Valheim
Install with App

Details

Latest version
0.1.0
Last Updated
First Uploaded
Downloads
48
Likes
0
Size
20KB
Dependants
ADDatHost Valheim hosting
30% off

Dungeon Environment Guard

Small Valheim/BepInEx compatibility guard for a pathological dungeon environment loop observed with regenerated sky dungeons.

What it fixes

In the affected world, Valheim can repeatedly alternate between:

  • Crypt
  • SunkenCrypt

many times per second. This creates huge log spam and can contribute to gameplay hitches.

The guard watches EnvMan.SetForceEnvironment(string) and does nothing during normal gameplay. It activates only after detecting the rapid alternating pattern A -> B -> A inside the configured conflict window.

When active it prefers SunkenCrypt and suppresses redundant/conflicting requests until either:

  • Valheim clears the forced environment,
  • another environment is requested, or
  • SunkenCrypt requests stop for the configured release delay, allowing a legitimate transition to Crypt.

Configuration

Created after first launch in the normal BepInEx config directory.

  • Enabled = true
  • ConflictWindowMs = 250
  • ReleaseDelayMs = 750
  • DiagnosticLogging = true

Scope

This mod does not modify LocationReset, dungeon generation, ZDOs, networking, or save data. It only guards the forced-environment setter.

Built for the Valheim 1.0.15 / BepInEx 5.4.2350 environment used by the target modpack. The patch resolves the target method by name and exact string parameter at runtime and fails open if its own logic errors.

Thunderstore development is made possible with ads. Please consider making an exception to your adblock.