Skip to content

Detect RPG Maker 2000/2003, which was never recognised at all - #95

Merged
rouges78 merged 2 commits into
mainfrom
claude/rpgmaker-classic-detection
Aug 21, 2026
Merged

Detect RPG Maker 2000/2003, which was never recognised at all#95
rouges78 merged 2 commits into
mainfrom
claude/rpgmaker-classic-detection

Conversation

@rouges78

Copy link
Copy Markdown
Owner

Installing an RPG Maker classic to test the complete flow turned up why that flow could never have run.

GameStringer had a branch introducing itself as "RPG Maker classico (RPG_RT 2000/2003)" — with a message for the user and, since #87, the hook into the runtime fallback. That branch was unreachable for exactly those games.

Three layers, blind the same way

Installed Yume Nikki (RPG Maker 2003, free on Steam, app 650700) and queried the commands directly:

detect_rpgmaker_game -> ERRORE: Non sembra essere un gioco RPG Maker

…on a folder holding RPG_RT.exe, RPG_RT.ldb, RPG_RT.lmt, RPG_RT.ini and sixty-odd Map####.lmu.

  1. engine_detector::is_rpg_maker() looked for www/data/System.json, Game.rpgproject and rgss*.dllno check for RPG_RT.*.
  2. RpgMakerVersion had no variant for 2000/2003, so detection fell to Unknown and errored.
  3. In the frontend that error landed in } catch { /* detect fallito → prosegui col workflow file-based normale */ } — the classic branch was skipped silently.

The fix

A RpgMakerVersion::RT variant, detection on the data files, and a depth-limited search.

For RT, find_data_files returns Ok(vec![]). Zero data files is not an error — it is the fact that routes these games to runtime translation. Returning Err would fail detection and leave the branch as unreachable as before.

Two things worth not relearning

Never look for the executable. Plenty of RPG_RT games rename RPG_RT.exe to the game's title; .ldb and .lmt are never touched. A library scan searching for RPG_RT.exe concludes you own none when you do — which is exactly what my earlier survey did.

The folder depth has to be searched. Steam installs Yume Nikki under common/Yume Nikki/yumenikki/, so looking only in the root misses it — the same trap as Unreal's Paks folders, in a different part of the codebase. detect_rpgmaker_game now reports the folder it found rather than the root, so callers need not repeat the search.

Result

From the install root the app actually passes:

version: RT
path:    …\Yume Nikki\yumenikki      (resolved, not the root)
title:   Yume Nikki
data_files: []          extraction: 0 strings

Precisely the conditions the classic branch tests for (isMvMz false, strings <= 0), so it fires — and with it the runtime fallback from #87.

Verification

Four tests: root detection, subfolder detection, zero-not-error extraction, and a non-RPG-Maker folder. Full Rust suite: 1560 passed, 0 failed. Clippy shows no new warnings (the five in these files are pre-existing acronym and range lints). tauri:check-cmds clean.

probe_rpgmaker is kept as an example so the detector can be queried on any folder without launching the app.

The trap, recorded

A branch with a well-written message, a circumstantial comment and tests downstream looks like live code. This one had been dead from the start — not through a defect of its own, but because of an upstream condition that could never be true. Before believing a path works, exercise it with an input that actually takes it. Here, installing one game was enough.

🤖 Generated with Claude Code

rouges78 and others added 2 commits August 21, 2026 20:10
GameStringer had a branch that introduced itself as "RPG Maker classico
(RPG_RT 2000/2003)", with a message for the user and, since #87, the hook
into the runtime fallback. That branch was unreachable for exactly those
games: none of the three detection layers could recognise them.

It surfaced while installing Yume Nikki (RPG Maker 2003, free on Steam) to
test the complete flow. Querying the commands directly returned "Non
sembra essere un gioco RPG Maker" for a folder holding RPG_RT.exe,
RPG_RT.ldb, RPG_RT.lmt, RPG_RT.ini and sixty-odd Map####.lmu files.

Three layers, blind the same way. engine_detector::is_rpg_maker looked for
www/data/System.json, Game.rpgproject and rgss*.dll, with no check for
RPG_RT at all. RpgMakerVersion had no variant for 2000/2003, so detection
fell to Unknown and errored. And in the frontend that error landed in a
catch that comments itself "detect fallito → prosegui col workflow
file-based normale", so the classic branch was skipped silently.

Now there is a RpgMakerVersion::RT variant, detection on the data files,
and a depth-limited search. For RT, find_data_files returns Ok(vec![]):
zero data files is not an error, it is the fact that routes these games to
runtime translation. Returning Err would fail detection and leave the
branch as unreachable as before.

Two things worth not relearning. Never look for the executable — plenty of
RPG_RT games rename RPG_RT.exe to the game's title, while .ldb and .lmt
are never touched; a library scan searching for RPG_RT.exe concludes you
own none when you do. And the folder depth has to be searched: Steam
installs Yume Nikki under common/Yume Nikki/yumenikki/, so looking only in
the root misses it — the same trap as Unreal's Paks folders, in a
different part of the codebase. detect_rpgmaker_game reports the folder it
found rather than the root, so callers need not repeat the search.

From the install root the app actually passes, detection now yields
version RT, the resolved subfolder, and zero strings — precisely the
conditions the classic branch tests for, so it fires, and with it the
runtime fallback from #87.

Four tests cover root and subfolder detection, zero-not-error extraction,
and a non-RPG-Maker folder. Full Rust suite: 1560 passed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
find_executables_in_folder read only the root. On common/Yume Nikki it
found nothing, because RPG_RT.exe lives in yumenikki/. The outcome was
worse than "not found": callers fall back to the game's name
(YumeNikki.exe), which does not exist, and then look for a process that
never will — so the runtime fallback would say "launch the game" with the
game already running.

Now, if and only if the root is empty, it looks one level down. One level,
and only in that case: this is not a disk scan, it is the case you
actually meet.

That makes four independent places in this codebase where the same lesson
had to be learned: Unreal's Paks folders, the RPG Maker detector, the
engine detector, and now the executable search.

Also records the end-to-end run. With Yume Nikki running, pressing
"STRING IT!" on its page took the whole path: the app already showed the
right strategy ("RPG Maker · RT — 0 file, 0 stringhe"), and gs-hook came
up with the GDI sources, the preloaded dictionary and an IPC connection.
Three independent confirmations — the log written at the instant of the
click, RPG_RT.exe being 32-bit so the x86 DLL was chosen by the dual-arch
selection, and a "GameStringer Overlay" window, which
ensure_overlay_window creates only inside the injection's success branch.

First time the path from the button to the game has been walked end to
end.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@rouges78
rouges78 merged commit 6d95b16 into main Aug 21, 2026
7 checks passed
@rouges78
rouges78 deleted the claude/rpgmaker-classic-detection branch August 21, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant