[GH-ISSUE #8402] [Issue]: Game Mode illustrations do not resolve appearance macros #8342

Closed
opened 2026-11-07 16:42:20 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @SpicyMarinara on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8402

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Game Mode storyboard and scene illustration prompts pass persona or character appearance text to the image model without resolving chat-variable macros. The macro appears as literal text in the prompt.

Expected behavior

Resolve macros in persona and character appearance fields, including imageAppearance overrides, using the chat's macro context before generating Game Mode illustrations.

Actual behavior

The Game Mode storyboard prompt includes the literal {{getvar::quartermaster_appearance_persona}} macro, while the Game Mode chat output shows the macro resolving.

Steps to reproduce

  1. Add a chat-variable macro such as {{getvar::quartermaster_appearance_persona}} to a persona or character appearance field.
  2. Generate a Game Mode storyboard or scene illustration.
  3. Inspect the illustration prompt and observe that the macro remains unresolved.

Environment

  • Marinara Engine version: 2.5.1 (build 2.5.1+6416fbf573c9, commit 6416fbf573)
  • Install type: Not provided
  • OS + version: Windows 10.0.26200 (x64)
  • Browser or app shell: Not provided

Logs, screenshots, or video

Game Mode diagnostics show the macro resolving in /api/generate, but the /api/game/storyboard/generate prompt contains Zella's Appearance: **Macro does not resolve here {{getvar::quartermaster_appearance_persona}}**.

Additional context

The report notes that RP Mode resolves the same field through resolvePersonaPromptText in generate.routes.ts; the Game Mode illustration path is affected.

Discord thread: Game Mode storyboard/scene illustration doesn't resolve macros in persona/char appearance fields
Discord thread link: https://discord.com/channels/1417099416812392641/1564853959229710498
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)

Discord thread transcript (2 messages)
[2026-10-28T04:10:57.461Z] thisonecan't: Bug/feature request:

 macros in persona/character Appearance don't resolve in Game Mode image prompts (storyboard / scene illustrations)

In Game Mode, the storyboard and scene illustration prompts get the persona's appearance raw. The character context is built in game.routes.ts (persona around line 800, characters around line 735) by reading persona.appearance / the imageAppearance override directly from the card and passing it through normalizeIllustratorAppearance, which only strips {{// comments}} and clips length. No macro resolution happens, so a chat-variable macro like {{quartermaster_appearance_persona}} reaches the image model as literal text.

RP mode resolves the same field: the Illustrator agent gets the persona appearance via resolvePersonaPromptText in generate.routes.ts (around line 6135), using the chat's macro variables. The  it too, so only the Game Mode image path is affected.

Suggested: resolve persona and character appearance (and the imageAppearance override) with the chat's macro context, including chat variables, in the Game Mode illustration/storyboard character context, similar to how RP modes illustrator agent does.

Console stuff from Game mode:
"route":"/api/generate","msg":"  [SYSTEM] <lore>...</lore><role>...</role><game>...</game><instructions>...</instructions><party>\nPlayer:\nName: Zella\nAppearance: **Macro resolves here**</party>
"route":"/api/game/storyboard/generate","msg":"[debug/game/storyboard-planner] messages:\n[\n  {\n    \"role\": \"system\",\n    \"content\": \"You are Marinara's Game Mode Storyboard Illustrator.\\n\\n**<character_appearance_context>**\\nZella's Appearance: **Macro does not resolve here {{getvar::quartermaster_appearance_persona}}</character_appearance_context>**

` ` `
Marinara Engine diagnostics
Version: 2.5.1
Build: 2.5.1+6416fbf573c9
Commit: 6416fbf573c9
Server OS: Windows 10.0.26200 (x64)
` ` `
[Discord message: https://discord.com/channels/1417099416812392641/1564853959229710498/1564853959229710498]

[2026-10-28T04:10:58.222Z] Professor Mari [bot]: Howdy!

Thank you for submitting a new bug report/feature request, your support means a lot. A member of the team will look into it as soon as possible, and if they find it valid, they will open a GitHub Issue out of it. You can check whether it was addressed on the staging build of Marinara Engine. **Do not ping any of the developers, this will not speed up the process.**

**Please include a Support Diagnostic in the post if you haven't done it yet.** Otherwise, ignore this step. To grab it, go to the Marinara Engine tab:

`Settings -> Advanced -> Support Diagnostics -> Copy Support Diagnostics.`

If your report is about any of the **Agents**, please provide **the Agent's version** which you can grab from here:

`Agents -> Download Agents -> Installed Agents -> Selected Agent -> Installed Version`

Thank you, this will help tremendously.

This is an automated message, but if you reply to it, I will do my best to assist you using my LLM-powered brain. That said, it's best for a human to handle this case.

Cheers!
[Discord message: https://discord.com/channels/1417099416812392641/1564853959229710498/1564853962421698664]

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 @SpicyMarinara on GitHub (Oct 28, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8402 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Game Mode storyboard and scene illustration prompts pass persona or character appearance text to the image model without resolving chat-variable macros. The macro appears as literal text in the prompt. ## Expected behavior Resolve macros in persona and character appearance fields, including imageAppearance overrides, using the chat's macro context before generating Game Mode illustrations. ## Actual behavior The Game Mode storyboard prompt includes the literal `{{getvar::quartermaster_appearance_persona}}` macro, while the Game Mode chat output shows the macro resolving. ## Steps to reproduce 1. Add a chat-variable macro such as `{{getvar::quartermaster_appearance_persona}}` to a persona or character appearance field. 2. Generate a Game Mode storyboard or scene illustration. 3. Inspect the illustration prompt and observe that the macro remains unresolved. ## Environment - Marinara Engine version: 2.5.1 (build 2.5.1+6416fbf573c9, commit 6416fbf573c9) - Install type: Not provided - OS + version: Windows 10.0.26200 (x64) - Browser or app shell: Not provided ## Logs, screenshots, or video Game Mode diagnostics show the macro resolving in `/api/generate`, but the `/api/game/storyboard/generate` prompt contains `Zella's Appearance: **Macro does not resolve here {{getvar::quartermaster_appearance_persona}}**`. ## Additional context The report notes that RP Mode resolves the same field through `resolvePersonaPromptText` in `generate.routes.ts`; the Game Mode illustration path is affected. Discord thread: Game Mode storyboard/scene illustration doesn't resolve macros in persona/char appearance fields Discord thread link: https://discord.com/channels/1417099416812392641/1564853959229710498 Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653) <details> <summary>Discord thread transcript (2 messages)</summary> ```text [2026-10-28T04:10:57.461Z] thisonecan't: Bug/feature request: macros in persona/character Appearance don't resolve in Game Mode image prompts (storyboard / scene illustrations) In Game Mode, the storyboard and scene illustration prompts get the persona's appearance raw. The character context is built in game.routes.ts (persona around line 800, characters around line 735) by reading persona.appearance / the imageAppearance override directly from the card and passing it through normalizeIllustratorAppearance, which only strips {{// comments}} and clips length. No macro resolution happens, so a chat-variable macro like {{quartermaster_appearance_persona}} reaches the image model as literal text. RP mode resolves the same field: the Illustrator agent gets the persona appearance via resolvePersonaPromptText in generate.routes.ts (around line 6135), using the chat's macro variables. The it too, so only the Game Mode image path is affected. Suggested: resolve persona and character appearance (and the imageAppearance override) with the chat's macro context, including chat variables, in the Game Mode illustration/storyboard character context, similar to how RP modes illustrator agent does. Console stuff from Game mode: "route":"/api/generate","msg":" [SYSTEM] <lore>...</lore><role>...</role><game>...</game><instructions>...</instructions><party>\nPlayer:\nName: Zella\nAppearance: **Macro resolves here**</party> "route":"/api/game/storyboard/generate","msg":"[debug/game/storyboard-planner] messages:\n[\n {\n \"role\": \"system\",\n \"content\": \"You are Marinara's Game Mode Storyboard Illustrator.\\n\\n**<character_appearance_context>**\\nZella's Appearance: **Macro does not resolve here {{getvar::quartermaster_appearance_persona}}</character_appearance_context>** ` ` ` Marinara Engine diagnostics Version: 2.5.1 Build: 2.5.1+6416fbf573c9 Commit: 6416fbf573c9 Server OS: Windows 10.0.26200 (x64) ` ` ` [Discord message: https://discord.com/channels/1417099416812392641/1564853959229710498/1564853959229710498] [2026-10-28T04:10:58.222Z] Professor Mari [bot]: Howdy! Thank you for submitting a new bug report/feature request, your support means a lot. A member of the team will look into it as soon as possible, and if they find it valid, they will open a GitHub Issue out of it. You can check whether it was addressed on the staging build of Marinara Engine. **Do not ping any of the developers, this will not speed up the process.** **Please include a Support Diagnostic in the post if you haven't done it yet.** Otherwise, ignore this step. To grab it, go to the Marinara Engine tab: `Settings -> Advanced -> Support Diagnostics -> Copy Support Diagnostics.` If your report is about any of the **Agents**, please provide **the Agent's version** which you can grab from here: `Agents -> Download Agents -> Installed Agents -> Selected Agent -> Installed Version` Thank you, this will help tremendously. This is an automated message, but if you reply to it, I will do my best to assist you using my LLM-powered brain. That said, it's best for a human to handle this case. Cheers! [Discord message: https://discord.com/channels/1417099416812392641/1564853959229710498/1564853962421698664] ``` </details> ## 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.
bsakaguchi 2026-11-07 16:42:20 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Oct 28, 2026):

@SpicyMarinara / Codex owns this fix. I checked open PRs, issue-linked work and branch names; no current implementation covers #8402. Current staging's Game appearance loaders insert the selected card/persona appearance without macro resolution. I am adding a regression at the real preview/provider boundary and reusing the existing chat-scoped macro resolver for storyboard and scene illustration paths, including imageAppearance overrides. Variable resolution will be isolated from saved chat/card state.

<!-- gh-comment-id:6464565289 --> @SpicyMarinara commented on GitHub (Oct 28, 2026): @SpicyMarinara / Codex owns this fix. I checked open PRs, issue-linked work and branch names; no current implementation covers #8402. Current staging's Game appearance loaders insert the selected card/persona appearance without macro resolution. I am adding a regression at the real preview/provider boundary and reusing the existing chat-scoped macro resolver for storyboard and scene illustration paths, including imageAppearance overrides. Variable resolution will be isolated from saved chat/card state.
Author
Owner

@SpicyMarinara commented on GitHub (Oct 28, 2026):

Fixed on staging via #8404, merged as c1ac4bc8322de5833137e44dc06b96ddf1f5ee93.

Game illustration previews, image generation, and storyboard planning now resolve character/persona appearance macros using the selected chat variables, persona, exact owning character, and scene clock. Macro writes remain local to the resolution; saved cards and chat variables are unchanged. Existing images are not regenerated automatically.

Validation on the final head 983b672de153cc035a363d553b7bb76797b8f764:

After updating and restarting Engine, regenerate the affected illustration. The reporter’s physical Windows setup and a paid image provider were not exercised; actual request payloads were verified through a local API fixture.

<!-- gh-comment-id:6466679030 --> @SpicyMarinara commented on GitHub (Oct 28, 2026): Fixed on `staging` via #8404, merged as `c1ac4bc8322de5833137e44dc06b96ddf1f5ee93`. Game illustration previews, image generation, and storyboard planning now resolve character/persona appearance macros using the selected chat variables, persona, exact owning character, and scene clock. Macro writes remain local to the resolution; saved cards and chat variables are unchanged. Existing images are not regenerated automatically. Validation on the final head `983b672de153cc035a363d553b7bb76797b8f764`: - `pnpm check`, prompt regressions, focused illustration/macro regressions, 7 browser smoke cases, and 1 production smoke case passed locally. - [All 1,126 Node regressions](https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/40662459429), [required checks and browser smoke](https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/40663091124), [CodeQL](https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/40662459855), and [all 10 platform jobs including container runtimes](https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/40663091207) passed on GitHub. - Final local CodeRabbit review had no findings. [Dottore reviewed this exact head](https://github.com/Pasta-Devs/Marinara-Engine/pull/8404#issuecomment-6465383121): 0 defects and 1 optional note; no unresolved review threads. - Verified the feature is an ancestor of the staging merge and the merged tree exactly matches the validated feature tree. - Post-merge [regression workflow](https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/40664873647), [CodeQL](https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/40664873731), and [container publication](https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/40664873600) completed successfully. After updating and restarting Engine, regenerate the affected illustration. The reporter’s physical Windows setup and a paid image provider were not exercised; actual request payloads were verified through a local API fixture.
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#8342
No description provided.