Skip to content

Tutorial 2: Who may start it

Nobody should poison a king who is already dead, and a child should not run a plot. In this lesson you give A cup for the king three rules. One says the target must be alive. One says the conspirator must be grown, and you keep that one in a requirement set so other schemes can share it. The first rule also counts while the scheme runs, so a king who dies in the middle ends the plot.

Open the finished scheme from Tutorial 1, or any scheme with a dialogue.

  1. Open the scheme and click empty canvas, so that nothing is selected. The Element Inspector shows the scheme’s settings.
  2. In Requirements, click Add requirement. A menu of conditions opens. Choose Actor, then Alive or Dead.

A requirement appears, named after its condition: Conspirator is alive. The name is set once and does not follow later changes. It has a Name, Conditions, a Reason and rows for timing. See Scheme settings.

  1. In the condition, set Actor to Target. Is is already Alive.
  2. Set Name to Target is alive.
  3. In Reason, write {target.Name} lies in the ground.

The Reason is what the player reads when the rule fails. Left empty, the player reads the name. Tokens work in it, so the king’s name is filled in. See Texts, tokens and pacing.

Open the row Counts and choose To start and while it runs. The row If it breaks appears under If not met:

Row Choose What it does
If it breaks Stop everything, then run its output Every flow stops, and then the output of the requirement runs.

A new requirement starts as To start, Refuse and show why and Stop everything, then run its output. You changed only Counts.

  1. Drag from empty canvas, or use the add menu, and add a When a Requirement Breaks node. It has no input.
  2. Look at its outputs. It should have one called Target is alive.
  3. Drag from that output and add Fail Scheme. It folds under the output.
When a Requirement Breaks
■ The scheme fails
    The node reacts for the requirement named like its output. The line under it is a folded Fail Scheme.

    Without this node, a requirement that stops everything ends the scheme with the result it had so far. Linking it lets you choose the ending. See When a Requirement Breaks.

    A rule that many schemes share belongs in a set.

    1. In the page menu, choose Requirement Sets. Click New. Name the set Schemer Is Grown and press Return.
    2. In Requirements, click Add requirement. Choose Actor, then Age.
    3. Actor is already Conspirator and Age Is is already ≥. Change Age from 18 to 16.
    4. Name the requirement Conspirator is of age. In Reason, write {conspirator.Name} is not yet of age.

    The line Reads as under the list says the set in words.

    1. Go back to the scheme and select nothing.
    2. In Requirements, click Use a set… and pick Schemer Is Grown.

    The new entry reads Uses: Schemer Is Grown (1 requirement). It has its own Counts and If not met. Leave them as they are. Save with Cmd+S (Ctrl+S on Windows). The idea behind sets is in Requirements.

    1. Open Requirement Sets and select your set. Open Try it. Pick an actor under 16 in For, and any actor in Against. The panel should list the requirement as not met, with your reason.
    2. Back on the scheme, click the arrow beside Run and choose Run with setup…. The line Can it start: should read ✓ yes for a grown conspirator, and ✕ with a reason for a young one.
    3. To test the requirement that counts while the scheme runs, drag from Start and add a Set State node. Set its Actor to Target. State is already Dead. It folds under Start, before the dialogue, and reads Target dies. Run the scheme.

    The Target is alive requirement should break before the dialogue opens, and the run should end in Failed. The test run works on a copy, so your king is still alive afterwards. Delete the Set State line when you are done. Edit > Undo also works.

    If you only need a scheme to end when its target dies, the scheme setting Ends if target is gone does it with no node. See Scheme settings. A requirement is for when you want to choose the ending. See Test run.