CoopParryFix

版本 v0.4.1·更新於 2026-09-17

Keeps vanilla 250ms parry when you own the attacker; otherwise compensates you→server→owner ping. Same DLL on server and clients.

模組介紹 作者原文

CoopParryFix

Valheim 1.0 plugin. One DLL for clients and the dedicated server.

The problem

Vanilla perfect parry is 250ms, timed on your PC when you raise the shield.

In co-op the mob is often simulated on someone else’s PC (the owner), not yours. Their attack has to travel owner → server → you before your client can count the parry. That extra hop is why a parry that would have worked in solo can miss online.

Steam ping only measures you ↔ server. It does not include the owner’s hop, and on a Steam dedicated server it is often 0. That is not “no delay.”

What this mod does

If you own the attacker, nothing changes: still 250ms.

If you do not, CoopParryFix pings the owner on the same round trip as combat (you → server → owner → server → you), takes half of that as the one-way delay, adds hitch if the owner’s frame time is above 33ms, and widens the window by that amount. A shield raise timed like vanilla still lands when the hit RPC is late.

Install on the dedicated server and every client for best results. If CoopParryFix is missing on a client and/or the server, pings time out and the parrying client falls back (GetNetStats if ping > 0, otherwise a 40ms floor). Blocking still works; the window is just a coarser guess.

Compatible with SmoothServer. Does not use SS_Ping. Owner-path delay uses CPF_Ping / CPF_Pong.

Details

Vanilla check: m_blockTimer < 0.25.

  • If attacker.IsOwner(): 250ms, same as solo.
  • If not: + (owner-path RTT × 0.5) + hitch above 33ms, using the max sample in the last 5 seconds.
  • Crowd extra is off by default (Milliseconds Per Player = 0).

Co-op check on dedicated: the owner kept 250ms; the other client widened by measured owner-path RTT (~20ms on LAN) while Steam ping stayed 0.

Install

Requires BepInExPack Valheim.

Drop CoopParryFix.dll from the GitHub release zip into BepInEx/plugins on the dedicated server and every client. One file, not two. Restart after replacing the DLL.

Combat / ping debug lines go to BepInEx/plugins/Ageous27-CoopParryFix/CoopParryFix.log (and are also copied into BepInEx/LogOutput.log).

Config

BepInEx/config/Ageous.CoopParryFix.cfg after first launch.

  • Latency.Compensate Latency — default on. Skipped when you own the attacker.
  • Latency.Ping Scale — default 0.5 (combat one-way).
  • Latency.Window Seconds — default 5.
  • Latency.Rtt Stat — default Max (also P90, Ema).
  • Latency.Hitch Budget Milliseconds — default 33 (30 FPS). Only frame time above this counts as hitch.
  • Latency.Min Remote Owner Milliseconds — default 40 when no ping sample is available.
  • Parry.Milliseconds Per Player — default 0.
  • General.Debug Logs — default on.

安裝與使用 安裝:BepInEx 外掛

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

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

前置依賴

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

denikson-BepInExPack_Valheim

檔案與校驗

檔案名稱
CoopParryFix-0.4.1.zip
檔案大小
18.6 KiB