dfherr / libthreatclassic2 Goto Github PK
View Code? Open in Web Editor NEWA library for multi-target threat tracking in WoW Classic. Successor of ThreatClassic-1.0
License: GNU Lesser General Public License v2.1
A library for multi-target threat tracking in WoW Classic. Successor of ThreatClassic-1.0
License: GNU Lesser General Public License v2.1
This is probably a niche issue, as it's likely not having an impact on the end-game raiding, but I am playing with a group that consists of 2 shamans (one of which is tanking) a Shadow Priest (with Vampiric embrace), and a a warlock. The tank, priest, and warlock are all using a threat meter based on this threat library.
We are finding that the shadow Priest threat is not aligning with when they pull aggro from the tank. The priest will pull aggro in longer fights with much less threat caused than the tank. We believe the threat caused by the healing from Vampiric Embrace (either from shadow damage caused by the Warlock, the priest, or both) is not being properly applied to the Priest. We think this results in the Priest pulling aggro even when it appears they have much less threat caused than the tank.
This is something we have just noticed recently, so I dont have any saved logs yet. I can start trying to save our logs as we continue to play and possibly run some tests if that might be helpful. Just wanted to bring this to your attention if it was something that was unknown until now.
if (minor and minor => MINOR) then return end
if (minor and minor >= MINOR) then return end
Cleave has values for threat, but appears to never be called.
No function for cleave appears to exist.
cleave = {
[845] = 10,
[7369] = 40,
[11608] = 60,
[11609] = 70,
[20569] = 100
Hi,
When analyzing computed threat variation between:
Note that according to this screenshoot Enden should have lost Agro. He does not.
On the following log:
https://classic.warcraftlogs.com/reports/4Wr78kgCQNcVdhLR#fight=4&type=summary
We got for our tank "Enden":
As you can see there quite a huge difference between the two static analyses and LibThreatClassic2.
It seems that there is around a 18k threat variation on the same timepoint.
Note that the threat values of both Genese and Aeranda are quite close in LibThreatClassic2 and http://82.130.21.56/threat.
Enden is using a Thunderfury and AFAIK he is playing on a French wow client.
Thanks.
I tried to taunt Broodlord Lashlayer at 1:50 of video, and of course it was resisted because of immunity, but addon shows, that threat was copied from player which had aggro at that moment and my threat immediatly rised from 16k to 20k. It should not be. Of course the boss did not pay attention to it, which means this copy was fake. The same shit happens on Onyxia - taunt copies threat even if resisted and addon shows fake threat.
https://youtu.be/z7DJh6LIsoI?t=109
What spell(s) are affected? Please provide any relevant spell IDs/spell names.
https://classic.wowhead.com/spell=24690/aspect-of-arlokk
ID: 24690
Name: Aspect of Arlokk
If reporting your findings, please describe your methodology. If you've observed behavior that you feel is not in line with current values, please describe it.
Aspect of Arlokk is part of the 'Hard mode' Hakkar fight. It resets the threat on the current target as you can see in the wowhead DB link I just linked. We did several pulls on the PTR and this seem to be consistent, no tank takes melee damage after being affected by Aspect of Arlokk and the boss swaps to another tank (or dps if no tanks are remaining). Current threatmeter does not seem to support it, should be hard-coded to wipe a tanks threat when he is affected by aspect of arlokk.
It is cast every ~30 seconds depending on what other abilities he uses.
Please provide any data you have gathered and/or evidence of any observed behavior below. If pertinent, please provide any sources that may back up your research / observations.
Gave all information above.
Any additional information?
No. Thanks for looking into it!
Wrong calculation of "Improved Power word: Shield" information.
Maximum talent points is 3. Not 5.
Proposed changes:
before: Priest.lua -> Priest:ScanTalents() -> "self.impPWS = 1 + (select(5, GetTalentInfo(1, 5)) * 0.05)"
after: Priest.lua -> Priest:ScanTalents() -> "self.impPWS = 1 + (select(3, GetTalentInfo(1, 5)) * 0.05)"
According to testing performed by AutumnRain#7088 and Femdead from FC discord, this debuff should provide 90 base threat per application. This threat value is before any stance modifiers or threat enhancements/reductions.
Originally posted by @seppurt in dfherr/ThreatClassic2#7 (comment)
Thanks for taking time to answer.
If you check the code, that's actually what what threatPercent = rawThreatPercent / aggroMod does.
I agree with you and this was also my understanding of the code. I tried to test this with a friend, who also had ThreatClassic2 installed and active. But in reality, this is what I experience with your code:
The following things can be seen, which I think are all bugs or unintended behaviors (all of the following was checked from both player's PoV, and the same behavior was seen for both):
The incorrect aggroMod
is being used. It seems to always use 1.3, although it can clearly be seen that both players are in melee range and never step out of melee range from the mob.
Regardless of who is targetOfTarget (=active tank), the person with the highest threatValue
is presented as 100% threatPercent
. You can clearly see this when Seppurt (538) is currently targetOfTarget, but Benist overtakes in threatValue
(541).
Just before Benist overtakes aggro on the mob, the player's threatValue
are Seppurt 538 and Benist 593. The corresponding threatPercentage
are Seppurt 69% and Benist 100%. This is due to the addon thinking that Benist is currently targetOfTarget (=active tank) and that Seppurt's aggroMod
is 1.3. Math: 538 / (593*1.3) = 0.697...
. This is reasonable due to the truncation of threatValue
on line 1665: threatValue = floor(threatValue)
As a final note to the .gif above; Benist overtakes actual aggro on the mob when his threatValue
increases from 593 to 596. This is as expected, since it is at this point where Benist overtakes threatValue
sufficiently to overaggro within melee range. Math: 596 / 538 = 1.107...
(same regarding truncation of threatValue
as explained above).
It calculats everyones threat as a percentage of when they would overaggro the current tank, but keeps the current tank at 100%. If you are at 95% percent in the current implementation, you actually have more threat than the current tank, because you are at 95% to pull aggro and you pull aggro at 110% or 130% threat of the current active tank. 95% of 110% is 104,5% threat of the current tank. This implementation makes sense as it takes into consideration that ranges will pull aggro much later than meeles and correctly orders them in regards to pulling aggro.
I think this sounds very good. If you manage to solve the bug reported in the first section of this comment, and get it to work like you describe here, I think that would be a big step in the right direction!
One more thing: Changing the library (anything inside of libs), even locally, is not a good idea. I highly recommend against doing this. The library is most likely included in multiple addons you have installed (e.g. Details, DBM) and which library with the same version will be loaded is basically random (which isn't a problem, because they are the same version, i.e. equal code). If you increase your version number locally, you're telling other players, they have an outdated version. Do not do this.
I understand the recommendation fully. I searched for all other addons/directories that used this new threat library, and updated them accordingly to all include ThreatClassic2. And modified all instances of LibThreatClassic2.lua. This was done purely for testing purposes on my part. And as I described earlier, modifying threatPercent
to virtually be the same as rawThreatPercent
was my wonky idea of how to bypass the "76% aggro bug", in order to get this working:
Clearly this should be done it a better way, as we are discussing here. Partly due to
Using rawThreatPercent has the downside that the difference in ranges and meeles is not considered when ordering the players in regards to pulling aggro.
To conclude, I think that fixing (what seems to be) either the aggroMod
bug and/or how isTanking
is affecting who is placed as targetOfTarget, meaning set to 100% threatPercent
would be a big step in the right direction!
Please let me know if I have misunderstood something, posted anything wrong in regards to how the code works/should work, or can help out in any way to fix this.
Druid bear form is currently implemented as multiplicative like warrior. This is the line/file in question:
https://github.com/dfherr/LibThreatClassic2/blob/master/ClassModules/Classic/Druid.lua#L119
According to testing by AutumnRain#7088 from the FC discord, it should be additive.
472 crit needed 555 damage to pull
472 crit on feral druid with salv fwiw, so 472*1.1*1.45*0.7=527 or 472*1.1*1.495*0.7=543 to pull threat.
Accounting for the 5 rage from the druid critting as well we need to add in 5*5*1.1*1.45*0.7=27.9 OR 5*5*1.1*1.495*0.7=~28.8 to either one,
so with 1.45 mod we would expect 527+27= 555 to pull, if it was 1.495 we would expect 543+28.8=~572 to pull
We have noticed that some player stays at top of the threat meter (Details/ThreatClassic2) after a knockback from Onyixa.
We are trying to reproduce the issue, so we can share data but at the current state, we think that both Lib's collide. Cause some use both (LibThreatClassic and LibThreatClassic2).
I am posting here based on the issue of Greater Blessing of Kings and possibly other blessings threat meters during fights. The suggested value of one Greater Blessing of Kings cast should be 60 threat (based on the level the spell was learned) per target of the blessing, divided by each enemy in the fight. In practice, the meters seem to not be able to properly track the paladins threat generation based on having aggro when the meter says you are not at the top or even in the top 10.
When testing and in a raid environment, it has been observed that the meters are not accurate, but for what reason. It can occur on single target bosses, so potentially the split threat between enemies is not a factor. The attached image clearly shows a paladin with 1140 threat pull aggro against a 1400 threat ally in melee. Greater Blessing of Kings was cast 10 times on 2 targets for 60 threat per target, multiplied by 1.9 modifier of Righteous Fury, divided by the two enemies. Based on the current understanding of threat generation, this should result in 1140 threat which it shows, but this seems to be inaccurate since the tanking paladin has pulled aggro of the enemies with the lower threat. In the image, multiple threat meters are shown, indicating that it is likely a library issue.
Good reference of this happening are also found in Askalon and Holyfrog paladin raid tanking videos. They currently use a Greater Blessing tracker. The confusing thing about this is that the tracker simply calculates the number of blessing casts and the targets cast on and assumes 60 threat per target and multiplied by 1.9 for Righteous Fury, to result in 114 threat per GBoK target. This is confusing because the tracker clearly shows they are top threat, but the meter does not. I am not certain where this discrepancy comes from.
I plan to do a few more tests to confirm that GBoK should in fact produce 60 threat and if in fact Righteous Fury should multiply the threat by 1.9 modifier. Then maybe additionally if the threat should be multiplied correctly per target.
Updates:
Look Below in comments for details of some of these findings.
provide a threatStatus response similar to the retail API https://wowwiki.fandom.com/wiki/API_UnitThreatSituation
This means threatStatus is determined by the highest status on any target.
This requires a loop over the targets of all party/raid members and their pets to determine if the provided unit is tanking (or in danger of tanking) in any of them.
Here I posted this in the paladin discord, I'll just paste it here
"the more I'm looking at it the more it seems that all RF calculations are wrong on tiny threat
judgment of rightouesness hit for 278 but tiny threat only shows 414 threat which is less than it should be
hitting exorcisms for 587 but showing as 1.4k threat which is way too much
Okay figured it out
It incorrectly has the RF threat modifier at 2.4 and some spells aren't being accounted for
The reason it shows 414 threat from Judgement of Rigtheousness is cause it shows all judgements as having a base threat of 57 (which could be true for the debuffs but likely doesn't apply to JoR), when modified with the incorrect 2.4 that's 136.8 threat, and for some reason tiny threat isn't scaling the threat from JoR with RF and leaving it at it's base threat. So 278 + 136 = 414
60 threat from GBoK x 2.4 = 144
587 damage from Exorcism x 2.4 = 1.4k"
Hi,
during the last few raids I noticed my threat always resets to zero when casting feign death, even when it's resisted (RESISTED shows up on screen). This renders the threat meter unusable until the next feign death goes through.
On checking the source I discovered some code specific to hunters that is supposed to deal with this situation. But it seems that it's not working as intended. I tried to enable the debug mode (via /tc2 debug) and inserted some print()s into the code but no messages show up at all on /reload. Is there anything I can help with to debug this issue?
Currently, the threat modifiers from things like Tranquil Air Totem https://classic.wowhead.com/spell=25909/tranquil-air are not being calculated at all. In the .gif below, it can be seen how a warrior in Battle Stance (0.8 base threat modifier):
Expected math, with Battle Stance and Tranquil Air threat modifiers:
246 + 106 * 0.8 * 0.8 = 313.84
Obviously 331 is not equal to 313.84. More specifically, the threat modifier for the 106 damage attack is (according to the addon's visual presentation):
(331-246) / 0.8 = 106.25
Meaning the threat modifier for the 106 damage attack is only 0.8, which comes from Battle Stance.
Lines 181-186 in ThreatClassModuleCore.lua
show that Tranquil Air (and other things like Salvation etc.) is at least implemented in some capacity, but still does not function correctly:
-- Tranquil Air
[25909] = function(self, action)
if action == "exist" then
self:AddBuffThreatMultiplier(0.8)
end
end,
To add to this, the shaman talent Enhancing Totems (both rank 1 and 2, spell ID's 16259 and 16295 respectively) boosts the threat reduction for Tranquil Air Totem. This is not the case in the code, but is evident in the following sources:
Hence, the addon should be updated to take these talents into account when calculating the AddBuffThreatMultiplier
for Tranquil Air, as posted above.
When tanks (or others) remove Blessings of Salvation by right clicking or macro, or when paladin who owns Blessings of Salvation replace it with other bless, library keeps calculating threat like salvation is still present. Untill combat end, when full recalculation happens, seems.
This happens becouse SPELL_AURA_REMOVED message dosnt always send correct SpellId, and it always send 0 for both blessings of salvations. Thats why addon misses fact of these blessings dissapearing.
This can be solved by catching name of removed buf (which seems always present) and transform it into spellId.
Here is how i tryed to fix this bug for my guild: https://cdn.discordapp.com/attachments/614989515291099148/705372312592973874/A_ThreatFix.zip
I hope this link will work for you. Look into "ThreatClassModuleCore.lua" file.
I understand detail tiny threat was not working on the PTR Monday? Is LibThreatClassic2 going to work with the new threat api Blizzard has enabled in Classic?
Hi, we've had an issue where the secondary tank pulled agro off the bear main tank on Vael early, causing several deaths. But the threatmeters did not indicate that they were close to pulling agro. Since then we've done a few tests and we think the problem is that the thunderfury has bonus threat that is not being counted.
Test setup:
Bear using maul, with threat talent, did 50k worth of threat on a single target.
Warrior then begins to generate threat (mix of shield slam and a few abilities in the rotation). The first trial is done with no thunderfury. In this trial, the warrior pulls threat at almost exactly 10% over the druid's threat count.
The second trial is exactly the same but swaps the thunderfury back in. During this trial the warrior pulled threat at 52.6k threat when the expected agro would have been just over 55k.
These threat estimate numbers are from a private server but the values would account for our test results: https://forum.elysium-project.org/topic/24166-weapon-procs-and-threat/
We did record combatlogs of both tests, as well as some other tests we did. We can upload and/or link those if they are helpful.
Can this be fixed?
Hello,
we found bug that this lib count BOS even if we dont have it buffed.
BOS got overbuffed by another paladin with PallyPower but TinyThreat and also ClassicThreatMeter2 counting still as BOS buffed and doing bad numbers in threat meters and confusion.
Attaching screenshot from BWL 12.4., Main Tank screenshot, Vaelstraz Main tank ofc didnt have BOS on him when battle starts. Sam ething happened 27.4.
When we simulated BOS in threat chart on MT http://82.130.21.56/threat/, threat numbers matched with addon data.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.