6
Components
Raphtalia edited this page 2025-02-10 21:49:54 +00:00

Important Components

Tile Extender

Adds extra dungeon generation rules to a tile. To use this component, simply add it to the same gameobject/prefab with the Tile component. By adding this component, certain features from the Tile become overridden by the TileExtender component.

Entrances/Exits

Overrides the Tile's entrance/exit fields with TileExtender's entrances/exits. These features allow you specify more than one required entrance and/or exit doorway for a tile.

Entrance Exit Interchangeable

Allows the dungeon generation to treat the entrances as exits and exits as entrances. If the generation decides to use an exit doorway as the entrance to a tile, then one of the entrance doorways will be selected as the exit of the tile.

Overlapping Doorways

Disallows the dungeon generation to use specified doorways as entrances or exits. They can still generate as overlapping doorways.

Main Room Doorway Groups

Works in conjunction with DunGenExtender's Main Path feature. This allows for more control in which doorways are selected for the alternate main paths. If you wish to use this component, it must be attached the MainRoomTilePrefab.

DoorwayLists contains a list of grouped doorways. Name is for organizing purposes and has no effect on the dungeon generation.

DoorwayGroupBehaviour describes how the dungeon generation algorithm should treat the DoorwayLists during the main path(s) generation step. Only two behaviours exist, RemoveGroup and SetInOrder.

Remove Group

When a doorway is selected for a main path, the dungeon generation will find that doorway's corresponding group in the component's DoorwayLists. It will then mark every doorway in that group invalid as a starting doorway for the other main paths.

Set In Order

When a main path begins generation, for either the default main path or alternate main paths, it will grab the group corresponding to the main path generation order. If the first main path begins generation (DungeonFlow's default main path), the first group in the list is selected. If the second main path begins generation (the first alternate main path), the second group is selected and so on. Whichever group is selected, it only allow the doorways in that group to start it's main path.

Note

You may want to use this component to split the main paths between floors for example. Or perhaps one main path in the left side of the main room and the other main path in the right side. However you like it.

Nice To Have Components

Random Guaranteed Scrap Spawn

Forces a random piece of scrap to spawn on the Transform's position. spawnChance specifics the chance that the scrap will spawn or not. minimumScrapValue and maximumScrapValue specifies that the random piece of scrap to be spawned MUST meet the following expression: minimumScrapValue <= minValue <= maximumScrapValue.

You can also specify a scrap item by it's scrap's display name or scriptable object file's name. That scrap must be able to spawn naturally on that moon. This will skip the scrap's minValue check.

Note

These scrap does not count towards the moon's scrap count.

Niche Components

Doorway Sisters

Works in conjunction with DunGenExtender's Doorway Sisters feature. The UseDoorwaySisters toggle in the Extender MUST be on for this component to do anything. This prevents an intersecting doorway from generating into an actual doorway IF it's sister doorway has already generated AND both of these doorways lead to the intersecting, neighbor tile. Read here for more information.

Sisters contains a list of the sister doorways. This should be self-explanatory.

Note

This feature is probably not necessary for your interior. My interior was designed to pack my tiles very closely and for their doorways to have a high chance of intersecting. As such, my interior developed the issue of having too many unnecessary doorways and required this feature to fix it. Most interiors won't have this same issue.