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

Remove Triggered Effect from Yucca

00Prescott

Refugee
Good morning,

I am brand new to modding 7d2d and I'm looking for a way to remove the food poisoning from Yucca and I'm not quite sure how to do it. Under the item name="foodCropYuccaFruit" there are the following lines:

Code:
		<triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="buffProcessConsumables"/>
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="buffIllFoodPoisoning0">
		<requirement name="RandomRoll" seed_type="Random" target="self" min_max="0,100" operation="LTE" value="10"/>
	</triggered_effect>
	<display_value name="FoodPoisoningRisk" value=".1" />
I think you're supposed to use remove xpath="/item" then something else but I really don't know what I'm doing. I dug around the forum for a bit but was not able to locate anything. Could someone help me out? Thanks!

 
You can either modify the xml directly or create a modlet.

If you modify the xml, every update of the game will overwrite it.

Creating a modlet is pretty straight forward but there's a small learning curve.

If you simply want to edit the xml, remove these lines directly in items.xml:

Code:
<triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="buffIllFoodPoisoning0">
 <requirement name="RandomRoll" seed_type="Random" target="self" min_max="0,100" operation="LTE" value="10"/>
</triggered_effect>
And change the line below:

Code:
<display_value name="FoodPoisoningRisk" value="[b]0[/b]" />
If you're creating a modlet, use the remove command:

Code:
<remove xpath="/items/item[@name='foodCropYuccaFruit']/effect_group/triggered_effect[@buff='buffIllFoodPoisoning0']" />
If you want to modify the displayed value of the poisoning risk, use set:

Code:
<set xpath="/items/item[@name='foodCropYuccaFruit']/effect_group/display_value[@name='FoodPoisoningRisk']/@value">0</set>
To get started:

https://7daystodie.com/forums/showthread.php?93816-XPath-Modding-Explanation-Thread

 
Back
Top