Zum Inhalt springen

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.

  1. In Story Map, open the Library.
  2. Select Add variable.
  3. 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.

  1. Select the scene.
  2. In the Story Inspector, open Logic.
  3. 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.

  1. Select the scene that should depend on the condition.
  2. 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.

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.

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

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.