Bladestorm Games
Refugee
I'm trying to simplify some code for a custom Buff, where its Duration is increased based on a Perk's level, trying to use the Perk as a Value input, the following throws an error
<effect_group>
<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".buffEnragedDuration" operation="set" value="5"/>
<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".buffEnragedDuration" operation="add" value="#perkPummelPete"/>
</effect_group>
Note 1: Looking into the Documentation section of Buff.xml, I see this:
Note 2: I've tried adding target="self" to the triggered_effect line of code that uses value="#perkPummelPete" and still fails.
Note 3: The Error being thrown:

The currently working code, to be simplified:
<effect_group>
<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".buffEnragedDuration" operation="set" value="5"/>
<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".buffEnragedDuration" operation="add" value="#perkPummelPete"/>
</effect_group>
Note 1: Looking into the Documentation section of Buff.xml, I see this:
value (Float,@cvar,#gameVariable) : Leading with @/# will parse the value of an existing cvar or game variable instead of a number.
Note 2: I've tried adding target="self" to the triggered_effect line of code that uses value="#perkPummelPete" and still fails.
Note 3: The Error being thrown:

The currently working code, to be simplified:
Code:
<effect_group>
<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".buffEnragedDuration" operation="set" value="5"/>
<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".buffEnragedDuration" operation="add" value="1"/>
<requirement name="ProgressionLevel" progression_name="perkPummelPete" operation="Equals" value="1"/>
</triggered_effect>
<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".buffEnragedDuration" operation="add" value="2"/>
<requirement name="ProgressionLevel" progression_name="perkPummelPete" operation="Equals" value="2"/>
</triggered_effect>
<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".buffEnragedDuration" operation="add" value="3"/>
<requirement name="ProgressionLevel" progression_name="perkPummelPete" operation="Equals" value="3"/>
</triggered_effect>
<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".buffEnragedDuration" operation="add" value="4"/>
<requirement name="ProgressionLevel" progression_name="perkPummelPete" operation="Equals" value="4"/>
</triggered_effect>
<triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar=".buffEnragedDuration" operation="add" value="5"/>
<requirement name="ProgressionLevel" progression_name="perkPummelPete" operation="Equals" value="5"/>
</triggered_effect>
</effect_group>
Last edited by a moderator: