ApplyMissionGraph en - shun126/DungeonGenerator GitHub Wiki
Apply MissionGraph
This page explains how to use MissionGraph to add a progression route where the player finds keys and unlocks doors while moving through the dungeon.
MissionGraph is currently a beta feature.
It is easier to work with after your normal dungeon generation setup is already stable.
Goal
- Understand what MissionGraph adds to dungeon generation
- Confirm the basic flow of locked doors and key placement
- Understand the roles of
DungeonDoorandDungeonRoomSensor
What to Know First
- MissionGraph adds a start-to-goal progression route to the dungeon
- Locked doors and key placement are realized by actors that use the MissionGraph information
- For the first test, keep it simple and only verify the flow of
pick up a key -> open a door -> move forward
Prerequisites
- QuickStart.en.md is complete
- Normal dungeon generation already works
- You understand the basic settings in UDungeonGenerateParameter.en.md
- You are ready to add both door actors and room sensors
What MissionGraph Does
When MissionGraph is enabled, dungeon generation builds a progression flow like this.
- The player starts from a start room
- A key is found in a room along the route
- A locked door is opened to reach a new area
- If needed, a
Unique keyopens the final special door - The player eventually reaches the goal
In other words, MissionGraph does more than place rooms.
It adds an intended order of progression to the dungeon.
Fastest Setup
Start with the minimum setup and confirm that MissionGraph is actually affecting the dungeon.
1. Enable MissionGraph in Generate parameter
In UDungeonGenerateParameter, check the following.
UseMissionGraph = trueMergeRooms = falseAisleComplexity = 0
When you use MissionGraph, it is safer and easier to understand if you do not combine it with room merging or normal aisle-complexity routing.
2. Prepare a Door Actor
The door actor handles the look and behavior of locked doors.
Create a Blueprint door derived from DungeonDoorBase, then register it in Door Parts so generation can use it.

3. Prepare Key Spawning on the Room Sensor Side
Keys and unique keys are handled on the room side using MissionGraph data.
If you are using a Blueprint derived from ADungeonRoomSensorBase, set SpawnKeyActor and SpawnUniqueKeyActor as needed.


4. Generate the Dungeon and Check the Progression
After generation, confirm that the following flow exists.
- The player can move through the start area
- A key can be picked up along the route
- That key opens a corresponding door
- The player can eventually reach the goal
Role of Each Piece
MissionGraph data is mainly consumed by the following two actor types.
DungeonDoor
- Receives lock information and behaves as a door
- Acts as the entry point that distinguishes normal doors from locked doors
DungeonRoomSensor
- Handles the actors and events needed in each room
- Can also be used to place keys and unique keys
How to Read the Graph
The diagram below is an example of a progression structure generated by MissionGraph.
- Arrows are aisles
- An arrow labeled
Lockis a locked door Unique lockis a door that can be opened only by the unique key in that dungeon- Squares are rooms
Item: KeyandItem: Unique keyshow what item is placed in the room
graph TB;
0_18_2["Item:Unique key"]
15_22_1["Type:Start"]
9_20_1["Item:Key"]
27_5_1["Type:Goal"]
8_26_1["Item:Key"]
22_24_1["Item:Key"]
10_13_1["Item:Empty"]
15_15_1["Item:Empty"]
15_7_0["Item:Empty"]
20_0_1["Item:Empty"]
15_22_1<-->|"Lock"|22_24_1;
15_22_1<-->8_26_1;
8_26_1<-->9_20_1;
9_20_1<-->0_18_2;
9_20_1<-->|"Lock"|10_13_1;
10_13_1<-->15_15_1;
15_15_1<-->15_7_0;
15_7_0<-->|"Lock"|20_0_1;
20_0_1<-->|"Unique lock"|27_5_1;
Verify the Result
- Some areas are inaccessible before picking up a key
- Picking up a key allows the matching door to open
- The final
Unique keyand final door work correctly - The full progression from start to goal is valid
Common Mistakes
UseMissionGraphis enabled, but it still feels like a normal dungeon
First, focus only on locked doors and key placement so the MissionGraph effect is obviousMergeRoomsorAisleComplexityconflicts with the intended setup
UseMergeRooms = falseandAisleComplexity = 0as the baseline for MissionGraph- Doors appear, but keys do not
Recheck theDungeonRoomSensorsetup, especiallySpawnKeyActorandSpawnUniqueKeyActor - Keys appear, but the door behavior or visuals do not match
Recheck the door actor registered inDoor Parts