Several stories in one project
Lives in: game.json → stories
Early — not final UX. Multi-story packs are implemented (catalog, save
story_id, unlock /clear_flag,new_game:<id>). There is no polished shipped story-select / campaign UI — you wire a hub inscreens.jsonyourself. Labels, hub layout, and comfort flows may change.
Optional catalog of story packs in one project (episodes or separate stories). Omit the key for a single pack at story/ (id main).
"stories": [
{
"id": "main",
"title": "Episode 1",
"path": "story",
"start": "start",
"mode": "episode",
"unlock": { "always": true },
"clear_flag": "ep1_cleared"
},
{
"id": "ep2",
"path": "stories/ep2",
"mode": "episode",
"unlock": { "flag": "ep1_cleared" }
}
],
"session": {
"default_story": "main"
}
Usually you need
| Idea | How |
|---|---|
| One story | Omit stories — same as today |
| Hub menu (DIY) | screens.json screen whose button hook is "on_click": "new_game:ep2" |
| Lock episode 2 | "unlock": { "flag": "ep1_cleared" } + "clear_flag" on episode 1 |
| Slot labels | occupied_label: "Slot {n} — {story_title} — {node}" |
All pack keys
| Key | Type | Default | Effect |
|---|---|---|---|
id | string | required | Stable pack id (saved as story_id) |
path | string | "story" | Folder under the project root with script.txt and/or story.json |
start | string | "start" | Entry node id for New Game; if that id is missing, the first moment is used (Scenes and jumps) |
mode | string | "anthology" | episode or anthology |
title | string | "" | Display name (slot labels); fallback = id |
title_key | string | "" | Locale key for title when set |
unlock | object | {always:true} | { "always": true } or { "flag": "<name>" } (reads prefs.campaign) |
clear_flag | string | "" | On story end in episode mode, set this key true in prefs.campaign |
Session
| Key | Type | Default | Effect |
|---|---|---|---|
session.default_story | string | first pack / main | Pack for bare new_game and boot graph |
Actions / show_if
| Surface | Effect |
|---|---|
new_game | Start default_story |
new_game:<id> | Start that pack if unlocked |
continue / load_slot:N | Activate pack from the save’s story_id, then restore |
story_unlocked:<id> | True when unlock passes against prefs.campaign |
Saves
All packs share one slot list and one autosave (same early multi-slot surface). Each save stores story_id. Load grid tokens: {story}, {story_title} (plus {n}, {node}).
In development · Save, Back and story end · Screens · game.json map