NoArbitraryIncompatibilityFlag

版本 v1.1.3·更新於 2026-08-21

Removes incompatibility restrictions from RtD mods, allowing them to work with other popular Valheim mods.

模組介紹 作者原文

NoArbitraryIncompatibilityFlag

A BepInEx patcher that removes incompatibility restrictions from RtD mods, allowing them to work alongside other popular Valheim mods.

What Does It Do?

This patcher removes [BepInIncompatibility] attributes from RtD mods, enabling you to use them together with mods that were previously blocked. The mods themselves work fine together - this simply removes the restrictions.

Affected RtD Mods:

  • RtDOcean
  • RtDVines
  • RtDMonsters
  • RtDSouls & RtDSouls_Addon
  • RtDBiomes
  • RtDMonstrum
  • RtDDungeons
  • RtDFairyTale
  • RtDGardening
  • RtDHorrors
  • RtDItems
  • RtDMagic
  • RtDLegends
  • RtDMythics
  • RtDQuestForge

Previously Blocked Mods (Now Compatible):

  • CookieMilk.MagicalMounts
  • CookieMilk.MajesticChickens
  • CookieMilk.BuildPieces
  • CookieMilk.CarryMeMaster
  • CookieMilk.DiscordControl
  • CookieMilk.UltimateServerControl
  • Therzie.MonstrumDeepNorth
  • Therzie.WarfareFireAndIce
  • Therzie.Monstrum
  • Therzie.Armory
  • Therzie.Wizardry
  • Therzie.Warfare
  • blacks7ar.MagicPlugin
  • blacks7ar.MagicRevamp
  • blacks7ar.SeedBed
  • blacks7ar.OreMines
  • blacks7ar.BowPlugin
  • randyknapp.mods.epicloot
  • org.bepinex.plugins.valheim_plus

Installation

IMPORTANT: This is a PATCHER, not a regular plugin!

  • Download NoArbitraryIncompatibilityFlag.dll
  • Place it in BepInEx/patchers/ folder (NOT plugins!)
  • Launch the game
  • The patcher will automatically process RtD mods on startup

How It Works

The patcher uses a dual-layer approach combining Cecil IL patching with Harmony runtime patches. All modifications are in-memory only - no files are ever modified on disk.

On launch, you'll see:

Processing RtDVines.dll...

Stripped 19 incompatibility attribute(s) from RtDVines

Neutered RtDVines.Fail()

Removed 4 Fail() call(s) from RtDVines.Awake()

✓ Cecil IL patching complete - RtD detection code neutralized

✓ Harmony fallback: Ready to bypass incompatibility checks

✓ Harmony fallback: Ready to hide from ContainsKey detection

✓ Harmony fallback: Ready to hide assembly name

✓ Harmony fallback: Ready to filter GetAssemblies

✓ Found RtD mod: RtDVines

✓ Successfully bypassed incompatibility checks for 1 RtD mod(s)

Technical Details

RtD mods added four detection checks in their Awake() method:

  • IL Bytecode Integrity Check: Verifies their "Block" method hasn't been modified

MethodInfo method = typeof(RtDMod).GetMethod("Block",...);

byte ilAsByteArray = method?.GetMethodBody()?.GetILAsByteArray();

if (method == null || ilAsByteArray == null || ilAsByteArray.Length a.GetName().Name.Contains("NoArbitraryIncompatibilityFlag")))

Fail();

  • Module Name Scan: Searches all loaded assembly modules for our name

if (AppDomain.CurrentDomain.GetAssemblies().Any(a => a.ManifestModule.Name.IndexOf("NoArbitraryIncompatibilityFlag", StringComparison.OrdinalIgnoreCase) >= 0))

Fail();

The patcher uses a dual-layer defense strategy. The Cecil layer runs during BepInEx's preloader phase, before any plugin code executes. BepInEx loads each RtD DLL into memory as an AssemblyDefinition object, passes it to our Patch() method, we modify the IL instructions, and BepInEx loads the modified version into the CLR. The original DLL on disk is never touched.

Cecil IL Patching (Primary Defense)

  • Strip Incompatibility Attributes: Removes all [BepInIncompatibility] custom attributes from types. This is the primary goal - removing the actual incompatibility declarations.
  • Neuter Fail() Method: Replaces the method body with just ret. Even if detection checks somehow execute, calling Fail() does nothing.

// Before:

private static void Fail() {

throw new Exception("Mod integrity check failed.");

}

// After:

private static void Fail() {

return; // Does nothing

}

  • Strip Static Constructor Throws: NOPs throw statements in.cctor. Finds static constructors that contain integrity check strings and replaces ldstr + newobj Exception + throw with nop instructions.
  • Strip Fail() Calls from Awake(): NOPs all calls to Fail() in the Awake method. Fi

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。

檔案與校驗

檔案名稱
NoArbitraryIncompatibilityFlag-1.1.3.zip
檔案大小
139.5 KiB