Skip to main content
Version: 3.4

Procedural Dungeon ⏵ Dungeon Generator

Dungeon Generator

Class Details

Defined in: Public/DungeonGenerator.h
Hierarchy: Object → Actor → Dungeon Generator Base → Dungeon Generator
Exposed in blueprint as: Blueprint Base Class | Variable Type

Description

This is the main actor of the plugin. The dungeon generator is responsible to generate dungeons and replicate them over the network.

Events

NameCategoryDescription
On Failed to Add Room Event
(inherited from Dungeon Generator Base)
Dungeon GeneratorCalled each time no room could have been placed at a door (all room placement tries have been exhausted).
On Generation Failed Event
(inherited from Dungeon Generator Base)
Dungeon GeneratorCalled when all dungeon generation tries are exhausted (IsValidDungeon always return false).
No dungeon had been generated.
On Generation Init Event
(inherited from Dungeon Generator Base)
Dungeon GeneratorCalled before trying to generate a new dungeon and each time IsValidDungeon return false.
On Post Generation Event
(inherited from Dungeon Generator Base)
Dungeon GeneratorCalled once after all the dungeon generation (even if failed).
On Pre Generation Event
(inherited from Dungeon Generator Base)
Dungeon GeneratorCalled once before anything else when generating a new dungeon.
On Room Added Event
(inherited from Dungeon Generator Base)
Dungeon GeneratorCalled each time a room is added in the dungeon (but not spawned yet).
Those rooms can be destroyed without loading them if the generation try is not valid.

Properties

NameTypeCategoryAccessorsDescription
Auto Discard Room if NullboolProcedural GenerationBlueprint Read/Write
Edit Anywhere
If true, returning null in ChooseNextRoom is the same as calling DiscardRoom.
Can LoopboolProcedural GenerationBlueprint Read/Write
Edit Anywhere
If ticked, newly placed room will check if any door is aligned with another room, and if so will connect them.
If unticked, only the doors between CurrentRoom and NextRoom (in the function ChooseNextRoom) will be connected.
(will only have effect if the deprecated CanLoop in the plugin settings is ticked too, until it is removed in a future version)
Dungeon LimitsFBoundsParamsProcedural GenerationBlueprint Read/Write
Edit Anywhere
Generation TypeEGenerationTypeProcedural GenerationBlueprint Read/Write
Edit Anywhere
In which order the dungeon generate rooms.
Depth First: Dungeon will use the last generated room to place the next one. Resulting in a more linear dungeon.
Breadth First: Dungeon will generate a room at each door of the current one before going to the next room. Resulting in a more spread dungeon.
Rooms
(inherited from Dungeon Generator Base)
UDungeonGraph*Dungeon GeneratorBlueprint Read Only
Use Generator Transform
(inherited from Dungeon Generator Base)
boolProcedural GenerationBlueprint Read/Write
Edit Anywhere
If ticked, the rooms location and rotation will be relative to this actor transform.
If unticked, the rooms will be placed relatively to the world's origin.
Use World Collision Checks
(inherited from Dungeon Generator Base)
boolProcedural GenerationBlueprint Read/Write
Edit Anywhere
If ticked, when trying to place a new room during a dungeon generation,
a box overlap test will be made to make sure the room will not spawn
inside existing meshes in the persistent world.
This is a heavy work and should be ticked only when necessary.
Does not have impact during gameplay. Only during the generation process.
Seed
(inherited from Dungeon Generator Base)
uint32Procedural Generation 
└ Seed
Edit Anywhere
Seed Increment
(inherited from Dungeon Generator Base)
uint32Procedural Generation 
└ Seed
Edit AnywhereThe increment number for each subsequent dungeon generation when SeedType is AutoIncrement.
Seed Type
(inherited from Dungeon Generator Base)
ESeedTypeProcedural Generation 
└ Seed
Blueprint Read/Write
Edit Anywhere
How to handle the seed at each generation call.
Random: Generate and use a random seed.
Auto Increment: Use Seed for first generation, and increment it by SeedIncrement in each subsequent generation.
Fixed: Use only Seed for each generation.

Nodes

NameCategoryDescription
Discard RoomDungeon GeneratorMust be called in "Choose Next Room" function to be used.
Tell explicitely the generator we don't want to place a room for a specific door.
No error will be thrown when returning a null room data and no further room placement tries occur for this door (skip directly to the next door).