QiLiu-ParryBosses icon

ParryBosses

Perfect-block a boss to stagger it for 2s like a normal mob: its attack is interrupted, it cannot attack again, and it takes 2x damage. Visual feedback included.

By QiLiu
Last updated a month ago
Total downloads 121
Total rating 1 
Categories Mods Tweaks Enemies AI Generated
Dependency string QiLiu-ParryBosses-1.0.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2351 icon
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.2351

README

Parry Bosses

EN — Perfect-block (parry) a boss and it gets staggered exactly like a normal mob: 2 seconds of stagger, its current attack is interrupted, it cannot start new attacks, and it takes 2x damage during the window. Bosses have no stagger animation state in vanilla (that is why parrying them does nothing), so this mod drives IsStaggering() with a timer and thereby reuses all vanilla stagger logic.

中文 —— 完美格挡(弹反)Boss 后,Boss 会像普通小怪一样被僵直 2 秒:定身、当前攻击被打断、 期间承受 2 倍伤害,并带有材质闪烁等视觉反馈。

效果

弹反 Boss 成功后持续 2 秒(可配置):

  • Boss 无法移动、当前攻击立即被打断、无法起手新攻击
  • 你在僵直窗口内攻击它 → 2 倍伤害
  • 视觉反馈:Boss 橙色材质闪烁/发光 + 火花 + 头顶 STAGGER! + 暖色点光 + 屏幕提示

为什么原版做不到?原版弹反确实会调用 Stagger(),但 Eikthyr / Bonemass / Moder / Yagluth 等 Boss 的 动画控制器里根本没有 tag=stagger 的僵直动画状态,所以 SetTrigger("stagger") 什么也不会发生。 本 Mod 用计时器直接把 IsStaggering() 拉成 true,从而完整复用原版的定身 / 打断 / 双倍伤害逻辑。

安装

方式一:r2modman / Thunderstore Mod Manager(推荐)

  1. 在 r2modman 里选择 Valheim 的一个配置档
  2. Settings → Install from file(或直接把本 zip 拖进 r2modman)
  3. 点 Start modded 启动

方式二:手动

  1. 解压本包
  2. 把 plugins/ParryBosses.dll 复制到游戏的 <Valheim>\BepInEx\plugins\(r2modman 用户请放到 %APPDATA%\r2modmanPlus-local\Valheim\profiles\<配置档>\BepInEx\plugins\)
  3. 启动游戏

依赖:denikson-BepInExPack_Valheim(BepInEx 5.4.23.x)。 注意不要填 BepInEx-BepInExPack_Valheim,那是已废弃的旧包,Thunderstore 会报"未找到匹配的参考包"。

联机

m_staggerWhenBlocked 在做出格挡的那台客户端上读取,2 倍伤害判定在 Boss 属主(主机/服务器) 上执行, 所以主机和所有玩家都要安装同一个 DLL。

配置

首次启动游戏后自动生成: BepInEx\config\dsh.valheim.parrybosses.cfg

键 默认 说明
StaggerSeconds 2 Boss 僵直时长(秒)
StaggerFallback Always Always(推荐)/ Auto(0.12s 后自检并自愈)/ Never
ForceStaggerWhenBlocked true 强制打开 Boss 的 m_staggerWhenBlocked
StaggerMaterialFlash true 材质闪烁开关
StaggerFlashMode PropertyBlock PropertyBlock(最安全)/ Material(发光更明显)
StaggerFlashStrength 2 闪烁发光强度
StaggerParticles true 僵直期间每 0.3s 火花
StaggerFloatingText true 头顶 STAGGER! 文字
StaggerLight true 暖色点光
HudOnStagger true 屏幕提示
DumpKey / ForceStaggerKey / ForceStaggerMobKey F7 / F8 / F9 诊断 / 强制僵直 Boss / 强制僵直小怪(测试用)

升级注意:BepInEx 的配置文件是持久的,代码里改了默认值不会更新已有配置。 升级本 Mod 后若想用新的默认值,请手动改 StaggerSeconds,或删掉该 cfg 让它重新生成。

原版僵直时长参考(本 Mod 调研数据)

从游戏动画资源包直接算出(片段长度 ÷ 状态速度):

角色 僵直
野猪 0.17s
玩家 0.67s
灰矮人 / 地精 0.92s
骷髅 1.05s
巨魔 1.22s
尸鬼 1.47s
普通小怪众数 / 中位数 1.5s / 1.46s
平原牦牛 Lox 1.81s
Fader / The Queen(Boss,自带僵直动画) 2.00s
训练假人 / Jotun 3.00s

本 Mod 默认对所有 Boss 统一用 2 秒(与 Fader / The Queen 的原生僵直时长一致)。

已知限制

  • Boss 没有僵直动画,所以不会像小怪那样"向后仰";视觉反馈靠材质闪烁 + 特效 + 文字替代。
  • 连续弹反可以持续续上僵直(与小怪行为一致),理论上能把 Boss 控制住。
  • 死亡蚊子等没有僵直动画的小怪不在本 Mod 处理范围内(本 Mod 只改 Boss)。

反馈

如果某只 Boss 表现异常,请附上 BepInEx\LogOutput.log 中带 Parry Bosses 的行。