/rpgmaker-mz:rpgmaker-authoringfrom RPG Maker MZ
Provides authoring judgment for RPG Maker MZ games built with the rpgmaker-mz MCP server. Covers tile layering, NPC/event placement, transfers, shops, chests, battles, and custom casts. Emphasizes that validators check structure, not playability.
Ships in RPG Maker MZ. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The mcp__rpgmaker-mz__* tools let you build a game, but a build that succeeds and
passes validate_project/validate_references/validate_event can still be a badly
built game — invisible NPCs, terrain with black gaps, entrances you walk into,
battlers that fail to load. This skill is the authoring judgment the tools don't
enforce, distilled from real playtests. Read it before/while building a game.
validate_* check command shape and id integrity. They will not catch: a
transparent tile with nothing beneath it, an NPC with no sprite, a battlerName that
doesn't exist, a transfer placed on the wrong tile, a class that always misses. The
only way to know the game is good is to open it in the RPG Maker editor and play it.
Treat "validators clean" as necessary, never sufficient.
The flip side: the event-writing tools refuse a write whose result is structurally
broken (wrong parameter count for a command code, a list missing its { code: 0 }
terminator, a choice/conditional/loop block left unclosed or missing a When branch, an
action-button event stranded on an impassable tile) — the tool errors
and nothing is saved. That error is a real bug in what you were about to write: fix
the input. force: true writes it anyway and exists for the rare case where the
validator is wrong (an exotic plugin, a deliberate experiment) — reaching for it to
make an error go away just puts the broken data on disk, which is what the refusal
saved you from. Advisory findings (unknown command code, unknown asset name, long text
line) still come back as warnings on a successful write — heed those too.
When you finish a chunk, say what still needs an in-editor look.
Each map cell has 6 stacked z-layers in the flat data array
(index = (layer*height + y)*width + x):
| layer | role |
|---|---|
| 0 | lower ground A (opaque base terrain) |
| 1 | lower ground B (overlays) |
| 2 | upper tile A (objects, drawn over the player) |
| 3 | upper tile B |
| 4 | shadow pen |
| 5 | region id |
The tilemap renders bottom-up (0→1→2→3) with per-pixel alpha — upper layers composite over lower ones, and transparent pixels reveal what's beneath.
Many autotiles are overlays with transparent/feathered edges — Overworld forest, roads, mountains, and similar decorative terrain elsewhere. If you paint one directly on layer 0 (the paint default), it replaces the base and its transparent pixels show the black empty background, not ground.
Do this:
fill_area(mapId, x, y, w, h, grassId) (layer defaults to 0)fill_area(mapId, x, y, w, h, forestId, layer: 1) — roads, forest, mountains.place_object
(its default), so they draw over the ground and the player can walk behind them.Autotiling still works per-layer: forest on layer 1 borders against forest on layer 1 only (the base grass on layer 0 doesn't affect its shape), so a clump still feathers its edges — and now grass shows through the feathering. Passability resolves upper-first, so the layer-1 overlay decides the cell with the base as fallback.
Heuristic: opaque, full-cell ground → layer 0. Anything decorative that should "sit on" the ground (forest/road/mountain/most named-feature autotiles) → layer 1 over a base. When unsure whether a tile is transparent, assume it is and layer it — or check the sheet's alpha.
data/Tilesets.json: each entry's id/name and tilesetNames[9]
[A1,A2,A3,A4,A5,B,C,D,E] (empty string = unused sheet). You need the tilesetId
for every paint/catalog/flag call.tilesetId first (get_map/check_passability
report it). Tile ids are position-based and valid under any tileset, so painting ids you
looked up in tileset 3's catalog onto a map still set to tileset 1 succeeds silently and
renders the wrong graphics with the wrong passability. The default/pre-existing MAP001 —
and every create_map call that omits tilesetId — is tileset 1 (Overworld). Fix with
update_map(mapId, { tilesetId }) (safe: it doesn't touch tile data), then re-verify
passability.find_tile(tilesetId, query) (case-insensitive substring,
not synonyms — "water" won't match "Sea"; browse names with
get_tile_catalog(tilesetId, sheet) first) or get_tile_catalog. On a custom
sheet cataloged by the tileset-catalog skill, searchDescriptions: true also matches
the drafted visual description, which is often more searchable than the name. Autotile entries
return the kind's base id — paint it and the shape is computed from neighbours.update_map changing width/height does not
resize the tile data array — it corrupts the map. Create the map at the size you
need with create_map(name, width, height, tilesetId, parentId) instead.check_passability(mapId, x, y).Landmarks the player should not walk through (buildings, dungeon mouths, trees, signs) should be solid, and the transfer should trigger from the tile the player faces them from — not from walking onto the landmark.
place_object it, then if the tile isn't already
blocked, set_tile_flags(tilesetId, tileId, { passage: { down:false,... } }, applyToAutotileKind) — or check with get_tile_flags/check_passability.same. With
priority below (the blank-page default), an action-button event fires only when
the player is standing on its tile — so on an impassable tile (a !Door on a
wall, an invisible trigger on a solid landmark) it can never fire at all. Any
event the player activates by facing it — doors, entrance triggers on solid tiles,
signs — needs priorityType: 1 / priority: 'same'. (create_npc defaults to
same; create_map_event pages default to below — set it explicitly.) The write
tools refuse this combination on an impassable tile rather than placing a dead
event; fix the priority, don't force past it.trigger: action_button,
priority same event on the solid landmark tile (or the wall the door sits
on); the player faces it and presses to enter. Best for buildings/dungeon
entrances/doors.trigger: player_touch, priority below
transfer event on a walkable door/threshold tile the player steps onto. Fine for
interior exits and map-edge gaps.player_touch transfer sitting on a decorative marker tile you can walk
onto — it works but reads wrong (you walk into the building to leave).build_transfer_player(mapId, x, y, direction, fade) →
insert_event_commands (or pass in a create_map_event page list).create_npc with no characterName (and no
tile graphic) makes an invisible NPC — almost always a mistake for a talker. Pass
characterName (a basename from list_assets('characters')) + characterIndex.
Invisible is only correct for pure trigger/controller events (auto-run logic, doormat
transfers).\C[n], \N[n], …)
don't count toward the display width.build_control_switch(scope:'self_switch', name:'A', value:'on') at the end.conditions: { selfSwitchValid: true, selfSwitchCh: 'A' }, showing the
"done" state (opened chest graphic, or empty for a removed boss). create_map_event
deep-merges page conditions, so you only pass the two fields.next_free_id. These
are one global namespace, and reusing an ID some other part of the game already owns
fails silently: no crash, no validator hit, just a door that turns out to be already
open hours into a playtest. next_free_id(type, count?) hands back IDs nothing has
claimed; list_allocated_ids(type) shows what's taken, and with an id shows every
place that one is used before you touch it. Then name what you take with
set_switch_name / set_variable_name — an unnamed switch is a claim nobody wrote
down, and naming it is what makes it visible later. (Self switches are exempt: they're
scoped to their own event and can't collide.)build_* tools return { command } or { commands };
concatenate them into a page list (for create_map_event/create_npc.commands) or
splice with insert_event_commands(mapId, eventId, pageIndex, commands).
call_common_event returns { command } like the build_* tools, so it composes
the same way.insert_event_commands (dialogue chunks) with
set_movement_route (movement) on the same page — both append before the terminator,
so build the page in play order. For custom/raw routes, the move-route codes you
actually need (full table: KNOWN_MOVE_COMMANDS in src/validation/moveCommands.ts):
1–4 move down/left/right/up, 12/13 step forward/back, 14 jump [dx,dy],
15 wait [frames], 16–19 turn down/left/right/up, 25/26 turn toward/away
from player, 29/30 speed/frequency [n], 37/38 through on/off, 39/40
transparent on/off, 41 change image ['SheetName', index], 44 play SE. A
wrong code isn't refused (plugins add codes) — it's a warning plus silently-weird
choreography, so double-check codes, and set skippable: true on forced routes so a
blocked step can't soft-lock the scene. An off-screen actor entering mid-scene: give
the event a graphic-less through: true page and open its route with
41 ['SheetName', index] + 38 (image on, through off), rather than pre-placing a
visible sprite.target:
insert_event_commands(target: "common_event", commonEventId, commands) or
insert_event_commands(target: "troop_page", troopId, pageIndex, commands).
(target defaults to "map_event", which is why the map form above can omit it.)
Building the whole list up front and passing it to create_common_event/
create_troop also works — append a { code: 0, indent: 0, parameters: [] }
terminator, or the write is refused as unterminated.{ code: 22, dataId: 0, value: 0.95 } — passed in traits. The default templates
ship traits: [], and HIT sums from 0 with no baseline, so a trait-free battler
always misses physical actions. (create_class/create_actor/create_enemy
descriptions carry this NOTE.)learnings only
teach the skill — the actor can't see or use it unless the class also has an
Add Skill Type trait for that skill's stypeId:
{ code: 41, dataId: <stypeId>, value: 1 } (default DB: 1 = Magic, 2 = Special).
Without it there is no Magic/Special command in battle or the menu at all — the
symptom is "my characters have no skills" even though learnings are correct.
Check each learned skill's stypeId in Skills.json and cover every distinct one
with a code-41 trait (a class mixing Magic + Special skills needs both).Failed to load img/enemies/Foo.png). Check names against
list_assets(...) before wiring: battlerName → enemies, characterName →
characters, faceName → faces, audio → bgm/bgs/me/se. Several tools warn
on unknown names (warn-by-default) — heed the warnings, don't ignore them.add_class_learning skillId, create_troop enemyId,
call_common_event), but others silently accept a dangling id
(create_state_skill stateId, create_enemy actions/dropItems, skill/item
effects dataIds). After building, run validate_references to catch dangling
ids across the whole project.set_party({ partyMembers: [...] }) (actor
ids; note the arg name differs from get_party's bare array) and
update_starting_position(mapId, x, y). A game with no party or a start on a blocked
tile is broken.build_troop_page({ when, span, commands })
fills the 12-field conditions object; land it with add_troop_page(troopId, page)
(appends without re-sending the other pages). when keys are ANDed: turn [a, b],
enemyHpBelow [slot, pct], actorHpBelow [actorId, pct], switch, turnEnd.enemyIndex is the 0-based troop slot (members[] order), never an enemy id —
for HP conditions and for build_battle_command (enemy_appear / enemy_state).battle runs once per fight (phase change at HP%), turn once per
turn (anything repeating — a recurring turn [a, b>0] page on battle span fires
only the first time), moment re-runs while true (guard it with a switch).members with hidden: true, then an
enemyHpBelow page with build_battle_command({ kind: "enemy_appear", enemyIndex }).abort_battle (340) ends the battle with no
victory/defeat; the calling Battle Processing takes its Escape branch, so give it
canEscape: true and put the aftermath there.Warn the player one turn before a big hit, every cycle (turn-based battle system):
actions: a wind-up skill (e.g. "Gather Power", or one that adds a
"Charging" state) at conditionType: 1, conditionParam1: a, conditionParam2: b, and
the big move at conditionType: 1, conditionParam1: a + 1, conditionParam2: b. Give
both a rating ≥ 3 above the enemy's normal actions — the engine drops every action
rated ≤ (max − 3), so they are forced on their turns.build_troop_page({ when: { turn: [a, b], turnEnd: true }, span: "turn", commands: <build_show_text "The golem is gathering power!"> }) → add_troop_page.
Troop-page and action-pattern Turn conditions count the same battle turn (the enemy
chooses turn N's action while the troop count is N−1, +1; the page checks after it
ticks to N), so turn [a, b] + turnEnd shows the warning at the end of the
wind-up turn — right before the player picks commands for the big-move turn.
Without turnEnd, the page runs at the start of turn N's actions instead.validate_project (command shape), validate_references (id integrity),
validate_event on the complex events.python3 -m http.server 8123 -d <project>), npm i playwright-core in a scratch
dir, and launch an already-cached Playwright Chromium
(~/Library/Caches/ms-playwright/chromium_headless_shell-*/chrome-headless-shell-mac-arm64/chrome-headless-shell,
args --use-gl=angle --enable-unsafe-swiftshader) — no browser download. Keyboard
events do NOT reach RMMZ headless; drive the engine in page.evaluate instead:
DataManager.setupNewGame(); SceneManager.goto(Scene_Map) to start,
$gamePlayer.reserveTransfer(mapId,x,y,dir,0) to jump maps (it is deferred while a
message window is open), $gameMap.event(id).start() to fire an event,
Input.virtualClick('ok') to advance text. Collect console/pageerror output and
screenshot each map/cutscene/battle, then look at the images — this catches the
rendering/asset problems validators can't (wrong tileset, invisible NPCs, missing
battlers).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub redseb/rpgmaker-mz-mcp --plugin rpgmaker-mz2 skills in this plugin
Other plugins' skills for the same job