
SwmarlyValheimNetworking
Unified Valheim networking and dedicated-server performance mod combining adaptive transport, dirty-set synchronization, compression, server tuning, and optional client smoothing.Swmarly Valheim Networking
Server-first BepInEx 5 networking and performance support for Valheim.
Features
- Fair per-peer ZDO scheduling and bounded bulk send budgets.
- Queue back-pressure and per-peer transport diagnostics.
- Optional negotiated Zstandard compression with vanilla-peer fallback.
- Dirty-set synchronization for ordinary rounds with full-scan recovery.
- TargetPortal 1.2.6 compatibility: dirty synchronization remains active between event-driven, destination-centered vanilla travel windows.
- Server frame, save, GC, object-creation, ownership, and support-physics safeguards.
- PeerTelemetry, Telemetry, and persistent StatsLog diagnostics.
Compatibility
Version 0.1.22 targets Valheim 1.0.7/network 39 and Valheim 1.0.12/network 40 with BepInEx 5.4.2350; its base runtime contract is the verified 0.1.13 surface. Unknown or structurally changed builds remain vanilla until reviewed and added to the allow-list.
TargetPortal is a soft dependency. When it is present, the client sends a travel notice before Player.TeleportTo, and the server uses a destination-centered vanilla CreateSyncList window only for that peer. Vanilla old-area invalidation runs before dirty synchronization resumes. A peer without the client capability remains on the complete vanilla path. The other networking, queue, compression, and performance modules remain enabled. Set Sync/TargetPortalAwareSync=false for the diagnostic full-vanilla mode.
TargetPortal diagnostics use the [TargetPortalBridge] prefix and log state changes only: hook/RPC setup, connection-gated hello send/acknowledgement, peer readiness, vanilla sync fallback, travel notice received, window open/arrival, timeout reconciliation, and window close. Normal sync rounds are not logged.
Installation
Install the package contents into BepInEx/plugins/SwmarlyValheimNetworking/. Do not run overlapping networking/map mods beside it; foreign Harmony owners are intentionally refused.
The generated config is BepInEx/config/Swmarly.ValheimNetworking.cfg.
Diagnostics
StatsLog writes stats-YYYY-MM-DD.jsonl and events-YYYY-MM-DD.jsonl under BepInEx/config/smoothserver/stats/ by default. Use the repository's tools/analyze.py to correlate frame spikes, peer queues, budgets, saves, GC, and ZDO rates.

