[GH-ISSUE #1460] [Issue]: Gacha Forge: Background generation fails for Korean location names #739

Closed
opened 2026-10-20 17:30:15 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @tlsiddl on GitHub (Oct 18, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1460

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Gacha Forge fails to generate location background images when the location name contains only Korean characters. The server and client use ASCII-only slug normalization, which removes all Hangul characters and can produce an empty location ID.

Affected package

Gacha Forge (gacha-forge), version 1.8.12

Expected behavior

Location background images should generate and display correctly for Korean location names, including names composed entirely of Hangul.

Actual behavior

Korean-only location names are normalized to empty strings, causing the server to skip them or reject background generation requests.

Location names containing both Hangul and numbers may also lose their Korean portions, potentially creating ID collisions.

Steps to reproduce

  1. Install Gacha Forge 1.8.12 on Marinara Engine 2.5.0.
  2. Create or enter a story containing a location named entirely in Korean, such as 달빛 숲.
  3. Navigate to a scene at that location.
  4. Observe that the location background does not generate or appear.

Environment

  • Marinara Engine version: 2.5.0
  • Package version: Gacha Forge 1.8.12
  • Install type: docker
  • OS + version: Linux (distribution/version not confirmed)
  • Browser or app shell: Chromium-based desktop browser

Logs, screenshots, or video

The issue appears to originate from the following slug normalization functions:

Server — packages/gacha-forge/server.mjs, gs():

function gs(e) {
  return String(e ?? "")
    .trim()
    .toLowerCase()
    .replace(/[^a-z0-9]+/g, "-")
    .replace(/(^-|-$)/g, "")
    .slice(0, 60);
}

Client — packages/gacha-forge/client.js, oc():

The client uses the same ASCII-only normalization logic.

For example:

"달빛 숲" → ""
"수정 동굴" → ""

The server skips locations with empty slugs, and the background endpoint rejects requests with invalid or empty IDs.

Additional context

I tested a temporary, unofficial runtime patch that changes location slug handling in both the server and client without modifying the installed package files.

After applying the patch, location background generation started successfully, and the generated images appeared correctly in the story UI.

A permanent fix should support Unicode location names consistently across both sides while preserving compatibility with existing background IDs and saved images.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @tlsiddl on GitHub (Oct 18, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1460 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Gacha Forge fails to generate location background images when the location name contains only Korean characters. The server and client use ASCII-only slug normalization, which removes all Hangul characters and can produce an empty location ID. ## Affected package Gacha Forge (`gacha-forge`), version 1.8.12 ## Expected behavior Location background images should generate and display correctly for Korean location names, including names composed entirely of Hangul. ## Actual behavior Korean-only location names are normalized to empty strings, causing the server to skip them or reject background generation requests. Location names containing both Hangul and numbers may also lose their Korean portions, potentially creating ID collisions. ## Steps to reproduce 1. Install Gacha Forge 1.8.12 on Marinara Engine 2.5.0. 2. Create or enter a story containing a location named entirely in Korean, such as `달빛 숲`. 3. Navigate to a scene at that location. 4. Observe that the location background does not generate or appear. ## Environment - Marinara Engine version: 2.5.0 - Package version: Gacha Forge 1.8.12 - Install type: docker - OS + version: Linux (distribution/version not confirmed) - Browser or app shell: Chromium-based desktop browser ## Logs, screenshots, or video The issue appears to originate from the following slug normalization functions: **Server — `packages/gacha-forge/server.mjs`, `gs()`:** ```js function gs(e) { return String(e ?? "") .trim() .toLowerCase() .replace(/[^a-z0-9]+/g, "-") .replace(/(^-|-$)/g, "") .slice(0, 60); } ``` **Client — `packages/gacha-forge/client.js`, `oc()`:** The client uses the same ASCII-only normalization logic. For example: ```text "달빛 숲" → "" "수정 동굴" → "" ``` The server skips locations with empty slugs, and the background endpoint rejects requests with invalid or empty IDs. ## Additional context I tested a temporary, unofficial runtime patch that changes location slug handling in both the server and client without modifying the installed package files. After applying the patch, location background generation started successfully, and the generated images appeared correctly in the story UI. A permanent fix should support Unicode location names consistently across both sides while preserving compatibility with existing background IDs and saved images. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:30:15 +07:00
Author
Owner

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

Fixed on staging by #1470 (Gacha Forge 1.8.13); update Gacha Forge from the catalog to get it.

<!-- gh-comment-id:6265678593 --> @SpicyMarinara commented on GitHub (Oct 19, 2026): Fixed on staging by #1470 (Gacha Forge 1.8.13); update Gacha Forge from the catalog to get it.
Author
Owner

@tlsiddl commented on GitHub (Oct 19, 2026):

@SpicyMarinara Thank you so much for fixing #1460 and #1461! I really appreciate your quick response and all the work you've put into Gacha Forge.

Sorry to bother you with one more related issue, but I also found a similar problem with character standing images when using Korean speaker names.

Just like the Korean location-name issue in #1460, Korean characters appear to be removed during speaker-name normalization, which can prevent character standing images from being matched and displayed correctly.

I created a temporary unofficial runtime patch that addresses both Korean background names and Korean character standing names:

https://github.com/tlsiddl/gacha-forge-korean-patch

Since both issues appear to involve ASCII-only normalization, I was wondering whether the fix in #1470 also covers Korean speaker names used for character standing images.

If not, would you mind taking a look at this issue as well?

The patch was originally developed for Gacha Forge 1.8.12, so I haven't verified whether it's still needed with 1.8.13.

Thank you again for your time and all your hard work, and I'm sorry for the additional request!

<!-- gh-comment-id:6265836548 --> @tlsiddl commented on GitHub (Oct 19, 2026): @SpicyMarinara Thank you so much for fixing #1460 and #1461! I really appreciate your quick response and all the work you've put into Gacha Forge. Sorry to bother you with one more related issue, but I also found a similar problem with **character standing images when using Korean speaker names**. Just like the Korean location-name issue in #1460, Korean characters appear to be removed during speaker-name normalization, which can prevent character standing images from being matched and displayed correctly. I created a temporary unofficial runtime patch that addresses both Korean background names and Korean character standing names: https://github.com/tlsiddl/gacha-forge-korean-patch Since both issues appear to involve ASCII-only normalization, I was wondering whether the fix in #1470 also covers Korean speaker names used for character standing images. If not, would you mind taking a look at this issue as well? The patch was originally developed for Gacha Forge 1.8.12, so I haven't verified whether it's still needed with 1.8.13. Thank you again for your time and all your hard work, and I'm sorry for the additional request!
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-Agents#739
No description provided.