McPack

版本 v1.0.0·更新於 2026-09-16

Evenly paced world updates for every player, with a bounded work budget, plus an unpinned Steam send rate.

模組介紹 作者原文

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

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

denikson-BepInExPack_Valheim

檔案與校驗

檔案名稱
McPack-1.0.0.zip
檔案大小
14.2 KiB