Armored Hediffs - SmArtKar/AthenaFramework GitHub Wiki
HediffCompProperties_Armored
can be used to add armor values to a certain bodypart. Unlike direct stat modification that implants like armorskin use, this would only protect against damage dealt to the hediff's bodypart (and it's children, unless toggled off). Hediff severity can also be used as durability, reducing or increasing it after absorbing damage, similarly to how apparel works. DamageDefArmor
function similarly to StatModifier
, not requiring <li>
public class HediffCompProperties_Armored : HediffCompProperties
{
// List of additional body part groups that are protected aside from the hediff's bodypart
public List<BodyPartGroupDef> additionalGroups;
// If the hediff should not only protect the parent part, but also all child parts
public bool protectChildren = true;
// If block should be considered metallic for VFX purposes
public bool metallicBlock = false;
// What type of durability should the hediff use
public HediffDurability durabilityMode = HediffDurability.None;
// Coefficent for the settings above. Uses percentages for severity, 0.25 would result in 400 damage required to destroy the hediff.
public float durabilityCoeff = 0.25f;
// List of armor stats
public List<StatModifier> armorStats = new List<StatModifier>();
// List of armor per damageDefs
public List<DamageDefArmor> defArmors = new List<DamageDefArmor>();
}
public enum HediffDurability
{
None,
LowerSeverity, //Lowers hediff severity, uses durabilityCoeff
IncreaseSeverity //Increases hediff severity, uses durabilityCoeff
}