Variables and Flags
Stalker PDA stories don't have a separate "quest database" — all state is stored in the same inventory and parameters as regular game items. This is a deliberate simplification of the engine, and it's worth understanding before designing a long story with many branches.
Flags as progress markers
A flag is an arbitrary text string that the add action drops into the player's
inventory, and that condition (has / !has) later checks. A flag has no icon
and no weight — to the player, it's indistinguishable from a regular quest-log entry, if you name it well.
// "Accept the job" stage
"actions": { "add": ["sidorovich_job"] }
// A later stage checks progress
"transfers": [
{ "text": "How's the job going?", "stage": "stage_progress", "condition": { "has": ["sidorovich_job"] } }
]
// The stage that completes the job removes the flag
"actions": { "remove": ["sidorovich_job"], "add": ["job_reward"] }
Use clear, story-wide unique flag names (for example quest_sidorovich_started,
quest_sidorovich_done) — these are snapshot-like markers, not typed variables, so a typo in the name will
silently break a condition instead of throwing an error.
Numeric variables
Besides flags, there are built-in numeric variables money and xp, plus your own variables, which
you're free to introduce yourself — the engine stores them in the player's shared parameter map
(parametersMap) and compares them with the operators =, !=, <, <=, >, >= (see
conditions).
Numeric variables are handy where degree matters more than a plain fact: reputation with a specific character, a counter of "how many times the player lied," a trust level, resource-gathering progress, and so on.
"actions": { "add": ["Sidorovich_Trust:1"] }
"condition": { "Sidorovich_Trust>=": ["3"] }
Placeholders in Text
Separate from state flags/variables, there are text placeholders like @name, which the engine substitutes
into the text on the fly when it's shown to the player — they aren't stored as state, they just read the
current profile data. The full list is in
Stages and Dialogues.
How to design a story's state
- For "yes/no" progress (picked up / not picked up, met / not met) — use flags via
has/!has. - For "how much" (reputation, counters) — introduce your own numeric variable.
- Don't reuse the same flag name across different, unrelated stories — state is shared at the level of the player's inventory, not isolated per story.
- Don't forget to "clean up after yourself": if a flag was only needed to track a single step, remove it with
the
removeaction once that step is done — this makes debugging conditions on later stages much easier.