[PR #7997] [CLOSED] feat(experiences): story tools, content packs, setup values and data-only Experience files #8048

Closed
opened 2026-10-24 04:09:56 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7997
Author: @kolacheee
Created: 10/21/2026
Status: ❌ Closed

Base: staging ← Head: claude/project-thread-iwmrlb


📝 Commits (10+)

  • 9c6a6ef Game Mode stories: clocks, and events that give, fight, move and end the game (Capability API 1.350, 1.351)
  • 354c2e6 Experiences: creature packs and music in a map pack (Capability API 1.352, 1.353)
  • dce743d Experiences: people and companions (Capability API 1.354, 1.355)
  • 7b0fbc0 Game Mode stories: what people know, and companions' scenes (Capability API 1.356, 1.357)
  • 8002c4f Experiences: check a whole map pack before export (Capability API 1.358)
  • 7091f02 Experience features: held seasons (Capability API 1.359)
  • 2340194 Experience features: flying creature art (Capability API 1.360)
  • 01c24c9 Experience features: 256 story flags (1.361), fliers in the air (1.362)
  • e38340c Experience features: ruleset overlays (Capability API 1.363)
  • 8f2f93d Experience features: fight variants by party size (Capability API 1.364)

📊 Changes

100 files changed (+14062 additions, -1456 deletions)

View changed files

📝 docs/development/optional-agent-packages.md (+330 -0)
📝 docs/extending/writing-creature-packs.md (+9 -1)
📝 docs/extending/writing-rulesets.md (+10 -0)
📝 docs/extending/writing-story-scripts.md (+296 -9)
📝 docs/game/party-and-npcs.md (+2 -0)
➕ e2e/game-experience-file-import.e2e.ts (+189 -0)
📝 packages/client/src/components/agents/AgentCatalogView.tsx (+1 -0)
📝 packages/client/src/components/game/CreatureArt.tsx (+46 -2)
📝 packages/client/src/components/game/DungeonMapView.tsx (+10 -4)
➕ packages/client/src/components/game/ExperienceFileImportModal.tsx (+178 -0)
📝 packages/client/src/components/game/GameJournal.tsx (+20 -0)
📝 packages/client/src/components/game/GameSetupWizard.tsx (+37 -2)
📝 packages/client/src/components/game/GameSurface.tsx (+1321 -1177)
📝 packages/client/src/components/game/NewGameExperienceChooser.tsx (+89 -3)
📝 packages/client/src/components/game/RulesetCombatBoard.tsx (+8 -8)
➕ packages/client/src/components/game/StoryClockDial.tsx (+76 -0)
📝 packages/client/src/components/game/TacticalCombatUI.tsx (+16 -9)
📝 packages/client/src/components/game/TownView.tsx (+9 -2)
📝 packages/client/src/components/game/WorldOverworld.tsx (+28 -10)
📝 packages/client/src/hooks/use-capability-packages.ts (+27 -1)

...and 80 more files

📄 Description

Linked issue

Closes #7996

Why this change

  • Story scripts can say where a game goes, but not much about what happens on the way: no visible countdowns, no fights or endings of their own, no people who know things, no companions that join with a sheet.
  • An Experience (a pre-built adventure picked when a game is created) could bring a world and a story, but not its own creatures, music, people, rule additions or GM setup.
  • Experiences were shared as package zips with a stub client.js, which is exactly what careful users are wary of: compressed contents they can't see, and code. Catalog rulesets had the same zip path.

What changed

Story tools (Capability API 1.342-1.371, each declared by the map pack that uses it):

  • Story clocks the player watches fill in the HUD and World tab; story actions that give an item, start one of the script's fights, move the party, end the game with an ending, play music, recruit or dismiss a companion, or put a sheet condition on the party.
  • What people know (flag-gated knowledge entries) and companions' own scenes; story triggers on a rest, travel, idle time, leaving a place and a named fight's outcome; event priority and any condition groups; 256 flags and 256 events.
  • Held seasons for places, exposures (what a place does to the party over time, with saves and shade), held death ("Held Ground") and its release, fight variants by party size (beyond six too), creature adjustments per fight, and items whose use spends a story number.

Content an Experience brings (in its map pack):

  • Creature packs (including flying art), music, people with portraits and walking looks, companions with a build per ruleset, hand-map image packs and words, and ruleset overlays that add catalog entries and sheet tracks on top of whatever ruleset the game uses without changing it.
  • A whole map pack can be checked before export (POST /api/game/experience/check).
  • Fliers in tactical fights start in the air, take off and land.

Setup and sharing:

  • 1.372: an Experience's GM setup values (setting, genre, tone, difficulty, goals and so on) fill the Game wizard when it is picked.
  • 1.373: Experiences are data-only (kind: ["experience"], no entrypoints or code) and are shared as one <id>.experience.json file. The new-game Experience chooser can import one, after a review screen showing its size, what it is made of and that it holds no code. Every picture must pass the same image check as character cards and match its extension, pictures and music are stripped of metadata, and data files must be valid JSON.
  • 1.373: an Experience is never installed from a package zip. A catalog Experience installs only from an .experience.json artifact, through the same reader and checks as an import. This removes the catalog zip path for map packs from #7473. Experiences already installed keep working. The official catalog lists none today.
  • 1.374: a catalog ruleset installs only from a .ruleset.json package file, read by the same reader as a player's ruleset import, never from a zip.

Experiences play on generated worlds, so they need Overworld games turned on (MARINARA_OVERWORLD_GAMES) like any story script. No CHANGELOG.md edit, per #7483.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • pnpm check passed. Full pnpm regression: 973 of 976 on the first run; the three failures were tests pinned to shapes this PR changes (the runtime host services check pinned the newest minor at 1.341, the combat screen lane needed a line for the new airborne lift event, and the zip reader lane reads the catalog install's zip opening), all fixed and passing.
  • New regressions for each minor: world-story-* (actions, companion scenes, exposures and their saves, fight adjust and variants, Held Ground, item costs, party size, precedence, reach, seasons, sheet actions), world-experience-* (people, rulesets, dungeon looks), game-creature-flying-art, game-ruleset-combat-airborne, experience-file-import, catalog-package-files, plus the lifecycle table.
  • E2E on desktop and mobile Chromium: game-experience-file-import, game-experience-setup, game-experience-startup, game-world-map-packs, game-world-story all pass. They caught a real bug, fixed here: the story clock query shared the World tab's cache entry, so the World tab kept spinning. game-experience-startup and the Tactical setup test each failed once under a parallel run and passed on every rerun alone (the Tactical one also passes on plain staging).
  • Not tried against a live model.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation): added to #7512
  • Version/release files updated (only if this PR includes a version bump)

Docs: docs/extending/writing-story-scripts.md, docs/development/optional-agent-packages.md, docs/extending/writing-creature-packs.md, docs/extending/writing-rulesets.md.

UI evidence (if applicable)

The Experience import review is covered by e2e/game-experience-file-import.e2e.ts; no screenshots attached.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/7997 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 10/21/2026 **Status:** ❌ Closed **Base:** `staging` ← **Head:** `claude/project-thread-iwmrlb` --- ### 📝 Commits (10+) - [`9c6a6ef`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9c6a6ef4574b4542ade2e691d030e3f389e24881) Game Mode stories: clocks, and events that give, fight, move and end the game (Capability API 1.350, 1.351) - [`354c2e6`](https://github.com/Pasta-Devs/Marinara-Engine/commit/354c2e6613d658cd97c02389afe579da8fd9fe61) Experiences: creature packs and music in a map pack (Capability API 1.352, 1.353) - [`dce743d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/dce743d7b9214309b6c775aae3a092b55960e97a) Experiences: people and companions (Capability API 1.354, 1.355) - [`7b0fbc0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7b0fbc066db63d35a610b4df235e51757e264246) Game Mode stories: what people know, and companions' scenes (Capability API 1.356, 1.357) - [`8002c4f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8002c4f088dfc427dfa849a2943e8bdb6684ddd1) Experiences: check a whole map pack before export (Capability API 1.358) - [`7091f02`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7091f0286b4542ade4334bc8878c27486f1a7e6f) Experience features: held seasons (Capability API 1.359) - [`2340194`](https://github.com/Pasta-Devs/Marinara-Engine/commit/234019489822e37c3b4e4492055b3a06782d2a24) Experience features: flying creature art (Capability API 1.360) - [`01c24c9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/01c24c98922a3f974783970aeeb71ca562caca94) Experience features: 256 story flags (1.361), fliers in the air (1.362) - [`e38340c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e38340c61aa755484cf8f5fa4d63543cff135194) Experience features: ruleset overlays (Capability API 1.363) - [`8f2f93d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8f2f93dff82d3e0b295847b1186a418e5134ecc7) Experience features: fight variants by party size (Capability API 1.364) ### 📊 Changes **100 files changed** (+14062 additions, -1456 deletions) <details> <summary>View changed files</summary> 📝 `docs/development/optional-agent-packages.md` (+330 -0) 📝 `docs/extending/writing-creature-packs.md` (+9 -1) 📝 `docs/extending/writing-rulesets.md` (+10 -0) 📝 `docs/extending/writing-story-scripts.md` (+296 -9) 📝 `docs/game/party-and-npcs.md` (+2 -0) ➕ `e2e/game-experience-file-import.e2e.ts` (+189 -0) 📝 `packages/client/src/components/agents/AgentCatalogView.tsx` (+1 -0) 📝 `packages/client/src/components/game/CreatureArt.tsx` (+46 -2) 📝 `packages/client/src/components/game/DungeonMapView.tsx` (+10 -4) ➕ `packages/client/src/components/game/ExperienceFileImportModal.tsx` (+178 -0) 📝 `packages/client/src/components/game/GameJournal.tsx` (+20 -0) 📝 `packages/client/src/components/game/GameSetupWizard.tsx` (+37 -2) 📝 `packages/client/src/components/game/GameSurface.tsx` (+1321 -1177) 📝 `packages/client/src/components/game/NewGameExperienceChooser.tsx` (+89 -3) 📝 `packages/client/src/components/game/RulesetCombatBoard.tsx` (+8 -8) ➕ `packages/client/src/components/game/StoryClockDial.tsx` (+76 -0) 📝 `packages/client/src/components/game/TacticalCombatUI.tsx` (+16 -9) 📝 `packages/client/src/components/game/TownView.tsx` (+9 -2) 📝 `packages/client/src/components/game/WorldOverworld.tsx` (+28 -10) 📝 `packages/client/src/hooks/use-capability-packages.ts` (+27 -1) _...and 80 more files_ </details> ### 📄 Description ## Linked issue Closes #7996 ## Why this change - Story scripts can say where a game goes, but not much about what happens on the way: no visible countdowns, no fights or endings of their own, no people who know things, no companions that join with a sheet. - An Experience (a pre-built adventure picked when a game is created) could bring a world and a story, but not its own creatures, music, people, rule additions or GM setup. - Experiences were shared as package zips with a stub `client.js`, which is exactly what careful users are wary of: compressed contents they can't see, and code. Catalog rulesets had the same zip path. ## What changed Story tools (Capability API 1.342-1.371, each declared by the map pack that uses it): - Story clocks the player watches fill in the HUD and World tab; story actions that give an item, start one of the script's fights, move the party, end the game with an ending, play music, recruit or dismiss a companion, or put a sheet condition on the party. - What people know (flag-gated knowledge entries) and companions' own scenes; story triggers on a rest, travel, idle time, leaving a place and a named fight's outcome; event priority and `any` condition groups; 256 flags and 256 events. - Held seasons for places, exposures (what a place does to the party over time, with saves and shade), held death ("Held Ground") and its release, fight variants by party size (beyond six too), creature adjustments per fight, and items whose use spends a story number. Content an Experience brings (in its map pack): - Creature packs (including flying art), music, people with portraits and walking looks, companions with a build per ruleset, hand-map image packs and words, and ruleset overlays that add catalog entries and sheet tracks on top of whatever ruleset the game uses without changing it. - A whole map pack can be checked before export (`POST /api/game/experience/check`). - Fliers in tactical fights start in the air, take off and land. Setup and sharing: - 1.372: an Experience's GM setup values (setting, genre, tone, difficulty, goals and so on) fill the Game wizard when it is picked. - 1.373: Experiences are data-only (`kind: ["experience"]`, no entrypoints or code) and are shared as one `<id>.experience.json` file. The new-game Experience chooser can import one, after a review screen showing its size, what it is made of and that it holds no code. Every picture must pass the same image check as character cards and match its extension, pictures and music are stripped of metadata, and data files must be valid JSON. - 1.373: an Experience is never installed from a package zip. A catalog Experience installs only from an `.experience.json` artifact, through the same reader and checks as an import. This removes the catalog zip path for map packs from #7473. Experiences already installed keep working. The official catalog lists none today. - 1.374: a catalog ruleset installs only from a `.ruleset.json` package file, read by the same reader as a player's ruleset import, never from a zip. Experiences play on generated worlds, so they need Overworld games turned on (`MARINARA_OVERWORLD_GAMES`) like any story script. No CHANGELOG.md edit, per #7483. ## Validation - [x] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - `pnpm check` passed. Full `pnpm regression`: 973 of 976 on the first run; the three failures were tests pinned to shapes this PR changes (the runtime host services check pinned the newest minor at 1.341, the combat screen lane needed a line for the new airborne `lift` event, and the zip reader lane reads the catalog install's zip opening), all fixed and passing. - New regressions for each minor: `world-story-*` (actions, companion scenes, exposures and their saves, fight adjust and variants, Held Ground, item costs, party size, precedence, reach, seasons, sheet actions), `world-experience-*` (people, rulesets, dungeon looks), `game-creature-flying-art`, `game-ruleset-combat-airborne`, `experience-file-import`, `catalog-package-files`, plus the lifecycle table. - E2E on desktop and mobile Chromium: `game-experience-file-import`, `game-experience-setup`, `game-experience-startup`, `game-world-map-packs`, `game-world-story` all pass. They caught a real bug, fixed here: the story clock query shared the World tab's cache entry, so the World tab kept spinning. `game-experience-startup` and the Tactical setup test each failed once under a parallel run and passed on every rerun alone (the Tactical one also passes on plain staging). - Not tried against a live model. ## Docs and release impact - [ ] No docs changes needed - [x] Updated docs (README / CONTRIBUTING / android/README) as needed - [x] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation): added to #7512 - [ ] Version/release files updated (only if this PR includes a version bump) Docs: `docs/extending/writing-story-scripts.md`, `docs/development/optional-agent-packages.md`, `docs/extending/writing-creature-packs.md`, `docs/extending/writing-rulesets.md`. ## UI evidence (if applicable) The Experience import review is covered by `e2e/game-experience-file-import.e2e.ts`; no screenshots attached. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-24 04:09:56 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#8048
No description provided.