You are viewing a potentially older version of this package. View all versions.
hvalch-Feint-0.2.1 icon

Feint

Changed your mind mid-swing? Block or dodge to cancel the attack before it lands, at a stamina cost.

Date uploaded 2 weeks ago
Version 0.2.1
Download link hvalch-Feint-0.2.1.zip
Downloads 24
Dependency string hvalch-Feint-0.2.1

This mod requires the following mods to function

ValheimModding-Jotunn-2.30.2 icon
ValheimModding-Jotunn

Jötunn (/ˈjɔːtʊn/, 'giant'), the Valheim Library was created with the goal of making the lives of mod developers easier. It enables you to create mods for Valheim using an abstracted API so you can focus on the actual content creation.

Preferred version: 2.30.2
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

Feint

Changed your mind mid-swing? Block or dodge to cancel the attack before it lands, at a stamina cost.

I got sick of being one-shot because I got greedy with a combo and couldn't back out of it. I'll still die, but now I have a bit more control. I didn't want that control for free, though. Other mods already let you cancel attacks (AttackCancel, for one), but I wanted cancelling to come with tradeoffs.

Video demos

Watch the video if it doesn't play above Video embed removed as Gale crashes with it.

Watch the dodge after hit video (DodgeAfterHit only).

How it works

Press block or dodge during a swing, before it hits, to cancel it. The block or dodge doesn't start right away. The wait is half the time you had been swinging: if you cancel 0.4 seconds into a swing, the block or dodge starts 0.2 seconds later.

Timeline of an early and a late cancel

If the swing reaches its hit during that wait, the hit still lands, but weaker. The longer you had been waiting, the less damage it does, down to half by default.

Damage of a cancelled swing by when you cancel

A cancel costs extra stamina, up to the swing's own stamina cost. How much depends on when you cancel. At the very start of a swing it's free. The cost rises quickly to the full amount for the latest cancel that still stops the hit, and is lower again for cancels so late that the hit lands anyway. You need the full amount of stamina to cancel. If the swing would have ended on its own before the block or dodge starts, there's no extra cost.

Extra stamina for a cancel by when you cancel

A cancel also resets your combo, so your next swing starts from the first attack.

After a swing hits, it can't be cancelled, so blocking or dodging then works like vanilla. You also can't cancel in the air or during the knife's jump attack before it hits.

With DodgeAfterHit on, you can also dodge after the hit to skip the rest of the swing. The dodge starts right away, or when you land if you're in the air. This works for every attack, including NonCancellableAttacks. By default this costs extra stamina too (DodgeAfterHitPenalty): half the full amount right after the hit, dropping to nothing by the end of the swing.

Why does it work like this?

It just does. I'm happy to take suggestions if I think they are better.

It's a bit odd that cancelling right before a hit is best, but I like that it introduces some risk:reward.

Extra controls

  • Dodge key: DodgeKey sets a dedicated dodge key that dodges the way you're moving. (Same as the game's own AltDodge control.)
  • Block + jump: BlockJump sets what jump does while blocking: Dodge (vanilla), Jump, or Nothing.

Config

BepInEx/config/hvalch.Feint.cfg, or in-game with a configuration manager (F1).

Setting Default What it does
CancelWithBlock / CancelWithDodge on Which inputs can cancel.
StaminaPenalty 1 Extra stamina per cancel, as a multiple of the attack's cost (0 to 3).
ScaleStaminaPenalty on Scale the cost by when you cancel. Off = always the full cost.
CancelledHitDamage 0.5 Lowest damage multiplier for a cancelled swing that still hits. (0 to 1)
ScaleCancelledHitDamage on Weaker the longer you'd been pulling back. Off = always CancelledHitDamage.
DodgeAfterHit off Dodging after the hit skips the rest of the swing.
DodgeAfterHitPenalty on Charge extra stamina for a dodge after the hit, scaled like other cancels. Off = only the dodge's cost.
NonCancellableAttacks knife jump attacks Attack animations that block and dodge can't cancel before the hit. DodgeAfterHit still works for them. DebugLog prints the name of each attack you cancel.
DodgeKey none Dedicated dodge key. Local only.
BlockJump Dodge What jump does while blocking. Local only.

Multiplayer

Client-side. Works on servers without it. If the server has it, the server's cancel settings are used and locked for non-admins. Controls are always your own.

AI Disclaimer

This mod was wholly generated by AI (Claude), guided by a software engineer.

CHANGELOG

Changelog

0.3.0

  • New KeepCombo setting (off by default): your combo carries on if your next swing starts within ComboKeepSeconds (1 second by default), also after a dodge or block. Vanilla resets it after 0.2 seconds. Cancelling a swing before it hits still resets the combo. A kept combo's next swing turns toward your aim by up to 90°, like a combo's first swing does in vanilla (which turns all the way).

0.2.1

  • DodgeAfterHit now works for attacks in NonCancellableAttacks too, such as the knife's jump attack. That setting only stops cancels before the hit.
  • A dodge after the hit pressed in the air starts when you land.

0.2.0

  • New DodgeAfterHit setting (off by default): dodge after a swing has hit to skip the rest of it.
  • New DodgeAfterHitPenalty setting (on by default): charge extra stamina for that dodge, scaled like other cancels.

0.1.0

  • Initial release.