# 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
# 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
Access variables
In the side menu, click on "Variables".
Add a variable
Click on "Add a variable".
Name it
Choose a descriptive name without spaces (e.g.: health_points).
Choose the type
Numeric, Boolean or Text.
Set the default value
The initial value at the beginning of the story.
# Variable scope
In multiplayer mode, variables can be private or shared:
| Type | Description | Example |
|---|---|---|
| Private | Each player has their own value | player_inventory |
| Shared | Same value for all players | main_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
# 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)