[PR #8004] [MERGED] Experience features 1/4: story clocks and actions, creature packs, music, people and companions (Capability API 1.342-1.350) #8053

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8004
Author: @kolacheee
Created: 10/21/2026
Status: ✅ Merged
Merged: 10/21/2026
Merged by: @kolacheee

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


📝 Commits (10+)

  • c1f0321 Experience features 1/4: story clocks and actions, creature packs, music, people and companions (Capability API 1.342-1.350)
  • f291a7e Merge remote-tracking branch 'origin/staging' into exp-part1-merged
  • 9ad1bd2 Keep English locale keys sorted
  • 40ce2d7 Merge remote-tracking branch 'origin/staging' into exp-part1-merged
  • b87cb77 Experience part 1: story shape lists knowledge, clock rows read once, people looked up by id
  • a2d5f60 Merge remote-tracking branch 'origin/staging' into exp-part1-merged
  • 9536359 Experience part 1: a new turn keeps the story's music cue until it has read its own
  • 993f7cd Merge remote-tracking branch 'origin/staging' into exp-part1-merged
  • bf54ba7 Answer the review: map pack minors, music hand-off, kept ending close, logged people reads, readable creature ids
  • 2c1ceac Refuse story fight creatures the ruleset lacks; cover the music hand-off and kept ending close

📊 Changes

35 files changed (+5066 additions, -1279 deletions)

View changed files

📝 docs/development/optional-agent-packages.md (+129 -0)
📝 docs/extending/writing-story-scripts.md (+129 -15)
📝 docs/game/party-and-npcs.md (+2 -0)
📝 packages/client/src/components/game/CreatureArt.tsx (+26 -1)
📝 packages/client/src/components/game/GameJournal.tsx (+20 -0)
📝 packages/client/src/components/game/GameSurface.tsx (+1336 -1177)
📝 packages/client/src/components/game/RulesetCombatBoard.tsx (+7 -8)
➕ packages/client/src/components/game/StoryClockDial.tsx (+92 -0)
📝 packages/client/src/components/game/TacticalCombatUI.tsx (+7 -8)
📝 packages/client/src/hooks/use-overworld-view.ts (+21 -3)
📝 packages/client/src/lib/game-audio.ts (+34 -3)
📝 packages/client/src/localization/locales/en.json (+6 -0)
📝 packages/server/src/routes/encounter.routes.ts (+28 -0)
📝 packages/server/src/routes/game.routes.ts (+132 -13)
📝 packages/server/src/routes/generate.routes.ts (+45 -2)
📝 packages/server/src/services/capability-packages/package-manager.service.ts (+60 -3)
➕ packages/server/src/services/game/experience-companions.service.ts (+138 -0)
📝 packages/server/src/services/game/made-battlefield.service.ts (+8 -0)
📝 packages/server/src/services/game/map-pack.service.ts (+337 -6)
➕ packages/server/src/services/game/story-fight.service.ts (+110 -0)

...and 15 more files

📄 Description

Linked issue

Part of #7996 (1 of 4). The later parts open as this one merges, because each takes the next Capability numbers.

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 or people.

What changed

Story tools and Experience content (Capability API 1.342-1.350, each declared by the map pack that uses it):

  • 1.342: story clocks the player watches fill in the HUD and World tab; the Game Master is told once when one fills.
  • 1.343: story actions that give an item, start one of the script's fights on a painted board, move the party, or end the game with one of the script's endings.
  • 1.344, 1.345: an Experience's map pack can ship creature packs (its fights draw from them first) and music (by place, elsewhere and in fights, plus a story music action). Package assets may be audio.
  • 1.346, 1.347: an Experience's people, with portraits, expressions, walking looks, how they speak and lore; some can be companions with a build per ruleset, recruited and dismissed by the story, joining with their sheet.
  • 1.348: what people know: flag-gated knowledge entries told to the Game Master when their person is in the scene or a key is said.
  • 1.349: story triggers on a rest, travel and idle time, event priority, party conditions, and 256 events.
  • 1.350: a whole map pack can be checked before export (POST /api/game/experience/check).

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 and the full pnpm regression (963 of 963) pass locally on this part alone, merged with current staging.
  • New regressions for each minor: world-story-actions, world-story-companion-scenes, world-experience-people, and the lifecycle table.
  • The game-world-story e2e caught a real bug, fixed here: the story clock query shared the World tab's cache entry, so the World tab kept spinning.
  • 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/game/party-and-npcs.md.

UI evidence (if applicable)

Story clocks are covered by e2e/game-world-story.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/8004 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 10/21/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `claude/project-thread-iwmrlb-part1` --- ### 📝 Commits (10+) - [`c1f0321`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c1f03214b1eb21169685357c666af0f4d3cb8a35) Experience features 1/4: story clocks and actions, creature packs, music, people and companions (Capability API 1.342-1.350) - [`f291a7e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f291a7eeae7e6bf75c7737485960c7f561fe3964) Merge remote-tracking branch 'origin/staging' into exp-part1-merged - [`9ad1bd2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9ad1bd208eaa2e06e7349e8a8f64590f288e8a45) Keep English locale keys sorted - [`40ce2d7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/40ce2d71f4b24176da25ff6444d74a91ab23660a) Merge remote-tracking branch 'origin/staging' into exp-part1-merged - [`b87cb77`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b87cb7714e2bb27bcc23b30bd32167ce942833d7) Experience part 1: story shape lists knowledge, clock rows read once, people looked up by id - [`a2d5f60`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a2d5f603cc9b70ea1c3506aa806c1eacb4f2ec91) Merge remote-tracking branch 'origin/staging' into exp-part1-merged - [`9536359`](https://github.com/Pasta-Devs/Marinara-Engine/commit/953635962f07cf3c0d90011255150d79f6e03503) Experience part 1: a new turn keeps the story's music cue until it has read its own - [`993f7cd`](https://github.com/Pasta-Devs/Marinara-Engine/commit/993f7cd8558e0f7aa995bf369d5e14099eca9c59) Merge remote-tracking branch 'origin/staging' into exp-part1-merged - [`bf54ba7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/bf54ba7fe44228cd17094121c090857339bdcb1e) Answer the review: map pack minors, music hand-off, kept ending close, logged people reads, readable creature ids - [`2c1ceac`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2c1ceac27f5d624f441806616c3176c14caa271c) Refuse story fight creatures the ruleset lacks; cover the music hand-off and kept ending close ### 📊 Changes **35 files changed** (+5066 additions, -1279 deletions) <details> <summary>View changed files</summary> 📝 `docs/development/optional-agent-packages.md` (+129 -0) 📝 `docs/extending/writing-story-scripts.md` (+129 -15) 📝 `docs/game/party-and-npcs.md` (+2 -0) 📝 `packages/client/src/components/game/CreatureArt.tsx` (+26 -1) 📝 `packages/client/src/components/game/GameJournal.tsx` (+20 -0) 📝 `packages/client/src/components/game/GameSurface.tsx` (+1336 -1177) 📝 `packages/client/src/components/game/RulesetCombatBoard.tsx` (+7 -8) ➕ `packages/client/src/components/game/StoryClockDial.tsx` (+92 -0) 📝 `packages/client/src/components/game/TacticalCombatUI.tsx` (+7 -8) 📝 `packages/client/src/hooks/use-overworld-view.ts` (+21 -3) 📝 `packages/client/src/lib/game-audio.ts` (+34 -3) 📝 `packages/client/src/localization/locales/en.json` (+6 -0) 📝 `packages/server/src/routes/encounter.routes.ts` (+28 -0) 📝 `packages/server/src/routes/game.routes.ts` (+132 -13) 📝 `packages/server/src/routes/generate.routes.ts` (+45 -2) 📝 `packages/server/src/services/capability-packages/package-manager.service.ts` (+60 -3) ➕ `packages/server/src/services/game/experience-companions.service.ts` (+138 -0) 📝 `packages/server/src/services/game/made-battlefield.service.ts` (+8 -0) 📝 `packages/server/src/services/game/map-pack.service.ts` (+337 -6) ➕ `packages/server/src/services/game/story-fight.service.ts` (+110 -0) _...and 15 more files_ </details> ### 📄 Description ## Linked issue Part of #7996 (1 of 4). The later parts open as this one merges, because each takes the next Capability numbers. ## 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 or people. ## What changed Story tools and Experience content (Capability API 1.342-1.350, each declared by the map pack that uses it): - 1.342: story clocks the player watches fill in the HUD and World tab; the Game Master is told once when one fills. - 1.343: story actions that give an item, start one of the script's fights on a painted board, move the party, or end the game with one of the script's endings. - 1.344, 1.345: an Experience's map pack can ship creature packs (its fights draw from them first) and music (by place, elsewhere and in fights, plus a story `music` action). Package assets may be audio. - 1.346, 1.347: an Experience's people, with portraits, expressions, walking looks, how they speak and lore; some can be companions with a build per ruleset, recruited and dismissed by the story, joining with their sheet. - 1.348: what people know: flag-gated knowledge entries told to the Game Master when their person is in the scene or a key is said. - 1.349: story triggers on a rest, travel and idle time, event priority, party conditions, and 256 events. - 1.350: a whole map pack can be checked before export (`POST /api/game/experience/check`). 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` and the full `pnpm regression` (963 of 963) pass locally on this part alone, merged with current staging. - New regressions for each minor: `world-story-actions`, `world-story-companion-scenes`, `world-experience-people`, and the lifecycle table. - The `game-world-story` e2e caught a real bug, fixed here: the story clock query shared the World tab's cache entry, so the World tab kept spinning. - 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/game/party-and-npcs.md`. ## UI evidence (if applicable) Story clocks are covered by `e2e/game-world-story.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:10:00 +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#8053
No description provided.