mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #414] [Issue]: Game Mode keeps reusing first library bg instead of generating a new one #172
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#172
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?
Originally created by @Romuromylus on GitHub (May 4, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/414
Summary
When starting a new scene in Game Mode (with image generation enabled), the client never asks the server to generate a fresh background — it pins the scene to whichever library bg comes first in iteration order. On installs that include the legacy SillyTavern bg pack, this is
backgrounds:user:ancient_library, so unrelated scenes appear to "stick" to the ancient library image.Expected behavior
A novel scene location emitted by the scene model (e.g.
backgrounds:fantasy:tavern-interior) should trigger generation through/game/generate-assetsand the freshly generated image should render. A scene whose location genuinely overlaps an existing library bg (e.g. one containing both "dark" and "forest" →backgrounds:user:dark_forest) should still reuse the library bg.Actual behavior
The client's
resolveAssetTagalways returns a library tag with score 1 — becausetagScorecounts the universal category prefix word (backgrounds) on both sides as a +1 match. ThenbestMatchaccepts any score > 0 and returns the first tag it walked, which on most installs isbackgrounds:user:ancient_library(alphabetically first in the legacy bg folder).The downstream effect inside
applySceneResult:setCurrentBackground(resolved)is called with the wrong library tag immediately — the user sees the wrong bg.unresolvedBgfind then concludes the bg is already resolved (it lives in the manifest) andbackgroundTagis omitted from the/game/generate-assetspayload — so no generation is ever requested.Server logs
[game/scene-wrap] bg "<chosen>" not in manifest; generation will be deferred, but the deferred follow-up call from the client never names the bg, so nothing is generated.Steps to reproduce
data/backgrounds/SillyTavern bg pack populated (any install where the user dropped in or kept the default 13 jpgs —ancient_library.jpg,dark_forest.jpg, etc.).data/game-assets/backgrounds/{fantasy,modern,scifi}/.ancient_library.jpg(or whichever bg is first in the manifest), and/game/generate-assetsis called withoutbackgroundTag, so nothing is generated.Environment
Logs, screenshots, or video
Server stdout for the affected turns shows
[game/scene-wrap] bg "X" not in manifest; generation will be deferredfollowed by no[game/generate-assets]background generation entry. The client console emits[asset-resolve] "<scene-tag>" → "backgrounds:user:ancient_library"(or whichever stock bg won the score=1 tie).Additional context
A previous attempt to address a similar-sounding "wrong/sticking-bg" symptom on the multi-segment server path (commit
00e97fe) was reverted (4afed2d) when the deployed instance still showed the bug, because the actual root cause is on the client-side fuzzy matcher rather than in scene-wrap's multi-tag generation. PR coming.Template check