# What is a variable?

A variable is a value that can change during the story based on the reader's choices. It allows you to store information and create complex conditional branches.

Simple analogy

Think of variables as counters or switches that you can manipulate. "Has the player found the key?" or "How many gold coins does he have?"

# Variable types

Stores an integer or decimal number. Ideal for counters, scores and statistics.

  • Health points — From 100 to 0
  • Gold collected — Increases with findings
  • Reputation — Varies based on actions
  • Time remaining — Countdown

# Create a variable

1

Access variables

In the side menu, click on "Variables".

2

Add a variable

Click on "Add a variable".

3

Name it

Choose a descriptive name without spaces (e.g.: health_points).

4

Choose the type

Numeric, Boolean or Text.

5

Set the default value

The initial value at the beginning of the story.

# Variable scope

In multiplayer mode, variables can be private or shared:

TypeDescriptionExample
PrivateEach player has their own valueplayer_inventory
SharedSame value for all playersmain_door_open

# Modify a variable

You can modify variables from steps. In the "Variables" section of the step editor, several actions are available:

  • Increment — Adds a value (for numeric variables)
  • Decrement — Subtracts a value (for numeric variables)
  • Assign value — Sets a new value
  • Assign if default — Modifies only if the variable has not changed

# Use in text

You can insert a variable's value directly into your step text using the "Add variables" button in the editor.

Personalization

"Welcome, {{player_firstname}}! You have {{gold}} gold coins." Variables in curly braces will be replaced by their values.

# System variables

In addition to your custom variables, system variables are available:

  • FirstName — Reader's first name
  • LastName — Reader's last name
  • FullName — First name + Last name
  • Age — Reader's age
  • CurrentTime — Current time
  • PlayerFirstName:X — First name of player X (multiplayer)