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

How do I remove a specific recipe in a custom recipe hierarchy?

Noisy Pants

Refugee
There are two recipes for glue, one for the campfire and one for the chemistry station. My mod makes the chemistry station more rewarding since it is an advanced piece of equipment. Here is the original code that I have that works but it deletes the campfire glue instead of the chemistry station glue:

Code:
<remove xpath="/recipes/recipe[@name='resourceGlue']"></remove>
	<append xpath="/recipes">

	<recipe name="resourceGlue" count="3" craft_area="chemistryStation">
		<ingredient name="resourceFemur" count="1"/>
		<ingredient name="drinkJarRiverWater" count="1"/>
	</recipe>

	</append>
I know I'm close because the game gave me this message:

a1.jpg

here is what i got to get that message:

Code:
<remove xpath="/recipes/recipe[@name='resourceGlue']/@count='1'/@craft_area='chemistryStation'"></remove>
	<append xpath="/recipes">

	<recipe name="resourceGlue" count="3" craft_area="chemistryStation">
		<ingredient name="resourceFemur" count="1"/>
		<ingredient name="drinkJarRiverWater" count="1"/>
	</recipe>

	</append>
 
You can also use set but targeted.

Code:
<set xpath="/recipes/recipe[@name='resourceGlue' and @craft_area='chemistryStation']/@count">3</set>
But I think you'll also get the idea if you want to remove / append.

 
You can also use set but targeted.
Code:
<set xpath="/recipes/recipe[@name='resourceGlue' and @craft_area='chemistryStation']/@count">3</set>
But I think you'll also get the idea if you want to remove / append.
you are awesome!!! thank you very much!!

 
Back
Top