Can't get XML OperationReplace to work to replace MarketValue

Started by Moonman327, July 23, 2021, 06:27:00 PM

Previous topic - Next topic

Moonman327

As the title says, I can't get this code to work for a quick mod I'm making for myself to lower the value of smoothed stone walls and floors (or atleast was testing to see if I could even do it).
<?xml version="1.0" encoding="utf-8"?>
<Patch>
  <Operation Class="PatchOperationReplace">
    <xpath>Defs/ThingDefs_Misc ParentName="SandstoneBase"[defName = "SmoothedSandstone"]/statBases/MarketValue</xpath>
    <value>
      <MarketValue>5</MarketValue>
   </value>
  </Operation>
</Patch>


I've tried multiple different versions of this, and can't seem to get it to work at all.  Here's the latest log for it.

If anyone knows how or why this isn't working, please post an example. I've done 0 modding or any actual coding before so I have no idea what the hell I'm doing, I'm just following examples from the wiki and other stuff.