Meta Maze – Multiple Exits

All from our dungeons always had one entrance and one exit. Although it was possible to make more than one exit using some tricks, it was not well supported. Here the Meta Maze comes into play. This add-on sets up an imaginary maze for you and helps you build a larger dungeon that has exits to the west and east. Such mazes will be a huge game-changer in your game but be aware, they can raise your dungeon’s complexity a lot.

It’s not required for a Meta Maze to actually look like a Maze; you can also make a linear road or a tower with 10 floors that the Player must solve. The Plugin will memorize Self-Switches for you, which means, when a player opens a chest, leaves the current floor, and revisit it later, the chest will remain in its state of being looted. The Plugin also offers you some convenient functions, e.g., get the Player’s position inside the Maze to draw a Minimap.

A Meta Maze is a maze itself, which requires some function calls to set up properly. I recommend you to open the Sample Project in the Maker while reading this tutorial.

Step 1: Map Setup

You will need to update some maps first.

⇨ Exits via Decoration Map

Just as we already drew the Entrance and Exit before, we draw 4 Exits while they require one Spawning Point each. Check the according Region Ids in the table below; you can change them in the Plugin Manager if you need to. Finally, we put some transfer events just as shown in the picture; we will fill their command lists later.

Region IdSpawn Point
Top56
Bottom1314
Left89
Right1516

If you want to use alternative exits that indicate if they lead to the next map or the real exit of this dungeon, go here.

⇨ Using Make Way out

Just as we already put spawning points on the Snippets, we need to put spawning points for all the other directions. Get the Spawning Point Ids from the table below; you can change them in the Plugin Manager if you need to.

Spawn Point Id
Top6
Bottom14
Left9
Right16

⇨ Using Noisemap Generator

You need to have at least one „Path“ Map. You’ve probably already done that.

Step 2: Create Meta Maze

Right before the Player enters the generated Map, call this Script once to create the Meta Maze:

$metaMaze.grid(width, height)
.withExit("top")
.withExit("bottom")
.apply()
.enterAt("bottom");

Go here to choose from all the available layouts.

Step 3: Update Dungeon Generation Calls

You don’t need multiple Calls for every direction anymore, but only one. Go to your command that generates your dungeon and update it as follows:

Remove these linesAnd replace them by one single line
placeEntranceAt(…)
placeExitAt(…)
placeExits()
makeWayOut(…)makeWaysOut()
drawPath(…)drawPaths(mapName, thickness)

Step 4: Go to next Map

Go to your event(s) that transfer the Player to the next Map. These are either the exits on your Decoration Map or the event with a „parallel process“ on your Space Map.

Use this line to let the Player move to the next Map:

$metaMaze.goTo(direction)

whereas direction must be one of these: „top“, „bottom“, „left“, or „right“.

Do a Conditional Branch –> Tab 4 –> „Script“ and insert

$metaMaze.isInsideMetaMaze()

to check if the Player is still inside the Meta Maze. If so, call your Event that generates the Dungeon. Otherwise, you can transfer the Player to your desired location on your Worldmap or doing anything else. It’s up to you!

This is an example of a full Event Code:

To reduce the chance of bugs, you should call this script when the Player leaves the dungeon:

$metaMaze.reset()

Users of RPG Maker MZ can use some Plugin Commands to avoid the usage of JS Calls. It’s up to you!