Bladestorm Games
Refugee
Hello! I am looking for some assistance on an item_modifier idea.
The idea: an item_modifier when created, has a CVAR that rolls a value between 10 to 25, that CVAR value then can be used for a passive_effect value entry, and a display_type value entry:
<!-- Create a CVAR and roll a value within a range. -->
<!-- cvar="rolled_value" -->
<!-- value="randomint(10,25)" -->
<!-- Use the CVAR for the value's entry -->
<passive_effect name="EntityDamage" operation="perc_add" value="@rolled_value"/>
<display_value name="dEntityDamage" value="@rolled_value"/>
Note, I cant do something like this:
<passive_effect name="EntityDamage" operation="perc_add" value="randomint(10,25)"/>
<display_value name="dEntityDamage" value="randomint(10,25)"/>
Because, for example, if the passive_effect rolled a 15, and the display_value rolled a 21, when you equip the item_mod to an item, you'd actually get 15% Entity Damage, but the text on the item would display 21.
This may sound silly, but am I to use the triggered_effect tag for generating and rolling a value? So something like this:
<triggered_effect trigger="???" action="ModifyCVar" cvar="rolled_value" operation="set" value="randomint(10,25)"/>
<passive_effect name="EntityDamage" operation="perc_add" value="@rolled_value"/>
<display_value name="dEntityDamage" value="@rolled_value"/>
If so, what would I want to use as the trigger entry value?
Thanks for the read!
The idea: an item_modifier when created, has a CVAR that rolls a value between 10 to 25, that CVAR value then can be used for a passive_effect value entry, and a display_type value entry:
<!-- Create a CVAR and roll a value within a range. -->
<!-- cvar="rolled_value" -->
<!-- value="randomint(10,25)" -->
<!-- Use the CVAR for the value's entry -->
<passive_effect name="EntityDamage" operation="perc_add" value="@rolled_value"/>
<display_value name="dEntityDamage" value="@rolled_value"/>
Note, I cant do something like this:
<passive_effect name="EntityDamage" operation="perc_add" value="randomint(10,25)"/>
<display_value name="dEntityDamage" value="randomint(10,25)"/>
Because, for example, if the passive_effect rolled a 15, and the display_value rolled a 21, when you equip the item_mod to an item, you'd actually get 15% Entity Damage, but the text on the item would display 21.
This may sound silly, but am I to use the triggered_effect tag for generating and rolling a value? So something like this:
<triggered_effect trigger="???" action="ModifyCVar" cvar="rolled_value" operation="set" value="randomint(10,25)"/>
<passive_effect name="EntityDamage" operation="perc_add" value="@rolled_value"/>
<display_value name="dEntityDamage" value="@rolled_value"/>
If so, what would I want to use as the trigger entry value?
Thanks for the read!