BetterMapCleanup
Companion cleanup and lifecycle mod for xtavim's BetterMap, with client event reporting, server relay and configuration sync.
模組介紹 作者原文
BetterMapCleanup 0.7.3
Companion for BetterMap 1.1.0. Removes disabled-category pins, maintains resource depletion/respawn state and merged counts, and relays lifecycle events between connected users.
Event sync
A client observes an actual resource change, applies its configured CrossOff/Remove behavior and reports the state to the server. The server distributes the state to registered BetterMapCleanup clients. Receiver application does not send the same event back. Server-side resource observation remains as an additional event source. Resource state snapshots/persistence remain available on reconnect.
The relay accepts only registered ready peers, known resource/portal prefabs and finite positions within 256 m of the reporter, with a burst limit. It relays client observations; these are not independent proof of a successful harvest. Server-synchronized settings determine resource actions on receivers.
Portal handling
BetterMap owns portal deletion. BetterMapCleanup no longer patches WearNTear.Destroy or runs its own orphan-portal deletion. The two previous portal-cleanup config options are retired and ignored if still present in an old config file.
The native BetterMap PortalPins.Destroyed result is observed and relayed client -> server -> connected Cleanup users. Receivers call that same native BetterMap function with a read-only description of the removed portal, even when its original ZDO is absent locally. No world object is spawned. Replay cannot produce a new report.
The server persists accepted portal removals per world and replays them when players reconnect or request bmc sync. Catch-up survives server restarts and is processed in batches. The server checks its portal registry for replacements within BetterMap's deletion radius before replay; receivers also protect locally known replacements. Pending incoming events wait for map readiness. Pin selection/removal follows BetterMap's own rules; Cleanup does not maintain a second portal remover.
Installation
Update BetterMapCleanup on the server and every participating client to 0.7.3. Protocol 5 intentionally does not exchange state with older Cleanup builds. Clients need BetterMap 1.1.0 or a compatible PortalPins.Destroyed API. A dedicated server can run Cleanup without BetterMap because it only relays data.
From the source repository, run:.\build.ps1 -Install
Use -ValheimPath for a nonstandard install. The script installs locally; copy the resulting DLL to the dedicated server's BepInEx/plugins/BetterMapCleanup folder separately and restart it.
Configuration and diagnostics
Existing Resources settings still select CrossOff/Remove, the depletion threshold and respawn restoration. Smoke Puff uses Depleted Pin Action. bmc status shows protocol 5 and clientReports=enabled. bmc sync requests current resource states and recorded portal removals. bmc reconcile is an explicit local resource repair command. No automatic world scan was added.
Validation
See TESTING.md. Build and stand-in logic tests pass; live multi-client behavior still needs a game test.
Portal history starts with 0.7.0; removals never reported to the server cannot be reconstructed. Keep the server configuration directory (including world-specific.portals files) across updates. History does not expire automatically. Resource snapshots contain the latest known depletion/respawn state rather than replaying obsolete harvest events.
Native Soft Tissue support (0.7.3)
Soft Tissue and Giant Remains discovery/settings now belong entirely to BetterMap. BetterMapCleanup no longer injects or overrides these rules. Obsolete Pins/Soft Tissue and Pins/Keep Giant Remains entries are ignored; configure the native BetterMap options instead. Resource depletion actions and synchronization continue to use BetterMap's native rules. Update the companion on both clients and servers and restart to discard any rule overrides from the previous process.
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。
下面這些內容需要先安裝,否則該模組不會生效: