Mode B = story/script.txt plus story/story.json. Script is primary; JSON overlays complex nodes. Mode C is JSON only (no script).
// story/story.json
[
{
"id": "park",
"commands": [
{ "type": "sprite", "id": "chair", "value": "chair", "layer": "bg_front" }
]
}
]
| Rule | Behavior |
| Match | Overlay id (or _ref) → script node id |
| Most keys | Overlay replaces the script value |
commands | Overlay commands are appended after script commands |
| Absent keys | Script values kept |
_ref is an alternative to id in an overlay entry when you prefer not to repeat the node id; it matches a script node the same way.
| Rule | Behavior |
| Match | By id or _ref |
| Override | All overlay keys replace script values |
| Exception | commands: appended to script commands |
text + {@phN} | Substitute from script line N before erase |
| Absent keys | Script kept (talking, etc.) |
| Locale | script_<locale>.txt / story_<locale>.json |
| Mode | Files |
| A | script.txt only |
| B | script.txt + story.json overlay |
| C | story.json only |