generate_map
Generate RPG Maker MV maps using blank, themed, procedural, batch, duplicate, or template modes. Customize theme, size, events, and seed for reproducible output.
Instructions
Create a new map file (next free map ID, registered in MapInfos.json; both files written immediately). mode selects the generator: "blank" makes an empty map you paint later (edit_map fill_layer); "themed" generates a simple tile layout for a theme using the tileset's real tiles; "procedural" is the full generator — for themes with matching RTP reference templates (town, dungeon, interior, castle, world, etc.) it CLONES a hand-authored template from the 106 bundled maps (real 3D buildings, walls, furniture), auto-picking the closest size; for themes without templates (beach, swamp, etc.) it generates procedurally (Perlin terrain, BSP dungeons, cellular caves). Same seed + params = same map. Pass templateId to force a specific template, or useTemplate:false to force procedural. 21 themes incl. snow, volcano, sewer, space_interior; "batch" generates several procedural maps in one call from batch specs; "duplicate" copies an existing map (transfer events still point at their ORIGINAL destinations — review them); "template" instantiates one of the 106 bundled reference maps by templateId (list them with get_project_context detail "templates"). Returns {mapId, ...} — procedural also returns the seed; batch returns all mapIds keyed for edit_map "connect". Fails with an error on unknown theme/template or unwritable files.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Which generator to use; see the tool description. Default "procedural" | |
| name | No | Internal map name for the editor tree (required for mode "duplicate") | |
| displayName | No | Location name briefly shown to the player on entry | |
| width | No | Map width in tiles (defaults: blank/themed 17, procedural 30; template uses the template's size) | |
| height | No | Map height in tiles (defaults: blank/themed 13, procedural 25) | |
| tilesetId | No | Tileset to render with. Defaults to the one matching the theme (Outside=2, Inside=3, Dungeon=4, Overworld=1), so you normally omit it — only set it to override. A mismatched tileset renders the map as garbage | |
| theme | No | Required for themed/procedural. themed: forest, dungeon, town, castle, cave, village, swamp, desert, ruins, interior, beach. procedural adds: snow, harbor, volcano, sewer, fortress, magic_forest, magic_interior, space_interior, space_exterior, world | |
| seed | No | procedural/batch: random seed for reproducible output (omit for random; returned in the result) | |
| addEvents | No | procedural: also place themed NPCs/chests/bosses/transfers (default true) | |
| enterableHouses | No | procedural town/village only: also auto-generate an interior map per house with a two-way warp (action-button door outside → interior, walk-on mat inside → back to the street). Default true; the new interior map IDs are returned in interiorMapIds | |
| encounters | No | procedural combat themes (dungeon/cave/world/fortress/sewer/volcano): auto-populate the map's random encounters from the project's existing troops so enemies appear while walking. Default true (no-op if the project has no troops yet) | |
| parentId | No | Map tree folder to nest the new map under (0 = root) | |
| bgmName | No | Audio file from audio/bgm/ to autoplay on entry | |
| note | No | Free-form note field for plugin metadata | |
| batch | No | mode "batch" only: one spec per map [{key, name, theme, width, height, tilesetId, seed, parentId}]; key is echoed back to match returned mapIds | |
| sourceMapId | No | mode "duplicate" only: existing map ID to copy (unchanged by the operation) | |
| templateId | No | mode "template": bundled template ID. mode "procedural": OPTIONAL — force a specific template ID (from get_project_context detail "templates") instead of auto-picking by theme+size | |
| keepEvents | No | mode "template" only: also copy the template's events (default true) | |
| useTemplate | No | procedural: when true (default), clone an RTP template for themes that have one (town, dungeon, interior, etc.) instead of generating procedurally. Set false to force procedural generation even when templates exist |