Hey Azumatt,
we hit a sync problem with WardIsLove 4.0.6 (Valheim 1.0.16, same DLL on server and clients) and I think I found the cause.
What happens: none of the [Synced with Server] settings reach the clients. Nothing is greyed out, and players keep their own values or the defaults. Force Server Config is On and the player isn't an admin. Only the recipe section ([<color=#00FFFF>Thor</color>], PieceManager) syncs. The client log shows this on every connect, and Received ... configs ... for mod WardIsLove never appears:
Exception in ZRpc::HandlePackage: ... ---> System.InvalidOperationException: Sequence contains no elements
at ServerSync.ConfigSync.ReadValueWithTypeFromZPackage (ZPackage package, System.Type type)
at ServerSync.ConfigSync.ReadConfigsFromPackage (ZPackage package)
at ServerSync.ConfigSync.RPC_FromServerConfigSync (ZRpc rpc, ZPackage package)
Received 7 configs and 0 custom values from the server for mod Azumatt.WardIsLove PieceManager
Cause: OwnerControlOptions is : ulong. ServerSync sends enums as their underlying type via ZRpc.Serialize, which doesn't support ulong. So the server writes nothing for Owner Controls, the client throws while reading it, and all 74 synced settings get dropped. With no server value applied, nothing gets locked either.
It also blocks the other direction. When an admin changes Owner Controls, the broadcast is handled on their own client first, throws there and never reaches the server. Every other setting goes through fine. Admin client log:
at ServerSync.ConfigSync.ReadConfigsFromPackage (ZPackage package)
at ServerSync.ConfigSync.RPC_FromOtherClientConfigSync (System.Int64 sender, ZPackage package)
...
at ZRoutedRpc.HandleRoutedRPC (ZRoutedRpc+RoutedRPCData data)
at ZRoutedRpc.InvokeRoutedRPC (System.Int64 targetPeerID, ...)
...
ServerSync.ConfigSync:Broadcast(Int64, ConfigEntryBase[])
BepInEx.Configuration.ConfigEntry`1:set_Value(OwnerControlOptions)
Fix: public enum OwnerControlOptions : long. The highest flag is bit 61, and existing configs keep working since the flags are saved by name. The underlying gap is in ServerSync, so I'll open an issue there as well.
Until then we run a small Harmony patch on both sides that sends ulong as Int64. We'll drop it as soon as a fix is out.
I reproduced all of this in a minimal test setup (just WardIsLove, unpatched). If full server and client logs or our config would help, just let me know and I'll send them over.
Thanks for all your mods, we run several of them and they've been great!