Class in ChivalrousGames.DungeonMaster


Holds configuration for Room generation.


roomSize Vector3 The size of each Room in Unity units. A Level will only accept Rooms that fit with its configured size.
region Region The Region this Room is a part of. A Region is a thematic area of a Level. Example: “Street” and “Sewer” could be two Regions of a same Level. Regions allow to limit connections between Rooms of a same Level. If null, Room is not considered part of any Region.
priorityRoomUntilMinOccurence int This Room will be selected in priority before other Rooms without priority until the following min occurences are created, after that the Room isn’t considered a priority. This doesn’t make the Room mandatory, but it allows for more chances to make the Room appear. If 0 then Room is not a priority.
decreaseWeightWithUsage bool If true, then chances of this Room being created will decrease as more occurrences of the Room are added to the Level down to a minimum weight of 1.
decreaseWeightAmount int The amount the weight is decreased each time the Room is used in a Level.
maxRoomOccurrence int The maximum amount of times this Room should appear in the Level. This doesn’t count the PresetRooms.
generationWeight int The generation weight: how likely is this Room to be used when generating the Level.
prefab GameObject The Room GameObject to instanciate when this Room is rendered.
adjustment TransformAdjustment The adjustment done on the Room when instantiated. NOTE: Avoid room scale adjustment if you use RoomNavMeshManager: it won’t work because of a Unity limitation.
allowedRotations RoomGenerationRotation The allowed rotations on the Room when generating Level. Will rotate the whole Room to match RoomConnectors. If a Room is rotated to match RoomConnectors of neighbors, the rotation will be applied after the Room’s adjustment.
prioritizeNoRotation int If true and it is possible to place the Room in a non-rotated fashion, the Room will always be placed non-rotated. Otherwise, any rotataion is used randomly.