Dynamic Attribute
Most attributes added by the mod work different from vanilla attributes. Instead of providing a value they modify dynamic values. They are calculated like normal attributes, but their base value is internally set to the dynamic value which is only known when a certain event happens.
For example in case of puffish_attributes:resistance attribute, when the player takes damage, the base value is internally set to the amount of damage taken, then modifiers of that attribute are applied, and the result is the new damage amount.
Changing base value of these attributes is not possible, and it is always displayed as NaN. It is not due to a bug, but to indicate that it is a dynamic attribute and the base value should not be used.
Examples
Click to view
Assume the player originally deals 8 damage and has the following modifiers of the puffish_attributes:melee_damage attribute which has positive effect.
1and2bothadditionthen deals8 + 1 + 2 = 11damage.0.25and0.3bothmultiply_basethen deals8 * (1 + 0.25 + 0.3) = 12.4damage.0.25and0.3bothmultiply_totalthen deals8 * (1 + 0.25) * (1 + 0.3) = 13damage.- Three
0.5allmultiply_basethen deals8 * (1 + 0.5 + 0.5 + 0.5) = 20damage. - Three
0.5allmultiply_totalthen deals8 * (1 + 0.5) * (1 + 0.5) * (1 + 0.5) = 27damage.
Click to view
Assume the player originally takes 8 damage and has the following modifiers of the puffish_attributes:resistance attribute which has negative effect.
1and2bothadditionthen takes8 - 1 - 2 = 5damage.0.25and0.3bothmultiply_basethen takes8 * (1 - 0.25 - 0.3) = 3.6damage.0.25and0.3bothmultiply_totalthen takes8 * (1 - 0.25) * (1 - 0.3) = 4.2damage.