Resource Connections

9 min read

Resource connections move resources between nodes. Set the formula to control how many move, then use interval, transfer and limits when the timing or amount needs more control.

A Source named Node A sending 10 Coins per Step to a Pool named Node B along a connection labeled 10 Coins: after five Steps Node B holds 50.A Source named Node A sending 10 Coins per Step to a Pool named Node B along a connection labeled 10 Coins: after five Steps Node B holds 50.

Transfer formulas should produce whole, non-negative resource counts. The available resources, destination rules and connection limits can reduce the amount that actually moves.

Properties

Select a Resource Connection to adjust it in the Properties panel on the right: its label and note, Type and value, Allow decimals, Interval, Transfer, Resource filter, Limits and Lever. Color and line width are on the floating toolbar that appears above a selected connection.

A connection's label is the handle of its line: drag the label to reshape the line, or hold Cmd (Ctrl on Windows) while dragging to slide the label along the line. Lines stay automatic until you shape them.

The label sits on the line clear of both ends. When a connection has both a name and a formula, the label shows both, shortened with an ellipsis if they are long; hover over it to read the full text. A connection marked as a Lever that has no name of its own is named after the two components it joins, for example “Wood → Houses”.

The sections below explain the properties specific to resource connections.

Resource Connection properties panel with the Behavior summary, the Lever switch, a Type menu set to Number, a value, Allow decimals, Interval, a Flow or Instant Transfer switch, a Resource filter, Shuffle resource types and Limits.Resource Connection properties panel with the Behavior summary, the Lever switch, a Type menu set to Number, a value, Allow decimals, Interval, a Flow or Instant Transfer switch, a Resource filter, Shuffle resource types and Limits.

Label and description

Click Add a label to name the connection, and Add a note for a longer description. This will make it easier to identify the purpose of the connection as well as specific properties you might set. It is also good practice and will make your diagram more accessible to others.

Top of the Resource Connection properties panel with the Add a label and Add a note lines.Top of the Resource Connection properties panel with the Add a label and Add a note lines.

Formula type and value

Resource Connections can transfer Resources at different rates and with different representations. The Type menu at the top of the panel lists number, chance, dice roll and formula for a connection that leaves a Source. A connection that leaves a Pool also offers all, and the outputs of a Gate offer Chance on a random Gate, Weights on a deterministic Gate, and Enable while on both. Here is how and when to use each one:

The Type menu of a Resource Connection that leaves a Source, in the Properties panel: Number, Chance, Dice roll and Formula.The Type menu of a Resource Connection that leaves a Source, in the Properties panel: Number, Chance, Dice roll and Formula.
The Type menu of a Resource Connection that leaves a Pool, with the choices Number, All, Dice roll and Formula.The Type menu of a Resource Connection that leaves a Pool, with the choices Number, All, Dice roll and Formula.
The Type menu of a Resource Connection that leaves a Pool

Number type

  • This is the go-to Type for resource connections as this value represents the number of resource tokens used in the transfer. Below the value, the Allow decimals checkbox decides what happens to a fraction: when it is on, the fraction is transferred as it is, and when it is off, it is rounded to a whole number. This type should be used when modeling transfers with deterministic values (static or dynamically adjusted using Modifier state connections).
The Type menu of a Resource Connection set to number, with the value 3 in the box below and the Allow decimals checkbox.The Type menu of a Resource Connection set to number, with the value 3 in the box below and the Allow decimals checkbox.

Chance type

  • Chance moves resources with a probability. The first box holds the chance, from 0 to 100 %, and the second box holds how many resources move when the chance succeeds (1 by default). On the outputs of a random Gate, the chance is the share of that output.
The Type menu of a Resource Connection set to chance, with the chance percentage and a second value box.The Type menu of a Resource Connection set to chance, with the chance percentage and a second value box.
Chance type screenshot
  • The chance cannot be above 100%. A connection set to a higher value, such as 140%, is disabled: it is grayed out on the canvas and moves nothing during a Play. To move more than one resource when the chance succeeds, type the number in the second box: a chance of 50% with 3 in the second box moves 3 resources about every second Step, as in the recording below.
Two Sources with a chance connection each: the top one is 50% for 1 Resource and the bottom one 50% for 3, so the bottom Pool grows about three times as fast (5 against 12 here).Two Sources with a chance connection each: the top one is 50% for 1 Resource and the bottom one 50% for 3, so the bottom Pool grows about three times as fast (5 against 12 here).

All type

  • Using the “all” type will ensure that, during a Play step, all available resources from the input are transferred to the output of the resource connection. Pools are the only compatible input node for an “all” connection since they require a quantifiable number of resources. Use this formula type when you want to transfer all the contents from pool A to pool B, or when targeting a Sink or delay
The Type menu of a Resource Connection set to all, with no value box below it.The Type menu of a Resource Connection set to all, with no value box below it.

Dice roll type

  • The Dice Roll formula type should be applied when the diagram requires random values on resource transfers. The first box of this type holds the number of dice you would like to roll, and the second one (after the “D”) holds the number of dice sides. As such, if you type 2D6, the formula will roll 2 dice with 6 faces, outputting a random integer value between 2 and 12. It is important to note that since this formula follows real-life random distributions, 2d6 is not equal to d12. For the d12 formula, the distribution of values is equal, while for 2d6 rolling 12 is 3 times more unlikely than rolling a 7 (the most probable outcome)
The Type menu of a Resource Connection set to dice roll, with 3 dice in the first box and 6 sides in the second box.The Type menu of a Resource Connection set to dice roll, with 3 dice in the first box and 6 sides in the second box.
Tip

Dice Roll formula type will produce a new random value at the start of each Play step.

Formula type

The formula type is the jack of all trades since you can construct more advanced operations while also using the rest of the options. Additionally, this type is preferred (but not required) when typing Parameters (called Custom Variables in older guides) names and functions from the math.js library. We recommend using this type when performing basic operations or when adding specific math.js formulas such as randomInt(). Additionally, this formula type works well combined with a dice roll: if you type 10+ D6 the formula will output a random value in the interval [11,16].

The Type menu of a Resource Connection set to formula, with the formula 10 + D6 in the box below.The Type menu of a Resource Connection set to formula, with the formula 10 + D6 in the box below.

Weights type (gate only)

  • The Weights type is offered only when the origin node of the connection is a Gate whose Distribution is set to deterministic. A weight is written as a plain number such as 40, as a fraction such as 0.4, or as a percentage such as 40%, and it represents how likely each gate outcome is to be selected. If all gate outputs have the same weights, the distribution on the outcomes will be equal. If a gate has 2 outputs, one with 1 weight and the second one with 3 weights, the second output will be selected 3 times more often. Read more about this type on our Weighted gates documentation page.
The Type menu of a deterministic Gate output set to Weights, with the weight 3 in the box below. A random Gate offers Chance in its place; both offer Enable while.The Type menu of a deterministic Gate output set to Weights, with the weight 3 in the box below. A random Gate offers Chance in its place; both offer Enable while.

Enable while (gate only)

  • Enable while is offered on the outputs of both random and deterministic Gates. Pick a comparison in the Formula menu (greater than, greater or equal, less than, less or equal, equal, not equal or between) and enter the value to compare against. The transfer on the connection is commanded by the number of the Step. If you would like to activate a specific output only when Play reaches step x, an Enable while output on a Gate should be used. Once the gate is activated, it will count how many triggers it received and will activate paths where the number of steps matches the comparison you set. As such, if you have 2 outputs where the comparison is greater than 6, the gate will output resources on both outputs after 6 triggers. Read more about this type on our Conditional gates documentation page
The Type and Formula fields of a Gate output connection: Type Enable while, Formula Greater than, and the value 3.The Type and Formula fields of a Gate output connection: Type Enable while, Formula Greater than, and the value 3.

More about formula types

We recommend taking a look at our Formulas article to learn more about all the possible ConnectionTypes.

Warning

Resource Connection will blink with an orange highlight if there are not enough Resources to be transferred or if the Resources available can’t be accepted by the Target.

A Source named Generate sending 10 Coins per Step into a Pool named Capacity 15: after five Steps the Pool holds 15 and stays there.A Source named Generate sending 10 Coins per Step into a Pool named Capacity 15: after five Steps the Pool holds 15 and stays there.

Note

Resources are whole tokens, unless you allow decimals.

The Allow decimals checkbox of a connection transfers fractions as they are, instead of rounding them to whole numbers. To keep whole tokens while modeling fractions, you can express your game’s Resources in sub-units so that

1 sub-unit = 1 Resource

An analogy for this would be working with the amount in ¢ (cents) instead of the amount in $ (dollars). To work with transferring 3.14 Resources, you’d need to multiply the whole flow by 100, resulting in 314 Resources.

A second solution to this representation would be to simply use the round() formula to remove the fractional part, if the decimal accuracy of the result is not needed in the system.

Interval

The Interval determines the number of Steps between transfers. If you want a Node in your diagram to be activated less than every Step, intervals are your best friend.

You can use this if your model requires transferring Resources every “x” Steps. E.g.: Formula = 1; Interval = 3 means 1 Resource is transferred every 3 Steps.

Please look at our Interval article to find out more.

Transfer timing: interval or instant

The Transfer switch of a Resource Connection has two options, Flow (the default) and Instant. Hover over either one and the app explains it.

The Transfer switch of a Resource Connection with Flow selected and Instant next to it.The Transfer switch of a Resource Connection with Flow selected and Instant next to it.

Flow: moves resources one by one during the Step, each as its own token. If more Resources are being transferred between 2 Nodes, each will be treated as an individual entity.

Instant: moves all resources at the start of the Step. Forecasts always do this.

Note

A Forecast always moves resources instantly, whichever option a connection has.

Filtering custom resources

Custom resources serve as defined properties that transform complex economic and gameplay concepts into quantifiable visual tokens. By assigning specific names and icons to nodes, you can intuitively track everything from manufacturing materials to player stats using distinct, real-time visual counterparts.

The Resource Filter option for Resource connections is a great tool when it comes to pools with multiple resource types stored simultaneously. As such, when you want to create a distribution system with multiple resource types, make sure that the Resource Filter is selected.

You can find out more about this in our Filter [Color coding] article.

Shuffle origin

Use the Shuffle resource types checkbox under the Resource filter in the Properties panel of a Resource Connection that leaves a Pool to randomize the transfer of differently colored Resources coming from the same origin Node.

The Resource filter menu of a Resource Connection set to None, with the Shuffle resource types checkbox below it.The Resource filter menu of a Resource Connection set to None, with the Shuffle resource types checkbox below it.

By default, Resources from multiple Sources are transferred according to the LIFO principle (last in, first out). When using Shuffle origin, Resources will be transferred randomly from their origin to the target Node.

To emphasize, in the example above, we used the Custom Resource Filter.

Limits

You can limit the amount of Resources being transported by typing a minimum, a maximum or both into the Limits boxes (min and max).

The Limits boxes of a Resource Connection, min and max, left empty so there is no limit.The Limits boxes of a Resource Connection, min and max, left empty so there is no limit.

In the example below, the Resource Connection is set to move 10 Resources from the Source to the Pool. However, due to its Limit being set to a maximum of 3, only 3 Resources will be moved.

Style properties

Select a connection and a floating toolbar appears above it. It sets the line color, the label’s font, font size, bold and alignment, and has an AI menu. None of these change the flow rate of a Resource Connection.

The floating toolbar of a selected connection: colour, line style, font, size, bold, alignment, label position and the AI menu.The floating toolbar of a selected connection: colour, line style, font, size, bold, alignment, label position and the AI menu.

Connection styles

Every connection you draw is a right-angled (orthogonal) line that bends around the nodes it joins. The older straight, curved and entity styles are no longer offered for new connections. There is no line-style picker: a line in an older diagram keeps the style it was drawn in.