Skip to content
warp edited this page Oct 14, 2024 · 1 revision

This page is a work in progress

Overview

A valheim Dungeon consists of two main parts:

  1. An exterior location
  2. An interior collection of procedurally placed rooms.

Dungeon Exterior

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.

Dungeon 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.

Building Rooms in UnityEditor

There are a few quirks to building dungeon rooms in Valheim.

  1. 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.

  2. 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...

Valheim Dungeon Room Connection Transform Values

Clone this wiki locally