Decamods Staff of Protection Tweaks
A rebuilt Staff of Protection for Valheim 1.0.
In vanilla, recasting the Staff of Protection on someone who already has a barrier only resets its timer. The damage the barrier has already soaked stays on it, so a recast gives you the full duration but a half-broken shield. This mod fixes that, and adds a few things to make playing a Blood Magic support more rewarding.
Features
- Recasting restores barrier HP. Recast on anyone who still has a barrier and it comes back at full strength, not just full duration.
- Barrier ignores Chop and Pickaxe damage. Some boss slams carry hidden terrain damage that one-shots the barrier. That damage no longer counts against it.
- Shield bar. Your barrier's HP shows as a blue bar right next to your health bar, with the same smoothing and damage trail as the vanilla bar. It only shows while you have a barrier, and the Forsaken power icon slides over to make room.
- Blood Magic XP on recast. Since barriers rarely break once recasting refreshes them, you get XP on recast for the share of the barrier that was used up, in 10% steps.
- Optional XP on hit. Earn a little Blood Magic XP every time your barrier absorbs a hit (off by default).
- Optional Warlock mode. Bloodstone weapons cost HP per attack while you have a barrier (off by default).
- Optional barrier HP on the status icon (off by default).
Configuration
The config file is created on first launch at BepInEx/config/decamods.staffofprotectiontweaks.cfg. Every feature can be turned on or off, and it works with the BepInEx Configuration Manager.
| Setting | Default | What it does |
|---|---|---|
StaffOfProtection.RecastFullRefresh |
on | Recasting restores the barrier's HP as well as its duration |
StaffOfProtection.IgnoreChopAndPickaxe |
on | Barrier ignores Chop and Pickaxe damage |
Experience.RecastExperience |
on | Blood Magic XP on recast for the used-up share of the barrier |
Experience.RecastExperienceFactor |
1.0 | Multiplier on recast XP |
Experience.OnHitExperience |
off | Blood Magic XP each time the barrier absorbs a hit |
Experience.OnHitExperienceFactor |
0.1 | Multiplier on per-hit XP |
Warlock.* |
off | Bloodstone weapons drain HP per attack while you have a barrier |
ShieldHud.ShowShieldBar |
on | Show the shield bar next to the health bar |
ShieldHud.ShieldBarColor |
blue | Color of the shield bar |
ShieldHud.ShieldBarLength |
— | Fixed length of the shield bar (it doesn't scale with max health) |
ShieldHud.ShieldBarOffsetX / ShieldBarOffsetY |
0 | Nudge the shield bar, in pixels |
ShieldHud.ShiftPowerIcon |
on | Slide the Forsaken power icon over while the bar is showing |
ShieldHud.ShowHpOnStatusIcon |
off | Show barrier HP on the barrier's status icon |
Compatibility
- Client-side. Install it on every player's client. A server install isn't needed.
- Multiplayer. A barrier's HP lives on the client of the player who has the barrier, so that player needs the mod for their barrier to refresh. The caster having it isn't enough.
- Shield bar shows your own barrier only. Other players' barrier HP isn't sent over the network, so it can't be shown.
- Incompatible with Better Staff Of Protection. This mod replaces it. Don't run both in the same profile.
Installation
Install with Gale, or manually:
- Install BepInExPack Valheim.
- Extract
DecamodsStaffOfProtectionTweaks.dllinto yourBepInEx/pluginsfolder.
Credits
Original concept and feature set by Belphegor, from Better Staff Of Protection. Staff of Protection Tweaks by DECAMODS.