Hediff Spawner - Vanilla-Expanded/VanillaExpandedFramework GitHub Wiki
HediffComp_Spawner is a comp class that can be applied to a hediff so the carrier of the hediff periodically spawns things nearby
public ThingDef thingToSpawn;
public int spawnCount = 1;
public int initialSpawnWait = 10000;
public IntRange spawnIntervalRange = new IntRange(100, 100);
public int spawnMaxAdjacent = -1;
public bool spawnForbidden;
public bool requiresPower;
public bool writeTimeLeftToSpawn;
public bool showMessageIfOwned;
public string saveKeysPrefix;
public bool inheritFaction;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 jelly production gene in Alpha Genes
<comps>
<li Class="VEF.AnimalBehaviours.HediffCompProperties_Spawner">
<thingToSpawn>InsectJelly</thingToSpawn>
<spawnCount>12</spawnCount>
<spawnIntervalRange>55000~65000</spawnIntervalRange>
<spawnMaxAdjacent>30</spawnMaxAdjacent>
<spawnForbidden>false</spawnForbidden>
<showMessageIfOwned>false</showMessageIfOwned>
</li>
</comps>