gogo1951 / gogowatch Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Need to build in the ability to call out when a player stands in fire.
https://tbc.wowhead.com/spell=25033/lightning-cloud
If you die from a certain ability, GogoWatch should send you a tell... "{rt7} GogoWatch : Hey Friend, you died from [Lightning Cloud]. That's an avoidable mechanic! Consider downloading GTFO, it could help you avoid that next time. https://www.curseforge.com/wow/addons/gtfo"
Should support Died From, and Hit By.
List should be easy to edit and add custom messages to. Like...
Ability ID, Type, Custom Message
This should provide with a grace level, as long as that person is not max level.
This requires proper testing of some one using a technically 'out dated' spell, due to dinging, preferably tested in an instance.
A level 70 casts a low-rank buff on another level 70... they should get an alert.
A level 70 casts a low-rank buff on low-level toon... they should only get an alert if it's not the highest buff they could give that player.
A low-level casts the highest rank buff they have access to on a Level 70... they should not get a warning.
Gets tricky since the observer can die, or the observer and the offender may be in combat or not.
TBD.
In Classic WoW, every spell and ability has a rank, and as Players go up in level they gain access to new ranks of abilities. In almost every case, Players should be using the highest rank ability they can.
Only trouble is, Blizzard doesn't automatically update the action bars as you level. So if you have a Rank 1, but then learn another rank, you have to drop Rank 2 on to where Rank 1 was. This gets especially annoying for abilities that you don't use very often, or on action bars for stances and forms that you don't use very regularly.
GogoWatch is a tool that will monitor the combat log of a party or raid, and send private messages to users who accidentally use incorrect rank abilities.
There used to be an addon called "RankWatch" that did the same thing.
Here's a sample list of ranks for the Priest Spell "Resurrection":
https://classic.wowhead.com/spell=2006/resurrection Rank 1, available at Level 10
https://classic.wowhead.com/spell=2010/resurrection Rank 2, available at Level 22
https://classic.wowhead.com/spell=10880/resurrection Rank 3, available at Level 34
https://classic.wowhead.com/spell=10881/resurrection Rank 4, available at Level 46
https://classic.wowhead.com/spell=20770/resurrection Rank 5, available at Level 58
We'd want to watch the combat log, and every time it saw Resurrection cast make sure the Player casting it was using the correct rank. In the example above, after level 22, a player should be using Rank 2, and not Rank 1.
I had done some proof of concept testing in the past (pre-TBC release), so I'm 99% sure we can do this. But before we get too far along, it's worth verifying that we can pull IDs that represent different ranks of abilities. When I tested in the past, it worked as long as you were the same faction as the person casting.
We'll need to pull a data set of all the spells, and what levels they are available, and extract what level they should be used until. WoWHead has these, but other DBs do too. Importing this data from a common source should be pretty low risk; quality should be pretty standard at this point. Use whatever data source you're most comfortable with.
Quick question, is this something we can pull from the API? May be worth checking to see if we can build logic around that... but probably safe to assume we'll need to manually build out the list. (And I'm paranoid about combat log performance... so like I'd be worried about the logic check to see when the next spell kicked in... probably safer to build list manually is my gut feeling.)
I'd like to make sure the Monitor List is easy to edit and maintain... just the Spell ID, Level Spell is Available, Highest Level of Current Spell before New Spell becomes Available. Open to suggestions, but I think this works:
{2006,10,21}, -- Priest, Resurrection, Rank 1
{2010,22,33}, -- Priest, Resurrection, Rank 2
{10880,34,45}, -- Priest, Resurrection, Rank 3
{10881,46,57}, -- Priest, Resurrection, Rank 4
{20770,58,70}, -- Priest, Resurrection, Rank 5
Go ahead and include all the spells, but let's comment out all healing spells to start. Please also do include the names and ranks of all spells, ideally grouped by Class and Spell Name like in the example above, so they are easy for humans to read.
I can help comment out / remove abilities from the monitor list as we go.
Good to review this... lots of good call-outs in the code. Things to think about.
Good example:
-- For buffs and HoTs, it's the target's level that matters, not the caster's
Only spells on the monitor list would be evaluated for correct rank. Any spell not on the list, would hopefully just pass through the filter without any performance hit.
Notes:
Important that combat tools are highly performant and never cause significant lag.
Monitor Party or Raid Logs Only
Monitor Spells on Monitor List Only
Needs to be smart enough to understand that some spells have limits based on recipient's level, like buffs or heals. Shouldn't send alert if buffing a lower level toon with the highest level buff they can receive; but should alert when a lower rank buff is used on a max-rank player.
Report to players in Private Message; once per instance. BUT, if there's any performance hit around keeping another "ignore list" relevant to that instance, it's fine to just report it every time the ability is spotted. Rather annoy an offender vs. penalize performance of someone running the addon.
Don't worry about addon-to-addon communication, if multiple people have the addon. I don't want to worry about the performance hit about syncing who is going to tell the offender. It's OK if the offender gets a few messages.
Message copy format:
{rt7} GogoWatch : Hey Friend, you just used a low rank of [Ability Name]. Please check your Action Bar or visit your Class Trainer to make sure you've got the right ability for your level.
Good if we include the link to the spell the player cast.
"rt7" is X / Cross.
255 Character count for messages, are there hidden characters included in a linked ability?
Tooltip copy:
{rt7} GogoWatch : Team Member
local creatorText = "\124TInterface\TargetingFrame\UI-RaidTargetingIcon_4.png:0\124t GogoLoot : Team Member"
Rebuilding "RankWatch" is MVP... but next up I would like to build out a few tells focused around helping people play better, "Hey, you stood in shatter. Next time /range 20 to avoid this." Not the public shaming, per se, more the helpful guides so players know how to improve next run. Again, I think this list grows over time... we start off with a few abilities that we know can be avoided, and send a message to people who get hit by them.
Drawing inspiration from:
Running list of spells that should be on the ignore list.
We don't want to spam players who are leveling. Someone going from 45 to 46 in a dungeon shouldn't result in a bunch of spam before they've had a chance to level.
For level 70 toons, we should warn on any low-rank used.
For sub-70s, we should give them a grace period of 1 level before sending them a message.
Low priority, but need to do a bit of housekeeping on https://github.com/Gogo1951/GogoWatch/blob/main/DataTables.lua
Need to rename "DataTables.lua" to "AbilitiesData.lua"
Need to move the top few references out of the AbilitiesData file and toss those in the application. I want the abilities list to be just it's own stand alone thing.
Need to rename GogoWatch.SpellIDs to GogoWatch.AbilityIDs
Here's what I go through to get the clean data.
import requests
import csv
import io
patch_version = "2.5.2.39832"
#url = 'https://wow.tools/dbc/api/export/?name=%s&build=%s&locale=enUS'
url = "https://wow.tools/dbc/api/export/?name=%s&build=%s"
def connect(dbc, patch):
text = requests.get(url % (dbc, patch), headers={'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Firefox/91.0'}).text
reader = csv.DictReader(io.StringIO(text))
return reader
spells = connect("spell", patch_version)
levels = connect("SpellLevels", patch_version)
classes = connect("SpellClassOptions", patch_version)
names = connect("SpellName", patch_version)
print("AbilityID, Rank, LevelAvailable, Name, Class")
levels_table = {}
class_table = {}
names_table = {}
for data in classes:
class_table[data["SpellID"]] = data
for data in names:
names_table[data["ID"]] = data["Name_lang"]
for data in levels:
levels_table[data["SpellID"]] = data
for spell in spells:
id = spell["ID"]
if id in levels_table and id in names_table and id in class_table:
rank = spell["NameSubtext_lang"]
if not rank or len(rank) == 0:
rank = "Rank 1"
print(id, end='')
print(", \"", end='')
print(rank, end='')
print("\", ", end='')
print(levels_table[id]["BaseLevel"], end='')
print(", \"", end='')
print(names_table[id], end='')
print("\", ", end='')
print(class_table[id]["SpellClassSet"])
Output Looks Like:
I reformatted this inside of Excel...
Example:
34426 3 Greater Invisibility Passive 1
These seem like GM abilities, or other odd abilities.
Example:
31751 3 Arcane Missiles 1 0
You can also delete any ability with Class = 0, or 13 (Consumables).
Example:
37988 3 Ancient Fire 1 20
16067 3 Arcane Blast 1 35
18091 3 Arcane Blast 1 35
20883 3 Arcane Blast 1 50
30451 3 Arcane Blast 1 64
35927 3 Arcane Blast 1 64
36032 3 Arcane Blast 1 1
38881 3 Arcane Blast 1 64
Careful: Some abilities upgrade to different names. Example. Curious if there is any sort of grouping in the DB. Doubt it. So... probably fine to just purge them and we can re-add as one-off cases manually later.
759 3 Conjure Mana Agate 1 28
3552 3 Conjure Mana Jade 1 38
10053 3 Conjure Mana Citrine 1 48
10054 3 Conjure Mana Ruby 1 58
36883 3 Conjure Mana Diamond 1 68
27101 3 Conjure Mana Emerald 1 68
Careful: Some abilities are GM-only abilities. From the example above... curious if there is any way to weed out the abilities not available to players? Maybe cross check if an ability is learned from a trainer, or learned from a book? Don't know if there is a way to do that.
36883 3 Conjure Mana Diamond 1 68
Watch out for situations where abilities are available, but impacted by talents that are not available until later levels. When encountered, set the "LevelAvailable" to the lowest level for all in that rank.
Example:
6136 3 Chilled 1 1
7321 3 Chilled 1 30
12484 3 Chilled 1 1
15850 3 Chilled 1 1
16927 3 Chilled 1 63
18101 3 Chilled 1 1
31257 3 Chilled 1 70
Desired Output:
6136 3 Chilled 1 1
7321 3 Chilled 1 1
12484 3 Chilled 1 1
15850 3 Chilled 1 1
16927 3 Chilled 1 1
18101 3 Chilled 1 1
31257 3 Chilled 1 1
Note we want to keep the Level 70 abilities in there, and just add "70" for those.
Example:
31661 3 Dragon's Breath 1 50
35250 3 Dragon's Breath 1 70
37289 3 Dragon's Breath 1 70
33041 3 Dragon's Breath 2 56
33042 3 Dragon's Breath 3 64
33043 3 Dragon's Breath 4 70
Desired Output:
31661 3 Dragon's Breath 1 50 55
35250 3 Dragon's Breath 1 50 55
37289 3 Dragon's Breath 1 50 55
33041 3 Dragon's Breath 2 56 63
33042 3 Dragon's Breath 3 64 69
33043 3 Dragon's Breath 4 70 70
*All... not really. Delete heals from Paladins, Priests, Shamans, and Druids that do not have a CD Timer. So like spam-able heals; but we want to keep a few spells, like Tranquility, because there's no reason to cast a low-rank when it's got a long CD. Likely has to stay manual process.
For things like Blessing of Might, the buff can only be given to players who are 10 levels under the "LevelAvailable" level.
Example:
19740 10 Blessing of Might 1 4
19834 10 Blessing of Might 2 12
19835 10 Blessing of Might 3 22
19836 10 Blessing of Might 4 32
19837 10 Blessing of Might 5 42
19838 10 Blessing of Might 6 52
25291 10 Blessing of Might 7 60
27140 10 Blessing of Might 8 70
Desired Output:
19740 10 Blessing of Might 1 4 11 0
19834 10 Blessing of Might 2 12 21 2
19835 10 Blessing of Might 3 22 31 12
19836 10 Blessing of Might 4 32 41 22
19837 10 Blessing of Might 5 42 51 32
19838 10 Blessing of Might 6 52 59 42
25291 10 Blessing of Might 7 60 69 50
27140 10 Blessing of Might 8 70 70 60
https://github.com/Gogo1951/GogoWatch/blob/main/DataTables.lua
It's gotten pretty ugly over the last week. Need to sort it by class, ability, and rank... and probably prune abilities that don't need to be in there... Likely need to re-generate it, then compare that to the edits over the last week to see what has to be removed.
Good if we include all player abilities, and then just "Ignore" or comment them out. That way we know why things were added to ignore list if we add comments to the line.
Should message the pet owner when the pet doesn't have max rank trained.
Should message the pet owner when Growl / Suffering is on when in an instance.
Seems to be using the Observer's Level instead of the Caster's Level to judge if the spell is low-rank.
https://discord.com/channels/868914725784797224/878370187601150003/888993283978715136
A level 30 Warlock should be OK to use the spell that is listed there.
https://github.com/Gogo1951/GogoWatch/tree/OncePerInstance
Basic testing done with slash command /gogowatch reset
for resetting the dynamically build ignore list after an announcement.
Now needs testing in instance.
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.