Daishi11-DungeonEnvironmentGuard icon

DungeonEnvironmentGuard

Prevents pathological Crypt/SunkenCrypt forced-environment ping-pong without disabling dungeon or LocationReset functionality.

Last updated 2 days ago
Total downloads 11
Total rating 0 
Categories Mods Tweaks AI Generated
Dependency string Daishi11-DungeonEnvironmentGuard-0.1.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2350 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.

Preferred version: 5.4.2350

README

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.