BeanheimNet
Networking fixes for Valheim dedicated servers and clients: a bigger send window, a higher Steam send rate, a fairer send order and fewer wasted updates, plus per-player network stats.
About this mod Author’s original text
BeanheimNet
Networking fixes for Valheim dedicated servers. Install it on the server and on every player's game.
It sends more of what players need, sooner, and stops sending updates nobody needs. It also writes
network stats to a log file so you can see what your server is actually doing.
Why
Vanilla Valheim keeps at most 10 KB of updates in flight per player and caps Steam's send rate at
150 KB/s. A player 150 ms away can receive about 68 KB/s at most, and the same limit caps what each
player uploads. Building pieces always go out before creatures, carts and dropped items. Fish and
ambient animals send an update every frame they move. On a busy server you see creatures that
stutter or teleport, carts that freeze and snap, drops that show up seconds late, and hits that land
late.
What it does
| Feature | What it does | Default |
|---|---|---|
| SendWindow | Sizes each player's window from their ping instead of the fixed 10 KB | on |
| SteamTransport | Raises Steam's per-connection send rate from 150 KB/s to 1 MB/s | on |
| Scheduler | Sends to every player each round instead of one player per frame | on |
| RelayThrottle | Sends fish, far creatures, far items, floating logs and sound effects less often. Near a player only fish (6 updates/s) and sound effects (10/s) are slowed | on |
| Priority | Creatures, carts and drops next to a player no longer wait behind a distant building backlog | on |
| Deadband | Whoever simulates an object skips updates for movement under a centimetre or a degree, and sends one exact stop when it comes to rest | on |
| Telemetry | Network stats every 10 s in the BepInEx log and in BepInEx/BeanheimNet-stats.log | on |
| Items | Reports dropped items on the server. Can also delete old floating junk | report on, delete off |
| ItemMerge | Merges nearby stacks of the same plain item | off |
| Diagnostics | Frame profiler and reflection sampler, for chasing long frames | off |
A dedicated server's frame cap also goes from 30 to 60 fps (Scheduler.ServerTargetFrameRate).
That setting follows the master switch, not the Scheduler switch.
What you might want to change
Most servers need nothing changed. The server and the clients pick their own defaults on first start.
- Server short on CPU: set [99 Advanced] Scheduler.ServerTargetFrameRate = 0 to go back to
vanilla's 30 fps.
- Too many dropped items lying around: set [01 General] RunItemReport = true to see what is
out there, then ItemCleanup = true to delete items that have sat for 6 hours of play more
than 200 m from everyone. By default only items in the water go. Enchanted items, gear, anything
above quality 1 and anything near a base are never touched.
- Piles of small stacks: [01 General] ItemMerge = true merges nearby stacks of the same plain
item.
- Less log output: [01 General] Telemetry = false, or switch off just the extra lines
(PeerExtras, ClientExtras, DesyncCounters).
- Something seems wrong: [01 General] Enabled = false puts every patch back to vanilla behaviour
within 5 s, without a restart.
Install
- Install with your mod manager on the server and on each player's game. A player who doesn't have
it can still join; they just don't get the client side of it.
- The config is BepInEx/config/helix.beanheim.net.cfg. Changes are picked up within 5 s, no restart.
Every on/off switch is in [01 General] (the General group in ConfigurationManager). The tuning
values are in [99 Advanced], named Section.Key (for example Scheduler.SendIntervalSeconds),
and the diagnostics in [12 Diagnostics].
- Some defaults differ between server and client: a dedicated server gets a 60 fps frame cap,
Scheduler.SendIntervalSeconds 0.033 and RelayThrottle.OtherHz 0,5,3, while clients keep 0.05 and
0,0,0. The values are written into the file, so don't copy a server cfg to a client or the other way.
- Coming from 0.2.1, 0.2.2 or 0.3.0, your settings move on the first start (switches into [01 General],
tuning values into [99 Advanced]) and anything you h
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file. In multiplayer, the host and every client need the same mods installed.
Install these first, or the mod will not work: