Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Expressions

Flag expressions gate jumps, choice visibility, and command when. Evaluated with flag names as identifiers. Use &&, ||, ! — not and / or / not.

{ "type": "jump_if", "cases": [{ "expr": "score > 5", "to": "good" }], "else": "bad" }
[if helped -> thank_you]
> Secret. -> vault

(with item rules.show_if: "has_key")

Usually you need

SurfaceShape
Choice visibilityrules.show_if / rules.disable_if
Branchnext_if[] or [if expr -> target]
Command skip"when": "expr" on any command (JSON / Mode B) — Command flow
Flag math"score": "= score + 1" in set / set_flag

Where expressions appear

SurfaceShape
set / set_flag.valuesLiteral, or string "= score + 1"
next_if[]{ "expr", "then" } — first truthy wins, else next
jump_if.cases[]{ "expr", "to" } + optional else
Choice rules.show_if / disable_ifexpr string
Command whenexpr string; no script sugar
Screen / block show_ifsame grammar

Truthiness

ValueResult
nullfalse
numberfalse only if 0
string "false" / "0" / ""false
string "true" / "1" / other non-emptytrue