• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Modification not applying to recipe or repair class...

I'm trying to make the blade traps more expensive right now and seem to have an issue that I cannot seem to figure out. First, the modification in blocks.xml is below.

Code:
<set xpath="/blocks/block[@name='bladeTrap']/property[@class='RepairItems']/property[@name='resourceForgedSteel']/@value">20</set>

Not sure why this isn't working. Next is the recipe component that is not applying.

Code:
<set xpath="/recipes/recipe[@name='bladeTrap']/ingredient[@name='resourceForgedIron']/property[@name='count']/@value">20</set>
<set xpath="/recipes/recipe[@name='bladeTrap']/ingredient[@name='resourceForgedSteel']/property[@name='count']/@value">20</set>
<set xpath="/recipes/recipe[@name='bladeTrap']/ingredient[@name='resourceMechanicalParts']/property[@name='count']/@value">16</set>
<set xpath="/recipes/recipe[@name='bladeTrap']/ingredient[@name='resourceElectricParts']/property[@name='count']/@value">12</set>
<set xpath="/recipes/recipe[@name='bladeTrap']/ingredient[@name='resourceOil']/property[@name='count']/@value">20</set>

Again, it looks right from what I understand about this XML stuff. C++ is my cup of tea though, so something might be wrong here. Have I missed something?

 
I'm trying to make the blade traps more expensive right now and seem to have an issue that I cannot seem to figure out. First, the modification in blocks.xml is below.

Code:
<set xpath="/blocks/block[@name='bladeTrap']/property[@class='RepairItems']/property[@name='resourceForgedSteel']/@value">20</set>


Not sure why this isn't working. Next is the recipe component that is not applying.

Code:
<set xpath="/recipes/recipe[@name='bladeTrap']/ingredient[@name='resourceForgedIron']/property[@name='count']/@value">20</set>
<set xpath="/recipes/recipe[@name='bladeTrap']/ingredient[@name='resourceForgedSteel']/property[@name='count']/@value">20</set>
<set xpath="/recipes/recipe[@name='bladeTrap']/ingredient[@name='resourceMechanicalParts']/property[@name='count']/@value">16</set>
<set xpath="/recipes/recipe[@name='bladeTrap']/ingredient[@name='resourceElectricParts']/property[@name='count']/@value">12</set>
<set xpath="/recipes/recipe[@name='bladeTrap']/ingredient[@name='resourceOil']/property[@name='count']/@value">20</set>


Again, it looks right from what I understand about this XML stuff. C++ is my cup of tea though, so something might be wrong here. Have I missed something?
The blocks line works fine. you can always check your config dumps to make sure something applied.

The recipe lines though are not quite right. Property, name, and value are not descriptions they're for when the file actually states those.
So for recipes it would need to look like this

Code:
<set xpath="/recipes/recipe[@name='bladeTrap']/ingredient[@name='resourceForgedIron']/@count">20</set>
<set xpath="/recipes/recipe[@name='bladeTrap']/ingredient[@name='resourceForgedSteel']/@count">20</set>
<set xpath="/recipes/recipe[@name='bladeTrap']/ingredient[@name='resourceMechanicalParts']/@count">16</set>
<set xpath="/recipes/recipe[@name='bladeTrap']/ingredient[@name='resourceElectricParts']/@count">12</set>
<set xpath="/recipes/recipe[@name='bladeTrap']/ingredient[@name='resourceOil']/@count">20</set>
 
Last edited by a moderator:
Thanks, I am still learning to deal with XML, and that went over my head for some reason. Switching the code as you had fixed the other error as well. Apparently, when the recipes.xml had issues, it triggered an issue with the blocks.xml as well. Thanks very much for your help!

 
Back
Top