mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #393] [MERGED] fix(game): swap full-body sprite per dialogue emotion for GoEmotions packs #4603
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#4603
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/393
Author: @Romuromylus
Created: 5/4/2026
Status: ✅ Merged
Merged: 5/4/2026
Merged by: @SpicyMarinara
Base:
main← Head:fix/game-mode-emotion-sprite-swap📝 Commits (3)
a854d9bfix(game): pass per-character sprite expressions into GM prompt9a9b621fix(game): use emitted dialogue expression as full-body pose candidatecb2e40fMerge branch 'main' into fix/game-mode-emotion-sprite-swap📊 Changes
2 files changed (+18 additions, -4 deletions)
View changed files
📝
packages/client/src/lib/game-full-body-pose.ts(+1 -1)📝
packages/server/src/services/game/gm-prompts.ts(+17 -3)📄 Description
Linked issue
Closes #392
Why this change
In Game Mode, the big VN-style character sprite never swaps with dialogue beats when the character's 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 sprite stays locked on the alphabetically first pose (admiration) for the whole chat.Two compounding issues cause this:
The GM prompt only exposes
character.fullBody(custom full-body aliases) per character.character.expressions— the actual emotion sprite filenames — is dropped, so the model never learns the real catalog and emits names from the hard-codedDefault expressionslist (happy, angry, crying, …). Those names don't match GoEmotion filenames (joy, anger, grief, …), so the picker can't resolve them.resolveDialogueFullBodyPoseonly special-casesthinkingandlaughing; for every other emotion it goes straight topickFirstAvailable(availablePoses, "idle"). Emotion packs ship nofull_idle.png, so the lookup misses, falls through to "first available pose alphabetically", and locks onadmiration.Fixing one without the other doesn't help: the prompt fix gets the model emitting correct names, but the resolver still ignores them. The resolver fix lets it honor whatever the model emits, but if the model is emitting
[happy]against ajoy.png-style pack the names won't line up. Both edits are needed and they're tightly coupled.What changed
packages/server/src/services/game/gm-prompts.ts—customSpriteLinesnow includes bothexpressionsandfullBodyper character, with a header instructing the model to use the listed names exactly when present. Characters with expressions but no fullBody aliases (the common case for SillyTavern packs) are no longer filtered out.packages/client/src/lib/game-full-body-pose.ts—resolveDialogueFullBodyPosenow passesnormalizedExpressionas the first candidate topickFirstAvailable, so the resolver attempts to honor the GM-emitted emotion before falling back toidleand the alphabetical default. Action-pose packs (full_idle,full_walk,full_attack, …) are unaffected: the existing tail (idle→battle_stance→ first available) still kicks in for non-pose emissions like[happy].No new code paths, no API changes, no version bump.
Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
pnpm checkpasses locally on the cherry-picked branch. The fix has been deployed and exercised in a real Game Mode chat against the EasyPanel image build of this branch:full_admiration.png,full_amusement.png, …,full_joy.png,full_anger.png, nofull_idle.png) was selected.full_admiration.pngfor every line. After the fix the sprite swaps per dialogue beat to match the GM-emitted emotion ([joy]→full_joy.png,[anger]→full_anger.png, etc.).idle→battle_stance→ first available) is preserved by construction — the change only adds the emitted expression as the first candidate.Suggested reviewer-side checks:
full_<emotion>pack and confirm the sprite swaps per turn.full_idle,full_walk, …) and confirm[happy]/[crying]style emissions still default toidle.full_-prefixed expression sprites.Docs and release impact
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.