Bladestorm Games
Refugee
Just a post checking if my usage of the "requirement" element is correct:
Here is the example code:
<!-- Method #1 - Requirements are before the trigger_effect -->
<passive_group>
<requirement name="EntityTagCompare" target="other" tags="zombie,animal"/>
<requirement name="IsAlive" target="other"/>
<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="10"/>
<triggered_effect trigger="onSelfKilledOther" action="ModifyStats" stat="Stamina" operation="add" value="10"/>
</passive_group>
<!-- Method #2 - Requirements are within the trigger_effect -->
<passive_group>
<triggered_effect trigger="onSelfKilledOther" action="ModifyStats" stat="Stamina" operation="add" value="10">
<requirement name="EntityTagCompare" target="other" tags="zombie,animal"/>
<requirement name="IsAlive" target="other"/>
<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="10"/>
</triggered_effect>
</passive_group>
I understand that in Method #2, the requirements must be met for that specific triggered_effect to occur.
Question #1) In Method #1, those requirements must be met for the triggered_effect to occur, but that means anything AFTER the triggered_effect will also need to have met the requirements?
So If I wanted to do something like:
"On hitting an enemy, Recover 10 Stamina and a 25% chance to recover 5 life"
<passive_group>
<requirement name="EntityTagCompare" target="other" tags="zombie,animal"/>
<requirement name="IsAlive" target="other"/>
<!-- Needs to pass the EntityTagCompare, and IsAlive requirements -->
<triggered_effect trigger="onSelfAttackedOther" action="ModifyStats" stat="Stamina" operation="add" value="10"/>
<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="25"/>
<!-- The first 2 requirements still apply to this triggered_effect, correct?? -->
<triggered_effect trigger="onSelfAttackedOther" action="ModifyStats" stat="Health" operation="add" value="5"/>
</passive_group>
Question #2) Kind of a side question, is this the way to do a value range? Say I wanted to do something like this:
"When you kill an enemy to recover 5 to 15 Stamina"
Here is the example code:
<!-- Method #1 - Requirements are before the trigger_effect -->
<passive_group>
<requirement name="EntityTagCompare" target="other" tags="zombie,animal"/>
<requirement name="IsAlive" target="other"/>
<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="10"/>
<triggered_effect trigger="onSelfKilledOther" action="ModifyStats" stat="Stamina" operation="add" value="10"/>
</passive_group>
<!-- Method #2 - Requirements are within the trigger_effect -->
<passive_group>
<triggered_effect trigger="onSelfKilledOther" action="ModifyStats" stat="Stamina" operation="add" value="10">
<requirement name="EntityTagCompare" target="other" tags="zombie,animal"/>
<requirement name="IsAlive" target="other"/>
<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="10"/>
</triggered_effect>
</passive_group>
I understand that in Method #2, the requirements must be met for that specific triggered_effect to occur.
Question #1) In Method #1, those requirements must be met for the triggered_effect to occur, but that means anything AFTER the triggered_effect will also need to have met the requirements?
So If I wanted to do something like:
"On hitting an enemy, Recover 10 Stamina and a 25% chance to recover 5 life"
<passive_group>
<requirement name="EntityTagCompare" target="other" tags="zombie,animal"/>
<requirement name="IsAlive" target="other"/>
<!-- Needs to pass the EntityTagCompare, and IsAlive requirements -->
<triggered_effect trigger="onSelfAttackedOther" action="ModifyStats" stat="Stamina" operation="add" value="10"/>
<requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="25"/>
<!-- The first 2 requirements still apply to this triggered_effect, correct?? -->
<triggered_effect trigger="onSelfAttackedOther" action="ModifyStats" stat="Health" operation="add" value="5"/>
</passive_group>
Question #2) Kind of a side question, is this the way to do a value range? Say I wanted to do something like this:
"When you kill an enemy to recover 5 to 15 Stamina"
Code:
<triggered_effect trigger="onSelfKilledOther" action="ModifyStats" stat="Health" operation="add" value="randomint(5,15)"/>
Last edited by a moderator: