Skip to content

TileMutatorWorker_ExtraAnimal

juanosarg edited this page May 30, 2026 · 2 revisions

<- Back

TileMutatorWorker_ExtraAnimal allows you to add a worker to a tile mutator that spawns new animals in a map. By default, Odyssey only allows you to spawn animals that ALREADY spawn naturally in that biome, but this worker doesn't have such restrictions.

However, since patching the wild spawner is a bit of a pain, what this worker does is detect when a new animal is naturally spawned and then on a configurable chance spawn one of the animals indicated in the TileMutatorExtension.

If you don't also define a TileMutatorExtension this worker does nothing and probably spews errors. TileMutatorExtension equires an optional feature to be toggled, learn how here: OptionalFeatures

How do I use this code?

Tile mutator workers are added to the <workerClass> tag of the TileMutatorDef you want to add them to.

For example, on Alpha Biomes' "butterfly swarms" tile mutator:

<workerClass>VEF.Maps.TileMutatorWorker_ExtraAnimal</workerClass>

And then:

<modExtensions>
	<li Class="VEF.Maps.TileMutatorExtension">
		<forcedPawnKindDefs>
			<li>
				<forcedPawnKindDef>AA_SmallButterfly</forcedPawnKindDef>
				<forcedPawnKindDefChance>0.25</forcedPawnKindDefChance>
			</li>
		</forcedPawnKindDefs>
	</li>
</modExtensions>

So 25% of the times a wild animal is going to spawn in the map, a small butterfly will spawn too. Bear in mind 25% is VERY HIGH, and this horrible, horrible mutator will fill the map with super annoying butterflies in no time!

Clone this wiki locally