Detect RPG Maker 2000/2003, which was never recognised at all - #95
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
…on a folder holding
RPG_RT.exe,RPG_RT.ldb,RPG_RT.lmt,RPG_RT.iniand sixty-oddMap####.lmu.engine_detector::is_rpg_maker()looked forwww/data/System.json,Game.rpgprojectandrgss*.dll— no check forRPG_RT.*.RpgMakerVersionhad no variant for 2000/2003, so detection fell toUnknownand errored.} catch { /* detect fallito → prosegui col workflow file-based normale */ }— the classic branch was skipped silently.The fix
A
RpgMakerVersion::RTvariant, detection on the data files, and a depth-limited search.For RT,
find_data_filesreturnsOk(vec![]). Zero data files is not an error — it is the fact that routes these games to runtime translation. ReturningErrwould 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.exeto the game's title;.ldband.lmtare never touched. A library scan searching forRPG_RT.execoncludes 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'sPaksfolders, in a different part of the codebase.detect_rpgmaker_gamenow 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:
Precisely the conditions the classic branch tests for (
isMvMzfalse, 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-cmdsclean.probe_rpgmakeris 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