Skip to content

TileMutatorWorker_PlantsWithCommonality

juanosarg edited this page May 30, 2026 · 1 revision

<- Back

TileMutatorWorker_PlantsWithCommonality allows you to add a worker to a tile mutator that spawns plants weighted by a commonality value

If you don't also define a TileMutatorExtension this worker does nothing and probably spews errors. TileMutatorExtension requires 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 Vanilla Landmarks Expanded's "wild cereals" tile mutator:

<workerClass>VEF.Maps.TileMutatorWorker_PlantsWithCommonality</workerClass>

And then:

<modExtensions>
	<li Class="VEF.Maps.TileMutatorExtension">
		<plantDefsWithCommonality>
			<li>
				<plantDef>VCE_Buckwheat</plantDef>
				<commonality>0.25</commonality>
			</li>
			<li MayRequire="VanillaExpanded.VCookE">
				<plantDef>VCE_Barley</plantDef>
				<commonality>0.25</commonality>
			</li>
			<li MayRequire="VanillaExpanded.VCookE">
				<plantDef>VCE_Sorghum</plantDef>
				<commonality>0.25</commonality>
			</li>					
			<li MayRequire="VanillaExpanded.VCookE">
				<plantDef>VCE_Oats</plantDef>
				<commonality>0.25</commonality>
			</li>		
		</plantDefsWithCommonality>
	</li>
</modExtensions>

Clone this wiki locally