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

How to add a crafting tool to an existing recipe?

bloodlust67

New member
As is the subject, so is the question. I tried this but it didn't work:

<append xpath="/recipes/recipe[@name='vehicleTruck4x4Accessories']/@craft_tool">toolSocketSet</append>

also tried, though I didn't think it would work, and it didn't:

<set xpath="/recipes/recipe[@name='vehicleTruck4x4Accessories']/@craft_tool">toolSocketSet</set>

any help/explanation would be appreciated :)

 
As is the subject, so is the question. I tried this but it didn't work:

<append xpath="/recipes/recipe[@name='vehicleTruck4x4Accessories']/@craft_tool">toolSocketSet</append>

also tried, though I didn't think it would work, and it didn't:

<set xpath="/recipes/recipe[@name='vehicleTruck4x4Accessories']/@craft_tool">toolSocketSet</set>

any help/explanation would be appreciated :)
You need to use setattribute for recipes that don't already have a craft_tool set. So something like

Code:
	<setattribute xpath="//recipe[@name='vehicleTruck4x4Accessories']" name="craft_tool">toolSocketSet</setattribute>
 
You need to use setattribute for recipes that don't already have a craft_tool set. So something like

<setattribute xpath="//recipe[@name='vehicleTruck4x4Accessories']" name="craft_tool">toolSocketSet</setattribute>

I ended up doing this, and now all vehicles except the Bicycle will require having the Socket Set. Thank you guys for your help!

<setattribute xpath="//recipe[starts-with(@name, 'vehicle') and not(@name='vehicleBicycleChassis') and not(@name='vehicleBicycleHandlebars') and not(@name='vehicleBicyclePlaceable')]" name="craft_tool">toolSocketSet</setattribute>

 
Last edited by a moderator:
Back
Top