Build a whole map in one call
make_mapCreates or updates an RPG Maker MZ map from a paint plan, resolving tile layers and passage flags in one transaction to prevent walkability issues.
Instructions
One intent — "a 26x18 field of grass, with a stone floor and a wall ring and a gap for the door" — as one call. It makes or reuses the map, sets its tileset, resolves the entire paint plan, writes it in one pass, applies the passage flags the plan names, and answers with the rendered map. Before this the high-level layer stopped at content and every build script had to drop to create_map + set_tiles per map, which is where the depth mistakes came from.
The plan is resolved to one tile per cell, the last stroke winning, because that is how the engine decides passage: Game_Map.checkPassage reads tile layers 3 down to 0 and returns on the first tile whose flags say something, so a wall left on layer 3 underneath a floor tile still blocks the doorway — the map renders as a room and the player cannot walk out of it. Paint ground first, then what sits on it, and nothing is ever stacked. On a repaint the plan owns the cell's whole stack: every layer it does not name is zeroed, so last run's roof cannot survive under this run's floor.
Each tile still lands on the layer its own slot belongs to (A1/A2 → 1, A3 → 2, A4 → 3, A5/B–E → 0); that is set_tiles with layer omitted, so a forest is never buried under the grass again.
flags is handed to set_tileset_flags for this map's tileset in the same transaction, so "these ids are walls" is stated where the walls are painted. regions paints layer 5 for make_encounter_zone to roll on. The reply counts the walkable cells the finished terrain leaves, because a map with no walkable cell is not something the engine will report — it is a game that boots and never moves.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fill | No | Tile id for every cell, under all the paint strokes | |
| find | No | Reuse the map whose tree name equals this, making it if there is none — the idempotent form for a build script | |
| name | No | The map's name in the map tree | |
| flags | No | `set_tileset_flags`' own `tiles` entries ({tileId|range, passable, blockFrom, bush, counter, terrainTag, …}), applied to this map's tileset | |
| mapId | No | Re-paint this map instead of making one | |
| paint | No | Rectangles and cell lists, applied in order over `fill`; later strokes win | |
| width | No | Required for a new map; ignored on a repaint (resizing means rebuilding the tile array) | |
| dryRun | No | Report the plan and write nothing | |
| height | No | ||
| regions | No | Painted on layer 5, on top of whatever tile is there | |
| parentId | No | Map-tree parent for a new map (default 1) | |
| tilesetId | No | Required for a new map; changing it on a repaint re-reads every tile id against the new flags | |
| properties | No | `set_map_properties`' own fields: displayName, disableDashing, battlebacks, parallax, bgm/bgs, encounterStep, encounters… | |
| clearRegions | No | Erase these region ids from the whole map first |