Skelitten Games

Dungeon Graphs

A Dungeon Graph defines the layout of a dungeon. For example, you could create a layout like Spawn Room → Corridor → Large Room.

You can create all sorts of layouts, such as:

  • Branching Paths
  • Key & Lock Setup (while making sure the key always spawns before the locked door)
  • Multi-Floor Dungeons

The graph uses Module Types to describe which modules should be placed. The Module Set provides the actual modules that the generator can choose from.

Creating the Dungeon Graph

  1. Right-click in the Content Browser → Dungeon Generator → Create a Dungeon Graph.
  2. Open the graph → Drag out of Dungeon Start → Place a Module node.
  3. Select the node → Choose a Module Type.
    • Your dungeon now consists of a single module of that type.
  4. Increase the Count so your dungeon doesn't just consist of a single module, or add more Module nodes to the chain.
    • For a fixed number of modules, use Set Count. For example, set a Corridor node's Count to 2 to place two corridor pieces in a row.
    • For a random number, use Random and set Min Count and Max Count.
  5. Save the graph.

Example layout for the Dungeon Graph.

Example of a more advanced graph. The generator will place the spawn module, then three corridors. The third corridor will lead to two dead ends and a large room.

The DG_Demo_KeyLockSetup graph is a good example. I recommend checking it out:

  • It always spawns a room labeled Key Room before each locked door.
  • Locked doors cannot randomly spawn, so we use the Connector node to spawn them in.
  • Because not every Dead End should have a key, we only add a key to modules labeled Key Room after we finish generating the dungeon. This is a good example use case for Labels (more details below).

The DG_Demo_KeyLockSetup graph adds two locked doors. It also ensures a key spawns in before each locked door.

Adding Branches

Branches are placed at unused connections after the main path has been generated. Branches are optional, so generation will count as successful even if no branches were placed.

To add branches:

  1. Right-click in an empty part of the graph → Add Branch Start.
  2. Drag out of Branch Start → Add a Module node.
    • For example, use a Dead End to add a room to a spare opening.
    • You can add more nodes to make a longer branch.
  3. Tweak the graph's Settings node.
    • Branch Chance defines the chance for a branch to spawn at each unused connection.
    • Maximum Branches limits how many branches can be placed. A value of 0 removes the limit.
    • Allow Branches On Branches lets branches attach to unused connections of other branches.

Tags & Labels

Tags allow you to force the generator to use specific modules or connectors in the layout. Labels allow you to find modules and connectors during play.

Adding Tags:

  • Use the Dungeon Tools to add tags to modules.
  • Use the Details Panel to add tags to Connector Markers.

Make sure to click Update module data after adding or removing any tags.

Using Tags:

In the Dungeon Graph, click on any module or connector node, then add to the Required Tags or Excluded Tags array in the Details Panel. This can be useful to request a specific module of a type, or to make sure we enter a module through a specific connector.

For example, you could assign a Loot tag to a selection of modules that share the same Module Type. You can then add request a module of that type that either has or doesn't have the Loot tag.

Connector tags are even more versatile, as they allow you to define through which connector you want to exit or enter a module. For example, you could add the Entrance tag to a connector to ensure that players always enter the module through a specific connector.

Adding Labels:

Click on a module or connector node in the Dungeon Graph and assign the tag in the Details Panel.

Using Labels:

Labels allow you to find or identify modules and connectors during play after a dungeon has loaded. For example, you can call Get Module Manager With Label to find a specific manager.

You can set required and excluded tags in the Dungeon Graph editor by selecting a node.

Chaining Dungeons

You can generate a dungeon at an External Connection of another dungeon. External connectors are created by adding a connector node that does not lead to another module.

The Medium Connector node does not lead to another module. It is therefore an external connector.

After generating a dungeon, you can find its external connections by using one of the provided Get External Connection functions.

Use these functions to get an external connection. You can then call Generate Dungeon at Connector on this external connection.

Search documentation

Type to search all documentation.