Infecter - AndroidQuazar/VanillaExpandedFramework GitHub Wiki

CompInfecter allows an animal's attack to produce extra infections. This is mostly an empty class only used to pass parameters to the Damage Worker

    //A comp class to make attacks from this animal produce additional infections

    //Note that it won't do anything on its own, it also needs a damage type with
    //damage class DamageWorker_ExtraInfecter

    public int infectionChance = 10;

How do I use this code?

It is a comp class, so you just add it in XML in the <comps> tag. You will also need to add the Damage Worker to the DamageDef used by the creature. For example, this allows Ghouls in RimWorld - Witcher Monster Hunt to cause additional infections with their attacks

<comps>
	<li Class="AnimalBehaviours.CompProperties_Infecter">
		<infectionChance>30</infectionChance>		
	</li>
</comps>
⚠️ **GitHub.com Fallback** ⚠️