The_Great_Sephiroth Posted July 12, 2023 Share Posted July 12, 2023 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. <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. <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? Link to comment Share on other sites More sharing options...
RevenantWit Posted July 12, 2023 Share Posted July 12, 2023 (edited) 5 hours ago, The_Great_Sephiroth said: 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. <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. <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 <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> Edited July 13, 2023 by RevenantWit (see edit history) Link to comment Share on other sites More sharing options...
The_Great_Sephiroth Posted July 12, 2023 Author Share Posted July 12, 2023 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! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now