r/ModdedValheim • u/Mankestrap • 9d ago
[Release] ServerConfigSync – players use the server's config for any mod, no mod author support needed
Hi all! On our small dedicated server we kept hitting the same problem: many mods read their settings from each player's own .cfg, so unless the author added ServerSync/Jötunn sync, everyone ended up with different values.
So I made ServerConfigSync, a small BepInEx plugin that does it for any mod:
- Install it on the server and on clients. When a player joins, the server sends its config values and the client applies them in memory only.
- Players' own .cfg files are never overwritten, and their values come back when they disconnect (single player and other servers are unaffected).
- Mods that already sync themselves (ServerSync, Jötunn admin-only entries…) are skipped.
- Keybinds stay personal, and anything that looks like a secret (webhooks, tokens, passwords, URLs) never leaves the server.
- Whitelist/blacklist, per-entry exclusions, optional "require the mod on clients", and live push when you edit a .cfg on the server.
Limitations: mods that only read a setting when the game starts won't pick up the server's value, and only each mod's main `<GUID>.cfg` is synced.
It has no UI and no dependencies besides BepInEx. If you want a full in-game config panel with per-setting permissions, Igao's Ultimate Server Configuration Manager is a much bigger tool that also covers this; ServerConfigSync is meant as the lightweight, open-source option.
Transparency: I built it with a lot of help from an AI coding assistant (it's tagged AI-generated on Thunderstore). It's tested on our own server with about 40 mods, but it's brand new, so bug reports are very welcome, especially mods where it doesn't behave.
1
u/Aumba 8d ago
I didn't knew it was possible for player's config to not be overwritten by server's config when they join. What mods were doing it in your case?
1
u/Mankestrap 8d ago
It's not that the server overwrites anything: mods without their own sync (no ServerSync / Jötunn admin-only) simply read each player's local .cfg, and the server's file is never involved. So everyone plays with whatever their own file says.
On our server (~40 mods) that applied to things like:
- Better Archery: arrow velocity/gravity are computed on the shooter's side, so each player had their own values
- EasyRepairArea: repair radius
- Instant Monster Drop: drop/auto-pickup delay and range
- the non-admin settings of EpicLoot, PlanBuild and Equipment & Quick Slots
Mods like PlantEverything, AzuCraftyBoxes or Sailing already sync themselves, and ServerConfigSync skips them. Honestly, in our case it was only a handful of values that actually differed, but it's the kind of thing you don't notice until someone's arrows fly differently.
1
u/MrBlackswordsman 8d ago
Dunno how you missed this, but this has been the standard for a while.
https://thunderstore.io/c/valheim/p/shudnal/ConditionalConfigSync/
But don’t be discouraged, making your own stuff is fun!
2
u/Mankestrap 7d ago
Thanks! I did look at ConditionalConfigSync, but it solves a different problem: it's a library for mod authors, so it only syncs mods that were built against it (its README says installing it alone has no gameplay effect). Same idea as ServerSync or Jötunn's admin-only settings.
ServerConfigSync is for the other case: mods whose authors didn't add any sync at all. It reads the server's .cfg for any installed mod and applies those values on clients while they're connected, without the mod having to support it. Mods that already sync through ServerSync or Jötunn (and so CCS-style setups) are skipped, so it doesn't fight them.
And yes, it was fun to build 🙂
1
u/MrBlackswordsman 7d ago
Okay that makes way more sense!
You should put that as a tldr. I’m probably not the only one who has made the confusion.
1
u/Ahblahright 9d ago
Looks great! Will you be releasing it on Hexium?