Valheim
Install with App

Details

Latest version
0.4.1
Last Updated
First Uploaded
Downloads
188
Likes
0
Size
19KB
Dependants
ADDatHost Valheim hosting
30% off

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.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.