Connections

    Documentation

    Labels, Formulas, Intervals

    Labels, Formulas, Intervals

    success
    1. Labels are purely descriptive
    2. Formulas are used to set the flow or Resources
    3. Intervals, a special field for inputting the cadence of the flow of Resources

    Labels can be applied to Nodes and Connections and are purely descriptive. Use them to organizse your diagram and annotate components for better readability. They will also be listed in the exported Google Sheet, when you are using the functionality to Export to Google Drive.

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

    Formulas on Resource Connections dictate how Resources flow between Nodes.

    Here are the types of Formulas supported by Resource Connections:

    TypesFormatExamples
    flow ratex0; 2 ; 13; 0.5
    random flow rateDx; yDx; x%D6; 2D5; D3-D2; 20%; 50%
    multipliersx*y250%; 3D3
    all resourcesallall

    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:

    TypesFormatExamplesApplicable to
    modifiers+; -; +x; -x; +x%+; -; +2; -0.3; +5%; -2%value modifiers; node modifiers
    interval modifiers+xi; -xi+2i; -1ivalue modifiers
    probabilitiesx%; x20%; 3triggers after a gate
    conditions==x; !=x; >=x;==0; !=2; >=4;activators; triggers after a gate
    range (conditions)x..y2..5; 4..7activators; 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:

    1. Use “=” to overwrite Node values.
    2. 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.

    connections_intervals
    success

    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.

    info

    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.)

    You can combine conditions and math expressions in the same formula (both for registers and for custom variables). If you want the math expression to calculate only when the condition is true you can use the * operator to combine them.

    As you can see in the image above, you replace the “and” and “or” conditions using multiplication and addition, respectively.

    and(largerEq(a,100),smaller(a,200)) is the same as largerEq(a,100)*smaller(a,200) just shorter.

    Example 1:

    largerEq(a,2)*(c+4)

    In this case, (c+4) will only be calculated if a is larger than or equal to 2.
    Please note that this condition will return 1 if it is true and 0 if it is false. Therefore, if the condition is false, the math expression will be multiplied by 0, returning 0 as the result.

    Example 2:

    largerEq(a,100)*smaller(a,200) → It is true when a is larger than or equal to 100 and smaller than 200

    smaller(a,100)+larger(a,200) → It is true when a is smaller than 100 or larger than 200.

    Contents

    All Rights Reserved © Machinations S.àr.l

    8217, Mamer, Luxembourg, accounts at BGL BNP PARIBAS, VAT number: LU30464284

    We use cookies for marketing and analytics. We also share information about your use of our site with our marketing and analytics partners who may combine it with other information that you’ve provided to them. You consent to our cookies if you continue to use our site. Learn more