Stage By X - Vanilla-Expanded/VanillaExpandedFramework GitHub Wiki

<- Back

These are a bunch of HediffComps that can change their stage depending on different factors:

HediffCompProperties_StageByHealth:

        public float lowHealthStageIndex = 0.1f;
        public float highHealthStageIndex = 1f;
        public float healthThreshold = 0.5f;

HediffCompProperties_StageByPsylink:

        No fields needed. Assumes base game 6 psylink level max

HediffCompProperties_StageBySunlight:

        public float sunlightStageIndex = 0.1f;
        public float sunlessStageIndex = 1f;

HediffCompProperties_StageByTemperature:

        public int minTemp = 0;
        public int maxTemp = 0;

HediffCompProperties_StageByVacuum:

        public float notVacuumStageIndex = 0.1f;
        public float vacuumStageIndex = 1f;
        public bool vacuumResistanceInArmorDisablesHediff = false;
        public float vacuumResistanceValueToDisable = 0.8f;
        public bool reverseVacuumResistanceEffects = false;

How do I use this code?

It is a comp class, so you just add it in XML in the <comps> tag of the hediff you want to have this behaviour. For example, this is the hediff added by the Thermal speed gene in Alpha Genes

<comps>
	<li Class="VEF.AnimalBehaviours.HediffCompProperties_StageByTemperature">
		<minTemp>-30</minTemp>
		<maxTemp>80</maxTemp>			
	</li>
</comps>
⚠️ **GitHub.com Fallback** ⚠️