[PR #1746] [MERGED] feat(gacha-forge): NPC voices, combat lines in every fight, expression portraits (1.24.6) #1948

Closed
opened 2026-11-07 16:38:14 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1746
Author: @SpicyMarinara
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/gacha-forge-voices


📝 Commits (2)

  • bf250d1 feat(gacha-forge): voice other characters and play combat lines in every fight
  • 9554d80 chore(gacha-forge): release 1.24.6

📊 Changes

25 files changed (+1567 additions, -150 deletions)

View changed files

➕ artifacts/gacha-forge-1.24.6.zip (+0 -0)
📝 catalog/catalog.json (+12 -12)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+12 -12)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+12 -12)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/gacha-forge/CHANGELOG.md (+5 -0)
📝 packages/gacha-forge/README.md (+7 -1)
📝 packages/gacha-forge/bundle-patches.json (+76 -0)
📝 packages/gacha-forge/client.js (+220 -35)
📝 packages/gacha-forge/docs/formation-combat.md (+3 -1)
📝 packages/gacha-forge/manifest.json (+9 -9)
📝 packages/gacha-forge/server.mjs (+85 -7)
📝 packages/gacha-forge/src/audio-client.mjs (+100 -5)
📝 packages/gacha-forge/src/audio-en.mjs (+20 -2)
📝 packages/gacha-forge/src/audio-settings.mjs (+1 -0)
📝 packages/gacha-forge/src/combat-voices-client.mjs (+95 -24)
📝 packages/gacha-forge/src/combat-voices-server.mjs (+9 -2)
📝 packages/gacha-forge/src/player-choices-server.mjs (+72 -2)

...and 5 more files

📄 Description

Linked issues

Closes #1742
Closes #1743

Why this change

Mari asked for three Gacha Forge story and combat improvements, shipped together as one release (1.24.6):

  1. Combat voice lines never played. Investigation found several gates that failed without telling the player:
    • Formation-only scoping, with the hint hidden in the in-world settings;
    • preparation starting only after a fight had begun;
    • only Engine-card units with an assigned voice being eligible, so the persona and model-invented units were skipped;
    • no notice when nobody could be voiced.
  2. NPCs and voiceless units were always silent. Mari asked for a toggle next to "Read character dialogue" that gives them voices.
  3. Expression portraits. Story portraits should follow each line's emotion (anger, fear, sadness, joy), with the normal image as neutral.

What changed

Voices (#1743)

  • "Voice other characters" toggle (World → Sources → Audio, right after "Read character dialogue", default off).
    • NPCs and units without an assigned voice get a voice from the Engine's Random NPC Voices lists ("Male NPC defaults" / "Female NPC defaults"), matched to gender. If both lists are empty, any voice of the current connection is used. Each name keeps the same voice for the whole world.
    • Gender comes from the scene writer in the same call, with no extra request, and the first known value is remembered per world. Units use identitySex.
    • Explicit assignments always win. The persona only ever uses its own assigned voice, and sent chat messages are still never read aloud (1.24.4).
  • Combat voice lines now play in Classic and Formation. Classic only gains killerId on death events, so kill lines can fire; its rules are unchanged.
    • Preparation starts when the battle screen loads.
    • The persona is included, with its own voice.
    • A free notice says when nobody in the team can be voiced.
  • Cost safety
    • Only paid work can show the paid-retry banner. A failed config or voice-list read never does.
    • Turning the toggle off mid-preparation stops further paid work.
    • The voice-list cache is keyed by connection, source and base URL.

Expression portraits (#1742)

  • "Expression portraits" toggle (World → Sources → Images, shown only with an image connection, default off).
    • Four expressions are painted per character look: the worn outfit, or the default portrait; for the persona, its Engine avatar.
    • Each is an edit of the current image, which is sent as the only reference, with a prompt that changes only the facial expression. Connections that cannot edit produce a redraw from that reference.
  • When. Painting runs in the background on the low-priority lane, only for characters who speak in a scene that is written, pre-forged or opened. It never blocks a scene.
  • One set per base image. Switching outfits back never pays twice, and redrawing a portrait or outfit prunes only its own set (gallery images are deleted after the document drops their refs).
  • Per line. The scene writer tags each dialogue or thought line with an optional expression in the same call. The story plate follows each line, including same-speaker changes, without flicker. Untagged lines and old scenes stay neutral.
  • Cost safety
    • A set is marked pending before the first paid image.
    • Every paid call re-checks the toggle and connection, the module is disposed with the package, and a set another instance has taken over is never paid for.
    • A set left pending by a crash or reload is never repainted automatically. Turning the toggle off and on allows one more attempt for the missing faces.

Release

  • Gacha Forge 1.24.6: manifest, one ledger entry per bundle (pure append), rebuilt bundles, catalog lanes, What's-new and CHANGELOG.

Validation

  • npm run check: passed.
  • All tests/gacha-forge-*.regression.mjs pass on each half.
  • Catalog lanes, package locales and the release-notes regression: passed.
  • validate-catalog.mjs was run in CI only: the local checkout is sparse and has no old artifacts.
  • Independent review: each half went through adversarial review and fix rounds. The remaining findings were fixed with regressions:
    • voices: 2 rounds;
    • expressions: 2 rounds, plus two final dispose-timing guards.
  • Combined check: an interaction check of the combined build runs alongside CI. It covers:
    • one prompt carrying both tags;
    • the normalizer and cast keeping gender and expression together;
    • an expression swap not replaying speech;
    • the four toggle combinations.
  • The browser e2e additions run in CI; Playwright was not run locally.

The PR opens with the voices half (on top of staging 1.24.5). The expression-portrait commits are being pushed into this PR right after the combined build, so CI and Dottore will run again on the full 1.24.6.

Manual verification

  • Turn on Voice other characters, pick Male/Female NPC defaults in Engine Connections → Text to Speech, and play a scene with an NPC. Confirm the NPC speaks, keeps the same voice in later scenes, and that your own sent chat messages stay silent.
  • With Combat voice lines on, start a Classic fight and a Formation fight with voiced characters. Confirm death, kill and Ultimate lines play, and that the "nobody can be voiced" notice appears for a team with no voices.
  • Turn on Expression portraits (Images) with an image connection, play a scene, and confirm portraits change with angry, afraid, sad or happy lines once the faces are painted, and that the normal portrait shows for calm lines.
  • Change a character's outfit and confirm their expressions follow the new outfit after it is painted.
  • Confirm the in-game What's-new shows 1.24.6.

🤖 Generated with Claude Code


🔄 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-Agents/pull/1746 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/gacha-forge-voices` --- ### 📝 Commits (2) - [`bf250d1`](https://github.com/Pasta-Devs/Marinara-Agents/commit/bf250d1206f365c35b148af62beeb5a9fba7b440) feat(gacha-forge): voice other characters and play combat lines in every fight - [`9554d80`](https://github.com/Pasta-Devs/Marinara-Agents/commit/9554d80c1741155433fb88b92bdf344d062cd7ea) chore(gacha-forge): release 1.24.6 ### 📊 Changes **25 files changed** (+1567 additions, -150 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/gacha-forge-1.24.6.zip` (+0 -0) 📝 `catalog/catalog.json` (+12 -12) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+12 -12) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+12 -12) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/gacha-forge/CHANGELOG.md` (+5 -0) 📝 `packages/gacha-forge/README.md` (+7 -1) 📝 `packages/gacha-forge/bundle-patches.json` (+76 -0) 📝 `packages/gacha-forge/client.js` (+220 -35) 📝 `packages/gacha-forge/docs/formation-combat.md` (+3 -1) 📝 `packages/gacha-forge/manifest.json` (+9 -9) 📝 `packages/gacha-forge/server.mjs` (+85 -7) 📝 `packages/gacha-forge/src/audio-client.mjs` (+100 -5) 📝 `packages/gacha-forge/src/audio-en.mjs` (+20 -2) 📝 `packages/gacha-forge/src/audio-settings.mjs` (+1 -0) 📝 `packages/gacha-forge/src/combat-voices-client.mjs` (+95 -24) 📝 `packages/gacha-forge/src/combat-voices-server.mjs` (+9 -2) 📝 `packages/gacha-forge/src/player-choices-server.mjs` (+72 -2) _...and 5 more files_ </details> ### 📄 Description ## Linked issues Closes #1742 Closes #1743 ## Why this change Mari asked for three Gacha Forge story and combat improvements, shipped together as one release (1.24.6): 1. **Combat voice lines never played.** Investigation found several gates that failed without telling the player: - Formation-only scoping, with the hint hidden in the in-world settings; - preparation starting only after a fight had begun; - only Engine-card units with an assigned voice being eligible, so the persona and model-invented units were skipped; - no notice when nobody could be voiced. 2. **NPCs and voiceless units were always silent.** Mari asked for a toggle next to "Read character dialogue" that gives them voices. 3. **Expression portraits.** Story portraits should follow each line's emotion (anger, fear, sadness, joy), with the normal image as neutral. ## What changed ### Voices (#1743) - **"Voice other characters" toggle** (World → Sources → Audio, right after "Read character dialogue", default off). - NPCs and units without an assigned voice get a voice from the Engine's Random NPC Voices lists ("Male NPC defaults" / "Female NPC defaults"), matched to gender. If both lists are empty, any voice of the current connection is used. Each name keeps the same voice for the whole world. - Gender comes from the scene writer in the same call, with no extra request, and the first known value is remembered per world. Units use `identitySex`. - Explicit assignments always win. The persona only ever uses its own assigned voice, and sent chat messages are still never read aloud (1.24.4). - **Combat voice lines** now play in **Classic and Formation**. Classic only gains `killerId` on death events, so kill lines can fire; its rules are unchanged. - Preparation starts when the battle screen loads. - The persona is included, with its own voice. - A free notice says when nobody in the team can be voiced. - **Cost safety** - Only paid work can show the paid-retry banner. A failed config or voice-list read never does. - Turning the toggle off mid-preparation stops further paid work. - The voice-list cache is keyed by connection, source and base URL. ### Expression portraits (#1742) - **"Expression portraits" toggle** (World → Sources → Images, shown only with an image connection, default off). - Four expressions are painted per character look: the worn outfit, or the default portrait; for the persona, its Engine avatar. - Each is an edit of the current image, which is sent as the only reference, with a prompt that changes only the facial expression. Connections that cannot edit produce a redraw from that reference. - **When.** Painting runs in the background on the low-priority lane, only for characters who speak in a scene that is written, pre-forged or opened. It never blocks a scene. - **One set per base image.** Switching outfits back never pays twice, and redrawing a portrait or outfit prunes only its own set (gallery images are deleted after the document drops their refs). - **Per line.** The scene writer tags each dialogue or thought line with an optional `expression` in the same call. The story plate follows each line, including same-speaker changes, without flicker. Untagged lines and old scenes stay neutral. - **Cost safety** - A set is marked pending before the first paid image. - Every paid call re-checks the toggle and connection, the module is disposed with the package, and a set another instance has taken over is never paid for. - A set left pending by a crash or reload is never repainted automatically. Turning the toggle off and on allows one more attempt for the missing faces. ### Release - Gacha Forge 1.24.6: manifest, one ledger entry per bundle (pure append), rebuilt bundles, catalog lanes, What's-new and CHANGELOG. ## Validation - `npm run check`: passed. - All `tests/gacha-forge-*.regression.mjs` pass on each half. - Catalog lanes, package locales and the release-notes regression: passed. - `validate-catalog.mjs` was run in CI only: the local checkout is sparse and has no old artifacts. - **Independent review:** each half went through adversarial review and fix rounds. The remaining findings were fixed with regressions: - voices: 2 rounds; - expressions: 2 rounds, plus two final dispose-timing guards. - **Combined check:** an interaction check of the combined build runs alongside CI. It covers: - one prompt carrying both tags; - the normalizer and cast keeping gender and expression together; - an expression swap not replaying speech; - the four toggle combinations. - The browser e2e additions run in CI; Playwright was not run locally. > The PR opens with the voices half (on top of staging 1.24.5). The expression-portrait commits are being pushed into this PR right after the combined build, so CI and Dottore will run again on the full 1.24.6. ### Manual verification - [ ] Turn on **Voice other characters**, pick Male/Female NPC defaults in Engine Connections → Text to Speech, and play a scene with an NPC. Confirm the NPC speaks, keeps the same voice in later scenes, and that your own sent chat messages stay silent. - [ ] With **Combat voice lines** on, start a Classic fight and a Formation fight with voiced characters. Confirm death, kill and Ultimate lines play, and that the "nobody can be voiced" notice appears for a team with no voices. - [ ] Turn on **Expression portraits** (Images) with an image connection, play a scene, and confirm portraits change with angry, afraid, sad or happy lines once the faces are painted, and that the normal portrait shows for calm lines. - [ ] Change a character's outfit and confirm their expressions follow the new outfit after it is painted. - [ ] Confirm the in-game What's-new shows 1.24.6. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:38:14 +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-Agents#1948
No description provided.