AaronG85
Refugee
Trying to add a food with a chance of a buff occurring. I have the following code that works for the buff but only gives food and health when the buff hits not every time the food is eaten.
Code:
<effect_group tiered="false" name="Food Tier 0">
<requirement name="CVarCompare" cvar="$buffSugarHighDuration" operation="GT" value="1803"/>
<display_value name="dRunSpeed" value=".1"/>
<display_value name="$waterAmountAdd" value="-5"/>
<display_value name="dDuration" value="20"/>
<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="$foodAmountAdd" operation="add" value="3"/>
<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="foodHealthAmount" operation="add" value="0"/>
<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="$waterAmountAdd" operation="add" value="0"/>
<triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="buffProcessConsumables"/>
<requirement name="RandomRoll" seed_type="Random" target="self" min_max="0,100" operation="LTE" value="20"/>
<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="$buffSugarHigh" operation="add" value="603"/>
<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="$buffSugarHigh" operation="set" value="1803">
<triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" buff="buffSugarHigh"/>
</triggered_effect>
</effect_group>