Spreadable Hediffs - Vanilla-Expanded/VanillaExpandedFramework GitHub Wiki
HediffCompProperties_Spreadable creates a hediff that can spread between different pawns
public float radiusToSpread;
public float severityToInfect;
public float baseDiseaseContractChance;
public IntRange spreadingTickInterval;
public float socialInteractionTransmissionChance;
public bool requiresLineOfSightToSpread;
public List<RaceCategory> speciesCanCatch;
public List<ThingDef> apparelsPreventingSpreading;
public List<StatModifier> statsPreventingSpreading;
public FleckDef fleckDefOnPawn;
public IntRange fleckSpawnInterval;
public Color fleckColor;
public float fleckScale = 1f;
public string spreadingMessageWarningKey;
It is a comp class, so you just add it in XML in the <comps>
tag of the hediff. For example, this was the black plague in VFE Medievals, which was removed from Medievals 2 because people are filthy cowards (I'm guessing here)
<comps>
<li Class="VEF.Hediffs.HediffCompProperties_Spreadable">
<radiusToSpread>3</radiusToSpread>
<severityToInfect>0.1</severityToInfect>
<baseDiseaseContractChance>0.8</baseDiseaseContractChance>
<spreadingTickInterval>3000~6000</spreadingTickInterval>
<socialInteractionTransmissionChance>0.1</socialInteractionTransmissionChance>
<requiresLineOfSightToSpread>true</requiresLineOfSightToSpread>
<speciesCanCatch>
<li>Humanlike</li>
</speciesCanCatch>
<apparelsPreventingSpreading>
<li>VFEM_Apparel_PlagueMask</li>
</apparelsPreventingSpreading>
<statsPreventingSpreading>
<ToxicResistance>0.8</ToxicResistance>
</statsPreventingSpreading>
<fleckDefOnPawn>AirPuff</fleckDefOnPawn>
<fleckSpawnInterval>5~10</fleckSpawnInterval>
<fleckColor>(0,0,0)</fleckColor>
<fleckScale>1.1</fleckScale>
<spreadingMessageWarningKey>VFEM.BlackPlagueSpreadedFurther</spreadingMessageWarningKey>
</li>
</comps>