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.
InnangardServerLagFix
Multiplayer patches aimed at Innangard 0.1.9 (improves fps / eliminate network delay / desync)
| Date uploaded | 2 days ago |
| Version | 1.0.3 |
| Download link | Phoenixf-InnangardServerLagFix-1.0.3.zip |
| Downloads | 56 |
| Dependency string | Phoenixf-InnangardServerLagFix-1.0.3 |
This mod requires the following mods to function
Yololo-Innangard
Build a living settlement: recruit villagers, give each a craft, stake out fields, and join your villages with roads your own people help you build.
Preferred version: 0.1.9README
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:
StationClaimZDO.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.
CHANGELOG
1.0.7
- Fixed ItemDrawers API harmony warning spam if there is no ItemDrawer API. Also caches type to prevent re-looking this up in future.
- Items that would be ignored on the ground like eggs are no longer ignored while in storage (now they can be sorted properly)
1.0.6
- Crafting from Frith now works, instead of just visually! Whoops.
- Settlers tried to exit chairs to pick/check tasks every second. Now they will exit a chair only if their task wants them to.
1.0.5
- Fixed Craft/Build from Frith not using ItemDrawers. Now supported and checked prior to chests. Optimised.
- Settlers now prefer to get out at the same position they got into chairs from. Otherwise it will fall back to old nearby logic.
- Settlers can now be assigned beds with Ctrl+E and then Ctrl+E on a bed. They will swap beds, or fill an empty one.
- Added Stations (!!) tab to Innangard Frith, allows you to enable or disable them from using specific stations like campfires, or multiple kilns so they only run one. Sorted by distance. You can also Ctrl+E on relevant stations to toggle them. These are stored in the ZDO so are replicated to other players and saved.
- Improved stale hostile-target cleanup further.
1.0.4
- Added body-aware settler/path clearance.
- Added live collider/planner radius configuration.
- Improved storage and machine approach routing.
- Added full storage standing-position fallback search.
- Added improved chair/table approach routing.
- Fixed meal seating timeout being consumed by travel to food.
- Added stale hostile-target cleanup.
- Added deliver-first caretaker sorting.
- Added blocked/stalled
CollectMoreand deposit recovery. - Added Better Organisation rule/UI integration.
- Improved lumberjack tree/log target choice.
1.0.3
- Bumped Readme/Changelog (no functional changes- new mod maker bla bla)
1.0.2
- More Fixes for Innangard. Listed fixes are in readme
1.0.0/1
- Initial Release. Reuploaded as 1.0.1 to fix Readme/Changelog (no functional changes)