kruft-SmoothArmorScaling icon

SmoothArmorScaling

Replaces the piecewise damage reduction function and provides a damage taken and global gear configuration options.

By kruft
Last updated 5 months ago
Total downloads 2588
Total rating 0 
Categories Mods Tweaks Gear Misc Tools Server-side Client-side Utility Ashlands Update
Dependency string kruft-SmoothArmorScaling-0.4.2
Dependants 4 other packages depend on this package

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2202 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured and includes unstripped Unity DLLs.

Preferred version: 5.4.2202

README

Smooth Armor Scaling

  • Replaces the piecewise damage reduction function and provides a damage taken and global gear configuration options.

Damage Reduction Function

The standard armor formula is a piecewise function in which 1 armor = 1 damage reduction for up to half of the incoming damage, after which it has diminishing returns. Refer to the wiki page for details.

Vanilla Armor Scaling Formula

This mod replaces that piecewise function with a singular function:

float basis = 1.0f + (ac * armorEffectiveness / dmg);
return (dmg * damageTaken) / (basis * basis);

This function follows the behavior of the original relatively closely but has smooth scaling across all values. Armor will be more effective vs larger hits and behave more consistently vs varying hit sizes.


Gear Configuration

Settings can be used to adjust the armor amounts on players and gear as well as overall damage taken:

  • Enable/disable the smooth armor function.

  • Coefficient for the effect of armor in damage reduction.

  • Multiply the final amount of damage applied to player.

  • Add flat armor to players.

  • Multiply base armor of Head, Chest, and Leg pieces.

  • Add flat armor to Head, Chest, and Leg pieces.

  • Armor added per quality level for Head, Chest, and Leg pieces.

  • Add flat armor to Capes.

  • Armor added per quality level for Capes.

The results of applying these settings are reflected on their respective tooltips.



ServerSync enabled
Valheim Modding Server
Thunderstore Github

Discord Kruft#6332