You are viewing a potentially older version of this package. View all versions.
IAmOnTheInternetAndItIsScary-NoArbitraryIncompatibilityFlag-1.1.0 icon

NoArbitraryIncompatibilityFlag

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

Date uploaded a week ago
Version 1.1.0
Download link IAmOnTheInternetAndItIsScary-NoArbitraryIncompatibilityFlag-1.1.0.zip
Downloads 224
Dependency string IAmOnTheInternetAndItIsScary-NoArbitraryIncompatibilityFlag-1.1.0

README

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

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

Installation

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

  1. Download NoArbitraryIncompatibilityFlag.dll
  2. Place it in BepInEx/patchers/ folder (NOT plugins!)
  3. Launch the game
  4. 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:

  1. 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 <= 2)
        Fail();
    
  2. PluginInfo Dictionary Check: Looks for our GUID in BepInEx's plugin registry

    if (Chainloader.PluginInfos.ContainsKey("IAmOnTheInternetAndItIsScary.NoArbitraryIncompatibilityFlag"))
        Fail();
    
  3. Assembly Name Scan: Searches all loaded assemblies for our name

    if (AppDomain.CurrentDomain.GetAssemblies().Any(a => a.GetName().Name.Contains("NoArbitraryIncompatibilityFlag")))
        Fail();
    
  4. 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)

  1. Strip Incompatibility Attributes: Removes all [BepInIncompatibility] custom attributes from types. This is the primary goal - removing the actual incompatibility declarations.

  2. 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
    }
    
  3. 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.

  4. Strip Fail() Calls from Awake(): NOPs all calls to Fail() in the Awake method. Finds all call Fail instructions and replaces them with nop (no operation).

Harmony Runtime Patches (Fallback Protection)

The Harmony layer provides fallback protection in case the Cecil layer misses something or a future RtD mod uses different patterns:

  1. Incompatibility Bypass: Patches PluginInfo.Incompatibilities getter to return empty array for RtD mods (identified by "Soloredis." GUID prefix).

  2. ContainsKey Stealth: Patches Dictionary<string, PluginInfo>.ContainsKey to return false only for our specific GUID and only when called from RtD code. Uses stack trace analysis to identify the caller.

  3. Assembly Name Hiding: Patches Assembly.GetName() to return "HiddenAssembly" instead of "NoArbitraryIncompatibilityFlag" when called from RtD mods. Uses recursion guard to prevent issues during GetAssemblies calls.

  4. GetAssemblies Filtering: Patches AppDomain.GetAssemblies() to filter our assembly from results only when called from RtD mods. Uses recursion guard (insideGetAssemblies flag) to prevent infinite loops - Prefix sets flag to true, Postfix sets it to false after filtering, and GetName_Postfix checks this flag and skips processing when true.

FAQ

Q: Is this safe?
A: Yes. The patcher only removes compatibility restrictions. The mods function normally, they just don't block other mods anymore.

Q: Will this break my game?
A: No. If you encounter any issues, they would be unrelated to this patcher. You can always remove the patcher to restore original behavior.

Q: Does this modify files on disk?
A: No. All modifications are in-memory only. BepInEx loads DLLs into memory, we modify the IL, and the modified version is loaded into the game. Original files remain unchanged.

Q: Do I need to reinstall after RtD mod updates?
A: No. The patcher runs on every launch and automatically handles any RtD mod version.

Q: Can I upgrade from an older version of this patcher?
A: Yes. Just replace the old DLL with the new one in the patchers folder.

Q: Will this work with old versions of RtD mods?
A: Yes. The patcher works with all current RtD mod versions.

Q: What if I want to stop using this patcher?
A: Simply remove the DLL from the patchers folder. RtD mods will return to their original behavior.

Q: Why does this patcher exist?
A: The blocked mods work fine with RtD mods. The incompatibility restrictions are arbitrary and prevent players from using mod combinations that function correctly together.

Q: Will you keep this updated?
A: Yes. As long as these mods keep getting blocked, this patcher will be updated to counter it. Made by a player, for the players.

CHANGELOG

Changelog

[1.1.1] - 2026-04-06

Changed

  • Updated FAQ to address false claims about patcher causing bugs or performance issues
  • Clarified that blocked mods work perfectly with RtD mods
  • Documentation improvements

[1.1.0] - 2026-04-06

Changed

  • Package structure updated for automatic installation with mod managers
  • DLL now included in patchers/ folder within the zip file
  • Mod managers will now automatically place the patcher in the correct BepInEx/patchers/ directory
  • No more manual file moving required when using mod managers

[1.0.9] - 2026-04-06

Changed

  • Implemented dual-layer defense combining Cecil IL patching with Harmony runtime patches
  • Cecil layer strips incompatibility attributes and neuters detection code before any plugin loads
  • Harmony layer provides fallback protection for runtime detection attempts

Technical Details

This version uses a two-layer defense strategy:

Layer 1: Cecil IL Patching (runs before any code loads)

  • Strips all [BepInIncompatibility] attributes from RtD mod types
  • Neuters the Fail() method by replacing its body with just ret
  • Removes throw statements from static constructor integrity checks
  • NOPs all Fail() calls in Awake() method

Layer 2: Harmony Runtime Patches (fallback protection)

  • Patches PluginInfo.Incompatibilities getter to return empty array
  • Patches Dictionary.ContainsKey to hide our GUID
  • Patches Assembly.GetName() to return fake name
  • Patches AppDomain.GetAssemblies() to filter out our assembly with recursion guard

The Cecil layer handles the heavy lifting by modifying IL before execution. Even if RtD mods add new detection checks, they all ultimately call Fail(), which now does nothing. The Harmony patches remain as a safety net.

All modifications are in-memory only. BepInEx's patcher system loads DLLs into memory, passes them to our Patch() method as AssemblyDefinition objects, we modify the IL, and BepInEx loads the modified version into the CLR. Original DLLs on disk are never touched.

[1.0.8] - 2026-04-06

Changed

  • Added runtime detection evasion for RtD mods
  • Patcher now hides from all RtD detection mechanisms
  • Assembly scanning is cached to prevent performance issues

Technical Details

RtD mods added detection checks in their Awake() method. The patcher uses Harmony to patch .NET runtime methods:

  • Dictionary<string, PluginInfo>.ContainsKey returns false when RtD mods check for our GUID
  • Assembly.GetName() returns a fake name when RtD mods scan loaded assemblies
  • Stack trace analysis identifies RtD mods by their "Soloredis." GUID prefix
  • All modifications remain in-memory only

[1.0.7] - 2026-04-04

Changed

  • Switched to runtime Harmony patching
  • All modifications now happen in-memory only
  • Patches PluginInfo.Incompatibilities property getter at runtime

Technical Details

  • Uses Harmony to intercept incompatibility checks
  • Patches execute in BepInEx preloader Finish phase
  • Returns empty incompatibility array for RtD mods

[1.0.6] - 2026-04-04

Changed

  • Updated documentation to be strictly informational
  • Removed informal language from documentation

[1.0.5] - 2026-04-04

Changed

  • Updated patcher to handle integrity verification in RtD mods
  • Modified approach to preserve method structures while bypassing compatibility checks

Technical Details

  • RtD mods added integrity checks using IL bytecode inspection
  • Patcher preserves original method structures to pass integrity verification
  • Initialization flow is modified to skip compatibility checks

[1.0.4] - 2026-04-04

Changed

  • Updated README with accurate log output examples
  • Documentation improvements for clarity

[1.0.3] - 2026-04-04

Changed

  • Rewrote detection code removal approach
  • Now rebuilds initialization methods instead of patching IL instructions
  • Reconstructs clean initialization flow without compatibility checks

Technical Details

  • Rebuilds initialization methods to skip compatibility checks
  • Clears problematic method bodies to prevent mod disabling
  • More robust approach that works regardless of code structure

[1.0.2] - 2026-04-02

Changed

  • Updated README to clarify that all RtD mods include compatibility restrictions
  • Documentation accuracy improvements

[1.0.1] - 2026-04-02

Changed

  • Updated README with additional documentation
  • Added FAQ entries about compatibility handling

[1.0.0] - 2026-04-02

Changed

  • Initial release
  • Removes [BepInIncompatibility] attributes from all RtD mods
  • Supports all 13 RtD mods (Ocean, Vines, Monsters, Souls, Biomes, Monstrum, Dungeons, FairyTale, Gardening, Horrors, Items, Magic, Souls_Addon)
  • Removes blocks for 19 popular mods
  • Automatic patching on game launch

Technical Details

  • Patches DLL files using Mono.Cecil
  • Works in BepInEx preloader phase
  • Only patches when needed