In this tutorial, we will build a cave. We will not use Snippets. This article explains to you how to define your dungeon’s overall design and how to individualize it by adding elements such as water, grass, dirt, boulders…
Create a Map and call it „Cave Space“, or any other name. You decide. Choose a width and height and other settings like Tileset or BGM. Choose one ceiling and one floor tile and draw something like this:
The plugin scans for only these two tiles, so please draw them this way.
What’s up with the walls? We will do them later, don’t worry.
You may add Events for background effects such as noises or weather effects. Please put them on any other tile than the two tiles we placed before.
This Plugin scans for child maps that are under your Space map to enable an additional feature. If you don’t want to use it, simply remove or rename the map.
Tip: To temporarily disable a Feature Map, just append a symbol to its name, e.g., „Structures_“
Structures & Walls
Now, we define how walls should look like. Create a new Map, call it „Structures“ and draw something like this:
Well, I admit, this map looks confusing. You can just copy-paste this screenshot into your game or read further to learn how a Structures Map works.
Main article: Post Processing – Structures
A Structures Map defines rules to replace parts of a generated Map with other tiles. It is usually used to scan for areas where the ceiling hits the floor to put walls in between, but it’s not limited to this mechanic.
Instead, it is written generically. It replaces whatever is on the left of the blank tiles with the tiles on its right.
Our cave can have some sub-biomes – if you wish!
In this example, we will add grass and a crystal floor. As there’s no smooth transition from rock floor to crystal floor, I decided to not use a floor but invisible Region Tiles instead.
Create a Map, call it „Biomes,“ and draw something like this:
You can safely skip grass or crystal floor when you don’t want to have grass or crystal floor.
Warning: You must have at least one tile on the right. If you don’t want to have this feature at all, leave out this map.
Dirt & Shadings
If you want to add some shadings, create a Child Map, call it „Shadings“ or „Dirt“ (both are okay), and draw something like this:
Why are there 2 rows? Because we have two biomes where we want dirt to be drawn. The default one and the one having the Region Id 22. If you don’t want to have dirt on the crystal floor, simply skip this row.
Deep Dive: Post Processing – Shadings
If you want to add some grass, create a Child Map, call it „Grass“ (exactly this name), and draw something like this:
- The piece on the left must be your floor tile
- There must be a blank tile
- Put one grass tile on the right
If you want to add some water, create a Child Map, call it „Water“ (exactly this name), and draw something like this:
A water tile is allowed to override the ceiling tile; this is why the ceiling tile is also there on the left.
Tip: Don’t be afraid of blocking the player. This plugin uses some algorithms and functions to put water only on tiles where it will never block the player.
If active, the generator will draw one or more roads to connect the map’s exits.
The rules of the Shadings Map apply. Create a Map, call it „Roads“, and draw something like this:
Create a new Map, call it „Details,“ and put it below the Space Map. Draw something like this:
Wow, this is a lot. If want to learn how this Map works, read here: Post Processing – Details
Some tips from my side:
- Groups 1 and 2 define those green plants. In group 1, I scan for the grass floor, and Region Tile 61 is closer than in group 2. This makes it more likely to grow plants when the floor is made of grass.
- In groups 4 and 5, I define that crystals can only spawn on the area with the invisible Region Id 22, which we put in a few steps before.
Loot Chests, Monsters, and other Gameplay-related Objects
We define those objects in a Map called „Assets“.
Read more: Post Processing – Assets
Chests and monsters can spawn on any floor (but not on the water, ceiling, etc.); we need to add all our dungeon’s floors on the left of every row.
The Region Ids on the left became more relevant. By default, this plugin offers you 3 reserved Ids:
- 20: Loot chests
- 21: Monsters
- 22: A single switch (e.g., for puzzles)
How can I change the number of spawns, and how can I add new assets?
You may use any other Region Id. To add or change Region Ids, or to change the number of how often an object spawns, go into Templates/Plugin Manager.
Plugin Manager & Templates
In the Plugin Manager -> MK_RNGMaps_withoutSnippets -> Templates you can manage Templates. Here you can change or add new rules, e.g. assets or other details such as water, dirt, …
You can look at this later because there is already a pre-defined Template for Caves that provides many rules.