How Armor was built

Raw game files read

Processing

Every itemtypes/ variant with the Wearable behavior (or a clothescategory) and an attributes.protectionModifiers is an armor row; the vanilla ones come from wearable/seraph/armor.json and armor-hide.json. Everything is resolved per concrete variant (armor-body-chain-iron): attributes is merged with the glob-matched attributesByType, and durabilityByType, protectionModifiersByType and statModifiersByType pick the most specific matching pattern, case-insensitively.

Tier / Protection / Flat are protectionTier, relativeProtection and flatDamageReduction. The per-tier losses (how much each of them drops when the attacker outranks the armor) come from the piece's own perTier...Loss arrays or, if it has none, the file's defaultProtLoss; they are shown on the piece's item page, along with the "... repair" crafting recipes and every stat modifier. Warmth exists only on some pieces (the bear hides). Walk and Hunger are statModifiers.walkSpeed and statModifiers.hungerrate.

Pipeline code