In this tutorial, we look at how you can create randomized Maps without defining Snippets.
Step 1 – The Space Map
Let’s create a Map and call it „Space Map“. Feel free to set BGM, encounters, or other settings for this map. Choose the map size wisely as it will be used in the Game; I usually use 40×30. Keep the map blank.
Step 2 – Pick a Template
This Plugin series comes with a set of pre-defined templates that you can pick, each with individual features and rules described in their respective blog post.
Articles coming soon!
Step 3 – Eventing
Finally, we can write the event command to start the generator. You can use Common Events to re-use your commands.
The player must be on the Space Map before you invoke the generator. The plugin relocates the player for you, so your transfer event can point anywhere on your Space Map.
Your (common) event, therefore, consists of:
- a Transfer Event (any position on the Space Map)
- a Script Call (MV)
- Plugin Command (MZ)
It’s useful to add some fade-in and fade-out effects to wrap everything.
MZ: Plugin Command
Here you define the directions into which your dungeon has exits. Note, that the entrance is treated as an exit, too. You also define from which direction the player spawns.
Non-Programmers, don’t be afraid. You don’t need any programming knowledge.
Make a Script command and copy-paste this:
$mapGenerator.template("Cave") .withExit("top") .withExit("bottom") .spawnPlayerAt("bottom") .finalize()
You can have the line
.withExit(x) up to 4 times; one for each direction (top, left, right, bottom).
Spawn Player at:
You can pass a direction (top, left, right, or bottom) or an x, y-pair. Example:
Replace 1 and 2 with your Variable Ids.