Feedback request: DotSpellHandler

Discussions on various DOL development features

Moderator: Support Team

Feedback request: DotSpellHandler

Postby Xanxicar » Sun Apr 16, 2017 9:39 am

During my work on CL abilities i noticed some incorrect behaviour of DOT stacking and found that the algorithm responsible was this method from DoTSpellHandler.cs: DoTSpellHandler.IsOverwritable()
Code: Select all
/// <summary> /// Determines wether this spell is compatible with given spell /// and therefore overwritable by better versions /// spells that are overwritable cannot stack /// </summary> /// <param name="compare"></param> /// <returns></returns> public override bool IsOverwritable(GameSpellEffect compare) { return Spell.SpellType == compare.Spell.SpellType && Spell.DamageType == compare.Spell.DamageType && SpellLine.IsBaseLine == compare.SpellHandler.SpellLine.IsBaseLine; }
Now this logic would suggest that any DOT of a different damage type is stackable and that would lead to some absurd combinations. Further it would mean that CL DOTs would never stack with any Spec DOT which is just not how it's supposed to work these days.

Testing on the live server came up with groups of DOTs wich will stack with each other but overwrite members of the same group:

group 1)
Sorceress Base Dot // Cabalist Base Dot // Champ Single Dot (Mid/Hib) // Bonedancer Base Dot // Shaman Base Dot // Mentalist Base Dot //
Item Charges n Procs

group 2)
Sorceress Spec Dot // Cabalist Spec Dot // Bonedancer Spec Dot // Mentalist Spec Dot

group 3)
Wizard Spec Dot // Shaman Spec Dot // Warlock Spec Dot // Druid Base Dot // Shadowblade Nightshade Infiltrator Poison

group 4)
Necro Spec Dot // Champ Ae Dot // Champ Single Dot (Alb)

group 5)
Essence Dot

group 6)
Bleed Effects


As you can see some groups contain different damage types and other irregularities such as Champ Single DOT (Alb) being in a completely different group than it's Hib/Mid counterparts. The test therefore entirely invalidates the current logic for DOT stacking.

I am aware that the naming and encapsulation of the logic is a bit irritating in the current Rev. the method should be renamed to HasEffect() as Tolakram suggested in a different post. Some reencapsulation might be in order in the code surrounding the call. The logic i would have expected from IsOverwritable() is something entirely different and depending on feedback may end up handling the question if a player can actually overwrite another player's/GameLiving's DOTs if it already has that same effect. The desire to stick to the design of the parent class as close as possible could make this a difficult consideration.

Now, i have a proposed code change that is actually working fine to the extend that i expect it to but i would like to ask for feedback on some issues:

Code: Select all
public override bool IsOverwritable(GameSpellEffect compare) { // If the spell to compare is not a DOT we don't overwrite it if (compare.Spell.SpellType != this.Spell.SpellType) return false; // Always allow DOT overwriting if EffectGroup is not defined explicitly in the Database if (compare.Spell.EffectGroup <= 0 || this.Spell.EffectGroup <= 0) return true; // DOTs of different EffectGroup can stack. Same group can be overwritten. return compare.Spell.EffectGroup == this.Spell.EffectGroup; }
1) If you have additional test results on stacking groups please let us all know !

3) I have read unsubstantiated claims on the net that DOTs can only be overwritten by their owners and will get resisted if the target already has the same effect from a different source. Can anyone provide tests and insight into that ?

2) If you have any other mechanical information about DOTs and DOT stacking be my guest.

3) You might think this could be modelled testing the spells assoctiated spellLine instead of using the EffectGroup but two things prevent that. CL single and AE DOTs are in the same spellLine but split up into different stacking groups. Mobs and NPCs might not even have an associated spellLine for their spells.

4) While i think this logic gives us the finest possible control over DOT stacking it also comes with the caveat of breaking a servers DOT stacking completely until all DOTs define an EffectGroup value. Is that asking too much of the server admins ? We plan on releasing the respective data sets with a future public database but some server owners probably won't be able to do it themselves. Should i wait on committing code changes until the Public DB is ready to support it ?
Xanxicar
Developer
 
Posts: 4
Joined: Mon Apr 10, 2017 11:08 pm

Re: Feedback request: DotSpellHandler

Postby ontheDOL » Sun Apr 16, 2017 2:14 pm

i think using the effect group is a good way to check dot stacking/overwriting.

as far as realm mates overwriting someone elses effect, a quick test on pendragon with 2 cabbies, one with no int and one with capped int ( to ensure his spell is stronger) and cast on a mob. vs Player could be different logic too.

What i have done in the past as to not break old DB's with new logic is add a server property, which when true will point to the new logic. That way the user can turn it on or off depending on their DB / preference.

ie :
Code: Select all
public override bool IsOverwritable(GameSpellEffect compare) { if (Properties.USE_NEW_DOT_HANDLING) { // If the spell to compare is not a DOT we don't overwrite it if (compare.Spell.SpellType != this.Spell.SpellType) return false;
or somethen like that. Have the old logic outside of the first if clause
- Unty -
Model Showroom and DOL guides
http://losojos-001-site1.btempurl.com
User avatar
ontheDOL
Developer
 
Posts: 311
Joined: Fri May 20, 2016 4:21 am
Location: Australian abroad

Re: Feedback request: DotSpellHandler

Postby Graveen » Mon Apr 17, 2017 9:02 am

On the other side, considering a null/empty EffectGroup is equal to 1 won't break anything i think.

In all cases, as long as you stay in the spellhandler own override, i have no trouble with really targetted code ;)

edit: yes it seems a good thing to have this distinction over different types of DOT !
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: Feedback request: DotSpellHandler

Postby Xanxicar » Mon Apr 17, 2017 9:36 am

Good point OnTheDOL,

do we know though if the current behaviour was ever used on live servers ?
And if so, which patch changed it ?
I wouldn't want to explicitly support a game mechanic if it never existed. Adding a server property would imply that it was valid at some point.

I am hesitant to switch out the logic inside the method. I would rather switch out the entire method either at runtime or at compile time. I have been wishing for a TargetPatchLevel server property since i started looking into DOL. I can probably implement patch level dependent method compilation using attributes over methods. Might as well start with this one, i just didnt expect the current behaviour could have been correct at some point.

I was thinking about adding a unit test and printing a warning message to the console if any spells of the type "DamageOverTime" have a non positive value. I'll probably have to include a link to the final test results as well or admins won't know how to set the EffectGroups.


@Graveen
with int being a value type the .NET framework will always evaluate NULL as 0. So we got that covered.
Xanxicar
Developer
 
Posts: 4
Joined: Mon Apr 10, 2017 11:08 pm

Re: Feedback request: DotSpellHandler

Postby ontheDOL » Mon Apr 17, 2017 2:55 pm

sorry i shoulda used USE_CORRECT_DOT_HANDLER or something in my example.
I meant to imply "NEW" simply as a new mechanic (correct mechanic ;) ) so people know of a change and can apply it when DB support it :)

Im pretty sure the mechanic you suggest is how it was from the start daoc, i dont think it was changed to the DOL current implementation
- Unty -
Model Showroom and DOL guides
http://losojos-001-site1.btempurl.com
User avatar
ontheDOL
Developer
 
Posts: 311
Joined: Fri May 20, 2016 4:21 am
Location: Australian abroad

Re: Feedback request: DotSpellHandler

Postby Leodagan » Wed Apr 19, 2017 9:37 am

Did you test all those DoT group on official server ?

I'm not surprised the mechanics is way different than Live, at some point in the previous stage of DAOC where DoT were not as widely used as now it may have been true...

Long time ago there was mostly 2 categories, 5-ticks DoT were baseline and could not stack, 6-ticks DoT were specline and could stack with baseline but not with specline...

With upcoming item-DoT, Pet-based DoT (Enchanter Zealot with a DoT that interrupt each ticks...), newer classes with DoT and Champion Level and Master Level, this could not be that simple :)

And lastly they even revamped classes like Warlock that now have a spec dedicated to ramping Damage over Time, and most other DoT classes received spells that increase in damage and duration depending on Spec Level and not only Damage anymore !

I think even Coop Server / PvP Server may have moved from a previous basic logic to allow more diversity in the DoT stacking, but it obviously needs some limit to prevent stacking a horrible amount of DoT at once on one target !


I think EffectGroup is the way to go, the groups are clearly specific if we want to mimic the Live server behavior, even if there is some groups that feel erroneous like the CL DoT Hib/Mid being in the "base DoT" group, and Having Alb DoT spread over 4 groups !

Maybe this was done for some reason to balance things, I wonder how player can understand which DoT stacks or not, it could also be errors from the developers that didn't bring each spells in the wanted stack group...
Last edited by Leodagan on Wed Apr 19, 2017 1:42 pm, edited 1 time in total.
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Feedback request: DotSpellHandler

Postby PlanarChaosRvrtwo » Wed Apr 19, 2017 11:12 am

I tested all those Dots on Live server with an friend and gaved Xanxicar that list (couse we both work together).
The logic why the Dots stack this way (like druid dot) is older then the rule with the cl spells and those you can check in very old char planners like 1.92 (around that state). I found that out after the test.

But while testing we found out each realm have the 4 grps of dots (we tested on Pendragon and on Gaheris) but we wondered why alb and hib/mid cl dots are stacking but after a while we noticed Alb have an class that do an stronger grp 4 Aedot so we had the idea that mythic developers thougt if you have an necro in grp you have the strongest grp 4 aedot so on other hand you need an real basedot class to have all 4 dots and cant fix the hole with a class that have both cl dots as an balance decide. And ofc on CO-OP Servers the stacking CL dots dont make a diffrence couse its PvE server.
DOL dint only gaved me the data to start my server,
it also gaved me 16 amazing years with nice peeps,
and now its on me to return the favor.
User avatar
PlanarChaosRvrtwo
Database Team
 
Posts: 517
Joined: Thu Jul 07, 2016 6:21 am

Re: Feedback request: DotSpellHandler

Postby Leodagan » Wed Apr 19, 2017 2:08 pm

Thanks for your experiments PlanarChaos (and Xanxicar obviously)

Do you mean CO-OP servers stack DoT differently ? (or the collision are on purpose there to prevent a sorc + menta + Shaman from rampaging through PvE ?)
4) While i think this logic gives us the finest possible control over DOT stacking it also comes with the caveat of breaking a servers DOT stacking completely until all DOTs define an EffectGroup value. Is that asking too much of the server admins ? We plan on releasing the respective data sets with a future public database but some server owners probably won't be able to do it themselves. Should i wait on committing code changes until the Public DB is ready to support it ?
For me there is still "one rule above all" to EffectGroup now that I read your question, DoT that are the in the same Spell Collection (not spellLine, but being the same spell upgraded through leveling) should not stack, but they should overwrite themselves...

I don't think lower damage DoT should resist when the effect already exists, I clearly remember having problem in RvR when more than one DoT user was in group (yeah DoT are still a bad tool in RvR but sometime you must resolve to try something when facing a resilient opponent), if your DoT is only in a low-tier additional spec you're going to rewrite effect from a full spec DoT user !

The logic for me is easy : Longer Duration overwrite Shorter Duration, this is the case for a lot of effects (timed buffs), and it make sense in case you're ready to sacrifice effectiveness for a longer duration buff/debuff

That bring the question on stat debuff as well, I don't think you can stack stat debuff effectively, it could rip off completely a character stat value, I don't know how this is handled between different source of debuff ? Do we have to use EffectGroup to allow stat debuff to match correctly ? I'm pretty sure resists debuff are just using the resist type to prevent stacking... (do they stack with DD+Debuff effect ?)

Well for now we mostly have to use database to match EffectGroup or even SpellGroup for hybrid line when we handle the "same spell" that just get a newer version with leveling, I wonder if there shouldn't be a hidden "Sub-SpellLine" property to match spell of the same group, this is getting more and more relevant because we have absolutely no natural way of sorting spell like that without database input... (there is a fallback for hybrid spell that will try to sort spell using SpellType, Target, CastTime, this was meant to take apart Low-Heal, Heavy-Heal, Group-Heal and Instant-Heal into their own line, but it fail most of the time without a SpellGroup)
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Feedback request: DotSpellHandler

Postby PlanarChaosRvrtwo » Fri Apr 21, 2017 5:34 am

Thanks for your experiments PlanarChaos (and Xanxicar obviously)

Do you mean CO-OP servers stack DoT differently ? (or the collision are on purpose there to prevent a sorc + menta + Shaman from rampaging through PvE ?)
....
To your first question i allready answered "we tested on Pendragon and on Gaheris".

Besides of the grp rule the "general stack and overwrite rule" apply :
Higher value overwrite lower value fails and return message:
Target allready have this effect.
That mean if you have 2 shamans in grp and both use base dot and one is subterrean spec and one augmention spec the cave shaman base dot overwrite couse the damage variances is lower and the effective damage is bigger so the rule apply "Higher effect overwrite lower"
the example you posted were true till patch 1.94.

Lower duration and higher duration is not part of the overwrite rule only effectivly DPS that means an duration 10 seconds dot and an damage 20 dot and an duration 20 seconds and damage 10 dot would be exactly the same spell (if same effectgroup).
But if one of both players have 1 acuity on gear and the other is naked the one with 1 acuity would overwrite the other.

Debuffs cant be stacked only one spell with given effect can be active but highest allways overwrite that mean you can debuff Str/con str and str/dex but more str debuffs cant be active.
(only procs stack to other debuffs of same type)
And on other hand no matter how good the debuffs are and no matter how much debuffs active the debuff the rule is:
Base stat x 1,5 (of the target) = max debuff value

And last question all spells of same type no matter what level in spell line share effect grp. (like you said the same spell in higher version like blue and yellow shaman aedot.)

And the idea of hidden "Sub-SpellLine" would be theorethical an good idea but not logical couse with next patch some of the shaman spec dots get changed and get an another grp so change it on each single spell would be way better.
This is an general issue on DOL that at one point someone want try to add an way that is correctly for the moment but create the issue at later point where you have to do hard work to split things couse 30% of things affected are now diffrent rest stay the same.

So we should really go far away from the come on lets do an grp behavior couse its easier atm mentality couse it creates more work over time.
DOL dint only gaved me the data to start my server,
it also gaved me 16 amazing years with nice peeps,
and now its on me to return the favor.
User avatar
PlanarChaosRvrtwo
Database Team
 
Posts: 517
Joined: Thu Jul 07, 2016 6:21 am

Re: Feedback request: DotSpellHandler

Postby Leodagan » Fri Apr 21, 2017 7:58 pm

Just a quick reply about debuff :

Champion's Debuff (Hib Fighter Class) are specific, I tested it on live some time ago, they debuff for much more than other regular Caster Debuff !

DOL Also implement these as being "Spec Debuff" instead of "Base Debuff"
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Feedback request: DotSpellHandler

Postby PlanarChaosRvrtwo » Fri Apr 21, 2017 10:22 pm

That is not correct Leodagan couse on that patch state is important couse champ debuffs were changed 5 times due to balancing on some times champ debuffs were nearly useless at other times champ had the best debuffs in game (around patch 1.112)
DOL dint only gaved me the data to start my server,
it also gaved me 16 amazing years with nice peeps,
and now its on me to return the favor.
User avatar
PlanarChaosRvrtwo
Database Team
 
Posts: 517
Joined: Thu Jul 07, 2016 6:21 am

Re: Feedback request: DotSpellHandler

Postby Sand » Mon Nov 06, 2017 5:05 pm

I always thought it was spec versus base with regards to spell dots with possible exception. Bleeds of course were a different spell type so would be a different grouping and stacked with standard dots. Essence dots I believe then were another dot type and maybe added another with champ level and later reworked their groupings.

As someone who played cave Shaman, nature Druid, and matter Cabalist wwho often grouped with someone whose main was a matter cabalist, I didn't think my shaman/druid dot would stack with both of Cabby's dots.

I can see that moving the druid dot from spec to baseline as was done at some point, may have changed its stacking behavior but what I remember guideline on stacking was whether it was a base buff or spec buff. I don't think it was 100% though as do feel like one class or two it was the opposite. Mind you I never did thorough testing of this so could be mistaken, just what I remember.
Sand
Server Team
 
Posts: 1375
Joined: Sat May 17, 2008 2:05 am


Return to “%s” DOL Development Discussion

Who is online

Users browsing this forum: No registered users and 1 guest