/////buffs.xml code//////
<append xpath="/buffs">
<!--buff is hidden from player and doesn't drop on death
Tracks the player level for specific milestones (5 and 10 in the example)-->
<buff name="buffPlayerLevelTracker" hidden="true" remove_on_death="false">
<stack_type value="ignore"/>
<duration value="0"/>
<effect_group>
<!--if player level ==5 AND not already given additional point for level 5-->
<requirement name="PlayerLevel" operation="Equals" value="5"/>
<!--The var LevelFivePointGiven will initialise to 0 - dont have to define or initialise it, just use it-->
<requirement name="CVarCompare" cvar="LevelFivePointGiven" operation="LTE" value="0"/>
<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="LevelFivePointGiven" operation="set" value="1"/>
<triggered_effect trigger="onSelfBuffUpdate" action="CallGameEvent" event="example_give_skillpoint"/>
<triggered_effect trigger="onSelfBuffUpdate" action="ShowToolbeltMessage" message="Level Five: Free Skill Point!"/>
</effect_group>
<!--repeat the above code but change the level number-->
<effect_group>
<!--player level==10 AND not already given additional point for level 10 -->
<requirement name="PlayerLevel" operation="Equals" value="10"/>
<requirement name="CVarCompare" cvar="LevelTenPointGiven" operation="LTE" value="0"/>
<triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="LevelTenPointGiven" operation="set" value="1"/>
<triggered_effect trigger="onSelfBuffUpdate" action="CallGameEvent" event="example_give_skillpoint"/>
<triggered_effect trigger="onSelfBuffUpdate" action="ShowToolbeltMessage" message="Level Ten: Free Skill Point!"/>
</effect_group>
</buff>
</append>
<!--This will add the buffPlayerLevelTracker buff to the system by adding a line to the default buff buffStatusCheck01.
When the player enters the game it adds the buff if it doesnt already exist-->
<append xpath="/buffs/buff[@name='buffStatusCheck01']">
<effect_group>
<requirement name="!HasBuff" buff="buffPlayerLevelTracker"/>
<triggered_effect trigger="onSelfEnteredGame" action="AddBuff" buff="buffPlayerLevelTracker"/>
</effect_group>
</append>
/////END buffs.xml code//////
//////gameevents.xml code //////
<!--give a skill point to player -->
<action_sequence name="example_give_skillpoint">
<action class="AddSkillPoints">
<property name="skill_points" value="1" />
</action>
<!--see gameevents.xml for other sounds-->
<action class="PlaySound">
<property name="sound" value="quest_restore_power_complete" />
</action>
</action_sequence>
//////END gameevents.xml code //////