
RunicWorldEngine
Monitor aggregate world and network activity while smoothing asynchronous saves to reduce avoidable save-related frame and server spikes.Runic World Engine 1.1.2
A Valheim world is constantly synchronizing objects, changing state, communicating with peers, and saving to disk. When those systems collide with an expensive frame or overlapping save work, everyone can feel the hitch even though nobody did anything wrong.
Runic World Engine watches that infrastructure and smooths asynchronous saves. It provides bounded aggregate diagnostics while coordinating save preparation to reduce avoidable spikes.
Version 1.1.2 targets Valheim 1.0.7 and BepInExPack Valheim 5.4.2350, including the new chunked-world save and load pipeline.
Major features
- Observe aggregate ZDO population, peer counts, traffic, and lifecycle rates.
- Measure save and load call duration without scanning world contents.
- Coalesce overlapping asynchronous periodic save requests.
- Briefly defer save preparation after an already-expensive frame.
- Offer optional, rate-limited diagnostic summaries.
How it feels in-game
There is no new gameplay interface demanding attention. The world continues to save normally, but avoidable overlapping work and poorly timed preparation are reduced so persistence announces itself less dramatically.
Safety and compatibility
Valheim remains responsible for snapshot preparation and disk writing. Synchronous shutdown saves are never deferred, and periodic deferral has a hard maximum. World Engine never deletes, rewrites, compacts, reprioritizes, or force-sends world data; unknown mod data is preserved. It has no client UI or custom protocol and runs on dedicated servers with the same small footprint.
Authority and performance bounds
World-data handling remains conservative:
- it never deletes, rewrites, compacts, quarantines, reprioritizes, or force-sends a ZDO;
- unknown third-party data is always preserved;
- it creates no persistent world keys of its own;
- it publishes no registry, capability, protocol, ownership declaration, or cross-mod service;
- it has no client UI or asset load, so dedicated servers use the same small runtime;
- optional summaries are off by default and rate-limited to 5–600 seconds.
The observatory uses constant-time collection counts and event counters. It does not perform a base scan, sector walk, prefab enumeration, heat-map build, or save clone on the game thread. Save/load completion cannot force an extra sample through the one-second ceiling. A failed sample is discarded without changing world state or blocking any gameplay mod.
Save smoothing
Asynchronous periodic saves are coalesced while an earlier save is still active and their main-thread preparation is deferred briefly when the previous frame exceeded the configured frame budget. The deferral is bounded (five seconds by default), so a persistently busy server still saves. Synchronous shutdown saves are never deferred. The smoother never touches Unity objects from a worker thread; Valheim retains ownership of both snapshot preparation and its normal disk writer. This reduces avoidable save-time spikes, but no mod can promise a literally zero-frame hitch for every world size and storage device.
Configuration
| Setting | Default | Meaning |
|---|---|---|
General.Enabled |
true |
Enables aggregate observation; false creates no patches or observatory state. |
Diagnostics.LogPeriodicSummary |
false |
Writes bounded aggregate summaries. |
Diagnostics.SummaryIntervalSeconds |
30 |
Summary cadence, clamped to 5–600 seconds. |
Save Smoothing.Enabled |
true |
Coalesces overlapping asynchronous save requests and waits for a stable frame. |
Save Smoothing.FrameBudgetMilliseconds |
24 |
Preferred maximum previous-frame duration before save preparation starts. |
Save Smoothing.MaximumDeferralSeconds |
5 |
Hard maximum delay before a pending save must start. |
Planned later work—world heat maps, compaction, and synchronization scheduling experiments—is not claimed by 1.1.2 and remains disabled until separately designed and tested.

