-
Notifications
You must be signed in to change notification settings - Fork 62
TileMutatorExtension
juanosarg edited this page May 30, 2026
·
4 revisions
IMPORTANT: This requires a feature to be toggled, learn how here: OptionalFeatures
TileMutatorExtension is a def extension that adds a few custom behaviours for the tile mutators added by Odyssey.
//This is used by TileMutatorWorker_ExtraAnimal
public List<PawnKindDefAndChance> forcedPawnKindDefs;
//This is used by TileMutatorWorker_GenericSpawner
public ThingDef thingToSpawn;
public IntRange thingToSpawnAmount;
public List<TerrainDef> terrainValidation;
public bool allowWater = true;
//These are used by TileMutatorWorker_GenericPrefabSpawner
public List<PrefabDef> prefabsToSpawn;
public IntRange prefabsToSpawnAmount = new IntRange(1, 1);
public int minSeparationBetweenPrefabs = 10;
//These are used by TileMutatorWorker_GenericKCSGSpawner
public List<KCSG.StructureLayoutDef> KCSGStructuresToSpawn;
public IntRange KCSGStructuresToSpawnAmount = new IntRange(1, 1);
public int minSeparationBetweenKCSGStructures = 10;
//These are used by TileMutatorWorker_TerrainSwapper
public TerrainDef terrainToSwap;
public TerrainDef terrainToSwapTo;
public int mapSizeOverrideX = -1;
public int mapSizeOverrideZ = -1;
public float mapSizeMultiplier = 1;
public float deepOresMultiplier = 1;
public float diseaseMTBMultiplier = 1;
public float movementDifficultyOffset = 0;
//This value is used by TileMutatorWorker_River
public int riverbankSizeMultiplier = 1;
//This value is used by TileMutatorWorker_PlantsWithCommonality
public List<PlantsWithCommonality> plantDefsWithCommonality;
//This value only affects VE Helixien Gas
public int extraDeepHelixienGasDeposits = 0;
//This value only affects VE Furniture - Power
public float tideStrengthMultiplier = 1;PawnKindDefAndChance and PlantsWithCommonality are wrapper classes:
public class PawnKindDefAndChance
{
public PawnKindDef forcedPawnKindDef;
public float forcedPawnKindDefChance;
}
public class PlantsWithCommonality
{
public ThingDef plantDef;
public float commonality;
}This Def Extension is added to the TileMutatorDef of the tile mutator you want to add them to.
If you aren't sure if the TileMutatorDef ALREADY has an extension (for example, if you think another mod will add their own), always use XPATH (xml patching) to add an extension, as there is already a PatchOperationAddModExtension to ensure they don't collide.
For example, on Vanilla Landmarks Expanded "domesticated escapees" tile mutator:
<modExtensions>
<li Class="VEF.Maps.TileMutatorExtension">
<forcedPawnKindDefs>
<li>
<forcedPawnKindDef>Chicken</forcedPawnKindDef>
<forcedPawnKindDefChance>0.1</forcedPawnKindDefChance>
</li>
<li>
<forcedPawnKindDef>Cow</forcedPawnKindDef>
<forcedPawnKindDefChance>0.1</forcedPawnKindDefChance>
</li>
<li>
<forcedPawnKindDef>Pig</forcedPawnKindDef>
<forcedPawnKindDefChance>0.1</forcedPawnKindDefChance>
</li>
</forcedPawnKindDefs>
</li>
</modExtensions>- Abilities
- Aesthetic scaling
- Animal Behaviours
- Apparels
- Buildings
- Cooking
- Factions
- Genes
- Global
- Graphics
- Hediffs
- Maps
- Memes
- OptionalFeatures
- Pawns
- Planet
- Plants
- Storyteller
- Things
- Weapons
- Weathers
- PipeSystem basics
- Resource
- Resource storage
- Resource processor
- Resource to thing
- Resource to power
- Thing to resource
- Resource trader
- Refill building with pipes
- Pipe valve
- Advanced Resource Processor
- Update to KCSG 2.0
- Exporting buildings
- Customizing symbols
- Debug helpers options
- Custom faction settlement
- Custom structure and scenarios
- Custom structure in quests
- Custom structure in WorldObjects
- Biome based structures
- Spawning world object(s) at world generation
- Prevent settlement spawning for nomadic factions