RimWorld

RimWorld

Spidercamp's Horses
dninemfive 22 Apr, 2018 @ 11:23am
Xpath code
Instead of recreating all (!) of the vanilla BiomeDefs without changes (!!), which will conflict with other mods, use the following code to insert horses wherever. Place this file in a Patches folder in your mod root:

<?xml version="1.0" encoding="utf-8" ?> <Patch> <!-- xpath code by dninemfive --> <Operation Class="PatchOperationAdd"> <xpath>*/BiomeDef[defName = "TemperateForest"]/wildAnimals</xpath> <value> <QuarterHorse>0.05</QuarterHorse> <BlackHorse>0.02</BlackHorse> <WhiteHorse>0.01</WhiteHorse> <Palomino>0.005</Palomino> </value> </Operation> <!-- cold biomes --> <Operation Class="PatchOperationAdd"> <xpath>*/BiomeDef[defName = "BorealForest"]/wildAnimals</xpath> <value> <QuarterHorse>0.03</QuarterHorse> <BlackHorse>0.01</BlackHorse> <WhiteHorse>0.02</WhiteHorse> </value> </Operation> <Operation Class="PatchOperationAdd"> <xpath>*/BiomeDef[defName = "Tundra"]/wildAnimals</xpath> <value> <QuarterHorse>0.03</QuarterHorse> <WhiteHorse>0.01</WhiteHorse> </value> </Operation> <!-- warm arid biomes --> <Operation Class="PatchOperationAdd"> <xpath>*/BiomeDef[defName = "AridShrubland"]/wildAnimals</xpath> <value> <QuarterHorse>0.06</QuarterHorse> <BlackHorse>0.025</BlackHorse> <WhiteHorse>0.015</WhiteHorse> </value> </Operation> <Operation Class="PatchOperationAdd"> <xpath>*/BiomeDef[defName = "Desert"]/wildAnimals</xpath> <value> <QuarterHorse>0.04</QuarterHorse> <WhiteHorse>0.012</WhiteHorse> </value> </Operation> </Patch>