This plugin series lets algorithms generate a skeleton first and then provides a set of functions to beautify it step-by-step to get a whole map. This so-called post-processing is independent of the chosen algorithm – in other words: you can use all the features described below in combination with every map generation algorithm (but not the algorithms from the snippet-based plugin, sorry).
Each function tries to imitate a map designer’s work step when mapping. These steps are:
- Walls, elevated floor, …
- Shadings (e.g. darker grass, dirt, …)
- Bioms (e.g. desert, snowland, ashes on a Worldmap)
- Large objects or assets
- Details (e.g. plants, flowers, small rocks, …)
All actions can be done in any order, even multiple times or omitted. We go through all of them and explain how to combine them to create a fancy map.
Using the Structures feature, you can define rules that scan for specific areas and replace them with pre-defined tiles. The most prominent example here is to look for places where a ceiling tile meets a floor tile and to draw a wall in here.
Let’s create a new map, call it „Structures“ (or any other name) with the same tileset you selected in the Space Map, and put it below.
Now, let’s look at this screenshot:
This map defines, on its left, combinations of tiles, that the generator will scan for. Any area from the generated map that fits one matcher is replaced by any combination from its right. We’ll go into more detail now. Each row consists of
- one Region Id block (blue) that assigns this row with a width&height and a number. The number does not matter, so just start from 1 and count up.
- at least one Matcher (orange); each matcher must have the same width&height as your region Id block. Use blank tiles as a joker.
- one blank area with the same size as your region Id block to separate matchers from replacements. If your matchers have a width of, e.g., 2 each, then the blank area must be 2 tiles wide, too.
- at least one Replacement (green); draw what should be drawn by the generator. For instance, walls, assets, dirt… You can set a Region Id Stopper 61 to make blank objects (see example in Tip&Ideas)
Having a 61 Stopper Tile, the generator will now include all assets on its left, regardless of whether they are blank. As a blank tile won’t modify the result, you can use this technique to draw assets by probability. Looking at this screenshot above, there’s a roughly 1:3 change of an object being placed.
Tips and Ideas
- You can have multiple maps to define Structures to organize your setup. I usually have a map called „Structures“ and a map called „Details.“
- The generator works from top to bottom. That means you can use the upper rows to define basic structures, walls, etc., and then you can set a wall as a matcher to define more details.
- You can draw the same element multiple times to get a ratio. E.g., you can have three regular statues and one broken one.
- You can use the Region Id Stopper 61. For example, draw 4 different flowers, leave 20 tiles empty, and then draw a Region 61 Stopper. Then you get a 1:5 ratio that a flower is drawn.
- Having a wall and a water tile below will create a waterfall! (every time or by chance, as you define it)
- Wall tiles right next to water tiles will have a higher chance of having greens.
Last but not least, you can build an elevated floor too!
The „Details“ feature works similarly to the Structures feature with one exception: Impassable assets are not drawn on areas that need to be passable according to the chosen algorithm. Every map generation algorithm defines „reserved“ spaces automatically. Use this feature to add details or assets while not being afraid of blocking your player.
Note: The „Static Map“ does not support this feature.
An Asset Map works basically the same as the Structures Map but has some special rules. While tiles on the Structures Map are drawn consistently, decorations are not added automatically. Decorations are added x-times instead, and therefore they are usually used to spawn loot chests or monsters.
To create a Decoration Map, create a new Map, call it „Assets“ (exactly this name), again use the same Tileset, and put it below the Space Map. Place Assets as we did before in the Structure’s Map.
Don’t use reserved Region Ids 5, 6, 13, and 61.
Shadings are usually used to draw darker grass, dirt, or any other tile to gain more variety on the map.
Create a Map with any Name (I recommend calling it „Shadings“) and put it below the Space Map.
A Shadings Map consists of one or multiple lines containing these blocks:
- At least one Matcher
- one blank Tile
- one Tile that will be the replacement for the Tiles on the left
You can draw multiple lines to set up Rules for different biomes, e.g., grass becomes darker grass, rock floor becomes dirt, etc. However, having more than one replacement in one line is not supported.
The Map setup to draw Biomes is slightly different from the configuration of the Shadings and Paths. It accepts only one line but outputs multiple Tiles. A Worldmap can accept all kinds of grass and replace it with desert, snowfields, mountains, etc.
- one line
- one or multiple matchers on the left
- one or multiple replacements on the right
Tip: You can also use the biomes feature given a (custom) tileset with various grass types.