Variables and Conditions
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Variables let a story remember things: how much a character trusts the reader, whether a key was found, which name the reader chose. Scenes can change variables, and conditions can decide which scenes and choice options appear.
Define a variable
Section titled “Define a variable”- In Story Map, open the Library.
- Select Add variable.
- Enter a name, choose the type (Number, True / false or Text), and set the starting value.
Every playthrough starts with the variables at their starting values.
Change a variable when a scene begins
Section titled “Change a variable when a scene begins”- Select the scene.
- In the Story Inspector, open Logic.
- Under When this scene begins, choose the variable and what happens to it: set to, increase by or decrease by a value.
The change happens as the scene starts, before its text and choices are shown.
Show a scene only under a condition
Section titled “Show a scene only under a condition”- Select the scene that should depend on the condition.
- Under Show this scene when, choose a variable, a comparison (equals, does not equal, is below, is at most, is above or is at least) and a value. Always removes the condition.
The condition applies to every connection that leads into this scene. What happens then depends on the card the connection comes from:
- From a Choice: the option leading to this scene only appears while the condition is true. Options without a condition always appear.
- From a Scene with several next scenes: the reader doesn’t choose. The story continues with the first next scene whose condition is true. A next scene without a condition acts as the default. Give all but one of the next scenes a condition, so there is always a way on.
Show a value in the text
Section titled “Show a value in the text”Write the variable’s name in square brackets, and Play Mode shows its current value:
Mara: You've earned my trust [trust] times now.A name that isn’t a variable stays as it is, and Markdown links such as [text](url) aren’t
affected.
Check the logic
Section titled “Check the logic”- In Play Mode, Vars shows every variable’s current value while you play. See Play Mode.
- In Linear view, Story path follows the route you pick through the story. The Inspector’s Effective scene state then shows the variables’ values at the selected scene.
- Story Health warns about variables that are used but never defined, and about scenes that branch without any condition.
More complex logic
Section titled “More complex logic”Calculations, several conditions combined with and and or, and loops that repeat a scene
while a condition holds are written as markup on the card. The Story Inspector keeps such
logic intact and shows it under Advanced. See
Story markup.
- Play Mode lets you try every path.