Casting penalty
If your skill in this armor type is greater than or equal to iSkillJournemanMin, then the base encumbrance for that type is 0.
Next I should introduce the idea of "armor coverage". The game checks each slot, sees if an item is equipped there, then accumulates a running total value if an item of the right type (heavy or light) is found. This sum capped at 100. Here are the slots, game settings, and default values:
- head - iArmorDamageHelmChance (10)
- hair - iArmorDamageHelmChance (10)
- upper body - iArmorDamageCuirassChance (25)
- lower body - iArmorDamageGreavesChance (15)
- hand - iArmorDamageGauntletsChance (10)
- foot - iArmorDamageBootsChance (10)
- shield - iArmorDamageShieldChance (30)
So, if you had something in the head, upper body and shield slots, you would have 10 + 25 + 30 = 65 coverage. Neither weight nor any other values are taken in to account.
Next, scale the coverage values by ((50 - armor skill) * 2) / 100, giving decreasing encumbrance as you increase in armor skill. (Yes, it always uses 50 even if you change iSkillJourneymanMin ).
Do the above for both armor types, then add the two results together. Use this sum to interpolate between fMagicArmorPenaltyMin and fMagicArmorPenaltyMax, and you're done.
Except in some cases, where you then scale by (cur_fatigue / max_fatigue) * fMagicFatigueDrainMult + fMagicFatigueDrainBase.