Registers

Nodes that allow you to construct a function.

Use Registers to make simple calculations or use numeric values that come from player input.

Registers are represented as solid squares with a number indicating their current value.

In many ways, a Register acts just like a Pool that always displays its value as a number. A Register can be passive or interactive.

A passive Register has a value that is set by input State Connections. When a diagram is not running, this value is displayed as fx because it is not yet determined.

The input field for the passive Register formula supports any syntax in the math.js library.

An interactive Register has an initial value that you can set while designing the diagram. In addition, it has two buttons that allow the user to modify its value while the diagram is running. An interactive Register is the equivalent of a Pool connected to an interactive Source and an interactive Drain (See video below).

Registers do not collect resources like Pools do, so you should not connect Resource Connections to a Register.

Registers only account for Delta changes, not for the initial value.

For example, if the initial value of an Interactive Register is x and the Register itself influences the flow of Resources via a State Connection, the modification will only take effect after the initial value of the Register changes (for example to x-1).

Connect Node Modifier State Connections to Registers in the same way you can connect State Connections to a Pool.

Passive Registers allow you to perform more complex calculations.

Every State Connection you connect to a Register as an input is assigned a letter automatically. You can give the Register a formula that uses these letters to determine the value of the register.

In the example below, the 3 interactive Registers are used as variables in the formula for the passive register that affects the Resources flow from the Source to the Pool. The diagram in the video is played time step by time step to emphasise the state changes.

You can also use the Labels max and min to set a passive Register to the maximum or minimum value of its inputs.