nioton6 Posted October 19, 2019 Share Posted October 19, 2019 Can someone give me a code where I can replace something like <Replace/> Link to comment Share on other sites More sharing options...
Sythalin Posted October 19, 2019 Share Posted October 19, 2019 I think you're looking for <set/>. This is used to change existing values in XML. For example, in my ReducedGlue modlet, I change the required amount of bones needed to make glue with the following: <set xpath="/recipes/recipe[@name='resourceGlue'][@craft_area='campfire']/ingredient[@name='resourceBone']/@count">5</set> <set xpath="/recipes/recipe[@name='resourceGlue'][@craft_area='chemistryStation']/ingredient[@name='resourceBone']/@count">3</set> Link to comment Share on other sites More sharing options...
nioton6 Posted October 19, 2019 Author Share Posted October 19, 2019 I think you're looking for <set/>. This is used to change existing values in XML. For example, in my ReducedGlue modlet, I change the required amount of bones needed to make glue with the following: <set xpath="/recipes/recipe[@name='resourceGlue'][@craft_area='campfire']/ingredient[@name='resourceBone']/@count">5</set> <set xpath="/recipes/recipe[@name='resourceGlue'][@craft_area='chemistryStation']/ingredient[@name='resourceBone']/@count">3</set> How do I do this with items with more than one crafting ingredient Link to comment Share on other sites More sharing options...
stallionsden Posted October 19, 2019 Share Posted October 19, 2019 How do I do this with items with more than one crafting ingredient <remove xpath="/items/item[@name=itemname]"></remove> <append xpath="/items"> Item code with new code put in </append> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.