Floor Generation Step: Difference between revisions
→General Steps: Added zone step recommendations |
Added a bunch of section headings (in preperation for documenting all steps) |
||
| Line 4: | Line 4: | ||
Below is a table of commonly used steps, what priorities PMDO places them in, and what they are used for. | Below is a table of commonly used steps, what priorities PMDO places them in, and what they are used for. | ||
{| class="wikitable" style="margin:auto" | {| class="wikitable sortable" style="margin:auto" | ||
|- | |- | ||
! Priority !! Step !! Description | ! Priority !! Step !! Description | ||
| Line 46: | Line 46: | ||
| 4 || [[Map Dict Texture Step|MapDictTextureStep]] || Defines the tile graphics in a more advanced way, needed if the layout uses grass. | | 4 || [[Map Dict Texture Step|MapDictTextureStep]] || Defines the tile graphics in a more advanced way, needed if the layout uses grass. | ||
|- | |- | ||
| 5 || [[ | |} | ||
== FloorGen Dependant Steps == | |||
These are steps that are exclusive for certain types of [[FloorGen]]. | |||
=== 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 | These steps are used exclusively for [[RoomFloorGen]]. | ||
{| class="wikitable" style="margin:auto" | {| class="wikitable" style="margin:auto" | ||
|- | |- | ||
! Priority !! Step !! Description | ! 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 for | These steps are used exclusively for [[StairsFloorGen]]. | ||
{| class="wikitable" style="margin:auto" | {| class="wikitable" style="margin:auto" | ||
|- | |- | ||
! Priority !! Step !! Description | ! 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. | ||
|- | |- | ||
|} | |} | ||
== | == Spawn Table Steps == | ||
These steps are used | These steps are used to define spawn tables for the floor. | ||
{| class="wikitable" style="margin:auto" | {| class="wikitable" style="margin:auto" | ||
|- | |- | ||
! Priority !! Step !! Description | ! Priority !! Step !! Description | ||
|- | |- | ||
| | | 1 || [[Money Spawn Step|MoneySpawnStep]] || Sets the spawn table for money on this floor.<br>Its [[Zone Step]] version [[Money Spawn Zone Step|MoneySpawnZoneStep]] is recommended in most cases. | ||
|- | |- | ||
| | | 1.1 || [[Item Spawn Step|ItemSpawnStep]] || Sets the spawn table for items on this floor.<br>Its [[Zone Step]] versions [[Item Zone Steps|ItemZoneSteps]] are recommended in most cases. | ||
|- | |- | ||
| | | 1.2 || [[Mob Spawn Step|MobSpawnStep]] || Sets the spawn table for NPCs on this floor.<br>Its [[Zone Step]] version [[Team Spawn Zone Step|TeamSpawnZoneStep]] is recommended in most cases. | ||
|- | |- | ||
| | | 1.3 || [[Tile Spawn Step|TileSpawnStep]] || Sets the spawn table for traps on this floor.<br>Its [[Zone Step]] version [[Tile Spawn Zone Step|TileSpawnZoneStep]] is recommended in most cases. | ||
|- | |- | ||
|} | |} | ||
== | == Post-Gen Room Steps == | ||
These steps are used | These steps place rooms and halls after the primary room generation steps have been called. | ||
== Terrain Painting & Carving Steps == | |||
These steps are used to modify the terrain of the floor. | |||
== Tagging Steps == | |||
These steps are used to tag certain parts of a floor for future identification in other steps. | |||
== Mob Placement Steps == | |||
These steps are used to place mobs. | |||
== Feature Step == | |||
These steps are used to place various features, such as [[houses]]. | |||
== Spawn Steps == | |||
These steps are used to spawn various things. | |||
{| class="wikitable" style="margin:auto" | {| class="wikitable" style="margin:auto" | ||
|- | |- | ||
! Priority !! Step !! Description | ! Priority !! Step !! Description | ||
|- | |- | ||
| - | | 5 || [[Random Room Spawn Step]] || Spawns money, items, traps, etc. in random rooms. | ||
|- | |||
| 5 || [[Spaced Room Spawn Step]] || Spawns money, items, traps, etc. in random rooms, taking care not to place in the same room or adjacent rooms. | |||
|- | |||
| 5 || [[Pattern Spawn Step]] || Places money, items, traps, etc. on a room in specified patterns. | |||
|- | |||
| 6 || [[Terminal Spawn Step]] || Places money, items, traps, etc. in dead-end rooms. | |||
|- | |||
| 6.1 || [[Due Spawn Step]] || Spawns money, items, traps, etc. based on how far they are from the starting room. | |||
|- | |- | ||
| | | 6.2 || [[Place Random Mobs Step|PlaceRandomMobsStep]] || Randomly places teams of mobs on the map (enemy spawns, friendly NPCs). | ||
|- | |- | ||
|} | |} | ||
== | == Debug Steps == | ||
These steps are | These steps are for debug or testing purposes. | ||
{| class="wikitable" style="margin:auto" | {| class="wikitable" style="margin:auto" | ||
|- | |- | ||
! Priority !! Step !! Description | ! Priority !! Step !! Description | ||
|- | |- | ||
| -7 || [[ | | 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. | |||
|} | |} | ||
== | == Obsolete Steps == | ||
These steps are used | These steps are made (mostly) obsolete by other steps. | ||
== Deprecated Steps == | |||
These steps, while still currently available, are deprecated and should not be used. | |||
{| class="wikitable" style="margin:auto" | {| class="wikitable" style="margin:auto" | ||
|- | |- | ||
! Step !! Former Use | |||
|- | |- | ||
| | | <code>DetourStep</code> || ? | ||
|- | |- | ||
|} | |} | ||
[[Category:Dungeon Generation]] | [[Category:Dungeon Generation]] | ||
Revision as of 22:30, 11 August 2025
Floor Generation Steps are steps that are used in floor generation. They are responsible for managing and initializing everything about a floor. The order they are performed in is dependent on each step's priority, with all steps having a standardized priority order for base PMDO.
General Steps
Below is a table of commonly used steps, what priorities PMDO places them in, and what they are used for.
| Priority | Step | Description |
|---|---|---|
| -6 | MapDataStep | Sets the music, time limit, and darkness of the floor. |
| -6 | MapNameIDStep | Gives the floor a name. Its zone step version ShowFloorName is recommended in most cases. |
| -6 | MapTitleDropStep | Makes the floor name appear on entry before fading in. Its zone step version ShowFloorName is recommended in most cases. |
| -6 | MapEffectStep | Sets event data for the floor. |
| -6 | DefaultMapStatusStep | Sets the base map status of the map. |
| -2.2 | AddDisconnectedRoomsStep | Adds disconnected rooms to the map. |
| -1 | DrawFloorToTileStep | Creates a grid of tiles and draws onto it based on the list of rooms and halls from a RoomFloorGen or GridFloorGen. |
| 0.1 | UnbreakableBorderStep | Adds a border of unbreakable tiles at the edge of the map. |
| 0.1 | TileBorderStep | Adds a border of the specified tiles at the edge of the map. |
| 1.2 | MobSpawnSettingsStep | Sets the rules for enemies respawning on the floor. |
| 2 | FloorStairsStep | Places the start point and the end stairs on different rooms of the floor for RoomFloorGen or GridFloorGen. |
| 3 | AddTunnelStep | Digs tunnels into the walls starting from a room. |
| 3 | PerlinWaterStep | Adds water/lava/etc. using Perlin Noise. |
| 3 | BlobWaterStep | Adds water/lava/etc. by placing several blobs made from cellular automata. |
| 3 | RoomTerrainStep | Sets terrain in a number of rooms to a certain value. |
| 3.1 | DropDiagonalBlockStep | If blobs of terrain are touching diagonally, then they are merged together. |
| 3.2 | EraseIsolatedStep | Replaces isolated terrain of the specified type with walls. |
| 4 | MapTextureStep | Defines the tile graphics for floors, walls, and water. |
| 4 | MapDictTextureStep | Defines the tile graphics in a more advanced way, needed if the layout uses grass. |
FloorGen Dependant Steps
These are steps that are exclusive for certain types of FloorGen.
GridFloorGen Steps
These steps are used exclusively for GridFloorGen.
| Priority | Step | Description |
|---|---|---|
| -5 | InitGridPlanStep | Initializes a grid for GridFloorGen. |
| -4 | GridPathBranch, GridPathCircle, GridPathTwoSides, etc. | Generates a path of rooms and halls for GridFloorGen. |
| -4 | SetGridDefaultsStep | Turns some rooms into halls (1 tile size), for GridFloorGen. |
| -4 | ConnectGridBranchStep | Connects some adjacent rooms, for GridFloorGen. |
| -4 | CombineGridRoomStep | Combines some rooms into larger rooms, for GridFloorGen. |
| -4 | SetGridPlanComponentStep | Tags all rooms in the grid plan as the specified components. |
| -4 | SetGridInnerComponentStep | Tags all rooms on the interior of the grid as the specified components. |
| -3 | 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.
| Priority | Step | Description |
|---|---|---|
| -3 | InitFloorPlanStep | Initializes a list of rooms and halls for RoomFloorGen. |
| -2 | FloorPathBranch | Generates a path of rooms and halls for RoomFloorGen. |
LoadGen Steps
These steps are used exclusively for LoadGen.
| Priority | Step | Description |
|---|---|---|
| -7 | 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.
| Priority | Step | Description |
|---|---|---|
| -1 | InitTilesStep | Sets the floor dimensions and initializes a grid of tiles, for StairsFloorGen. |
| 2 | StairsStep | Places the start point and the end stairs on different tiles of the floor, for StairsFloorGen. |
Spawn Table Steps
These steps are used to define spawn tables for the floor.
| Priority | Step | Description |
|---|---|---|
| 1 | MoneySpawnStep | Sets the spawn table for money on this floor. Its Zone Step version MoneySpawnZoneStep is recommended in most cases. |
| 1.1 | ItemSpawnStep | Sets the spawn table for items on this floor. Its Zone Step versions ItemZoneSteps are recommended in most cases. |
| 1.2 | MobSpawnStep | Sets the spawn table for NPCs on this floor. Its Zone Step version TeamSpawnZoneStep is recommended in most cases. |
| 1.3 | TileSpawnStep | Sets the spawn table for traps on this floor. Its Zone Step version TileSpawnZoneStep is recommended in most cases. |
Post-Gen Room Steps
These steps place rooms and halls after the primary room generation steps have been called.
Terrain Painting & Carving Steps
These steps are used to modify the terrain of the floor.
Tagging Steps
These steps are used to tag certain parts of a floor for future identification in other steps.
Mob Placement Steps
These steps are used to place mobs.
Feature Step
These steps are used to place various features, such as houses.
Spawn Steps
These steps are used to spawn various things.
| Priority | Step | Description |
|---|---|---|
| 5 | Random Room Spawn Step | Spawns money, items, traps, etc. in random rooms. |
| 5 | Spaced Room Spawn Step | Spawns money, items, traps, etc. in random rooms, taking care not to place in the same room or adjacent rooms. |
| 5 | Pattern Spawn Step | Places money, items, traps, etc. on a room in specified patterns. |
| 6 | Terminal Spawn Step | Places money, items, traps, etc. in dead-end rooms. |
| 6.1 | Due Spawn Step | Spawns money, items, traps, etc. based on how far they are from the starting room. |
| 6.2 | PlaceRandomMobsStep | Randomly places teams of mobs on the map (enemy spawns, friendly NPCs). |
Debug Steps
These steps are for debug or testing purposes.
| Priority | Step | Description |
|---|---|---|
| 0 | SpecificTilesStep | Sets the floor to specific tiles. Only used for debug. |
| 7 | DetectIsolatedStairsStep | Testing step: Looks for a path from start to end and throws an error if none can be found. |
| 7 | 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. |
Obsolete Steps
These steps are made (mostly) obsolete by other steps.
Deprecated Steps
These steps, while still currently available, are deprecated and should not be used.
| Step | Former Use |
|---|---|
DetourStep |
? |
