[GH-ISSUE #392] [Issue]: Game Mode VN sprite locks to first alphabetical pose for emotion-named sprite packs #160

Closed
opened 2026-10-20 17:25:47 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Romuromylus on GitHub (May 4, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/392

Summary

In Game Mode, the big VN-style character sprite never swaps with dialogue beats when the character's sprite pack uses emotion-style filenames (e.g. SillyTavern GoEmotions: full_admiration.png, full_anger.png, full_joy.png, …). Whatever the GM emits as the dialogue expression, the same pose stays on screen — typically the alphabetically first one (admiration).

Expected behavior

When the GM emits [Name] [joy]: "...", the full-body sprite swaps to full_joy.png. When it emits [anger], it swaps to full_anger.png. The sprite tracks the dialogue expression turn-to-turn.

Actual behavior

The full-body sprite is permanently stuck on a single pose for the whole chat — in practice the first one returned by the directory listing (alphabetically admiration for a SillyTavern GoEmotions pack). Newer turns, scene transitions, and even fresh Game Mode chats do not change it.

Steps to reproduce

  1. Generate or upload a SillyTavern-style emotion sprite pack to a character. Files use the full_<emotion>.png convention (full_admiration.png, full_anger.png, full_joy.png, …) — no full_idle.png.
  2. Start a new Game Mode chat with that character.
  3. Send a few turns and observe the GM's dialogue lines ([Name] [joy]: "...", [Name] [anger]: "...", etc.).
  4. Watch the big VN sprite — it stays on the same pose (the alphabetically first one) for every turn.

Environment

  • Marinara Engine version: 1.5.7
  • Install type: docker (EasyPanel-managed deployment)
  • OS + version: Linux (server-side); reproduced in browser
  • Browser or app shell: Chrome / Firefox

Logs, screenshots, or video

No console errors. The sprite simply never updates its src.

Additional context

Root cause is two compounding issues that ship together:

  1. GM prompt does not list available expression filenames per character. packages/server/src/services/game/gm-prompts.ts builds the per-character prompt block from character.fullBody only — character.expressions (the actual sprite filenames) is dropped on the floor. The model only sees the hard-coded Default expressions list (neutral, happy, sad, angry, surprised, scared, disgusted, thinking, laughing, crying, blushing, smirk, embarrassed, determined, confused, sleepy) and emits names from there.

  2. The full-body pose resolver ignores the emitted expression. resolveDialogueFullBodyPose in packages/client/src/lib/game-full-body-pose.ts only special-cases thinking and laughing; for every other emotion it skips straight to pickFirstAvailable(availablePoses, "idle"). Emotion packs ship no full_idle.png, so the lookup misses and falls through to "first available pose alphabetically" — which is admiration for any SillyTavern GoEmotions pack. The sprite gets locked there permanently.

A two-line fix on each side restores correct behavior:

  • Prompt-side: include character.expressions (and character.fullBody) in customSpriteLines so the model picks names from the real catalog.
  • Picker-side: pass normalizedExpression as the first candidate to pickFirstAvailable so the resolver actually attempts to honor the emitted emotion before falling back to idle and the alphabetical default.

Action-pose packs (full_idle, full_walk, full_attack, …) are unaffected — the picker still falls through to idle for non-pose emissions like [happy] exactly as before.

Happy to send a PR.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Romuromylus on GitHub (May 4, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/392 ## Summary In Game Mode, the big VN-style character sprite never swaps with dialogue beats when the character's sprite pack uses emotion-style filenames (e.g. SillyTavern GoEmotions: `full_admiration.png`, `full_anger.png`, `full_joy.png`, …). Whatever the GM emits as the dialogue expression, the same pose stays on screen — typically the alphabetically first one (`admiration`). ## Expected behavior When the GM emits `[Name] [joy]: "..."`, the full-body sprite swaps to `full_joy.png`. When it emits `[anger]`, it swaps to `full_anger.png`. The sprite tracks the dialogue expression turn-to-turn. ## Actual behavior The full-body sprite is permanently stuck on a single pose for the whole chat — in practice the first one returned by the directory listing (alphabetically `admiration` for a SillyTavern GoEmotions pack). Newer turns, scene transitions, and even fresh Game Mode chats do not change it. ## Steps to reproduce 1. Generate or upload a SillyTavern-style emotion sprite pack to a character. Files use the `full_<emotion>.png` convention (`full_admiration.png`, `full_anger.png`, `full_joy.png`, …) — no `full_idle.png`. 2. Start a new Game Mode chat with that character. 3. Send a few turns and observe the GM's dialogue lines (`[Name] [joy]: "..."`, `[Name] [anger]: "..."`, etc.). 4. Watch the big VN sprite — it stays on the same pose (the alphabetically first one) for every turn. ## Environment - Marinara Engine version: 1.5.7 - Install type: docker (EasyPanel-managed deployment) - OS + version: Linux (server-side); reproduced in browser - Browser or app shell: Chrome / Firefox ## Logs, screenshots, or video No console errors. The sprite simply never updates its `src`. ## Additional context Root cause is two compounding issues that ship together: 1. **GM prompt does not list available expression filenames per character.** `packages/server/src/services/game/gm-prompts.ts` builds the per-character prompt block from `character.fullBody` only — `character.expressions` (the actual sprite filenames) is dropped on the floor. The model only sees the hard-coded `Default expressions` list (`neutral, happy, sad, angry, surprised, scared, disgusted, thinking, laughing, crying, blushing, smirk, embarrassed, determined, confused, sleepy`) and emits names from there. 2. **The full-body pose resolver ignores the emitted expression.** `resolveDialogueFullBodyPose` in `packages/client/src/lib/game-full-body-pose.ts` only special-cases `thinking` and `laughing`; for every other emotion it skips straight to `pickFirstAvailable(availablePoses, "idle")`. Emotion packs ship no `full_idle.png`, so the lookup misses and falls through to "first available pose alphabetically" — which is `admiration` for any SillyTavern GoEmotions pack. The sprite gets locked there permanently. A two-line fix on each side restores correct behavior: - Prompt-side: include `character.expressions` (and `character.fullBody`) in `customSpriteLines` so the model picks names from the real catalog. - Picker-side: pass `normalizedExpression` as the first candidate to `pickFirstAvailable` so the resolver actually attempts to honor the emitted emotion before falling back to `idle` and the alphabetical default. Action-pose packs (`full_idle`, `full_walk`, `full_attack`, …) are unaffected — the picker still falls through to `idle` for non-pose emissions like `[happy]` exactly as before. Happy to send a PR. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
Author
Owner

@SpicyMarinara commented on GitHub (May 4, 2026):

Thank you for the PR, checking it out right now!

<!-- gh-comment-id:4370472921 --> @SpicyMarinara commented on GitHub (May 4, 2026): Thank you for the PR, checking it out right now!
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#160
No description provided.