[GH-ISSUE #471] [Feature]: Support random sprite selection for Expressions Engine #209

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

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

What problem does this solve?

The Expressions Engine currently maps an emotion or custom expression to a specific file or single key. This means characters with multiple sprite variations for the same emotion either need exact filenames exposed to the agent prompt or cannot easily rotate through those variations.

This creates prompt bloat and limits visual variety in RP / Visual Novel mode.

Proposed solution

Add SillyTavern-style random sprite selection for expression groups.

Suggested behavior:

  • If the expression agent returns an emotion key like joy, the engine checks the character’s sprite folder for files that start with that prefix, such as joy_01.png, joy_laugh.png, or joy_blush.png.
  • If matching files are found, randomly select one sprite from that group and display it.
  • If no prefix group is found, fall back to the current exact 1:1 expression matching behavior.

This would let prompts reference simple emotion keys like joy, sad, or angry without listing every available sprite variation.

Alternatives considered

Users can currently list every individual sprite filename in the agent prompt or manually map expressions one by one, but this increases prompt size and makes setup harder, especially for characters with many sprite variants.

Additional context

Requested by fastgarden on Discord.

This would improve visual variety during roleplay and Visual Novel mode by rotating through different sprite variations for the same mood, similar to SillyTavern Expression Folders.

Benefits mentioned:

  • Reduces prompt bloat.
  • Makes cloud usage cheaper by avoiding long filename lists.
  • Helps smaller models by only requiring simple emotion keys.
  • Makes characters feel more visually alive through varied sprite selection.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @cha1latte on GitHub (May 6, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/471 ## What problem does this solve? The Expressions Engine currently maps an emotion or custom expression to a specific file or single key. This means characters with multiple sprite variations for the same emotion either need exact filenames exposed to the agent prompt or cannot easily rotate through those variations. This creates prompt bloat and limits visual variety in RP / Visual Novel mode. ## Proposed solution Add SillyTavern-style random sprite selection for expression groups. Suggested behavior: - If the expression agent returns an emotion key like `joy`, the engine checks the character’s sprite folder for files that start with that prefix, such as `joy_01.png`, `joy_laugh.png`, or `joy_blush.png`. - If matching files are found, randomly select one sprite from that group and display it. - If no prefix group is found, fall back to the current exact 1:1 expression matching behavior. This would let prompts reference simple emotion keys like `joy`, `sad`, or `angry` without listing every available sprite variation. ## Alternatives considered Users can currently list every individual sprite filename in the agent prompt or manually map expressions one by one, but this increases prompt size and makes setup harder, especially for characters with many sprite variants. ## Additional context [Requested by fastgarden on Discord](https://discord.com/channels/1417099416812392641/1501486374082314322). This would improve visual variety during roleplay and Visual Novel mode by rotating through different sprite variations for the same mood, similar to SillyTavern Expression Folders. Benefits mentioned: - Reduces prompt bloat. - Makes cloud usage cheaper by avoiding long filename lists. - Helps smaller models by only requiring simple emotion keys. - Makes characters feel more visually alive through varied sprite selection. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:26:17 +07:00
Author
Owner

@cha1latte commented on GitHub (May 6, 2026):

Triage note: labeling this as normal-scope because random sprite selection extends the existing Expressions Engine behavior while preserving the current exact-match fallback.

Least risky next step is to keep this in the normal enhancement backlog and implement prefix-group selection as a focused addition to the existing expression lookup.

<!-- gh-comment-id:4392835013 --> @cha1latte commented on GitHub (May 6, 2026): Triage note: labeling this as `normal-scope` because random sprite selection extends the existing Expressions Engine behavior while preserving the current exact-match fallback. Least risky next step is to keep this in the normal enhancement backlog and implement prefix-group selection as a focused addition to the existing expression lookup.
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#209
No description provided.