NetworkPerformanceSystem
General Network Performance overhaul. What if it felt like singleplayer for everyone?
模組介紹 作者原文
NetworkPerformanceSystem
Network Performance Systems is a general networking overhaul, designed to tackle the problem created by high ping.
In Valheim, most objects are simulated by users. So a single high ping user in an area can make everything or all sorts of things feel terrible.
This mod aims to address that in a number of ways.
Why this is different from the other networking mods
Every other Valheim networking mod treats multiplayer performance as a bandwidth problem —
compression, bigger buffers, higher send rates, filtered broadcasts. That is the right diagnosis for
ten people in one base saturating a shared cap. It does not handle a larger distributed server, or multiple players from
vastly different goegraphic locations.
NPS addresses these issues in a number of ways
- Each peer gets their own Round Trip timing (RTT), Healthcheck and bandwidth estimates
- This allows dynamic adjustments to route around a poor connection
- This higher ping players with decent bandwidth allow the server to send more aggressively to these players in compensation
- Object ownership can be dynamically adjusted around players with poor connections to provide the best experience for all players in the area
- Objects which need network calls to interact with get ownership transferred ahead of time, delay scenarios much less likely
- Objects that change ownership during active requests get their requests properly re-targeted against the new owner, and an item that still cannot be delivered is dropped at the station instead of lost
- Objects which are locally important (footsteps for example) are only network broadcast locally, instead of globally around the server
- Server Garbage collection churn is significantly reduced compared to vanilla
Installing
Server-only works. Vanilla clients get the send window, ownership, scheduler, station-request and creature-hit
fixes with nothing installed on their end, and the server follows where they actually are rather than where they
were two seconds ago. The server also sends settled or distant creatures, and fish and birds, to each player less often,
holds back building, tree and rock updates that change nothing a player can see, and sends the world's list of past
players only when it has actually changed. Damage numbers go only to players close enough to see them, and
Routed RPC / Damage Numbers can limit them to the player who landed the hit, or stop sending them at all.
Installing on clients too adds latency compensation, live position reporting and the clean exit
from a dead session for those clients, and lets a ship they own pass to whoever takes its helm.
Creatures they simulate stop re-sending themselves while standing still, which matters most next
to a pen of tamed animals, and fish and birds they simulate are sent a few times a second instead of
every frame, which matters most by water. Their game also tells the server how smoothly it is
running, so a player whose machine slows down in a big fight is given fewer creatures to run.
Mixed groups are fine — benefits are per-player, and a client without the mod behaves
exactly as vanilla. There is no version lock: nobody gets kicked for not having it.
Works on dedicated servers and on player-hosted games.
Diagnosing and Reporting a problem
An easy way to start is enabling the nps_stats display Run nps_stats_collect (needs devcommands, since sampling costs a Steam call per peer per tick), play, then nps_stats.
A player the link-pressure table marks as LOSSY is already being dealt with: the server steps that one player's send rate down until their connection stops losing packets, and back up once it is clean, without changing anyone else's rate (Steam Transport / Enable Loss Backoff). A player whose loss does not improve - once their rate is below what their connection was already carrying, or at the lowest rate - has a connection problem the rate cannot fix: they go back to full speed and are left there until the server restarts. Loss
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。
下面這些內容需要先安裝,否則該模組不會生效: