Limit Server Chests and register builders automatically - #114
Conversation
|
Now I have enough context. Let me write the review. No blocking issues found. PR #114 — Limit Server Chests and register builders automatically
|
|
No blocking issues found. ServerChestPlacement.cs — new placement RPC The core mechanics look correct. The The Client-side count validation
The new Timeout edge case If the 15-second retry window expires without the server confirming the ZDO, Removal of vanilla wood chest restoration The removal of Minor observation (non-blocking)
|
|
Now I have enough context for a complete review. Let me write the final analysis. No blocking issues found. ServerChestPlacement.cs — placement and registration flow The new RPC handshake is logically sound. The
The new branch triggers only when For manual registration (
Counting by either ZDO creator or registered platform ID is intentional: it catches both newly placed unregistered chests (matched by creator) and registered chests in unloaded zones (matched by platform). The Client-side stale-count window The 6-second
Prefab change from The vanilla wood chest restoration and repair code ( |
Building a Server Chest automatically registers it to its builder. Each player can place one chest per world, including when their existing chest is unloaded. A dedicated placement RPC asks the server to verify the builder and reject duplicate chests. The client retries this request for up to 15 seconds if object synchronization has not arrived. Accepted repeat requests do not change the chest. The client blocks further chest placement while registration is pending.
The feature no longer patches
ZDOMan.RPC_ZDODataorZDO.Deserialize. Validation applies to clients that send the placement request; a modified client that bypasses it is outside this enforcement path.The chest clones
TreasureChest_dvergrtowerdirectly. Its build cost is set to 10 wood with a workbench requirement. It keeps theServerChestprefab identity and inventory format, disables treasure loot, treasure-discovery statistics, and empty-chest destruction, and generates its build icon from the clone. The wooden-chest dependency and repair code have been removed. Manual registration remains available for old unregistered chests.Live validation passed on Valdev and Valnet client 02 with the deployed Season 8 8.0.29 runtime, Valheim 1.0.16, and the candidate on both sides:
Validation found inherited treasure-discovery behavior sending a missing vanilla RPC when opening the clone. Setting
m_discoverStattoNonefixed it. After that change, placement, registration, delivery, and opening were repeated; both final logs contained zero exceptions, zero missing-RPC warnings, and zero Server Chest errors. Existing shader, headless-video, and other mod/config warnings remain. Earlier automation errors came from using an obsolete helper RPC or interacting with a build preview; neither appeared in the final run.The build passed with zero errors and 84 existing warnings. This was a one-client validation; most placement checks used the normal
Player.TryPlacePiecemethod with costs disabled, with a separate normal mouse-input cost/removal check. Screenshots and logs are retained outside the repository; no documentation or test files were added.Cleanup: all test chests and the test workbench were removed. Original profile files, metadata, and links were restored and verified against their backup hashes. Both restored profiles loaded successfully. Valdev was returned to its stopped state. Valnet client 02 was powered off, and both device leases were released.