paint_blueprint
Generate an entire RPG Maker MZ map region from an ASCII blueprint in one call: map glyphs to tiles, multi-layer cells, or A4 walls, then write all validated cells at once.
Instructions
Paint a whole map area from an ASCII blueprint in ONE call and one write. rows are equal-length strings (one glyph per cell); legend maps each glyph to what that cell holds: [[layer, tile], ...] pairs (multi-layer cells, e.g. ground on 0 + fence on 1); a bare string = a catalog tile name on layer 0; { wall: { top, side?, faceHeight?, layer? }, tiles?: [...] } = an A4 wall (or A3 roof) — every cell gets the wall-top kind and the bottom faceHeight (default 1) cell(s) of each vertical run get the wall-side kind (derived as top + 8 kinds = +384 ids unless side is given; a run continuing off the map's bottom edge gets no face); or null = leave the cell untouched. Tiles may be ids or catalog names (exact name, else a unique substring — unknown/ambiguous names are an error). Row lengths, unknown glyphs, names and fit are all validated before anything is written. With clearUpperLayers (default true) each painted cell zeroes the tile layers (0-3) above its lowest specified layer that it does not specify, so stale objects vanish ([] erases the cell). Autotiling is recomputed once per layer, as in paint_tiles. Returns cells painted per layer, cleared count, wall faces made, and a passability overview of the rectangle, judged like the engine's canPass (a step needs the source to allow leaving and the target to allow entry): rows with # = impassable — a cell with no walkable direction (face, water, solid object) or part of a region whose own edge flags refuse entry from the walkable cells around it (an A4 wall-top mass, a stair-less plateau) — and . = walkable ground, plus the impassable [x, y] cells. Stamp multi-tile B/C objects afterwards with place_object.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | Blueprint rows, top to bottom; every row the same length, one glyph per cell | |
| mapId | Yes | The ID of the map | |
| dryRun | No | Preview only: return a diff of what would change without writing to disk. | |
| legend | Yes | Glyph → cell contents (see the tool description for the value forms) | |
| origin | No | [x, y] map position of the blueprint's top-left cell (default [0, 0]) | |
| clearUpperLayers | No | Zero the tile layers above each cell's lowest specified layer that it does not specify (default true) |