Dungeon Architect  17.0.0
DungeonArchitect.Builders.Grid.GridDungeonConfig Class Reference

The dungeon configuration for the Grid builder More...

Inheritance diagram for DungeonArchitect.Builders.Grid.GridDungeonConfig:
DungeonArchitect.DungeonConfig

Public Member Functions

override bool IsMode2D ()
 
- Public Member Functions inherited from DungeonArchitect.DungeonConfig
virtual bool HasValidConfig (ref string errorMessage)
 

Public Attributes

Vector3 GridCellSize = new Vector3(4, 2, 4)
 This dungeon builder works on a grid based system and required modular mesh assets to be placed on each cell (floors, walls, doors etc). This important field specifies the size of the cell to use. This size is determined by the art asset used in the dungeon theme designed by the artist. In the demo, we have a floor mesh that is 400x400. The height of a floor is chosen to be 200 units as the stair mesh is 200 units high. Hence the defaults are set to 400x400x200. You should change this to the dimension of the modular asset your designer has created for the dungeon More...
 
int NumCells = 150
 Changing this number would completely change the layout of the dungeon. This is the base random number seed that is used to build the dungeon. There is a convenience function to randomize this value (button labeled R) More...
 
int MinCellSize = 2
 This is how small a cell size can be. While generation, a cell is either converted to a room, corridor or is discarded completely. The Cell width / height is randomly chosen within this range More...
 
int MaxCellSize = 5
 This is how big a cell size can be. While generation, a cell is either converted to a room, corridor or is discarded completely. The Cell width / height is randomly chosen within this range More...
 
int RoomAreaThreshold = 15
 If a cell size exceeds past this limit, it is converted into a room. After cells are promoted to rooms, all rooms are connected to each other through corridors (either directly or indirectly. See spanning tree later) More...
 
float RoomAspectDelta = 0.4f
 The aspect ratio of the cells (width to height ratio). Keeping this value near 0 would create square rooms. Bringing this close to 1 would create elongated / stretched rooms with a high width to height ratio More...
 
int CorridorWidth = 1
 The extra width to apply to one side of a corridor More...
 
float HeightVariationProbability = 0.2f
 Tweak this value to increase / reduce the height variations (and stairs) in your dungeon. A value close to 0 reduces the height variation and increases as you approach 1. Increasing this value to a higher level might create dungeons with no place for proper stair placement since there is too much height variation. A value of 0.2 to 0.4 seems good More...
 
int MaxAllowedStairHeight = 1
 The number of logical floor units the dungeon height can vary. This determines how high the dungeon's height can vary (e.g. max 2 floors high). Set this value depending on the stair meshes you designer has created. In the sample demo, there are two stair meshes, one 200 units high (1 floor) and another 400 units high (2 floors). So the default is set to 2 More...
 
float SpanningTreeLoopProbability = 0.15f
 Determines how many loops you would like to have in your dungeon. A value near 0 will create fewer loops creating linear dungeons. A value near 1 would create lots of loops, which would look unoriginal. Its good to allow a few loops so a value close to zero (like 0.2 should be good) More...
 
float StairConnectionTollerance = 6
 The generator would add stairs to make different areas of the dungeon accessible. However, we do not want too many stairs. For e.g., before adding a stair in a particular elevated area, the generator would check if this area is already accessible from a nearby stair. If so, it would not add it. This tolerance parameter determines how far to look for an existing path before we can add a stair. Play with this parameter if you see too many stairs close to each other, or too few More...
 
float DoorProximitySteps = 3
 Increase this value to remove nearby duplicate doors. This value determines how many cell we can move to reach the two connected cells of a door if the door was removed More...
 
float NormalMean = 0
 The random number generator used in the dungeon generator does not use a uniform distribution. Instead it uses a normal distribution to get higher frequency of lower values and fewer higher values (and hence fewer room cells and a lot more corridor cells). Play with these parameters for different results More...
 
float NormalStd = 0.3f
 The random number generator used in the dungeon generator does not use a uniform distribution. Instead it uses a normal distribution to get higher frequency of lower values and fewer higher values (and hence fewer room cells and a lot more corridor cells). Play with these parameters for different results More...
 
float InitialRoomRadius = 15
 The radius within which to spawn the initial cells before they are separated. Keep to a low value like 10-15 More...
 
GridDungeonWallType WallLayoutType = GridDungeonWallType.WallsAsEdges
 
int FloorHeight = 0
 __Internal More...
 
bool UseFastCellDistribution = false
 
int CellDistributionWidth = 20
 
int CellDistributionLength = 30
 
bool Mode2D = false
 
- Public Attributes inherited from DungeonArchitect.DungeonConfig
uint Seed = 0
 

Detailed Description

The dungeon configuration for the Grid builder

Definition at line 17 of file GridDungeonConfig.cs.

Member Data Documentation

◆ CorridorWidth

int DungeonArchitect.Builders.Grid.GridDungeonConfig.CorridorWidth = 1

The extra width to apply to one side of a corridor

Definition at line 75 of file GridDungeonConfig.cs.

◆ DoorProximitySteps

float DungeonArchitect.Builders.Grid.GridDungeonConfig.DoorProximitySteps = 3

Increase this value to remove nearby duplicate doors. This value determines how many cell we can move to reach the two connected cells of a door if the door was removed

Definition at line 119 of file GridDungeonConfig.cs.

◆ FloorHeight

int DungeonArchitect.Builders.Grid.GridDungeonConfig.FloorHeight = 0

__Internal

Definition at line 151 of file GridDungeonConfig.cs.

◆ GridCellSize

Vector3 DungeonArchitect.Builders.Grid.GridDungeonConfig.GridCellSize = new Vector3(4, 2, 4)

This dungeon builder works on a grid based system and required modular mesh assets to be placed on each cell (floors, walls, doors etc). This important field specifies the size of the cell to use. This size is determined by the art asset used in the dungeon theme designed by the artist. In the demo, we have a floor mesh that is 400x400. The height of a floor is chosen to be 200 units as the stair mesh is 200 units high. Hence the defaults are set to 400x400x200. You should change this to the dimension of the modular asset your designer has created for the dungeon

Definition at line 29 of file GridDungeonConfig.cs.

◆ HeightVariationProbability

float DungeonArchitect.Builders.Grid.GridDungeonConfig.HeightVariationProbability = 0.2f

Tweak this value to increase / reduce the height variations (and stairs) in your dungeon. A value close to 0 reduces the height variation and increases as you approach 1. Increasing this value to a higher level might create dungeons with no place for proper stair placement since there is too much height variation. A value of 0.2 to 0.4 seems good

Definition at line 85 of file GridDungeonConfig.cs.

◆ InitialRoomRadius

float DungeonArchitect.Builders.Grid.GridDungeonConfig.InitialRoomRadius = 15

The radius within which to spawn the initial cells before they are separated. Keep to a low value like 10-15

Definition at line 142 of file GridDungeonConfig.cs.

◆ MaxAllowedStairHeight

int DungeonArchitect.Builders.Grid.GridDungeonConfig.MaxAllowedStairHeight = 1

The number of logical floor units the dungeon height can vary. This determines how high the dungeon's height can vary (e.g. max 2 floors high). Set this value depending on the stair meshes you designer has created. In the sample demo, there are two stair meshes, one 200 units high (1 floor) and another 400 units high (2 floors). So the default is set to 2

Definition at line 95 of file GridDungeonConfig.cs.

◆ MaxCellSize

int DungeonArchitect.Builders.Grid.GridDungeonConfig.MaxCellSize = 5

This is how big a cell size can be. While generation, a cell is either converted to a room, corridor or is discarded completely. The Cell width / height is randomly chosen within this range

Definition at line 53 of file GridDungeonConfig.cs.

◆ MinCellSize

int DungeonArchitect.Builders.Grid.GridDungeonConfig.MinCellSize = 2

This is how small a cell size can be. While generation, a cell is either converted to a room, corridor or is discarded completely. The Cell width / height is randomly chosen within this range

Definition at line 45 of file GridDungeonConfig.cs.

◆ NormalMean

float DungeonArchitect.Builders.Grid.GridDungeonConfig.NormalMean = 0

The random number generator used in the dungeon generator does not use a uniform distribution. Instead it uses a normal distribution to get higher frequency of lower values and fewer higher values (and hence fewer room cells and a lot more corridor cells). Play with these parameters for different results

Definition at line 127 of file GridDungeonConfig.cs.

◆ NormalStd

float DungeonArchitect.Builders.Grid.GridDungeonConfig.NormalStd = 0.3f

The random number generator used in the dungeon generator does not use a uniform distribution. Instead it uses a normal distribution to get higher frequency of lower values and fewer higher values (and hence fewer room cells and a lot more corridor cells). Play with these parameters for different results

Definition at line 135 of file GridDungeonConfig.cs.

◆ NumCells

int DungeonArchitect.Builders.Grid.GridDungeonConfig.NumCells = 150

Changing this number would completely change the layout of the dungeon. This is the base random number seed that is used to build the dungeon. There is a convenience function to randomize this value (button labeled R)

Definition at line 37 of file GridDungeonConfig.cs.

◆ RoomAreaThreshold

int DungeonArchitect.Builders.Grid.GridDungeonConfig.RoomAreaThreshold = 15

If a cell size exceeds past this limit, it is converted into a room. After cells are promoted to rooms, all rooms are connected to each other through corridors (either directly or indirectly. See spanning tree later)

Definition at line 61 of file GridDungeonConfig.cs.

◆ RoomAspectDelta

float DungeonArchitect.Builders.Grid.GridDungeonConfig.RoomAspectDelta = 0.4f

The aspect ratio of the cells (width to height ratio). Keeping this value near 0 would create square rooms. Bringing this close to 1 would create elongated / stretched rooms with a high width to height ratio

Definition at line 69 of file GridDungeonConfig.cs.

◆ SpanningTreeLoopProbability

float DungeonArchitect.Builders.Grid.GridDungeonConfig.SpanningTreeLoopProbability = 0.15f

Determines how many loops you would like to have in your dungeon. A value near 0 will create fewer loops creating linear dungeons. A value near 1 would create lots of loops, which would look unoriginal. Its good to allow a few loops so a value close to zero (like 0.2 should be good)

Definition at line 103 of file GridDungeonConfig.cs.

◆ StairConnectionTollerance

float DungeonArchitect.Builders.Grid.GridDungeonConfig.StairConnectionTollerance = 6

The generator would add stairs to make different areas of the dungeon accessible. However, we do not want too many stairs. For e.g., before adding a stair in a particular elevated area, the generator would check if this area is already accessible from a nearby stair. If so, it would not add it. This tolerance parameter determines how far to look for an existing path before we can add a stair. Play with this parameter if you see too many stairs close to each other, or too few

Definition at line 113 of file GridDungeonConfig.cs.


The documentation for this class was generated from the following file: