Mwuah-ConditionalConfigSyncOptionalPatch icon

ConditionalConfigSyncOptionalPatch

A patch for ConditionalConfigSync to disable client side validation to allow users to join vanilla servers with mods.

By Mwuah
Last updated a month ago
Total downloads 638
Total rating 0 
Categories Client-side Utility AI Generated
Dependency string Mwuah-ConditionalConfigSyncOptionalPatch-1.0.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

ConditionalConfigSync Optional Patch

This package allows Valheim clients to use mods that declare themselves as server-required through ConditionalConfigSync while connecting to a server that does not have those mods installed.

A small BepInEx preloader patch scans the installed client plugins before the game loads them. When it finds a ConditionalConfigSync ModRequired = true assignment, it changes that assignment to false.

This makes the affected mod treat its server-side presence as optional, allowing the client to connect to a vanilla server.

It does not redistribute or modify ConditionalConfigSync itself, and it does not include any of the third-party mods it patches.

Scope

  • scans installed BepInEx plugin DLLs before the normal plugin loading process;
  • detects ConditionalConfigSync.ConfigSync.ModRequired = true assignments at the IL level;
  • changes only those true assignments to false;
  • works generically with mods using ConditionalConfigSync rather than targeting individual mod names;
  • leaves ModRequired = false assignments unchanged;
  • leaves ConditionalConfigSync's own DLLs untouched;
  • automatically creates a backup of every DLL before modifying it;
  • records the SHA-256 hash of the patched DLL so the same binary is not unnecessarily patched again;
  • automatically recognizes changed or updated mod DLLs and can patch them again;
  • does not intentionally change the affected mod's configuration defaults, assets, mechanics, plugin identity, or network protocol.

The patch is intentionally narrow: it changes the value supplied to the ModRequired property and nothing else.

How It Works

ConditionalConfigSync mods can declare that their server-side counterpart is mandatory:

ConfigSync = new ConfigSync(ModId)
{
    DisplayName = ModName,
    CurrentVersion = ModVersion,
    MinimumRequiredVersion = ModVersion,
    ModRequired = true
};

The preloader detects the resulting IL instruction that loads true immediately before the ModRequired setter and changes it to false.

Conceptually, this:

ldc.i4.1
callvirt ConfigSync::set_ModRequired(bool)

becomes:

ldc.i4.0
callvirt ConfigSync::set_ModRequired(bool)

No source code or original mod package is redistributed.

Installation

Install this package normally with r2modman or Thunderstore Mod Manager.

The patcher should be installed on the client that needs to connect to servers without the affected mods.

The server does not need this patcher.

After installation, start Valheim normally. The BepInEx preloader will scan the installed plugins before they are loaded.

A successful patch produces log entries similar to:

DigDeeper.dll: FOUND ModRequired setter
DigDeeper.dll: PATCHED 1 ModRequired=true assignment(s) to false.

Sated.dll: FOUND ModRequired setter
Sated.dll: PATCHED 1 ModRequired=true assignment(s) to false.

Mods that already have ModRequired = false are left unchanged.

Backups and Safety

Before modifying a DLL, the patcher creates a backup beside the active plugin:

ModName.dll.ccs-original.bak

The patcher also creates a SHA-256 marker:

ModName.dll.ccs-patched.sha256

These files allow the patcher to determine whether the currently installed DLL has already been processed and provide a recovery copy of the original DLL.

The patcher only operates on DLLs inside the BepInEx plugins directory.

The following ConditionalConfigSync assemblies are deliberately excluded from patching:

  • ConditionalConfigSync.dll
  • ConditionalConfigSync.Plugin.dll
  • ConditionalConfigSyncOptionalPatch.dll

Updating Mods

If a patched mod is updated to a new DLL, its SHA-256 hash changes. The patcher will therefore inspect the new DLL and patch it if it still contains a matching ModRequired = true assignment.

The previous backup is retained rather than overwritten.

Removal

To completely remove the compatibility patch:

  1. Remove ConditionalConfigSyncOptionalPatch.
  2. Reinstall the affected mods from Thunderstore/r2modman.

This restores the official mod binaries.

Alternatively, an individual original DLL can be restored from its:

*.ccs-original.bak

backup.

The patcher does not modify the Thunderstore package cache.

Compatibility

This patch is intended for mods that use ConditionalConfigSync and whose only server requirement preventing client-only use is the ModRequired setting.

It does not guarantee that every ConditionalConfigSync mod will function correctly without its server-side counterpart. A mod may still depend on server-side code, synchronized configuration, RPCs, or other functionality that cannot be provided by this patch.

In particular, this patch does not remove arbitrary multiplayer or server dependencies. It only makes the ConditionalConfigSync ModRequired declaration optional.

Tested

  • Valheim 1.0.7
  • BepInExPack Valheim 5.4.2350
  • ConditionalConfigSync
  • Dig Deeper
  • Sated
  • ExtraSlots

The patch has been tested successfully with Dig Deeper and Sated, allowing the client to connect to a completely vanilla server after their ModRequired = true declarations were patched to false.

Disclaimer

This is an independent compatibility patch and is not affiliated with or endorsed by the authors of ConditionalConfigSync or the third-party mods it modifies.

The package does not redistribute third-party DLLs, source code, assets, models, or other copyrighted mod content. It modifies the installed client-side copies of those assemblies at load time.