Skip to content

System Overview

Daisy edited this page Mar 26, 2024 · 4 revisions

Pool Variables

Each pool is outfitted with several standard variables that store different information about the pool for use in basic functions. They are all based on the player-specified string _varName set when using the createPool function.

The following list assumes that the pool has been created with a name of "name":

"name"

Stores the current value of the resource pool. Lower limit is always 0.

"name_limit"

Stores the maximum value able to be held in the resource pool. Player defined. Maximum 65,536 (2^16).

"name_frozen"

Stores the boolean frozen state of the pool. True when frozen, false when unfrozen. (See freezePool)

"name_RD_Array"

Stores the renew/decay ID number and rate array.

  • the renew/decay ID number is a number between 0 and 2:
    • 0 : Neither renew or decay
    • 1 : Renew
    • 2 : Decay
  • Rate array is an array in format: [_amount, _time]
    • _amount : the amount of supply to renew/decay
    • _time : the time in seconds to wait before renewing/decaying

"name_poolInit"

Set to true when createPool has executed successfully.

Functions and Variable & Event Locality

There are two options for variable and CBA event locality in this mod: Local and Public. They are selected through the use of the public or local functions.

Local functions may be identified by the appending of "Local" to the end of the public function. If "Local" is not present in a function name, it is a public function. (i.e. RPF_fnc_alterPool (public) becomes RPF_fnc_alterPoolLocal (local)).

Public Functions

  • Broadcasts variables over network to all machines
  • Raises CBA events on the server

Local Functions

  • Variables are not broadcast over the network to all machines
  • Raises CBA events on the local machine

Clone this wiki locally