ConditionalConfigSyncOptionalPatch
A patch for ConditionalConfigSync to disable client side validation to allow users to join vanilla servers with mods.
About this mod Author’s original text
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 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:
- Remove ConditionalConfigSyncOptionalPatch.
- Reinstall the affected mods/r2modman.
This restores the official mod binaries.
Alternatively, an individua
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file. In multiplayer, the host and every client need the same mods installed.
Install these first, or the mod will not work: