You are viewing a potentially older version of this package. View all versions.
kruft-SmoothArmorScaling-0.1.0 icon

SmoothArmorScaling

Replace the piecewise armor function and configure armor effectiveness.

By kruft
Date uploaded 2 years ago
Version 0.1.0
Download link kruft-SmoothArmorScaling-0.1.0.zip
Downloads 168
Dependency string kruft-SmoothArmorScaling-0.1.0

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 armor function with a singular one and provides a configuration setting for general armor effectiveness.

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 in proportion to its reciprocal. (Please see the wiki page for damage mechanics)

Vanilla Armor Scaling Formula

This mod replaces that piecewise function with a singular function:

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

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

Adjusting armorEffectiveness value is equivalent to multiplying your current armor value.


ServerSync enabled.

CHANGELOG

Changelog

0.4.3
  • Bump for Call to Arms!
0.4.2
0.4.1
  • Fix readme typo

0.4.0

  • Add damageTaken multiplier
  • Add smoothArmorScaling toggle
  • Adjust granularity of armorEffectiveness to 0.01
  • Adjust range of gear multiplier

0.3.0

  • Reinclude armorEffectiveness alongside armor settings.
  • Update documentation

0.2.0

  • Remove armorEffectiveness
  • Add player and gear armor configuration options
  • Update Documentation
0.1.2
  • Reimplement RoundedValueRange
  • Update Icon
  • Add Github
0.1.1
  • Clamp armorEffectiveness to [0..5] in steps of 0.05
  • Update Documentation
  • Update Icon
0.1.0
  • Initial Release