BoatMapExploreRadiusServerSync
Server-authoritative BoatExploreRadius for BiggerBoatMapExploreRadius. Server pushes radius to clients via ServerSync. Fixes the FieldAccessException in 224-ServerSyncedBoatMapExploreRadius.BoatMapExploreRadiusServerSync
A server-authoritative wrapper for nearbear's BiggerBoatMapExploreRadius.
The dedicated server owns the BoatExploreRadius value, pushes it to every client on connect via ServerSync, and writes it into nearbear's config at runtime. Clients cannot override the radius locally.
Why this exists
The 224-ServerSyncedBoatMapExploreRadius fork crashes on recent Valheim builds with FieldAccessException: Field 'Minimap:m_exploreTimer' is inaccessible, which spams the log every frame and prevents the map from opening. This wrapper achieves the same server-authoritative behavior without patching Minimap at all, so the bug is structurally impossible.
Requirements
- BepInEx Pack Valheim 5.4.2202+
- nearbear-BiggerBoatMapExploreRadius 1.0.3
Do NOT install alongside 224-ServerSyncedBoatMapExploreRadius — pick one. This mod supersedes it.
Install
- Install both required dependencies above (r2modman will handle this automatically).
- Install this mod.
- On the dedicated server, edit the config (see below) to set your radius.
- Restart the server.
- Clients just connect — no client-side config needed.
Configuration
Located in BepInEx/config/JG224_BoatMapExploreRadiusServerSync.cfg (auto-generated on first boot):
| Setting | Default | Range | Description |
|---|---|---|---|
BoatExploreRadius |
200 |
10-10000 |
Map reveal radius in meters while sailing. Synced from the server. |
LockConfiguration |
true |
bool | When true, the server's BoatExploreRadius is authoritative and clients cannot change it locally. |
How to set the radius
- On the dedicated server, open
BepInEx/config/JG224_BoatMapExploreRadiusServerSync.cfg. - Set
BoatExploreRadius = <your value>. LeaveLockConfiguration = true. - Restart the server.
- When clients connect, they automatically receive the server's value — no client-side edit required.
If you'd rather let each player keep their own radius, set LockConfiguration = false on the server. Clients will then use whatever is in their local config file.
How it works
On Awake, this plugin:
- Creates a
ServerSync.ConfigSyncinstance registered under GUIDJG224_BoatMapExploreRadiusServerSync. - Registers
BoatExploreRadiusandLockConfigurationas synced config entries. - Locates
BiggerBoatMapExploreRadius.Main.boatExploreRadius(a public staticConfigEntry<float>) via reflection. - Subscribes to
BoatExploreRadius.SettingChanged, so any update received from the server is pushed into nearbear's config immediately.
nearbear's existing postfix on Minimap.UpdateExplore reads Main.boatExploreRadius.Value every frame, so the synced value takes effect automatically — no Minimap patch of our own, so no FieldAccessException.
ServerSync license
ServerSync by blaxxun-boop is distributed under the MIT-0 license and bundled inside this mod's DLL.
Credits
- nearbear — original BiggerBoatMapExploreRadius mod. This wrapper is useless without it.
- blaxxun-boop — ServerSync, the config synchronization library.
Source
Available on request. The wrapper is ~120 lines of C#; the bulk of the work is done by nearbear's mod and blaxxun-boop's ServerSync.
Changelog
1.0.0
- Initial release.
- Fork of the broken 224-ServerSyncedBoatMapExploreRadius approach, restructured to avoid the
FieldAccessExceptionbug by not patchingMinimapdirectly.
