McPack
Evenly paced world updates for every player, with a bounded work budget, plus an unpinned Steam send rate.
About this mod Author’s original text
McPack
Every player gets an evenly paced turn to receive world updates, and Steam is
allowed to pick its own send rate again.
Install it, leave the defaults alone, and put it on whatever machine is hosting.
The problem
Valheim hands out world updates in rounds. It waits 0.05 seconds, then serves
exactly one connection per frame, always starting the walk from the same end of
the peer list, then waits again.
Two things follow from that shape:
- A round costs one frame per connection. The gap between a given player's
turns grows with the player count, and again with a slower server loop. The
server is not busy during that gap; it is idle by design.
- The walk restarts from the same index every round, so the connection that
happens to be first is structurally favoured and the last one starved.
That is what stale doors, late-arriving dropped items, rubber-banding ships and
choppy map markers on a full server tend to come from.
What McPack does
Connections accrue credit at a fixed rate, and the cursor carries across frames.
Turns rotate evenly and the pace per player stops collapsing as the server fills.
Measured against stock, at a 30 Hz server loop, with default settings:
| Players | Stock, per player | McPack, per player | Stock, total | McPack, total |
| ------: | ----------------: | -----------------: | -----------: | ------------: |
| 5 | 4.95/sec | 19.95/sec | 24.9/sec | 100/sec |
| 15 | 1.85/sec | 10.00/sec | 28.1/sec | 150/sec |
| 30 | 0.95/sec | 5.00/sec | 28.9/sec | 150/sec |
| 50 | 0.55/sec | 3.00/sec | 29.4/sec | 150/sec |
Note the last column. The total is capped, so the extra work does not grow
with the player count. Small sessions run at the full rate; large ones stretch
the per-player interval to stay inside the budget rather than overrunning the
host. That ceiling is the setting to turn down if the host is struggling, and
the one to turn up if it has headroom.
McPack also unpins Steam's send rate. Valheim sets the minimum and the maximum
to the same number, 153600 bytes/sec, which does not just cap throughput — it
removes Steam's ability to estimate bandwidth at all, because a range with equal
ends has nothing to choose from. McPack restores a real range so Steam can climb
on a healthy link and back off on a struggling one.
What it costs
Roughly five times stock's total send passes per second, bounded and predictable.
Each pass rebuilds and sorts one player's nearby-object list inside the game's
own code, so it is real CPU and real upload. That is the trade: more frequent
updates cost more work. TotalPassesPerSecond is where you decide how much.
McPack cannot fix packet loss, bad routing, slow hardware, or an uplink that is
already saturated.
Where to install it
The scheduler matters on whichever machine is hosting — a dedicated server,
or the player hosting the world. That is where the peer list lives and where the
round-robin happens.
Clients can install it too; the Steam send-rate change applies to any machine
running it. Unmodded clients can still join a server running McPack. Nothing is
enforced and nobody is kicked for not having it.
Configuration
BepInEx/config/joaorodrigues.valheim.mcpack.cfg, written on first launch.
1 - General
| Setting | Default | What it does |
| --- | ---: | --- |
| Enabled | true | Master switch. Off restores stock behaviour without uninstalling. |
2 - Send Scheduler
| Setting | Default | What it does |
| --- | ---: | --- |
| FairScheduler | true | The even pacing described above. Off leaves the game's own scheduling alone. |
| SendInterval | 0.05 | Best-case seconds between one player's turns. Never goes faster than this. |
| TotalPassesPerSecond | 150 | The budget. Ceiling on send passes per second across all players. Stock lands near 30/sec at a 30 Hz loop. |
| MaxPeersPerFrame | 8 | Most players served in one frame, capping a single spike. 0 removes the cap and is not recommended on a busy server. |
If the host is struggling, lower TotalPassesPerSecond firs
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: