Floor Generation Step: Difference between revisions
No edit summary |
No edit summary |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 11: | Line 11: | ||
|- | |- | ||
| -6 || [[Map Name ID Step|MapNameIDStep]] || Gives the floor a name.<br>Its [[zone step]] version [[Show Floor Name|ShowFloorName]] is recommended in most cases. | | -6 || [[Map Name ID Step|MapNameIDStep]] || Gives the floor a name.<br>Its [[zone step]] version [[Show Floor Name|ShowFloorName]] is recommended in most cases. | ||
|- | |||
| -6 | |||
| [[MapExtraStatusStep]] | |||
| Sets a bunch of statuses on the map. | |||
|- | |- | ||
| -6 || [[Map Title Drop Step|MapTitleDropStep]] || Makes the floor name appear on entry before fading in.<br>Its [[zone step]] version [[Show Floor Name|ShowFloorName]] is recommended in most cases. | | -6 || [[Map Title Drop Step|MapTitleDropStep]] || Makes the floor name appear on entry before fading in.<br>Its [[zone step]] version [[Show Floor Name|ShowFloorName]] is recommended in most cases. | ||
| Line 21: | Line 25: | ||
|- | |- | ||
| -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. | | -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. | ||
|- | |||
| 0.2 | |||
| [[TempTileStep]] | |||
| Places a temporary tile that is kept track of and removed by a [[map status]]. | |||
|- | |- | ||
| 1.2 || [[Mob Spawn Settings Step|MobSpawnSettingsStep]] || Sets the rules for enemies respawning on the floor. | | 1.2 || [[Mob Spawn Settings Step|MobSpawnSettingsStep]] || Sets the rules for enemies respawning on the floor. | ||
| Line 29: | Line 37: | ||
|- | |- | ||
| 2.1 || [[RescueSpawner]] || Spawns a rescue flag somewhere on the map.<br>This step should never be explcitly added, but instead added dynamically when in rescue mode. | | 2.1 || [[RescueSpawner]] || Spawns a rescue flag somewhere on the map.<br>This step should never be explcitly added, but instead added dynamically when in rescue mode. | ||
|- | |||
| 3 | |||
| [[RoomPostProcStep]] | |||
| Sets terrain in a room to a certain value. | |||
|- | |- | ||
| 4 || [[Map Texture Step|MapTextureStep]] || Defines the tile graphics for floors, walls, and water. | | 4 || [[Map Texture Step|MapTextureStep]] || Defines the tile graphics for floors, walls, and water. | ||
| Line 37: | Line 49: | ||
|- | |- | ||
| * || [[ScriptGenStep]] || Calls a lua script to act like the floor step. | | * || [[ScriptGenStep]] || Calls a lua script to act like the floor step. | ||
|- | |- | ||
|} | |} | ||
| Line 130: | Line 134: | ||
== Post-Gen Room Steps == | == Post-Gen Room Steps == | ||
These steps place rooms and halls after the primary room generation steps have been called. | These steps place rooms and halls after the primary room generation steps have been called. | ||
{| class="wikitable | {| class="wikitable" style="margin:auto" | ||
|- | |- | ||
! Priority !! Step !! Description | ! Priority !! Step !! Description | ||
| Line 156: | Line 160: | ||
| 0.1 || [[Tile Border Step|TileBorderStep]] || Adds a border of the specified tiles at the edge of the map. | | 0.1 || [[Tile Border Step|TileBorderStep]] || Adds a border of the specified tiles at the edge of the map. | ||
|- | |- | ||
| | | 3 | ||
| [[LoadBlobStep]] | | [[LoadBlobStep]] | ||
| | | Paints a blob onto the floor, based on some maps. | ||
|- | |- | ||
|} | |} | ||
| Line 168: | Line 168: | ||
== Terrain Painting & Carving Steps == | == Terrain Painting & Carving Steps == | ||
These steps are used to modify the terrain of the floor. | These steps are used to modify the terrain of the floor. | ||
{| class="wikitable | {| class="wikitable" style="margin:auto" | ||
|- | |- | ||
! Priority !! Step !! Description | ! Priority !! Step !! Description | ||
|- | |- | ||
| -2.1 | | -2.1 || [[TerrainSealStep]] || Seals a room in the specified terrain. | ||
| [[TerrainSealStep]] | |||
| Seals a room in the specified terrain. | |||
|- | |- | ||
| 3 || [[Perlin Water Step|PerlinWaterStep]] || Adds water/lava/etc. using Perlin Noise. | | 3 || [[Perlin Water Step|PerlinWaterStep]] || Adds water/lava/etc. using Perlin Noise. | ||
| Line 181: | Line 179: | ||
|- | |- | ||
| 3 || [[Room Terrain Step|RoomTerrainStep]] || Sets terrain in a number of rooms to a certain value. | | 3 || [[Room Terrain Step|RoomTerrainStep]] || Sets terrain in a number of rooms to a certain value. | ||
|- | |||
| 3 || [[FillImpassableStep]] || Fills all tiles that can't be reached with impassable tiles. | |||
|- | |||
| 3 || [[PatternTerrainStep]] || Places terrain in the specified pattern. | |||
|- | |- | ||
| 3.1 || [[Drop Diagonal Block Step|DropDiagonalBlockStep]] || If blobs of terrain are touching diagonally, then they are merged together. | | 3.1 || [[Drop Diagonal Block Step|DropDiagonalBlockStep]] || If blobs of terrain are touching diagonally, then they are merged together. | ||
| Line 186: | Line 188: | ||
| 3.2 || [[Erase Isolated Step|EraseIsolatedStep]] || Replaces isolated terrain of the specified type with walls. | | 3.2 || [[Erase Isolated Step|EraseIsolatedStep]] || Replaces isolated terrain of the specified type with walls. | ||
|- | |- | ||
| 3.2 | | 3.2 || [[EraseIsolatedFromSpawnStep]] || Erases tiles of the given type that are isolated from spawn. | ||
| [[EraseIsolatedFromSpawnStep]] | |||
| Erases tiles of the given type that are isolated from spawn | |||
|- | |- | ||
|} | |} | ||
| Line 202: | Line 194: | ||
== Tagging Steps == | == Tagging Steps == | ||
These steps are used to tag certain parts of a floor for future identification in other steps. | These steps are used to tag certain parts of a floor for future identification in other steps. | ||
{| class="wikitable | {| class="wikitable" style="margin:auto" | ||
|- | |- | ||
! Priority !! Step !! Description | ! Priority !! Step !! Description | ||
| Line 218: | Line 210: | ||
== Feature Step == | == Feature Step == | ||
These steps are used to place various features, such as [[houses]]. | These steps are used to place various features, such as [[houses]]. | ||
{| class="wikitable" | {| class="wikitable" style="margin:auto" | ||
|- | |- | ||
! Priority | ! Priority | ||
| Line 306: | Line 298: | ||
=== Mob Spawning Steps === | === Mob Spawning Steps === | ||
These steps specifically spawn mobs. | These steps specifically spawn mobs. | ||
{| class="wikitable" | {| class="wikitable" style="margin:auto" | ||
|- | |- | ||
! Priority !! Step !! Description | ! Priority !! Step !! Description | ||
| Line 363: | Line 355: | ||
== Unfinished Steps == | == Unfinished Steps == | ||
These steps are not fully programmed yet. | These steps are not fully programmed yet. | ||
{| class="wikitable | {| class="wikitable" style="margin:auto" | ||
|- | |- | ||
! Priority !! Step !! Description | ! Priority !! Step !! Description | ||
Latest revision as of 03:41, 18 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 | MapExtraStatusStep | Sets a bunch of statuses on the map. |
| -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. |
| -6 | StateMapStatusStep | Adds a specified map status 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.2 | TempTileStep | Places a temporary tile that is kept track of and removed by a map status. |
| 1.2 | MobSpawnSettingsStep | Sets the rules for enemies respawning on the floor. |
| 2 | FloorStairsStep | Places the start point and the end stairs in different rooms. Has a min distance, but no max distance. |
| 2 | FloorStairsDistanceStep | Places the start point and the end stairs in different rooms. Has a min and max distance. |
| 2.1 | RescueSpawner | Spawns a rescue flag somewhere on the map. This step should never be explcitly added, but instead added dynamically when in rescue mode. |
| 3 | RoomPostProcStep | Sets terrain in a room to a certain value. |
| 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. |
| * | RandGenStep | Randomly selects one of the floor generation steps specified in its spawn table. |
| * | ScriptGenStep | Calls a lua script to act like the floor step. |
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. |
| -2 | AddLargeRoomStep | Adds a large room to the floor plan, on top of pre-existing rooms. |
| -2.2 | SetGridSpecialRoomStep | Takes an existing grid plan, and then changes one of the specified rooms into a new room type. |
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.
| Priority | Step | Description |
|---|---|---|
| -2.2 | AddBossRoomStep | Creates and attaches a boss room to the pre-exisiting floor plan. |
| -2.2 | AddConnectedRoomsRandStep | Creates and attaches connected rooms to the pre-existing floor plan. |
| -2.2 | AddConnectedRoomsStep | Creates and attaches connected rooms to the pre-existing floor plan. |
| -2.2 | ConnectRoomStep | Taking the current floor plan, connects its rooms with other rooms. |
| -2.2 | AddDisconnectedRoomsStep | Adds disconnected rooms to the map. Will keep trying until the specified amount of rooms are placed, but this may cause performance problems. |
| -2.2 | AddDisconnectedRoomsRandStep | Adds disconnected rooms to the map. Only tries to place the room a finite amount of times before giving up. |
| -2.5 | ClampFloorStep | Clamps the size of the floor to be within a min and a max size. |
| 0.3 | AddTunnelStep | Digs tunnels into the walls starting from a room. |
| 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. |
| 3 | LoadBlobStep | Paints a blob onto the floor, based on some maps. |
Terrain Painting & Carving Steps
These steps are used to modify the terrain of the floor.
| Priority | Step | Description |
|---|---|---|
| -2.1 | TerrainSealStep | Seals a room in the specified terrain. |
| 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 | FillImpassableStep | Fills all tiles that can't be reached with impassable tiles. |
| 3 | PatternTerrainStep | Places terrain in the specified pattern. |
| 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. |
| 3.2 | EraseIsolatedFromSpawnStep | Erases tiles of the given type that are isolated from spawn. |
Tagging Steps
These steps are used to tag certain parts of a floor for future identification in other steps.
| Priority | Step | Description |
|---|---|---|
| -2.1 | MarkAsHallStep | Marks rooms that pass its filters as a hall. |
| -2.1 | SetFloorPlanComponentStep | Takes all rooms in the map's floor plan and gives them the specified component, for future filtering. |
Feature Step
These steps are used to place various features, such as houses.
| Priority | Step | Description |
|---|---|---|
| 2.2 | KeyDetourStep | Adds an extra room to the floor that can only be accessed with a key item. |
| 4.1 | MonsterHallStep | Creates a house that can occur in halls. |
| 4.1 | MonsterHouseStep | Creates a house in a room. |
| 4.1 | MonsterMansionStep | Creates a house that takes up the entire floor. |
| 4.1 | ChestStep | Spawns a chest, which contains the contents of a house. |
| 4.2 | ShopStep | Spawns a shop somewhere in the map. |
Combo Steps
These are steps that are combined with other steps to make certain structures.
| Priority | Step | Description |
|---|---|---|
| 0.2 | GuardSealStep | Takes the target room and surrounds it by unbreakable blocks, with one key block used to unlock it. |
| 0.2 | SwitchSealStep | Takes the target rooms and surrounds them with unbreakable walls, with a switch key that unlocks them. |
| 2.2 | SwitchDetourStep | Adds an extra room that can only be accessed by pulling a switch. |
Compass Steps
These steps are used to modify the settings of compasses.
| Priority | Step | Description |
|---|---|---|
| 5.1 | DetectItemStep | Orients tiles that are defined as compasses to point to the given item. |
| 5.1 | DetectTileStep | Orients tiles that are defined as compasses to point to the given tile. |
| 5.2 | SetCompassStep | Orients all of the specified tiles to points of interests as a compass. |
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 | MoneyTrailSpawnStep | Spawns a trail of money leading to an item. |
| 6.2 | NearSpawnableSpawnStep | Spawns a spawnable near a pre-existing spawnable. |
| 6.2 | TerrainSpawnStep | Spawns objects randomly on the specified terrain tiles. |
| 6.2 | SpecificSpawnStep | Spawns an object in the specified location. |
Mob Spawning Steps
These steps specifically spawn mobs.
| Priority | Step | Description |
|---|---|---|
| 6.2 | PlaceRandomMobsStep | Randomly places teams of mobs on the map (enemy spawns, friendly NPCs). |
| 6.2.1 | PlaceDisconnectedMobsStep | Places mobs in disconnected parts of the map. |
| 6.2.1 | PlaceNearSpawnableMobsStep | Places mobs in a room that has a spawnable. |
| 6.2.1 | PlaceNoLocMobsStep | Places mobs without selecting their location. Used when the location is already pre-selected. |
| 6.2.1 | PlaceRadiusMobsStep | From tiles that can be reached by walking from the entrance, spawns mobs there within a certain radius. |
| 6.2.1 | PlaceTerrainMobsStep | Places mobs depending on the terrain. |
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.
| Priority | Step | Description |
|---|---|---|
| -6 | MapMusicStep | Sets the music in the map. MapDataStep is suggested instead. |
| -6 | MapTimeLimitStep | Sets the time limit in the map. MapDataStep is suggested instead. |
| 6.2.1 | DisconnectedSpawnStep | Spawns mobs disconnected from spawn. Suggested to use regular spawning that selects rooms marked as disconnected instead. |
Deprecated Steps
These steps, while still currently available, are deprecated and should not be used.
| Step | Former Use |
|---|---|
DetourStep |
? |
Unfinished Steps
These steps are not fully programmed yet.
| Priority | Step | Description |
|---|---|---|
| ? | MinimizeBarrierStep | This step will eventually remove extra unbreakable blocks. |
