Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Manhunting Muffalo

#1
Help / Re: A quick tutorial of xpathing and patching
November 27, 2017, 04:15:12 PM
Nope, still missing something, I guess I'm not smart enough to suss out what you're saying. God damnit, I wish the error message was a bit more informative. Very frustrating that I can't even do something this simple.
#2
Help / Re: A quick tutorial of xpathing and patching
November 27, 2017, 03:13:23 PM
But standing lamp sub-versions don't have a basePowerConsumption entry..?
#3
Help / Re: A quick tutorial of xpathing and patching
November 27, 2017, 01:49:23 PM
So something has changed in 0.18 that I can't suss out, and the error I'm getting is unhelpful ("patching operation failed"). My code is very simple, just trying (for the sake of practice) to change the power consumption for a standing lamp to 15. This is what I have:


<?xml version="1.0" encoding="utf-8" ?>

<Patch>
<Operation Class="PatchOperationReplace">
<xpath>/Defs/ThingDef[defName="StandingLampBase"]/comps/li[@Class="CompProperties_Power"]/basePowerConsumption</xpath>
<value>
<basePowerConsumption>15</basePowerConsumption>
</value>
</Operation>

</Patch>


I can't seem to figure out what it can't find. Could someone point it out since I seem to be extra dumb today?