Skip to main content

Procedural Dungeon ⏵ Dungeon Generator

Dungeon Generator

Class Details

Defined in: Public/DungeonGenerator.h
Hierarchy: Object → Actor → 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.

Properties

NameTypeCategoryAccessorsDescription
RoomsUDungeonGraph*Dungeon GeneratorBlueprint Read Only
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.
Use Generator TransformboolProcedural 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 ChecksboolProcedural 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.
Seeduint32Procedural Generation 
└ Seed
Edit Anywhere
Seed Incrementuint32Procedural Generation 
└ Seed
Edit AnywhereThe increment number for each subsequent dungeon generation when SeedType is AutoIncrement.
Seed TypeESeedTypeProcedural 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
GenerateDungeon GeneratorUpdate the seed and call the generation on all clients
Do nothing when called on clients
Get Compatible Room DataDungeon GeneratorReturns an array of room data with compatible at least one compatible door with the door data provided.
Get ProgressDungeon GeneratorReturns the current generation progress.
Get Random Room DataDungeon GeneratorReturn a random RoomData from the array provided
Get Random Room Data WeightedDungeon GeneratorReturn a random RoomData from the weighted map provided.
For example: you have RoomA with weight 1 and RoomB with weight 2,
then RoomA has proba of 1/3 and RoomB 2/3 to be returned.
Get Random StreamDungeon GeneratorAccess to the random stream of the procedural dungeon. You should always use this for the procedural generation.
Get SeedDungeon Generator
Set SeedDungeon Generator
UnloadDungeon GeneratorUnload the current dungeon
Do nothing when called on clients