RimWorld

RimWorld

Accurate Mortars Lite
dninemfive 23 Apr, 2018 @ 2:29pm
xpath code
Instead of recreating the entire "Buildings_Security.xml" and "Items_Resource_Shell" files, which may lead to incompatibilities, use the following xpath code to patch only the values you wish to:

<?xml version="1.0" encoding="utf-8" ?> <Patch> <!-- xpath code by dninemfive --> <Operation Class="PatchOperationReplace"> <xpath>*/ThingDef[defName = "Artillery_Mortar"]/verbs/li[verbClass = "Verb_Shoot"]/forcedMissRadius</xpath> <value> <forcedMissRadius>5</forcedMissRadius> </value> </Operation> <Operation Class="PatchOperationReplace"> <xpath>*/ThingDef[defName = "Bullet_Shell_HighExplosive"]/projectile/damageAmountBase</xpath> <value> <damageAmountBase>100</damageAmountBase> </value> </Operation> </Patch>