Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
BetterMapCleanup
Companion cleanup and lifecycle mod for xtavim's BetterMap, with client event reporting, server relay and configuration sync.
By Ainzworth
CHANGELOG
0.7.3
- Remove the obsolete Soft Tissue rule injection and the Giant Remains enable-setting override. BetterMap owns both discovery rules and their configuration.
- Remove the companion Pins/Soft Tissue and Pins/Keep Giant Remains settings from config binding and server sync. Old config entries are ignored.
- Keep normal resource depletion cleanup and synchronization for native BetterMap Soft Tissue pins.
0.7.2
- Match historical prefab-derived and PlantEverything pin labels to exact rules, including Pickable Smoke Puff.
- Resolve unambiguous named rules before shifted numeric categories during disabled-pin cleanup.
- Preserve manually placed BetterMap pins marked by BetterMapSeneaLCompat 0.3.0.
- Cache expected rule labels per settings snapshot.
0.7.1
- Publish the completed offline recovery changes under a new release version because 0.7.0 is already registered.
- Includes persisted portal catch-up, replacement protection and retry handling for sync requests and native replay.
- Protocol 5; update server and participating clients to this build.
0.7.0
-
Retry unanswered sync requests and temporarily failed native portal replay.
-
Persist accepted portal removals per world and replay them on reconnect or bmc sync, including server restarts.
-
Reuse BetterMap native deletion and protect replacements using the server portal registry.
-
Apply catch-up in batches and wait for map readiness. Resource reconnect snapshots remain in use.
-
Protocol 5 requires matching server/client versions. History begins with this update.
0.6.0
- Enable client resource reports and server relay (protocol 4), including host map updates and echo suppression.
- Remove our WearNTear portal deletion and orphan-portal cleanup.
- Relay BetterMap 1.1.0 native portal deletion to connected Cleanup users; replay through BetterMap, with no independent remover.
- Resource snapshots remain persisted. Portal events are live-only, not replayed to offline users.
- See TESTING.md for validation and limitations.
0.5.3 - Smoke Puff lifecycle
- Track Pickable_SmokePuff via the actual Pickable.SetPicked state and initial Awake state.
- Include its Forage rule in lifecycle matching, BetterMap observation and merged-label maintenance.
- Route harvest/respawn through the existing resource-state and pin-action pipeline. Multiplayer clients with an active BMC server wait for its deltas; hosts/singleplayer and local fallback use the same state application.
- Uses Resources / Depleted Pin Action (CrossOff by default). No periodic world scan added.
- Update both server and clients. Run bmc reconcile locally for already harvested objects currently loaded, or reload their area after updating the server. Previously unloaded areas are learned when loaded.
Validation: warning-free net48 build against workspace copies of game/BepInEx assemblies. 13 production-hook checks passed with stand-in game/network/map APIs. Real game harvest, merged-pin counts, respawn and multiplayer delivery still require an in-game test.
Changelog
0.5.2
Testing status
-
Feature-complete for the current scope and released for broader gameplay testing.
-
Still needs wider validation of merge labels/counts (especially Tin), full Remove/CrossOff lifecycle behavior, deliberate PinRecord repair cases, depletion/respawn restoration, multi-client dedicated-server longevity, and reconnect/world-reload sync timing.
-
Added server-authoritative BetterMapCleanup config synchronization, modeled after BetterMap's ServerSync behavior.
-
Added
[1 - ServerSync] Enable Server Config Sync(defaulttrue) andLock Configuration(defaulttrue). -
Joining BetterMapCleanup clients receive the server's synchronized cleanup/resource policy through a compact dedicated RPC snapshot.
-
Server values are applied in memory only; client config files are not rewritten and the previous local values are restored after disconnect.
-
With config locking enabled, client edits to synchronized settings are immediately reverted to the server value.
-
Runtime server-side setting changes are broadcast to connected BetterMapCleanup clients.
-
Config synchronization is independent from resource-state synchronization, so policy can still be server-controlled when resource-state sync is disabled.
-
bmc statusnow reports config-sync state, protocol, peer count and lock state. -
Local-only diagnostics/maintenance settings remain unsynchronized.
0.5.1
- Fixed build failure in
BetterMapCleanupEventSync.csby importing the BepInEx namespace required forPluginInfo. - Removed the obsolete
_nextResourceReconcileAtfield left behind after the 0.5.0 event-driven rewrite, eliminating the compiler warning. - No runtime behavior changes from 0.5.0.
0.5.0
Event-driven/server-authoritative resource architecture
- Removed automatic periodic resource reconciliation from normal gameplay.
- BetterMapCleanup now observes BetterMap's own
AutoPins.Placecandidates andAutoPins.Sweepcompletion rather than launching a second client world scan. - Added server-authoritative resource mutation hooks for tracked
Destructible,MineRock5andMineRockresources. - Resource Sync protocol bumped to 3.
- Clients no longer submit authoritative depletion reports; the server derives state from the world itself.
- Remote clients with confirmed server support stop their old local damage/ZDO recheck coroutines and consume compact server deltas instead.
- Same DLL continues to support BetterMap-free dedicated servers (BetterMap remains a soft dependency).
- Persisted server state canonicalizes legacy fracture/source prefab names on load.
- Respawn is event-driven: a previously depleted server record is revived only when the tracked object is actually observed active again.
- Join snapshots are applied in bounded batches (8 records/frame).
- Registry file writes are deferred while a snapshot is being applied and performed once when the queue drains, avoiding per-record file-I/O stutter.
- Server snapshot records for disabled/unavailable BetterMap rules are discarded from the per-frame pending queue instead of being retried forever;
bmc synccan request them again after a config change. bmc reconcileremains as an explicit manual repair command only.bmc statusnow reportsautomaticReconcile=disabled(event-driven), BetterMap observation state, protocol 3,clientReports=disabled, and whether local lifecycle is usingserver-deltasorlocal-fallback.
Architecture note
- Reviewed OdinEye/OdinEyeClient's public server/client split as a design reference: server-authoritative information remains server-side, while client-only data/UI stays client-side. BetterMapCleanup keeps Valheim-native
ZRoutedRpcrather than adopting OdinEye's REST/WebSocket transport.
0.4.8
- Added runtime-mode detection and suspended periodic reconciliation in true singleplayer / solo-host cases.
0.4.7
- Fixed 0.4.6 scope errors in the reconciliation label-update optimization.
0.4.6
- Replaced periodic global Unity
FindObjectsByTypescans with an event-driven loaded-resource cache.
0.4.5
- Added respawn recovery, console commands/status diagnostics and resource sync protocol 2.
0.4.4
- Added
assembly_utils.dllreference and Valheim 1.0.15 server-peer API compatibility.
0.4.3
- Added resource member registry, loaded-zone reconciliation and optional server resource sync.
0.4.2
- Added conservative PinRecord repair/resync.
0.4.1
- Added conservative orphan portal cleanup.
0.4.0
- Added same-resource merge labels/counting and lifecycle count decrement support.