Source-checkedAdmin & protection

ValheimEffectListCompat

by Ntxfloy · for Valheim

Compatibility bridge for Valheim 1.0 (Unity 6): restores EffectList.Create 5-arg forwarder, Character.Message 4-arg forwarder (fixes OdinStorage), and fixes ZNetScene.RemoveObjects NRE cascade.

187Downloads
40d agoLast updated
BepInExLoaders
ThunderstoreSource

About ValheimEffectListCompat

From Thunderstore

Compatibility bridge for Valheim 1.0 (Unity 6): restores EffectList.Create 5-arg forwarder, Character.Message 4-arg forwarder (fixes OdinStorage), and fixes ZNetScene.RemoveObjects NRE cascade.

Valheim Compatibility Bridges

Thunderstore Version License: MIT Target: Valheim 1.0 (Unity 6)-orange.svg)

A lightweight, robust two-component compatibility mod designed to restore legacy mod compatibility and eliminate game-breaking NullReferenceException cascades in Valheim 1.0 (Unity 6).


The Problems This Mod Solves

When Iron Gate upgraded Valheim to 1.0 (Unity 6000), two critical breaking changes broke dozens of existing mods and destabilized sector unloading:

1. MissingMethodException on EffectList.Create

In Valheim 1.0, Iron Gate added a 6th parameter (ZDOID targetZDO) to EffectList.Create:

// Legacy signature (used by dozens of existing mods):
EffectList.Create(Vector3 pos, Quaternion rot, Transform baseChild, float scale, int itemVariant)

// Valheim 1.0 signature:
EffectList.Create(Vector3 pos, Quaternion rot, Transform baseChild, float scale, int itemVariant, ZDOID targetZDO)

Any mod compiled against older versions of Valheim throws:

System.MissingMethodException: Method not found: EffectList.Create

2. AmbiguousMatchException in Harmony

When multiple overloads exist without proper parameter discrimination, Harmony lookups by method name fail with:

System.Reflection.AmbiguousMatchException: Ambiguous match found for EffectList.Create

3. Unity 6 ZNetScene.RemoveObjects NRE Cascade (5,000+ Errors per Session)

In Unity 6, native C++ object destruction and managed reference lifetime behavior changed. When objects leave player sectors, ZNetScene.RemoveObjects iterates m_instances.Values. If an external mod destroyed a ZNetView or its associated GameObject during gameplay, vanilla code dereferences the dead object:

NullReferenceException: Object reference not set to an instance of an object
  at ZNetScene.RemoveObjects (System.Collections.Generic.List`1[ZDO] currentNearObjects, System.Collections.Generic.List`1[ZDO] currentDistantObjects)
  at ZNetScene.CreateDestroyObjects ()
  at ZNetScene.Update ()

This causes an infinite loop of thousands of NREs every frame, severe stuttering, memory leaks, and broken entity despawning.


How It Works

This package provides a clean, two-layer architecture:

 Valheim Game Launch
         │
         ├──► 1. Preloader Patcher (ValheimEffectListCompat.dll)
         │       ├─ Injected via Mono.Cecil before game assemblies load
         │       ├─ Adds legacy 5-argument EffectList.Create forwarder
         │       └─ Installs Harmony resolver hook for by-name patches
         │
         └──► 2. Runtime Scene Plugin (ValheimSceneCompat.dll)
                 ├─ Intercepts ZNetScene.RemoveObjects
                 ├─ Phase 1: Cleans dead/corrupted keys from m_instances
                 ├─ Phase 2: Safely unloads entities leaving active sector
                 ├─ Phase 3: Cleans up non-persistent owned ZDOs in ZDOMan
                 └─ Installs safety Finalizers on CreateDestroyObjects & RemoveObjects

Component 1: Cecil Preloader (ValheimEffectListCompat.dll)

  • Location: BepInEx/patchers/Ntxfloy-ValheimEffectListCompat/ValheimEffectListCompat.dll
  • Target: netstandard2.0 with zero dependencies on game assemblies.
  • EffectList Forwarder: Injects a lightweight IL wrapper that forwards 5-argument calls to the native 6-argument method with a default ZDOID.None.
  • Harmony Resolver: Automatically directs ambiguous Harmony EffectList.Create patches to the primary game implementation by metadata token order.

Component 2: Runtime Scene Plugin (ValheimSceneCompat.dll)

  • Location: BepInEx/plugins/Ntxfloy-ValheimSceneCompat/ValheimSceneCompat.dll
  • Target: netstandard2.1 standard BaseUnityPlugin.
  • Safe Dictionary Sanitization: Sweeps and removes null/destroyed keys and dead references before iterating.
  • Guaranteed Removal: m_instances.Remove(zdo) is guaranteed in a finally block, ensuring clean sector transitions.
  • Vanilla Parity for Non-Persistent ZDOs: Correctly unregisters temporary owned entities (arrows, projectiles, transient VFX) via ZDOMan.DestroyZDO inside an isolated block, preventing world database leaks.
  • Safety Finalizers: Catches and suppresses any rogue exceptions in CreateDestroyObjects and RemoveObjects, ensuring the game's main loop never aborts.
  • Smart Error Throttling: Logs the first occurrence of each unique exception signature immediately with full stack trace, then throttles subsequent occurrences to once per 10 seconds.

Configuration

Settings are saved in BepInEx/config/ntxfloy.valheimscenecompat.cfg:

| Category | Option | Default | Description | | :--- | :--- | :---: | :--- | | ZNetScene | EnableSafeRemoveObjects | true | Enables dictionary sanitization and guaranteed removal in ZNetScene.RemoveObjects. | | ZNetScene | EnableCreateDestroyFinalizer | true | Installs a safety finalizer on ZNetScene.CreateDestroyObjects to catch unhandled third-party exceptions. | | ZNetScene | PreventDoubleZNetViewGhostZDO | false | Experimental: Destroys duplicate ZNetView components on prefabs rather than creating unmanaged ghost ZDOs. |


Installation

Via r2modman / Thunderstore Mod Manager (Recommended)

  1. Install r2modman or Thunderstore App.
  2. Search for ValheimEffectListCompat by Ntxfloy and click Download.

Read the full description on Thunderstore →

Highlights

From source data

Loaders

Runs on BepInEx.

Footprint

Rated a light load on a server.

Last update

Its author last shipped an update 40d ago.

ValheimEffectListCompat on Nxeon

From our catalogue
One-click install
Supported on Nxeon Valheim servers, for BepInEx servers. We download it from Thunderstore, place it, and restart the server.
Server type needed
BepInEx
Server load
light
Smallest plan we suggest
Valheim — 4 GB (4 GB RAM). This follows our own load rating above, not a benchmark.
Latest build
0.1.9, released 2026-09-26

Game versions by loader

LoaderGame versionsNewest
BepInEx

From 4 recorded builds of ValheimEffectListCompat.

Recent builds

BuildReleasedGame versionsLoaders
0.1.92026-09-26n/aBepInEx
0.1.72026-09-24n/aBepInEx
0.1.62026-09-24n/aBepInEx
0.1.52026-09-24n/aBepInEx

Dependencies

Declared by the newest build that lists any. Required ones are installed with it on one-click installs.

Run ValheimEffectListCompat on a Valheim server

Pick a server or deploy a new one above; it is installed in one click.

What kind of mod it is

From the catalog
Listed on Thunderstore as “Admin”

Admin & protection

Permissions, moderation, anti-cheat and land protection for the people running the server.

Compatibility

Game
Valheim
Loaders
BepInEx
Requires
One-click install needs a BepInEx server.

Verified at the source

  • ✓ThunderstoreOfficial listing, checked 2026-10-01Open ↗
  • ✓AuthorNtxfloy, as published on Thunderstore
  • ✓LicenseNot published by the sourceFree

ValheimEffectListCompat, answered

Generated from the mod’s own source data.

Which loaders does it support?

BepInEx.

Is it free?

Yes. ValheimEffectListCompat is free to download from Thunderstore.

How do I add it to my Nxeon server?

Use “Add to a server” on this page, or open NxLabs from your dashboard. We install it, restart your server and switch it on.

NxLabs

Run ValheimEffectListCompat on a Valheim server.

Deploy in about a minute from $9.99 a month, then add ValheimEffectListCompat in one click.