Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
CoopParryFix
Keeps vanilla 250ms parry when you own the attacker; otherwise compensates you→server→owner ping. Same DLL on server and clients.
| Date uploaded | a month ago |
| Version | 0.4.1 |
| Download link | Ageous27-CoopParryFix-0.4.1.zip |
| Downloads | 191 |
| Dependency string | Ageous27-CoopParryFix-0.4.1 |
This mod requires the following mods to function
denikson-BepInExPack_Valheim
BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.
Preferred version: 5.4.2350README
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.
CHANGELOG
Changelog
0.4.1
- CoopParryFix writes
BepInEx/plugins/Ageous27-CoopParryFix/CoopParryFix.log(next to the DLL), and still mirrors lines into BepInExLogOutput.log.
0.4.0
- Same DLL on dedicated server and clients. Routed
CPF_Ping/CPF_Pongtoattacker.GetOwner()measures you→server→owner→server→you. - Remote-owned parry window uses max RTT in a 5s window (half, plus hitch above 33ms). Debug Logs default on.
- Missing CoopParryFix on a client or the server: ping times out and falls back to GetNetStats or a 40ms floor. Does not break blocking.
0.3.0
- Latency bonus is 0 when this client owns the attacker (
Character.IsOwner()). Remote-owned hits still useZNet.GetNetStats. - Crowd extra defaults to 0ms so nearby players do not make parries easier than solo. Set
Milliseconds Per Playerto 50 for the old behavior. - Soft-detects SmoothServer (
Nosferatu.SmoothServer) and does not duplicate its net/ownership work. - Debug Logs default on for new config files.
0.2.2
- Renamed the mod to CoopParryFix (was ZoneParry). New GUID
Ageous.CoopParryFix; remove the oldZoneParry.dll. - Debug BlockAttack prefix no longer calls private
Humanoid.GetCurrentBlocker()(MethodAccessException on the live assembly).
0.2.1
- Fix FieldAccessException spam on
Character.m_nview(publicized-at-compile, private-at-runtime). That Update exception was breaking combat. - Latency now uses only public
ZNet.GetNetStatsping/quality. No private Character fields. - Clamp the parry window so it cannot become NaN/infinite.
0.2.0
- Client-side latency compensation: samples Steam/PlayFab connection ping, jitter, and quality.
- Adds one-way ping plus jitter to the 250ms vanilla window so a locally timed parry still counts when the hit RPC is late.
- Crowd bonus is unchanged (50ms per extra player in the zone).
0.1.1
- Debug now logs every blocked hit, not only when the nearby player count changes.
- Stopped using
is Player(could skip the bonus/log). Player check isCharacter.IsPlayer().
0.1.0
- Initial release for Valheim 1.0.
- Harmony transpile of
Humanoid.BlockAttackreplaces the hardcoded 0.25s perfect-parry window. - Adds 50ms per extra player in the same 64m world zone. Optional WorldChunk (512m) or radius grouping.