Valheim
You are viewing a potentially older version of this package. View Latest Version
Install with App

Details

Date Uploaded
2 days ago
Downloads
296
Size
190KB
ADDatHost Valheim hosting
€1

Installation

Install on both the dedicated server and all clients alongside Innangard.

This plugin contains networking, ownership, storage, and AI safety fixes that I believe should largely be part of Innangard's default multiplayer behaviour.

Current Behavior

1. Station reservations no longer steal ZDO ownership

Settlers no longer take ownership of a station's ZDO merely because they are:

  • planning a job
  • walking toward a station
  • waiting for a station
  • renewing a reservation
  • releasing a reservation

In most cases this ownership transfer was unnecessary and was a major source of station desync in multiplayer.

2. Duplicate station claims are ignored

StationClaim.Take is deduplicated when the same valid claim is already present.

This avoids unnecessary repeated reservation writes.

3. Station lease renewals are reduced

StationClaim.Renew only rewrites the lease when 15 seconds or less remain.

Healthy reservations are left alone instead of constantly refreshing their ZDO state.

4. Immediate station retakes are coalesced

StationClaim.Release uses a 1-second same-station retake grace period.

If the AI releases a station and immediately selects the same station again, the plugin avoids needless release/take churn.

5. Real mutations still acquire ownership

Innangard's existing mutation-time Ownership.Take calls remain at their audited action callsites.

Actual world, inventory, storage, and machine mutations still acquire authority when they genuinely require it.

The plugin removes unnecessary ownership churn without removing ownership from operations that actually modify state.

6. Dedicated-server JIT ownership protection

On a dedicated server, the ordinary-object JIT (Just In Time) ownership guard prevents an Innangard mutation path from stealing a ZNetView that is already owned by a connected client.

For ownerless ordinary objects, the server also leaves the object alone while a player is within HandoffRadius, allowing normal Valheim/client ownership handling to take place.

7. Settler replication throttling

Locally-owned Innangard_Settler replication is throttled to reduce redundant ZDO writes while preserving normal local AI, movement, and animation.

Current limits:

transform:       20 Hz
velocity:        20 Hz
animation float: 20 Hz per parameter

Meaningful changes bypass the rate limit immediately:

transform distance: >= 0.25 m
transform angle:    >= 10 degrees
velocity delta:     >= 0.50
animation delta:    >= 0.10

In testing this can eliminate a large amount of replication traffic that would otherwise produce no meaningful visible change.

This is especially important in settlements with many active residents, where unnecessary ZDO updates can contribute heavily to network saturation and delayed world state.

8. Settler ownership remains vanilla/Innangard-controlled

The plugin does not replace Innangard or Valheim's normal resident ownership and simulator-selection logic.

Whichever peer Valheim/Innangard normally chooses to simulate a settler continues to do so.

9. Client death/respawn safety

On player clients, station-lease overrides are disabled whenever there is no live local player.

When entering that state:

  • pending deferred releases are discarded
  • shadow leases are discarded
  • settler replication throttling is disabled on non-dedicated peers

Sync-write scopes are also finalizer-protected so their state is restored even if a patched synchronization method throws an exception.

Dedicated-server behaviour is unaffected by this safety gate.

10. Tighter movement path corners

Settlers use smaller tolerances for intermediate path waypoints so they do not cut corners as aggressively.

Walking: 0.35 m
Original: 0.50 m

Running: 0.55 m
Original: 1.00 m

This only changes intermediate path corners.

Final destination and interaction stopping distances remain unchanged.

11. Improved chest and drawer approach positioning

Storage interactions now prefer a usable standing position on the same floor/height as the settler.

This prevents residents from unnecessarily choosing interaction points above or below themselves.

Drawer approaches are routed through Innangard's chest-style storage standing-point solver before falling back to the original direct approach behaviour.

12. Drawer reach now respects storage reach settings

Drawer interaction distance now follows Innangard's storage settings correctly:

  • horizontal reach uses StorageReach
  • vertical tolerance uses StorageVerticalReach

This replaces the previous simple direct-distance behaviour for these interactions.

13. Storage containers are no longer globally locked between settlers

Chest and drawer StationClaim locks are bypassed for settlers.

One resident using a storage container no longer prevents every other resident from using that same storage object.

Existing fine-grained protections remain:

  • chest item reservations remain active
  • chest capacity reservations remain active
  • drawer transfers still depend on the actual drawer API reporting available capacity

This allows concurrent storage activity without removing the protections that actually prevent item duplication or overfilling.

14. Open source chests no longer stall completed sorting jobs

Caretakers only wait for an open chest when that chest still needs to be read from or written to.

If a source chest has already been emptied, another player having that chest open no longer causes the caretaker to:

  • abandon the delivery
  • stall indefinitely
  • attempt to return already-collected cargo

15. Ordinary caretaker hauling can use drawers directly

Caretakers carrying ordinary loose or sorting cargo can now prefer a compatible drawer before falling back to a normal chest.

This applies when the job does not already have an explicit work/storage chest that Innangard expects the resident to use.

Explicitly assigned storage and work destinations continue to take priority.

16. Loose ground-item reservations

Added in v1.0.2.

Loose-item pickups use short-lived local reservations so multiple caretakers do not all chase the same dropped stack.

These reservations are entirely in memory on the peer currently simulating the settlers.

They do not write reservation data to the item's ZDO.

17. Nearest-wins pile claims

Also added in v1.0.2.

Loose caretaker pickups are grouped into nearby piles using a 3.0 m radius.

When several caretakers want items from the same pile, the nearest caretaker owns that pile and the others temporarily skip it.

This prevents groups of caretakers from repeatedly converging on the same dropped resources.

18. Pile ownership can change dynamically

Loose-pile reservations are not permanently first-come-first-served.

If another caretaker becomes meaningfully closer to the pile before collection, the nearer caretaker can take over the claim and the previous claimant yields it.

This lets residents naturally divide work based on their actual positions rather than whichever AI happened to evaluate the item first.

19. Loose-pile claims add no additional networking

The loose-item reservation system does not use:

  • StationClaim
  • ZDO.SetOwner
  • additional ZDO fields
  • custom RPCs
  • persistent world data

Claims exist only on the peer currently simulating those settlers and disappear naturally as jobs, items, or claimants change.

Settler ownership itself remains completely unchanged.

DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro