Switches, variables and self switches
The memory of your game: what each kind is for and how to keep them tidy.
| Switch | ON or OFF, the same for the whole game. "Talked to the king", "Bridge repaired". |
| Variable | A number, the same for the whole game. Quest steps, counters, gold for a bet. |
| Self switch | A, B, C or D, ON or OFF, separately for each event. "This chest is open". |
When to use which
- Something only one event needs to remember, like an opened chest: self switch. You do not use up a global switch for every chest.
- Several events or maps need to know it: switch.
- A story with many steps: one variable per quest with values 0, 1, 2, 3 instead of a switch per step. Pages then check "variable is at least 2".
Keep them findable
- Name every switch and variable in the editor. "0012 Talked To King" beats "0012".
- Reserve ranges, for example 1 to 50 for the main story and 51 to 100 for side quests.
- A switch that is checked somewhere but never turned on is the most common reason a story gets stuck. Search for its use before you change it.