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

Adding direction to a script scene

Lives in: story/script.txt + story/story.json

Keep dialogue and flow in the script. Put precise staging in a direction entry with the same id.

Name the scene

:: park
HANA:
Watch the meter.
-> after

The :: park name is the link. Without a stable id, the direction file cannot find the moment.

Add a patch

story/story.json is a list of objects. Each object matches one script moment:

[
  {
    "id": "park",
    "commands": [
      {
        "type": "obj",
        "object": "meter",
        "instance_id": "score_meter",
        "show": true,
        "x": 16,
        "y": 16
      }
    ]
  }
]

How merge works

RuleEffect
Match by idDirection entry attaches to that script moment
Most fieldsDirection replaces what the script had
commandsDirection commands are appended after script brackets
Fields you omitScript values stay

So the line and HANA: stay in the script; the meter object is only in the direction file.

A worked meter / flag bind lives in the presentation examples under examples/ (search for story.json next to a script.txt).

When commands run

WhenWhere you put them
Start of the momentScript brackets, or commands in the direction entry
Middle of the textMid-line […] → {@cN} + flow_commands, or write those fields in direction / data
Leave the momentexit_commands / exit_delay — fade or cleanup on the way out

Everyday timing stays in the script: Pacing. Use direction when the mid-line or leave action is too heavy for a bracket. Batches and indexing: Command flow.

Choices and other overlays

You can also replace or flesh out choices, panel fields, auto, and similar on the matched id. Prefer replacing only what you must; leave speakers and text in the script when they are already clear.

Usually you need

WantDo
Extra staging on one beat{ "id": "…", "commands": [ … ] }
Keep script stage tooRely on append — do not duplicate every [bg]
Whole new textPut text in the direction entry (it replaces the script text)
Every command’s fieldsCommands

Next

Reacting to flags live · Commands