A tiny dev tool for gen1recomp mod authors. Talk to any NPC and it shows you the two strings you need to take over their dialogue:
MAP:
PEWTER_NIDORAN_H
OUSE
[A]
TEXT:
TEXT_PEWTERNIDOR
ANHOUSE_MIDDLE_A
GED_MAN
Press A and the NPC says whatever they normally say, completely untouched.
This is a development tool, not a gameplay mod. Install it while you're building something, then toggle it off (or uninstall) to play normally.
In gen1recomp there's no NPC registry — the way you add dialogue is to
take over an existing NPC's TEXT_ constant on their map:
mod.content.map_scripts:register("PEWTER_NIDORAN_HOUSE", {
talk = { TEXT_PEWTERNIDORANHOUSE_MIDDLE_AGED_MAN = MY_SCRIPT },
priority = 500,
})The problem: those constants are extracted from the ROM at load time, so they aren't greppable in the engine repo. Only the handful of maps with hand-ported scripts name them in source at all.
Worse, guessing them from the pokered disassembly fails in the way that
hurts most — some objects are renamed between Red/Blue and Yellow.
The Celadon Game Corner coin-giver is TEXT_GAMECORNER_CLERK2 in
Red/Blue but TEXT_GAMECORNER_MIDDLE_AGED_MAN2 in Yellow. Register the
wrong one and your mod does nothing at all — no error, no warning, just
vanilla dialogue. That is a genuinely slow bug to find.
Reading the constant off the real running game is version-correct by construction. (And the renames are per-map, not universal, so it's worth checking each NPC on each version rather than assuming either way.)
- Install and enable alongside whatever you're building.
- Walk up to each NPC you want to target and talk to them. Note the two strings — the box hard-wraps at 16 characters, so read it as one continuous string ignoring the line breaks.
- Toggle SHOW NPC IDS off in the mod's options when you want to play normally. No restart needed.
| Option | Default | Effect |
|---|---|---|
| SHOW NPC IDS | ON | Show the map id and TEXT constant before each NPC's dialogue |
- Download
npc_inspector-<version>.zipfrom the latest release. - In the launcher: MODS → Import mod .zip. On iOS, delete any older downloaded copy of the zip from Files first.
- Fully quit and relaunch.
- Requires gen1recomp 0.1.38 or newer. No other dependencies.
Updating: once installed, the launcher checks this repo for new releases — the mod's entry shows "vX.Y.Z available" → tap → Update → fully quit and relaunch.
OverworldState:showMapText(textConst, npc, onDone) is the single funnel
every NPC talk passes through. This wraps that method, pushes one
TextBox, and calls the original from its onDone — so real dialogue is
never modified, reordered or suppressed, it just happens one box later.
Two deliberate safety choices:
- The wrapper is rebuilt from a stashed original rather than guarded by a "already wrapped" sentinel. Engine module tables persist in Lua's module cache for the whole game process, so a sentinel makes a re-enabled updated mod silently keep running its old code.
- Any error while building the debug box falls straight through to untouched vanilla dialogue, so this can never stop you talking to an NPC.
Built for gen1recomp. By Mister Miracle (@mistermiracle3036). See THIRD_PARTY_NOTICES.md.