BattleGroundEnemies

BattleGroundEnemies

6M Downloads

Does not work in RBGS

l3uGsY opened this issue ยท 28 comments

commented

Scoreboards do not populate until after the match.
Possible fix would be to use the combat log, like Spy.

commented

Omg, why did they change that. I only did random bgs so far. So in rbgs when you click on the pvp eye nothing happens? Can you try using /dump C_PvP.GetScoreInfo(1) in a rbg and see if it outputs anything? But I guess it doesn't otherwise the add-on should work. This change is really no good news. So this means as a player you only see what you are up against when the gates open and you see the players? Or is blizzard providing any other information?

commented

okay, this makes sense, i added a check for when 0 player are found it doesnt delete any players of that type (type being enemy or ally), this was a feature to not delete players when the enemy or ally tab was selected (This made the score info only return data for that selected tab so that players of the other grup would not show up) So it fills up the players at the end of the RBG from the end results list then when a new RBG is started it doesnt delete any due to that fact.

ragarding the command, keep in mind /dump C_PvP.GetScoreInfo(1) just outputs the first player in the list, so that could be a group member aswell. So if you get something from that try other values than 1 too. But i really think you will just get group members and no enemy if this is the case
Well i think i could fall to listening for GUIDs via the combat log and then using back to GetPlayerInfoByGUID(guid) on this guids, this will give me the name, and class. I could build up the usual list from this basic info, the player frames would look like its on classic (addon will display class icon instead of spec)

commented

I'll do some RBGs tonight and try the /dump C_PvP.GetScoreInfo(1) but I believe your assumption is correct based on the addon behavior. It populates the Allies, but not the enemies. However in the next RBG it will populate Enemies with the team from the previous RBG. Interesting fact; If you play the same team back to back, it all works or if one person from the previous team joined the next, then it will show the previous team but that one players frame works.

I ended up downloading Spy, which reads from the combat log, and populates a list. Mainly used for WPvP, it's come in handy. Is there a way to populate the BGE Enemies list this way? Even if you can't track anything, just having the names and class would be instrumental in strategizing.

commented

I just uploaded a new alpha, it has many changes, but i also added early support for the guids, i did two normal BGs to test out this feature and i got it working but it also uses the scoreboard to get the data from the GUID GetScoreInfoByPlayerGuid() I assume this also doesnt work for players in rated bgs, but i also added data from GetPlayerInfoByGUID(guid). If you want you can check it out and let me know whats happening, If players show up, if they show up with spec icons or if you only see the class icon, if there are errors, etc. Its past my bedtime but this always happens when i get hooked on programming LOL

commented

All dump values 1-10 = empty result
No Enemy players, just Friendly Frame
No errors came up, just didn't work

commented

okay, what i can say so far is progress has been made. You will like the new version :)

commented

Thanks for you testing. I appreciate it a lot since haven't done a RBG in years myself ๐Ÿ˜ƒ.

The trigger for this combat log scanning is the scoreboard update, which was firing frequently since I also request the update every few seconds.
Then when the scoreboard update event is fired I simply added a check if this current BG is a rated one, the game version is retail WOW and if there are 0 found enemies, when all 3 is the case the add-on switches to the combat log scanning (There is also a message in the chat when this is enabled).

What you said makes me think that somehow this scoreboard update event doesn't fire anymore even tho a update is requested.
So I guess I have to find a rbg group myself or I will upload another alpha with some extra chat outputs then you could tell me what it's outputs and I can adjust the code :)

You can enable this combat log scanning manually for now by writing /run Battlegroundenemies:EnableFallbacktoCombatlogScanning() in the chat

commented

Very happy to hear it, I will test it tonight.
On behalf of the friends I play with, we all thank you.

commented

Didn't work on the 1st.
Reset Profile
Worked on the 2nd
Didn't rescan for players on the 3rd and showed the previous team. Attempted to reset profile, reload UI while in the RBG with no luck, no errors
On the 4th I reloaded before I went in, showed nothing, attempted the same as on the 3rd.

Unsure what the trigger is to scan for players, but perhaps there could be a 2nd trigger like the countdown

Restarted the game, reinstalled the BGE, reset profile, it worked on 1st run, waiting on next to see if it continues to work.
Did not work on the 2nd run, showed previous team.

commented

Are you on EU or NA?

commented

EU

commented

Is there a command to enable a debug feature that can output the needed data I can post for you? I can't help you on EU but I can sure hell test.

commented

Not really, since debugging is like very specific and if you just log all kinds of things it's hard to see what you are looking for cause it gets spammy really fast. I will send you a modified main.lua when when I am home.

commented

https://pastebin.com/0eN2gg0x

its basically just three extra outputs
i added one for RequestBattlefieldScoreData which besically is used to ask the game for score board update, when the data is ready the game will give you a UPDATE_BATTLEFIELD_SCORE which you then use to grap the player data from the scoreboard. So every time the data is requested you will see a chat message now

let me know if there are still any frequent UPDATE_BATTLEFIELD_SCORE outputs in your chat after data has been requested
and the third chat message i added is for the variable used to save if the current BG is a RBG (This is probably correct but still a extra check doesnt hurt :D )

commented

UPDATE_BATTLEFIELD_SCORE
no enemies found
isRated: false (this should be true)
RequestBattleFieldScoreData
RequestBattleFieldScoreData
RequestBattleFieldScoreData
RequestBattleFieldScoreData
RequestBattleFieldScoreData...

...WON GAME
UPDATE_BATTLEFIELD_SCORE
RequestBattleFieldScoreData
RequestBattleFieldScoreData
RequestBattleFieldScoreData
LEFT INSTANCE

Not once did BGE Enemies populate

When I tried to run the "/run Battlegroundenemies:EnableFallbacktoCombatlogScanning()"
2x [string "Battlegroundenemies:EnableFallbacktoCombatl..."]:1: attempt to index global 'Battlegroundenemies' (a nil value)
[string "Battlegroundenemies:EnableFallbacktoCombatlogScanning()"]:1: in main chunk
[string "=[C]"]: in function RunScript' [string "@Interface/FrameXML/ChatFrame.lua"]:2165: in function ?'
[string "@Interface/FrameXML/ChatFrame.lua"]:5219: in function ChatEdit_ParseText' [string "@Interface/FrameXML/ChatFrame.lua"]:4883: in function ChatEdit_SendText'
[string "@Interface/FrameXML/ChatFrame.lua"]:4919: in function `ChatEdit_OnEnterPressed'
[string "*ChatFrame.xml:127_OnEnterPressed"]:1: in function <[string "*ChatFrame.xml:127_OnEnterPressed"]:1>
[string "=[C]"]: ?

Locals:
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index global 'Battlegroundenemies' (a nil value)"

commented

Reset Profile, new game.
UPDATE_BATTLEFIELD_SCORE
no enemies found
isRated: true
BattlegroundEnemies: Combat log scanning to detect enemy players been enabled
RequestBattleFieldScoreData
RequestBattleFieldScoreData
RequestBattleFieldScoreData
RequestBattleFieldScoreData
RequestBattleFieldScoreData... ALL GAME

RequestBattleFieldScoreData
RequestBattleFieldScoreData
RequestBattleFieldScoreData
RequestBattleFieldScoreData
RequestBattleFieldScoreData...
UPDATE_BATTLEFIELD_SCORE
GAME WON
RequestBattleFieldScoreData
RequestBattleFieldScoreData
RequestBattleFieldScoreData
LEFT INSTANCE
BattlegroundEnemies: Disabled combat log scanning for enemies

BGE WORKED for the game but class/role icons were all wrong, onto Game 3

commented

Game 3, it showed previous team. Did not update
UPDATE_BATTLEFIELD_SCORE
no enemies found
isRated: false

However, someone stated they found out if you open the scoreboard and click the Alliance and Horde tabs back an forth over and over and over again, it starts to find people. So I did that and chat output spam was this for each click

UPDATE_BATTLEFIELD_SCORE
no enemies found
isRated: true (This changed from false)
UPDATE_BATTLEFIELD_SCORE
no enemies found
isRated: true
UPDATE_BATTLEFIELD_SCORE
no enemies found
isRated: true
UPDATE_BATTLEFIELD_SCORE
no enemies found
isRated: true

BGE Enemy frame began to populate, slowly until it was filled with 10.

Then
RequestBattleFieldScoreData
RequestBattleFieldScoreData
RequestBattleFieldScoreData
RequestBattleFieldScoreData
RequestBattleFieldScoreData...
UPDATE_BATTLEFIELD_SCORE
GAME WON
RequestBattleFieldScoreData
RequestBattleFieldScoreData
RequestBattleFieldScoreData
LEFT INSTANCE
BattlegroundEnemies: Disabled combat log scanning for enemies
RequestBattleFieldScoreData
RequestBattleFieldScoreData
RequestBattleFieldScoreData

commented

Game 4 all worked
UPDATE_BATTLEFIELD_SCORE
no enemies found
isRated: true
BattlegroundEnemies: Combat log scanning to detect enemy players been enabled

RequestBattleFieldScoreData
RequestBattleFieldScoreData
RequestBattleFieldScoreData
RequestBattleFieldScoreData
RequestBattleFieldScoreData...
UPDATE_BATTLEFIELD_SCORE

GAME LOST :(
RequestBattleFieldScoreData
RequestBattleFieldScoreData
RequestBattleFieldScoreData
LEFT INSTANCE
BattlegroundEnemies: Disabled combat log scanning for enemies

commented

Hi, thanks for this very detailed output :) nice job.

Okay, I see the issue, somehow my check for if it's rated is not happening or happening at a time when it's not giving me the correct data.. Also the request function doesn't trigger the UPDATE_BATTLEFIELD_SCORE event anymore which the code is currently relying on to happen frequently.
All this is fixable :)

Oh yeah, and the command didn't work because I wrote /run Battlegroundenemies:xxx
Instead of BattleGroundEnemies... my bad.

commented

So i just created a new alpha that should make RBGs work every time :)

commented

Good to hear.
what do you mean with issues with the icons? Somethign didnt work as expected?

commented

Okay, so last night it worked. Only issues were icons related to specializations and classes.

commented

Ya, the grouping was weird and it would show a Warlock with Prot Warrior Icon and a Hunter as Demo Lock Icon. Stuff like that I imagine that info was retrieved by the scoreboard. I won't be able to do more testing until after the weekend.
image

commented

Oh, that looks super weird ๐Ÿคฃ I assume the issue occurs when the BG ended? I think I can already imagine why this happens. I will include a change in the next alpha that should fix this

commented

i uploaded a new alpha. If you want you can give this one a shot at has a few other changes as well thats why it took a bit longer

commented

I will let you know, but group hasn't been queuing. Most are taking a breath before S1 of DF.

commented

All good, i am pretty confident it should work so i released it :D

commented

Since some other people have confirmed its working i will close This. Once again thank you for your time providing the data and in general for helping getting this fixed :) If there is anythign else you want to see changed or any bug you found feel free to create a new issue :)