NPC buff returning after being replaced by a skill of the same Stacktype

Coffee

Heir
Customer
1 - NPC BUFF
Npc Buff.webp


2 - Player Skill
Pa'agrio.webp


3 - After Duration Ends .
Exxx.webpRenew.webp





How can I stop the NPC buff from reappearing? In the first image, the NPC uses a buff skill with a duration of 2 hours. If a player uses a skill of the same Stacktype, it replaces the NPC buff. However, when the replacement skill's duration ends, the original NPC buff returns automatically. I would like the NPC buff to expire completely instead of coming back. How can I prevent it from returning?
 
i think there is a config such as: cancel lesser effects
giving the option to "hide behind" or completely replace the lower or same stacktype

but now i can't find it either o_O
 
Still looking for it, not found

well,,, there is a slightly small chance that i was mistaken and confused this with another datapack :rolleyes:
but after you posted about lesser effects, i did some tests of my own and found out that:

this also applies to debuffs....->same stacktype debuffs "hide" each-other
and after the one effect is 0 (end), then the "lesser" debuff (the one that was "hiden") comes back and continues take effect and count till 0
although there is only a handfull of skills that i encountered this and from mobs/raids only.

i am NOT talking about Player buffs/debuffs. i talk about Monster/Raid specific debuffs.
and the outcome is the same as the picture in your post.
i will continue search if i can find more regarding this issue.
if more to be found, then deazer should add this type of config to cancel completely the lesser effect.
(maybe it is already here and i am blind :D )
 
well,,, there is a slightly small chance that i was mistaken and confused this with another datapack :rolleyes:
but after you posted about lesser effects, i did some tests of my own and found out that:

this also applies to debuffs....->same stacktype debuffs "hide" each-other
and after the one effect is 0 (end), then the "lesser" debuff (the one that was "hiden") comes back and continues take effect and count till 0
although there is only a handfull of skills that i encountered this and from mobs/raids only.

i am NOT talking about Player buffs/debuffs. i talk about Monster/Raid specific debuffs.
and the outcome is the same as the picture in your post.
i will continue search if i can find more regarding this issue.
if more to be found, then deazer should add this type of config to cancel completely the lesser effect.
(maybe it is already here and i am blind :D )
Did you find a solution?
 
@Deazer Can we have this please?
I didn't quite understand the problem, what you want. Buffs for players and NPCs are mechanically no different. A buff with a longer duration, and if it's the same Stacktype, will take priority.
I don't understand who returns what to where. Can you explain in more detail - in simple terms, the more unnecessary information there is, the harder it is for me to understand the problem. Just tell me what the problem is, don't go into a lot of unnecessary details.
What is returned, from where it is returned... What does the player have to do with it, all I need to know is that.
 
Well, @Deazer , in Interlude, some skills are returning after the buffs or debuffer effect ends.

For example: When Surrender To Fire successfully hits the opponent, the Resist Fire skill should go off, which is normal. But when Surrender To Fire's effect ends, the Resist Fire skill returns, which shouldn't happen.

I managed to fix this issue in my review, but other members aren't having the same luck.

I just changed a few lines in the skill structure, and it worked fine
 
1 - NPC BUFF


2 - Player Skill


3 - After Duration Ends .





How can I stop the NPC buff from reappearing? In the first image, the NPC uses a buff skill with a duration of 2 hours. If a player uses a skill of the same Stacktype, it replaces the NPC buff. However, when the replacement skill's duration ends, the original NPC buff returns automatically. I would like the NPC buff to expire completely instead of coming back. How can I prevent it from returning?
Do you use buffs with different durations? It’s kind of strange that you want the player to lose the buff of NPC if they receive a buff from another player.
 
This method explicitly removes the NPC buff by stack type before applying the new one.
XML:
<for>
    <!-- 1) Remove any existing NPC buff on this stack -->
    <effect count="1" name="DispelEffects" time="0" val="0">
        <!-- Use a dispelType supported by your handler -->
        <def name="dispelType" val="buff"/>
        <def name="cancelRate" val="100"/>
        <def name="negateCount" val="99"/>
        <!-- If your handler supports filtering by stack, target the specific stack: -->
        <def name="stackType" val="hp_up"/>        <!-- same as the NPC buff -->
        <!-- or (in some forks): <def name="abnormalType" val="hp_up"/> -->
    </effect>

    <!-- 2) Apply the new player buff on the same stack -->
    <effect count="1" name="Buff" time="7200" val="0" stackType="hp_up" stackOrder="#stack">
        <mul order="0x50" stat="maxHp" val="1.10"/>
    </effect>
</for>
If your DispelEffects handler doesn’t support stackType or abnormalType filtering,
keep dispelType="buff" and lower negateCount (e.g. 1–2) so it doesn’t wipe other buffs.

Alternative, Precise removal using negateSkill (at skill level)
Code:
<set name="negateSkill" val="12345"/>  <!-- NPC buff skill ID -->
<set name="negatePower" val="999"/>
Then keep only your Buff inside <for> (as above).
This directly removes that specific NPC buff before applying the new one.

Maybe This pattern ensures that the old effect is completely removed before the new one is applied,
so when the new buff expires, there’s no suspended NPC buff left to resume.
 
Last edited:
I didn't quite understand the problem, what you want. Buffs for players and NPCs are mechanically no different. A buff with a longer duration, and if it's the same Stacktype, will take priority.
I don't understand who returns what to where. Can you explain in more detail - in simple terms, the more unnecessary information there is, the harder it is for me to understand the problem. Just tell me what the problem is, don't go into a lot of unnecessary details.
What is returned, from where it is returned... What does the player have to do with it, all I need to know is that.
When two buffs have the same StackType, the new one replaces the old one , But when the new buff ends, the old NPC buff comes back automatically.
NOW ! I WANT THE OLD BUFF TO NOT REETURN AFTER BEING REPLACED .
not just Buffs also debuffs ...
 
When two buffs have the same StackType, the new one replaces the old one , But when the new buff ends, the old NPC buff comes back automatically.
NOW ! I WANT THE OLD BUFF TO NOT REETURN AFTER BEING REPLACED .
not just Buffs also debuffs ...
Hey friend, I have a tip that initially solved my problem and I think it will solve yours too.

I'll give the example of Surrender to Fire: The correct way for this skill to work is that when it successfully hits, the Resist Fire skill is canceled and doesn't return. However, after the surrender is complete, the Resist Fire skill returns.

What I did was change the skill's effect as shown in the example below. What really affects it is negateStackTypes, meaning you'll have to get the stackType of the skill you want to prevent from returning and apply it to the skill's effect. It was the only valid solution I found to solve the problem.

<effect count="1" name="DispelEffects" time="15" val="0">
<def name="dispelType" val="bane"/>
<def name="negateCount" val="1"/>
<def name="negateStackTypes" val="FireAtr"/>
<sub order="0x40" stat="defenceFire" val="30"/>
<add order="0x40" stat="defenceWater" val="15"/>
</effect>


Another way that I think might work is to use the <set name="negateSkill" val="ID SKILL"/> tag. Since you're dealing with buffs, I think this will be the most acceptable. Just place this tag in the skill structure and define the skill ID, which will be canceled when used.
 
this is a simple function that exists in almost all L2J.
I also think it's valid and would be cool to have a tag like <set name="returnAfterDebuffEnds" val="true"/> at least for debuffs, as it would solve the problem in the simplest way lol
 
When two buffs have the same StackType, the new one replaces the old one , But when the new buff ends, the old NPC buff comes back automatically.
NOW ! I WANT THE OLD BUFF TO NOT REETURN AFTER BEING REPLACED .
not just Buffs also debuffs ...
Chill, man, I will start on Monday.
 
1 - NPC BUFF


2 - Player Skill


3 - After Duration Ends .





How can I stop the NPC buff from reappearing? In the first image, the NPC uses a buff skill with a duration of 2 hours. If a player uses a skill of the same Stacktype, it replaces the NPC buff. However, when the replacement skill's duration ends, the original NPC buff returns automatically. I would like the NPC buff to expire completely instead of coming back. How can I prevent it from returning?
Fixed, committed
 
Back
Top