This article describes how to use randomly-generated dungeons using the scripts included in Pokémon Essentials.
- A dungeon map is a type of map.
- Dungeon maps are drawn using three different autotiles.
What are dungeons?
Dungeon maps feature heavily in the Mystery Dungeon set of Pokémon games. A dungeon map is a collection of small rooms and connecting corridors, with one entrance and exit. They typically take the form of cave systems.
The layout of a dungeon map is randomly generated every time it is entered. The same dungeon map will never have the same layout in successive visits.
One drawback with dungeons is that they are quite plain, as by default they only use up to three different textures, and the only decorations are events.
Setting up a dungeon map
To create a dungeon map, simply create a blank map and set its "Dungeon" metadata to TRUE. Whenever that map is entered, its layout will be randomly generated. The dungeon will fill the entire map, so change the size of the map to make the dungeon bigger or smaller.
You will also need to make sure the dungeon map uses the proper graphics. Dungeon maps are drawn using the first 3 definable autotiles of the tileset set for that map, in the following order:
- The area surrounding the map, usually blackness. Unpassable.
- Floor. Passable.
- Wall. Unpassable.
You should use a separate tileset just for dungeons, set up with appropriate autotiles.
Filling up the dungeon
You can place events anywhere on the map. The game will place them randomly on the dungeon floor when it generates the dungeon.
One vital event you must include is one that moves the player to a new map; this is the only way the player will be able to leave the dungeon.
You can also define "Cave" encounters as you can for any other cave.
- The minimum recommended size for a dungeon is 40x40 tiles. This allows for up to 4 separate chambers connected by 3 corridors on each side (with up to 16 chambers in total).
- Modify the dungeon generator to make the dungeons look better, e.g. to use more graphics from the tileset such as random rock formations, pools of water, etc.
- To keep a dungeon useful as a training area, you can modify the wild Pokémon's levels so that they are based on the levels of the Pokémon in the player's party. The dungeon in the example maps do this with a script in the script section PokemonEncounterModifiers.
- Dungeons don't need to be just caves. Experiment with other environments, e.g. pyramid interior, deep forest, ocean reef.