Valheim
Install

Details

Last Updated
First Uploaded
Downloads
40
Likes
0
Size
163KB
Dependency string
jg224-BoatMapExploreRadiusServerSync-1.0.0
Dependants

Categories

ADDatHost Valheim hosting
30% off!

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

Do NOT install alongside 224-ServerSyncedBoatMapExploreRadius — pick one. This mod supersedes it.

Install

  1. Install both required dependencies above (r2modman will handle this automatically).
  2. Install this mod.
  3. On the dedicated server, edit the config (see below) to set your radius.
  4. Restart the server.
  5. 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

  1. On the dedicated server, open BepInEx/config/JG224_BoatMapExploreRadiusServerSync.cfg.
  2. Set BoatExploreRadius = <your value>. Leave LockConfiguration = true.
  3. Restart the server.
  4. 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:

  1. Creates a ServerSync.ConfigSync instance registered under GUID JG224_BoatMapExploreRadiusServerSync.
  2. Registers BoatExploreRadius and LockConfiguration as synced config entries.
  3. Locates BiggerBoatMapExploreRadius.Main.boatExploreRadius (a public static ConfigEntry<float>) via reflection.
  4. 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

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 FieldAccessException bug by not patching Minimap directly.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.