|
|
| Line 22: |
Line 22: |
| == Priority System == | | == Priority System == |
|
| |
|
| Floor generation is broken down into an ordered list of steps, each assigned a priority. The priority determines at what point in the generation process the step should be performed, with a lower number means a step will execute earlier. While these priority numbers do not need to be obeyed for modding, they are the numbers that base PMDO uses. Priority becomes especially handy when using [[Zone Step Overview|Zone Steps]] to plan out dungeon features across multiple floors instead of a single one. | | Floor generation is broken down into an ordered list of steps, each assigned a priority. The priority determines at what point in the generation process the step should be performed, with a lower number means a step will execute earlier. While these priority numbers do not need to be obeyed for modding, they are the numbers that base PMDO uses. |
|
| |
|
| == Steps Summary ==
| | Priority becomes especially handy when using [[Zone Steps]] to plan out dungeon features across multiple floors, rather than a single one. |
|
| |
|
| While the Overview section covers the bare minimum steps to generate without error, you may notice that generating a map only with those steps will have no name, no music, no time limit, and even no textures, forcing you to rely on the minimap to understand the terrain.
| | To view each step that exists and what they do, see [[Floor Generation Steps]]. |
|
| |
|
| === General Steps === | | == Priority Brackets == |
| | | Each range of priority is generally used to perform different tasks. These are each bracket present in PMDO, and what they are generally used for. |
| Below is a table of commonly used steps, what priorities PMDO places them in, and what they are used for.
| | {| class="wikitable" |
| | |
| {| class="wikitable" style="margin:auto" | |
| |-
| |
| ! Priority !! Step !! Description
| |
| |-
| |
| | -6 || [[Map Data Step|MapDataStep]] || Sets the music, time limit, and [[darkness]] of the floor.
| |
| |-
| |
| | -6 || [[Map Name ID Step|MapNameIDStep]] || Gives the map a name.
| |
| |-
| |
| | -6 || [[Map Title Drop Step|MapTitleDropStep]] || Makes the map name show up before fading in.
| |
| |-
| |
| | -6 || [[Map Effect Step|MapEffectStep]] || Sets event data for the floor.
| |
| |- | | |- |
| | -6 || [[Default Map Status Step|DefaultMapStatusStep]] || Sets the base [[Map Statuses|map status]] of the map.
| | ! Priority !! Bracket !! Purpose |
| |- | | |- |
| | -2.2 || [[Add Disconnected Rooms Step|AddDisconnectedRoomsStep]] || Adds disconnected rooms to the map. | | | -6 || Floor Data || Setting the initial data of a floor. |
| |- | | |- |
| | -1 || [[Draw Floor To Tile Step|DrawFloorToTileStep]] || Creates a grid of tiles and draws onto it based on the list of rooms and halls from a RoomFloorGen or GridFloorGen. | | | -5 || Grid Creation || Initializing the grid for [[GridFloorGen]]. |
| |- | | |- |
| | 0.1 || [[Unbreakable Border Step|UnbreakableBorderStep]] || Adds a border of unbreakable tiles at the edge of the map. | | | -4 || Grid Path Generation || Generating rooms and halls for [[GridFloorGen]], as well as editing them. |
| |- | | |- |
| | 0.1 || [[Tile Border Step|TileBorderStep]] || Adds a border of the specified tiles at the edge of the map. | | | -3 || Room List Creation|| Initializing the floorpan for [[RoomFloorGen]]. |
| |- | | |- |
| | 1 || [[Money Spawn Step|MoneySpawnStep]] || Sets the spawn table for money on this floor. | | | -2 || Room List Generation || Generating the rooms and halls for [[RoomFloorGen]]. |
| |- | | |- |
| | 1.1 || [[Item Spawn Step|ItemSpawnStep]] || Sets the spawn table for items on this floor. | | | -1 || Tiles Creation || Placing down the initial tiles of the floor. |
| |- | | |- |
| | 1.2 || [[Mob Spawn Step|MobSpawnStep]] || Sets the spawn table for mobs on this floor. | | | 0 || Tiles Generation || Generating tiles outside of the initial generation. |
| |- | | |- |
| | 1.2 || [[Mob Spawn Settings Step|MobSpawnSettingsStep]] || Sets the rules for enemies respawning on the floor. | | | 1 || Spawn Tables || Defining spawn tables for the floor. |
| |- | | |- |
| | 1.3 || [[Tile Spawn Step|TileSpawnStep]] || Sets the spawn table for traps on this floor. | | | 2 || Exits || Placement of entrances and exists. |
| |- | | |- |
| | 2 || [[Floor Stairs Step|FloorStairsStep]] || Places the start point and the end stairs on different rooms of the floor, for RoomFloorGen or GridFloorGen. | | | 3 || Extra Terrain || The placement of extra terrain types, such as water and tall grass. |
| |- | | |- |
| | 3 || [[Add Tunnel Step|AddTunnelStep]] || Digs tunnels into the walls starting from a room. | | | 4 || Textures || Assigns textures to the map.<br>At 4 because textures were formerly placed during this step, but are now placed after all steps are done. |
| |- | | |- |
| | 3 || [[Perlin Water Step|PerlinWaterStep]] || Adds water/lava/etc. using Perlin Noise. | | | 5 || Tile Spawns || Spawning tiles, such as traps. |
| |- | | |- |
| | 3 || [[Blob Water Step|BlobWaterStep]] || Adds water/lava/etc. by placing several blobs made from cellular automata. | | | 6 || Spawns || Spawning other objects, like mobs and items. |
| |- | | |- |
| | 3 || [[Room Terrain Step|RoomTerrainStep]] || Sets terrain in a number of rooms to a certain value. | | | 7|| Debug Checks || Steps that check the dungeon for issues, throwing an error if one is found.<br>Useful for [[Stress Testing]]. |
| |-
| |
| | 3.1 || [[Drop Diagonal Block Step|DropDiagonalBlockStep]] || If blobs of terrain are touching diagonally, then they are merged together.
| |
| |-
| |
| | 3.2 || [[Erase Isolated Step|EraseIsolatedStep]] || Isolated terrain of the specified type is erased.
| |
| |-
| |
| | 4 || [[Map Texture Step|MapTextureStep]] || Defines the textures for floors, walls, and water.
| |
| |-
| |
| | 4 || [[Map Dict Texture Step|MapDictTextureStep]] || Defines the textures in a more advanced way, needed if the layout uses grass.
| |
| |-
| |
| | 5 || [[Random Room Spawn Step|RandomRoomSpawnStep<?, EffectTile>]] || Spawns traps in random rooms.
| |
| |-
| |
| | 5 || [[Spaced Room Spawn Step|SpacedRoomSpawnStep<?, EffectTile>]] || Spawns traps in random rooms, taking care not to place in the same room or adjacent rooms.
| |
| |-
| |
| | 5 || [[Pattern Spawn Step|Pattern Spawn Step]] || Places placeables on a room in specified patterns.
| |
| |-
| |
| | 6 || [[Terminal Spawn Step|TerminalSpawnStep<?, MoneySpawn>]] || Spawns money in dead-end rooms.
| |
| |-
| |
| | 6.1 || [[Due Spawn Step|DueSpawnStep<?, InvItem, MapEntrance>]] || Spawns items based on how far they are from the starting room.
| |
| |-
| |
| | 6.2 || [[Place Random Mobs Step|PlaceRandomMobsStep]] || Randomly places enemies on the map.
| |
| |-
| |
| |}
| |
| | |
| === Debug Steps ===
| |
| These steps are for debug or testing purposes.
| |
| {| class="wikitable" style="margin:auto"
| |
| |-
| |
| ! Priority !! Step !! Description
| |
| |-
| |
| | 0 || [[Specific Tiles Step|SpecificTilesStep]] || Sets the floor to specific tiles. Only used for debug.
| |
| |-
| |
| | 7 || [[Detect Isolated Stairs Step|DetectIsolatedStairsStep]] || Testing step: Looks for a path from start to end and throws an error if none can be found.
| |
| |-
| |
| | 7 || [[Detect Tile Step|DetectTileStep]] || Testing step: Checks to see if a certain tile can be found on the map and throws an error if none can be found.
| |
| |} | | |} |
|
| |
|
| |
| === GridFloorGen Steps ===
| |
| These steps are used exclusively for GridFloorGen.
| |
| {| class="wikitable" style="margin:auto"
| |
| |-
| |
| ! Priority !! Step !! Description
| |
| |-
| |
| | -5 || [[Init Grid Plan Step|InitGridPlanStep]] || Initializes a grid for GridFloorGen.
| |
| |-
| |
| | -4 || [[Grid Path Steps|GridPathBranch, GridPathCircle, GridPathTwoSides, etc.]] || Generates a path of rooms and halls for GridFloorGen.
| |
| |-
| |
| | -4 || [[Set Grid Defaults Step|SetGridDefaultsStep]] || Turns some rooms into halls (1 tile size), for GridFloorGen.
| |
| |-
| |
| | -4 || [[Connect Grid Branch Step|ConnectGridBranchStep]] || Connects some adjacent rooms, for GridFloorGen.
| |
| |-
| |
| | -4 || [[Combine Grid Room Step|CombineGridRoomStep]] || Combines some rooms into larger rooms, for GridFloorGen.
| |
| |-
| |
| | -4 || [[Set Grid Plan Component Step|SetGridPlanComponentStep]] || Tags all rooms in the grid plan as the specified [[Component Tag|components]].
| |
| |-
| |
| | -4 || [[Set Grid Inner Component Step|SetGridInnerComponentStep]] || Tags all rooms on the interior of the grid as the specified [[Component Tag|components]].
| |
| |-
| |
| | -3 || [[Draw Grid To Floor Step|DrawGridToFloorStep]] || Initializes a list of rooms and halls and populates it with the grid from GridFloorGen.
| |
| |}
| |
|
| |
| === RoomFloorGen Steps ===
| |
| These steps are used exclusively for RoomFloorGen.
| |
| {| class="wikitable" style="margin:auto"
| |
| |-
| |
| ! Priority !! Step !! Description
| |
| |-
| |
| | -3 || [[Init Floor Plan Step|InitFloorPlanStep]] || Initializes a list of rooms and halls for RoomFloorGen.
| |
| |-
| |
| | -2 || [[Floor Path Branch|FloorPathBranch]]|| Generates a path of rooms and halls for RoomFloorGen.
| |
| |-
| |
| |}
| |
|
| |
| === LoadGen Steps ===
| |
| These steps are used exclusively for LoadGen.
| |
| {| class="wikitable" style="margin:auto"
| |
| |-
| |
| ! Priority !! Step !! Description
| |
| |-
| |
| | -7 || [[Mapped Room Step|MappedRoomStep]] || Loads a dungeon map to use as this floor's layout, including its entities and properties.
| |
| |-
| |
| |}
| |
|
| |
| === StairsFloorGen Steps ===
| |
| These steps are used exclusively for StairsFloorGen.
| |
| {| class="wikitable" style="margin:auto"
| |
| |-
| |
| ! Priority !! Step !! Description
| |
| |-
| |
| | -1 || [[Init Tiles Step|InitTilesStep]] || Sets the floor dimensions and initializes a grid of tiles, for StairsFloorGen.
| |
| |-
| |
| | 2 || [[Stairs Step|StairsStep]] || Places the start point and the end stairs on different tiles of the floor, for StairsFloorGen.
| |
| |-
| |
| |}
| |
|
| |
| == Typical Priority Usages ==
| |
| The sections below go into more detail of what each priority is typically used for, as well as less commonly used steps used in those priority brackets.
| |
|
| |
| === Floor Data ===
| |
|
| |
| Priority -6
| |
|
| |
| Examples:
| |
|
| |
| * MapDataStep
| |
| * MapEffectStep
| |
| * MapNameIDStep
| |
| * DefaultMapStatusStep
| |
| * MapTimeLimitStep
| |
|
| |
| === Grid Creation ===
| |
|
| |
| Priority -5
| |
|
| |
| Examples:
| |
|
| |
| * InitGridPlanStep
| |
|
| |
| === Grid Path Generation ===
| |
|
| |
| Priority -4
| |
|
| |
| Examples:
| |
|
| |
| * GridPathBranch
| |
| * GridPathCircle
| |
| * GridPathTwoSides
| |
| * GridPathGrid
| |
| * GridPathBeetle
| |
| * GridPathTiered
| |
|
| |
| * SetGridDefaultsStep
| |
| * ConnectGridBranchStep
| |
| * CombineGridRoomStep
| |
|
| |
| === Room List Creation ===
| |
|
| |
| Priority -3
| |
|
| |
| Examples:
| |
|
| |
| * InitFloorPlanStep
| |
| * DrawGridToFloorStep
| |
|
| |
| === Room List Generation ===
| |
|
| |
| Priority -2
| |
|
| |
| Examples:
| |
|
| |
| * FloorPathBranch
| |
|
| |
| === Tiles Creation ===
| |
|
| |
| Priority -1
| |
|
| |
| Examples:
| |
|
| |
| * InitTilesStep
| |
| * DrawFloorToTileStep
| |
|
| |
| === Tiles Generation ===
| |
|
| |
| Priority 0
| |
|
| |
| Examples:
| |
|
| |
| * SpecificTilesStep
| |
|
| |
| === Spawn Tables ===
| |
|
| |
| Priority 1
| |
|
| |
| Examples:
| |
|
| |
| * MoneySpawnStep
| |
| * ItemSpawnStep (Priority 1.1)
| |
| * MobSpawnStep (Priority 1.2)
| |
| * TileSpawnStep (Priority 1.3)
| |
|
| |
|
| |
| === Exits ===
| |
|
| |
| Priority 2
| |
|
| |
| Examples:
| |
|
| |
| * FloorStairsStep
| |
| * StairsStep
| |
|
| |
| === Water ===
| |
|
| |
| Priority 3
| |
|
| |
| Examples:
| |
|
| |
| * PerlinWaterStep
| |
| * BlobWaterStep
| |
|
| |
| === Textures ===
| |
|
| |
| Priority 4
| |
|
| |
| Used to be here because textures were actually placed here, but now only assigns textures to the map itself and lets the map compute them after ALL steps are done. Thus, this step is the least dependent on its current position in the steps.
| |
|
| |
| Examples:
| |
|
| |
| * MapTextureStep
| |
| * MapDictTextureStep
| |
|
| |
| === Tile Spawns ===
| |
|
| |
| Priority 5
| |
|
| |
| Examples:
| |
|
| |
| * RandomSpawnStep
| |
| * DueSpawnStep
| |
| * TerminalSpawnStep
| |
|
| |
| === Spawns ===
| |
|
| |
| Priority 6
| |
|
| |
| Examples:
| |
|
| |
| * All steps in Tile Spawns
| |
| * PlaceRandomMobsStep
| |
| * PlaceDisconnectedMobsStep
| |
| * PlaceNoLocMobsStep
| |
|
| |
| === Debug Checks ===
| |
|
| |
| Priority 7
| |
|
| |
| These gen steps are used to check the dungeon for issues, and throw an error if they're found. Useful for [[Stress Testing Dungeons|stress testing]].
| |
|
| |
| Examples:
| |
|
| |
| * DetectIsolatedStairsStep
| |
| * DetectTileStep
| |
|
| |
|
| [[Category:Dungeon Generation]] | | [[Category:Dungeon Generation]] |
Floor generation is performed as a list of steps, which allows a developer to customize their floor layout at every part of the pipeline. This page covers the basics of what each step is responsible for and why it is needed.
For information on what steps are required to create a floor from scratch, see Creating Dungeons from Scratch.
Overview
A dungeon map can be generated without items, enemies, or traps. But at a bare minimum, a dungeon map must generate terrain (plus entrance/exit) in order to complete without errors. There are 4 main options on how to do this.
| Type |
Example |
Description |
Usage
|
| Grid of Rooms Generation |
 |
Rooms generate inside of a grid with cells. |
Most dungeon floors
|
| List of Rooms Generation |
 |
Rooms generate freely, spreading out from defined halls and rooms. |
Uncommon, but used for some dungeon floors
|
| Stairs Floor Generation |
 |
Tiles are generated directly on a base of walls. |
Rare, primarily debugging
|
| Load Generation |
Anything! |
Load a pre-made map. |
Secret rooms, final floor treasure rooms
|
To learn more about the technical details of how they generate, visit their pages.
Priority System
Floor generation is broken down into an ordered list of steps, each assigned a priority. The priority determines at what point in the generation process the step should be performed, with a lower number means a step will execute earlier. While these priority numbers do not need to be obeyed for modding, they are the numbers that base PMDO uses.
Priority becomes especially handy when using Zone Steps to plan out dungeon features across multiple floors, rather than a single one.
To view each step that exists and what they do, see Floor Generation Steps.
Priority Brackets
Each range of priority is generally used to perform different tasks. These are each bracket present in PMDO, and what they are generally used for.
| Priority |
Bracket |
Purpose
|
| -6 |
Floor Data |
Setting the initial data of a floor.
|
| -5 |
Grid Creation |
Initializing the grid for GridFloorGen.
|
| -4 |
Grid Path Generation |
Generating rooms and halls for GridFloorGen, as well as editing them.
|
| -3 |
Room List Creation |
Initializing the floorpan for RoomFloorGen.
|
| -2 |
Room List Generation |
Generating the rooms and halls for RoomFloorGen.
|
| -1 |
Tiles Creation |
Placing down the initial tiles of the floor.
|
| 0 |
Tiles Generation |
Generating tiles outside of the initial generation.
|
| 1 |
Spawn Tables |
Defining spawn tables for the floor.
|
| 2 |
Exits |
Placement of entrances and exists.
|
| 3 |
Extra Terrain |
The placement of extra terrain types, such as water and tall grass.
|
| 4 |
Textures |
Assigns textures to the map. At 4 because textures were formerly placed during this step, but are now placed after all steps are done.
|
| 5 |
Tile Spawns |
Spawning tiles, such as traps.
|
| 6 |
Spawns |
Spawning other objects, like mobs and items.
|
| 7 |
Debug Checks |
Steps that check the dungeon for issues, throwing an error if one is found. Useful for Stress Testing.
|