Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Monstrum Location Manager Fix
Fix location problem with Monstrum mods
| Last updated | 2 hours ago |
| Total downloads | 2 |
| Total rating | 0 |
| Categories | Mods Server-side Client-side AI Generated |
| Dependency string | sighsorry-Monstrum_Location_Manager_Fix-1.0.0 |
| Dependants | 1 other package depends on this package |
This mod requires the following mods to function
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.2333README
MonstrumLocationManagerFix
Monstrum mods are fine by itself but it can have problems with other mods that adds locations.
There is sometimes duplication with location proxies so you may devote double offerings to summon a boss.
And there was problem with valheimcuisine's location too. And this mod fixes that.
MonstrumLocationManagerFix is a small BepInEx plugin for Valheim that fixes Therzie's Monstrum and MonstrumDeepNorth location registration at runtime.
What it fixes
In Therzie's location registration flow, LocationManager.Location.AddLocationToZoneSystem can use:
UnityEngine.Object.Destroy(...)
when removing the existing enabled LocationProxy from ZoneSystem.m_locationProxyPrefab.
In this path, deferred destruction can leave the old proxy alive until later in the frame while a replacement proxy is added immediately. That can cause duplicate or conflicting location proxy behavior.
This plugin changes that call to:
UnityEngine.Object.DestroyImmediate(...)
so the cleanup happens immediately during location setup.
Target mods
This plugin only patches loaded assemblies that belong to these plugin GUIDs:
Therzie.MonstrumTherzie.MonstrumDeepNorth
It only targets this method:
LocationManager.Location.AddLocationToZoneSystem
How it works
This is a normal BepInEx plugin, not a preloader patcher.
At startup it:
- Detects whether
Monstrumand/orMonstrumDeepNorthare loaded. - Finds
LocationManager.Location.AddLocationToZoneSystemin those assemblies. - Applies a Harmony transpiler.
- Replaces
Destroy(Object)withDestroyImmediate(Object)in memory.
Important behavior
- Install location:
BepInEx/plugins - Does not modify
Monstrum.dll - Does not modify
MonstrumDeepNorth.dll - Does not write marker files
- Does not clear the BepInEx cache
- Does not require anti-cheat whitelisting for modified Monstrum DLLs
Example log lines
Successful runtime patch:
Loading [MonstrumLocationManagerFix 1.0.0]Patched Monstrum.LocationManager.Location.AddLocationToZoneSystem and replaced 1 Destroy call(s).Patched MonstrumDeepNorth.LocationManager.Location.AddLocationToZoneSystem and replaced 1 Destroy call(s).
Already fixed in the loaded target assembly:
Verified Monstrum.LocationManager.Location.AddLocationToZoneSystem is already using DestroyImmediate.
Patch summary:
Applied runtime patch to 2 LocationManager method(s).
Scope and safety
This plugin is intentionally narrow.
- No config file
- No gameplay changes outside the targeted location proxy cleanup
- No patching of unrelated mods
- No permanent modification of other mods' files
Why this exists
An earlier version solved the issue by rewriting other mods' DLL files on disk. This version keeps the same fix but applies it at runtime instead.