Skip to content

ValheimTune 0.6.0

Choose a tag to compare

@Akoozie Akoozie released this 08 Sep 09:28
· 10 commits to main since this release

Server-side BepInEx plugin for Valheim dedicated servers. Players install nothing.

This binary is byte-for-byte the one running on the reference server — same sha256, no separate release build.

Compatibility

game            0.221.12 (network version 36)
server build    21981590 (Steam app 896660)
needs           BepInEx 5.4.x for Valheim

On any other game version the plugin runs in vanilla + measurement mode and says so in the log. New in this release: the README now explains what to do when that happens — previously it pointed at a porting doc written for maintainers, which was no help to a server admin.

New in 0.6.0 — G1, deferred asset unload

Vanilla calls Resources.UnloadUnusedAssets() every hour, regardless of whether anyone is playing:

// src_server/Game.cs:239
InvokeRepeating("CollectResourcesCheckPeriodic", 3600f, 3600f);

Measured on a 698,000-object world:

Unloading 2 unused Assets  ... 607 ms
Unloading 1 unused Assets  ... 456 ms
Unloading 0 unused Assets  ... 443 ms     <- frees nothing, still 443 ms

The cost has nothing to do with what it frees — Unity's MarkObjects walks all ~207,000 loaded objects to release one asset. It was caught landing with two players online at frame max 512 ms against a 17 ms baseline.

Both vanilla entry points route through Game.CollectResources, so one prefix covers them.

[Server]
DeferAssetUnload = false           # default
AssetUnloadMaxDeferMinutes = 240

Deferred, not skipped. Memory hygiene still matters — the collection runs the moment the last player disconnects, or after the backstop if your server never empties.

Honest status: this ships off and is not yet verified in the field. It is live on the reference server with the knob on, but proving it requires a player online across an hour boundary, which has not happened yet. With an empty server the deferral is a no-op. If you turn it on, look for asset unload deferred: N player(s) online in your log, then asset unload running after N s deferred once everyone leaves.

SkipRenderMesh from 0.5.0 is likewise still off and still unproven — it only fires on terrain that has never been generated, which an explored world does not have.

Everything else, unchanged from 0.5.0

690,000 objects, a 12,000-instance base, 2-6 players, on a 4-core laptop:

Vanilla ValheimTune
Sync scan, per player per round 4.1 ms 0.07 ms
Autosave 381 ms freeze in one frame 6 ms slices over ~350 frames
Join sync cost ~11 ms per call ~5.5 ms
Join stream rate 1,261 objects/s 3,617 objects/s
Server frame rate 30 fps, hard-capped 60 fps

Full history in CHANGELOG.md.

Verify the download

sha256  b351d8958020dcb9225e349701ec259df844484d270b97b9a43f4d39c085254d
size    51,200 bytes

MIT licensed. Not affiliated with Iron Gate or Coffee Stain.