Playtest and debug an RPG Maker game with AI
Most RPG Maker bugs are logic bugs: a switch that is never turned on, a door that leads into a wall, a chest behind an impassable tile. RPGM MCP Pro finds many of them without running the game, then plays the game to confirm the rest.
Three layers of testing
| Layer | Tools | Needs the game running? |
|---|---|---|
| Logic | logic_check, event_flow, map_search_by_switch | No |
| Reachability | qa_reachability, qa_reachability_all, map_connections | No |
| Play | game_*, save_*, qa_run_scenario | Yes, with MCP_Debug |
1. Static checks: logic_check
Run logic_check and sort the findings into real bugs and intentional ones.
logic_check scans every map and common event for switches that are checked but never set, variables read but never written, dead-end and unreachable maps, and unused common events. Its flag dependency graph shows what blocks if a switch is never set ("switch 42 is set by the Map 3 boss event and blocks the Map 7 guard"). Plugin commands are listed for manual review, because a plugin may set switches the scan cannot see.
In the demo, logic_check reported 26 findings on the VisuStella sample project. The AI read the events behind them and judged all 26 intentional: battle action sequences called by skill notetags, a debug room, a scratch variable. That triage is the useful part.
2. Reachability
qa_reachability flood-fills a map over the real passability data (a port of the engine's own passage check) plus blocking events, and reports chests, NPCs and transfers the player cannot reach. qa_reachability_all follows the transfer graph from the start position across the whole game and lists unreachable maps and events.
Run qa_reachability_all. For each unreachable event, render that part
of the map with showEvents and tell me why it is blocked.
3. Live test play
Start test play with the debug plugin enabled (see setup). The AI can then:
- Look:
game_get_state(map, position, party, gold, switches, variables, scene),game_get_map_info,game_get_event_info,game_screenshot. - Move:
game_teleport,game_move_player,game_input,game_input_sequence. - Set up a situation:
game_set_switch,game_set_variable,game_add_item,game_set_gold,game_toggle_encounters,game_call_common_event. - Save and restore:
save_create,save_load,save_backup,save_restore. - Anything else:
game_evalruns JavaScript in the game.
Teleport to the bridge on Map 7, turn switch 5 on, talk to the guard,
and take a screenshot after each message. Does the guard let me pass?
Input is focus-free: the debug plugin writes the engine's input state directly, so the game keeps responding while you work in another window.
4. Regression scenarios
Once a bug is fixed, keep it fixed. qa_run_scenario runs a scripted test against the running game: load a save or start a new game, send inputs, wait, teleport, run scripts, and assert switches, variables, position, gold or items. Failures are saved with a screenshot. qa_scenario_template prints the format.
{
"name": "bridge-guard",
"load": 3,
"steps": [
{ "action": "teleport", "mapId": 7, "x": 12, "y": 9 },
{ "action": "eval", "script": "$gameSwitches.setValue(5, true)" },
{ "action": "input", "key": "up", "frames": 16 },
{ "action": "input", "key": "ok" },
{ "action": "wait", "ms": 1500 },
{ "action": "assert", "check": { "position": { "mapId": 8 } } }
]
}
Ask the AI to write a scenario for each fixed bug and to rerun them all before a release; the JSON report and failure screenshots go to qa_reports/ in the project by default.
5. Text, assets and release
event_search_textandevent_replace_textfind and fix a name or typo in every Show Text command.text_exportwrites every line of dialogue, choice and database text to JSON or CSV for proofreading or translation;text_importputs it back and warns if a line changed in the meantime.asset_auditlists images and audio no event, database entry or plugin seems to use. It never deletes anything.project_validatechecks data integrity. Before release, runtestplay_remove_debug_pluginif you prefer not to ship the plugin (it stays inactive outside test play either way).
Tips
- Make a save at each chapter so scenarios and battle tests can start there.
game_speed2 or 4 makes long tests much shorter.- Turn random encounters off with
game_toggle_encounterswhile testing events. - After changing data files, restart test play so the game loads them (MV:
testplay_restart).
Get RPGM MCP Pro
$5 once on itch.io, free updates.