Mirage Source 6
Extending / Importing RPG Maker Maps

Importing RPG Maker MV/MZ content

MS6 stores every map as a fixed-size grid of cells, each with up to 9 stacked tile-graphic layers plus one interaction (type) — see Architecture. demo/content/rpgmaker-import/ is a content-pipeline tool that reads a plain RPG Maker MV or MZ project's map JSON directly — no intermediate file format — and converts it straight into that same grid shape, autotiles and all, so it flows through the ordinary content→SQL build pipeline like any hand-authored map.

Licensing is on you. RTP/stock RPG Maker assets are licensed for use in games made with RPG Maker, not necessarily for redistribution as raw, extractable files in an unrelated public repo — and a specific commercial game's bespoke art is a different, usually stricter question again. This tool will happily decrypt and convert whatever project you point it at (including RPG Maker's standard image encryption, since the decryption key ships in the project's own files) — check you have the right to use the result before shipping it.

How a map gets converted

RPG Maker's autotiles aren't simple raster tiles — each placed tile is really 4 independently-chosen 24×24 corner pieces, composited at draw time from a shared source sheet. MS6 has no such concept, so instead of teaching the engine that compositing logic, the importer does it once, up front, per map:

1

mz-tiles.mjs is a direct port of RPG Maker's own tile/autotile addressing tables (read out of an exported game's bundled js/rmmz_core.js), so tile IDs resolve to the exact same source pixels the original game would draw.

2

flatten-tileset.mjs pre-renders every distinct tile id a map actually uses into one composited chipset image per source category (water/ground/walls/cliffs/each object sheet) — not one giant merged sheet, so chipsets stay browsable in the map editor and a map can freely mix tiles from different source sheets, same as picking a different chipset per tile always could.

3

mz-map-to-maprec.mjs ties it together: given a set of maps sharing one tileset, it flattens what they use, writes the resulting chipset PNGs straight to assets/chipsets/, and builds each map's tile grid — MZ's lower/upper tile layers become MS6 layers Ground/GroundOverlay/Fringe/FringeOverlay, per-tile shadow bits become a synthetic shadow chipset, and MZ's own passability flags (Tilesets.json's flags) decide Blocked directly — no guessing.

One map size for the whole world. The server treats GameServerConfig.mapWidth/mapHeight as one fixed bounding box for every map (movement clamps, NPC wander bounds, occupancy grid). A source map smaller than that shared size is anchored at (0,0) and padded with empty, Blocked "void" cells out to the full canvas (convertMzMapsToMapRecs's canvasWidth/canvasHeight do this for you) — don't stretch it. Pick the canvas size from your largest included map and skip (or separately import at a different size) anything wildly bigger, like a full overworld map.

Everything else the pipeline pulls in

Alongside maps, the same content/rpgmaker-import/ helpers convert the rest of a project's assets into MS6's conventions: characters.mjs slices character sheets into per-NPC/player sprite PNGs (remapping MZ's Down/Left/Right/Up row order to MS6's Up/Right/Down/Left), faces.mjs slices portrait sheets, and titles.mjs composites a titles1 background with a titles2 overlay into the single flat image MS6's login screen expects. Music and sound effects (.ogg, played via a plain <audio> element client-side — any browser-supported format works, no transcoding needed) copy straight into assets/music//assets/sound/, referenced by filename from a map's music field or GameServerConfig.loginMusicId.

A worked example putting all of this together — content/project1-import/build.mjs — pulls a full asset library (characters, faces, titles, parallaxes, pictures, item/spell icons from the stock IconSet, audio) from one MZ project and its actual map content from another, wiring MZ "Transfer Player" events up as MS6 warp tiles along the way. That's the file to start from and adapt for your own project.