Narratomidocs
State and logic

State and logic

How a Narratomi story remembers things, tests what it remembers, shows it to the player, and rolls dice.

A story that only moves forward needs no state. The moment you want a locked door to open because the reader picked up a key three scenes ago, you need four things: somewhere to keep the fact (a variable), a way to write it (a Set beat), a way to test it (a condition), and, optionally, a way to show it (the HUD).

Everything on these pages is declarative data that travels into the published bundle. The runtime is a pure state machine over one flat snapshot of variable values, so the same inputs always produce the same playthrough. That is also what makes seeded randomness possible: chance in Narratomi is one number carried in the snapshot, not a call to Math.random.

Where the panels are

Variables and HUD widgets are project-level configuration. Open the right dock, pick the Project tab, then the Variables or HUD sub-tab. Conditions have no panel of their own: the same condition editor appears wherever a gate can go, on a choice option, on an edge in the flow view, and on a HUD widget's visible when.

On this page