• Mods are now organized as resources. Use the Mods link above to browse for or submit a mod, tool, or prefab.

    The TFP Official Modding Forum Policy establishes the rules and guidelines for mod creators and mod users.

How do I add a replacement code in append

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:

Code:
<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>
 
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:

Code:
<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

 
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>

 
Back
Top