-
Notifications
You must be signed in to change notification settings - Fork 7
Creating Dungeons
This page is a work in progress
A valheim Dungeon consists of two main parts:
- An exterior location
- An interior collection of procedurally placed rooms.
The dungeon exterior is similar to all other locations. It is placed during world generation and will follow location placement rules. However, it should have an attached DungeonGenerator to generate the dungeon rooms as well as a teleport to transfer the player from exterior to interior.
A dungeon interior is a collection of procedurally placed rooms. A DungeonGenerator holds a Theme field and will attempt to place rooms with the same Theme. Each room has one to many connections. For each connection, the DungeonGenerator will attempt to place another room given a set of room connection parameters. Dungeon generation will stop when the max rooms is met or when a room exceeds the bounds of it's starting zone.
There are a few quirks to building dungeon rooms in Valheim.
-
Room sizes should be configured so as to not allow rooms to exceed the bounds of their starting zone. If a room exceeds the bounds of it's starting zone and therefore places a room connection outside the starting zone, that room connection will not receive another room. This can be circumvented by ensuring all rooms fit neatly into a 64x64 size zone or by creating endcaps with a room size of 0.
-
Room connections transform values must follow a specific pattern. See attached image below. With the UnityEditor compass in the same orientation as shown. North facing room connections must use the transform values on the top of the black square. South facing room connections must use the transform values on the bottom of the black square. Etc...