Jump to content

Edit History

Please note that revisions older than 365 days are pruned and will no longer show here
khzmusik

khzmusik

In the comments of the buffs.xml file, there are both "onSelfOpenLootContainer" and "onSelfLootContainer" triggered effects. I have never used either, but I'm guessing that the former is triggered when the loot container is opened. I'm also guessing the latter is triggered either when the loot container is closed, or when the player removes all the items from the loot container.

 

If I'm right, you could write a buff like this, and add it to the player when they spawn or respawn:

 

<buff name="buffGodModeWhenInContainer" name_key="buffGodModeName" description_key="buffGodModeDesc" tooltip_key="buffGodModeTooltip" icon="ui_game_symbol_add" icon_color="132,0,155">
    <stack_type value="ignore" />
    <display_value_key value="buffGodModeNameShort" />
    <display_value value="xxx" />

    <effect_group>
        <triggered_effect trigger="onSelfOpenLootContainer" action="AddBuff" buff="god" />
        <triggered_effect trigger="onSelfLootContainer" action="RemoveBuff" buff="god" />
    </effect_group>
</buff>

 

(As you might tell, I based it off of the vanilla "god mode" buff.)

 

That's just a suggestion, but it should hopefully be enough to point you in the right direction.

 

Also, a caveat: Those triggered effects are not actually used in any vanilla buffs. The comments don't have the "hook up" phrase that means they still have to be hooked up, so I assume they're hooked up and working, and just unused. But that is my assumption. You'll have to try it yourself.

 

EDIT: Also, if "onSelfLootContainer" is not fired when the container is closed, then you will have to figure out some other way to remove the "god" buff (or its effects). Maybe make the "update_rate" value be "2" (seconds) and have the "god" buff removed "onSelfBuffUpdate". 

khzmusik

khzmusik

In the comments of the buffs.xml file, there are both "onSelfOpenLootContainer" and "onSelfLootContainer" triggered effects. I have never used either, but I'm guessing that the former is triggered when the loot container is opened. I'm also guessing the latter is triggered either when the loot container is closed, or when the player removes all the items from the loot container.

 

If I'm right, you could write a buff like this, and add it to the player when they spawn or respawn:

 

<buff name="buffGodModeWhenInContainer" name_key="buffGodModeName" description_key="buffGodModeDesc" tooltip_key="buffGodModeTooltip" icon="ui_game_symbol_add" icon_color="132,0,155">
    <stack_type value="ignore" />
    <display_value_key value="buffGodModeNameShort" />
    <display_value value="xxx" />

    <effect_group>
        <triggered_effect trigger="onSelfOpenLootContainer" action="AddBuff" buff="god" />
        <triggered_effect trigger="onSelfLootContainer" action="RemoveBuff" buff="god" />
    </effect_group>
</buff>

 

(As you might tell, I based it off of the vanilla "god mode" buff.)

 

That's just a suggestion, but it should hopefully be enough to point you in the right direction.

 

Also, a caveat: Those triggered effects are not actually used in any vanilla buffs. The comments don't have the "hook up" phrase that means they still have to be hooked up, so I assume they're hooked up and working, and just unused. But that is my assumption. You'll have to try it yourself.

×
×
  • Create New...