# Connections

### Getting Started

### Examples

### Simulations

### Connections

### Advanced Nodes

### Nodes Properties

### Collaboration

### Accounts

### Unity Plugin (UP) & API

### Evolution

## Labels, Formulas, Intervals

- Labels are purely descriptive
- Formulas are used to set the flow or Resources
- Intervals, a special field for inputting the cadence of the flow of Resources

Labels are applied to Nodes and Connections and are purely descriptive – a way for you to annotate diagram components for readability.

Formulas are applied to Connections (or Registers). Depending on which type of Connections they are used, Formulas determine the rate at which Resources flow, or how the diagram’s State changes.

Formulas on Resource Connections dictate how Resources flow between Nodes.

Here are the types of Formulas supported by Resource Connections:

Types | Format | Examples |

flow rate | x | 0; 2 ; 13; 0.5 |

random flow rate | Dx; yDx; x% | D6; 2D5; D3-D2; 20%; 50% |

multipliers | x*y | 250%; 3D3 |

all resources | all | all |

Formulas attached to State Connections indicate the effects of state and state changes on other elements in the diagram.

Here are the Formulas types you can use, and to which types of State Connection they can be applied:

Types | Format | Examples | Applicable to |

modifiers | +; -; +x; -x; +x% | +; -; +2; -0.3; +5%; -2% | value modifiers; node modifiers |

interval modifiers | +xi; -xi | +2i; -1i | value modifiers |

probabilities | x%; x | 20%; 3 | triggers after a gate |

conditions | ==x; !=x; x; >=x; | ==0; !=2; >=4; | activators; triggers after a gate |

range (conditions) | x..y | 2..5; 4..7 | activators; triggers after a gate |

trigger maker | * | * | triggers |

trigger maker | ! | ! | revers triggers |

overwrite | = | = | value modifiers; node modifiers |

Use `=`

on a State Connection to overwrite the Formula on a State Connection or the value of a Node.

In the example above, you can experiment how changes in the input Nodes can overwrite the values of target Formulas or of target Nodes.

**Formula Modifier: **before hitting Play, the Formula on the Resource Connection between the Source and the Pool is 10. However, upon hitting Play, the Formula will be overwritten, and it will equal the value of the Modifier Pool.

**Node Modifier**: before hitting Play, there are 500 Resources in the Target Pool. After hitting Play, any change to the Interactive Register will be reflected in the number of Resources contained by the Target Pool.

**In short:**

- Use “=” to overwrite Node values.
- Use “+1” if the State Connection’s output Node needs to react to changes made by other inputs.

Here’s a diagram explaining the difference between the two operators:

**Note**: Click on the double-edged Drains to notice the difference in behaviour.

And a short video explaining this:

You may want a Node in your diagram to be activated less than every Step. Use Intervals to do this, as in the example below.

In the example above, the Source will produce 3 Resources every 2 Steps.

**You can use random flow rates with Intervals**.

The example above will produce between 1 and 6 Resources every 3 steps.

**Intervals can be random as well**.

The above setup produces 1 Resource every 3 to 6 steps.

Random Intervals can be a good way to keep the player’s attention on the game.

You can even use a production rate of D6|D6, which indicates between 1 and 6 Resources are produced every 1 to 6 steps.

**Intervals can also be modified dynamically**. Formula Modifiers that have an `i`

as a unit of their modification (for example, `+1i`

or `-3i`

) will change their target’s Interval.

In the example above, the Difficulty initially increases 1 Difficulty point every 2 Steps (1|2). By adding the Interactive Register with the Formula Modifier `+1i,`

we’re able to change the interval dynamically. Play around with the Interactive Register, to increase or decrease the interval at which Difficulty Points accumulate for our player. (Hint: watch the Steps count next to the Reset button to track changes.)

Powering top studios around the World

+350 Academic Institutions are already teaching Machinations