A Gate is a node that controls resource flow. Gates can be used to create random or deterministic distribution, or limit the number of resources passing through it.
Gates can have four different activation modes:
- Automatic Gates fire once every time step (or once every turn for Turn-Based Diagrams).
- Interactive Gates fire when a user activates it by clicking on it.
- Starting Gates fire once when a diagram starts running.
- Passive Gates only fire when triggered.
- In 'any' pull mode it will pull any available resources up to amount specified by its inputs, even when there are not enough.
- In 'all' pull mode it will only pull resources when the amount specified by its inputs is available.
The outputs of a gate are either probable outputs, conditinal outputs or color coded outputs:
- Conditional outputs have a Label that is an expression ("<2", "==3", ">=4", "!=0"), a range ("3-5") or is marked as "else". The condition is checked against the current value of the gate (see below) and all outputs which condition evaluates to true will receive a resource. If none of conditions evaluates as true the flow connections marked "else" will receive a resource. A Gate with conditional outputs can duplicate or destroy recources.
- Probable outputs have a Modifier that either represents the probability of the output being selected with a percentage ("40%") or a weight ("5"), probable outputs with no modifier have weight of 1. Normally 1 output is selected for each incoming resources, but when percentages are used, and the values do not add up to 100% the resource might be destroyed.
- Color coded outputs match the color of the output with the color of the resource.
A gate can have different ways to generate values conditional outputs or distribute among probable outputs. A gate can be:
- Deterministic, in which case it will count the resources passing through for conditional outputs (and reset each second), or spread out the recources evenly (as indicated b y their relative weights) for probable outputs.
- Random (Dice, Skill, Multiplayer or Strategy), in which case it will generate a random number according to the specified random setting of the diagram (see Diagram Settings) for conditional outputs. The generated value can be affected by input State Connections. When it has probable outputs a random output is selected based on their relative probability.
Gates As Event Generators
As of Machinations version 3.0, Gates can used to generate events. All output State Connections from a Gate act as Triggers. The outputs can still be conditional, probable or color-coded. The Gate itself can still be random or deterministic. These gates can 'convert' a resource into a trigger.
Version 2.0 "Limiter Gates" Are Obsolete
Machinations version 2.0 had a special gate type for "limiter gates". This type e are now replaced by a deterministic gate with conditional outputs, which can act in the same way (and other ways). This particular construction can still be called a limiter gate.