• Mods are now organized as resources. Use the Mods link above to browse for or submit a mod, tool, or prefab.

    The TFP Official Modding Forum Policy establishes the rules and guidelines for mod creators and mod users.

Help - Flame buff wont stop

I have a buff that wehn it sets a player or zombie on fire there is no way to put it out, which obvisly i dont want to happen. can someone see where im going wrong.

XML:
<AMG5TAG>
    <append xpath="buffs">
<!-- FLAME TRAP -->       
        <buff name="buffFlameTrap" hidden="true">
            <damage_type value="heat"/>
            <stack_type value="replace"/>
            <duration value="0"/>
            
            <effect_group>
                <requirement name="CVarCompare" cvar="$buffBurningElementDuration" operation="LTE" value="10"/>
                    <triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="$buffBurningElementDuration" operation="set" value="10"/>
                    <triggered_effect trigger="onSelfBuffStack" action="ModifyCVar" cvar="$buffBurningElementDuration" operation="set" value="10"/>
            </effect_group>
            
            <effect_group>
                <passive_effect name="BuffBlink" operation="base_set" value="2" duration="0,3" tags="buffBurningElement"/>

                <triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="$buffBurningElementDuration" operation="add" value="-1"/>
                <triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" buff="buffBurningElement">
                    <requirement name="CVarCompare" cvar="$buffBurningElementDuration" operation="LTE" value="0"/>
                </triggered_effect>
                <triggered_effect trigger="onSelfBuffRemove" action="RemoveCVar" cvar="$buffBurningElementDuration"/>
            </effect_group>

            <effect_group>
                <triggered_effect trigger="onSelfBuffStart" action="AddBuff" buff="buffIsOnFire"/>

                <passive_effect name="HealthChangeOT" operation="base_subtract" value="10"/>
                <passive_effect name="WaterChangeOT" operation="base_subtract" value="2"/>
                <passive_effect name="HyperthermalResist" operation="base_add" value="30"/>
                <passive_effect name="HypothermalResist" operation="base_add" value="-10"/>
            </effect_group>
        </buff>
    </append>
</AMG5TAG>
 
Side Quiestion: When im testing my mods i use a Nazegane map and i load the game, test, make changes i need, transfer changes to mods folder. But now do i have to completely exit the game to see the changes or can i just go back to the main menu and load the save.
 
This is an "At first glance" comment as I'm in a rush to go somewhere so may not be accurate but could give ideas to look at.

I see the buff is called "buffFlameTrap" with a duration of 0 (never ending). so assume you have a block with "BuffsWhenWalkedOn" to apply it. in the buff you add another buff "buffIsOnFire" and remove a buff "buffBurningElement" but I don't see anywhere that removes the actual buff "buffFlameTrap" and it is what actually is doing the damage.

without studying too much, you could add another triggered_effect same as you did to remove the "buffBurningElement" but tell it to remove itself "buffFlameTrap" or I think you could add it to the first triggered effect so it removes both with the same trigger (but would have to test to see if that works) e.g. buff="buffBurningElement,buffFlameTrap"

or give the buff duration of 10 if it resets the timer each time its replaced.
 
If you just make some xml changes, reloading the save is enough. If editing localization, you want to copy it over to your Mods folder either before launching the game, or while still in a save before exiting to menu as that's when the game updates it. It's a bit backwards to normal xml. Only time a full game restart is needed is for custom asset changes or dll changes, or if you add icons.

When doing a lot of testing, what I do is load into the POI editor and make a real small POI and playtest it. Then after that you can load it from the Continue Game page. It will load a bit faster than loading a full map like Nav.
 
This is an "At first glance" comment as I'm in a rush to go somewhere so may not be accurate but could give ideas to look at.

I see the buff is called "buffFlameTrap" with a duration of 0 (never ending). so assume you have a block with "BuffsWhenWalkedOn" to apply it. in the buff you add another buff "buffIsOnFire" and remove a buff "buffBurningElement" but I don't see anywhere that removes the actual buff "buffFlameTrap" and it is what actually is doing the damage.

without studying too much, you could add another triggered_effect same as you did to remove the "buffBurningElement" but tell it to remove itself "buffFlameTrap" or I think you could add it to the first triggered effect so it removes both with the same trigger (but would have to test to see if that works) e.g. buff="buffBurningElement,buffFlameTrap"

or give the buff duration of 10 if it resets the timer each time its replaced.
Worked a treat thanks.
 
Back
Top