-- -------------------------------------------------------------------------- --
-- BattlegroundTargets by kunda --
-- -------------------------------------------------------------------------- --
-- --
-- BattlegroundTargets is a World of Warcraft AddOn. --
-- BattlegroundTargets is a 'Enemy Unit Frame' for battlegrounds. --
-- BattlegroundTargets is not a 'real' (Enemy) Unit Frame. --
-- BattlegroundTargets simply generates buttons with target macros. --
-- --
-- Features: --
-- # Shows all battleground enemies with role, class and name. --
-- - Left-click : set target --
-- - Right-click: set focus --
-- # Independent settings for '10 vs 10', '15 vs 15' and '40 vs 40'. --
-- # Specialization --
-- # Target --
-- # Main Assist Target --
-- # Focus --
-- # Enemy Flag/Orb Carrier --
-- # Target Count --
-- # Health --
-- # Range Check --
-- # Guild Groups --
-- --
-- -------------------------------------------------------------------------- --
-- --
-- These events are always registered: --
-- - PLAYER_REGEN_DISABLED --
-- - PLAYER_REGEN_ENABLED --
-- - ZONE_CHANGED_NEW_AREA (to determine if current zone is a battleground) --
-- - PLAYER_LEVEL_UP (only registered if player level < level cap) --
-- --
-- In Battleground: --
-- # If enabled: ------------------------------------------------------------ --
-- - UPDATE_BATTLEFIELD_SCORE --
-- - PLAYER_DEAD --
-- - PLAYER_UNGHOST --
-- - PLAYER_ALIVE --
-- --
-- # Range Check: --------------------------------------- VERY HIGH CPU USAGE --
-- - Events: --
-- 1) Combat Log: --- COMBAT_LOG_EVENT_UNFILTERED --
-- 2) Class: -------- PLAYER_TARGET_CHANGED --
-- - UNIT_HEALTH_FREQUENT --
-- - UPDATE_MOUSEOVER_UNIT --
-- - UNIT_TARGET --
-- 3/4) Mix: ---------- COMBAT_LOG_EVENT_UNFILTERED --
-- - PLAYER_TARGET_CHANGED --
-- - UNIT_HEALTH_FREQUENT --
-- - UPDATE_MOUSEOVER_UNIT --
-- - UNIT_TARGET --
-- - The data to determine the distance to an enemy is not always available.--
-- This is restricted by the WoW API. --
-- - This feature is a compromise between CPU usage (FPS), lag/network --
-- bandwidth (no SendAdd0nMessage), fast and easy visual recognition and --
-- suitable data. --
-- --
-- # Health: ------------------------------------------------- HIGH CPU USAGE --
-- - Events: - UNIT_TARGET --
-- - UNIT_HEALTH_FREQUENT --
-- - UPDATE_MOUSEOVER_UNIT --
-- - The health from an enemy is not always available. --
-- This is restricted by the WoW API. --
-- - A raidmember/raidpet MUST target(focus/mouseover) an enemy OR --
-- you/yourpet MUST target/focus/mouseover an enemy to get the health. --
-- --
-- # Target Count: ------------------------------------ HIGH MEDIUM CPU USAGE --
-- - Event: - UNIT_TARGET --
-- --
-- # Guild Groups: ----------------------------------------- MEDIUM CPU USAGE --
-- - Events: - GROUP_ROSTER_UPDATE --
-- - UNIT_TARGET --
-- --
-- # Main Assist Target: ------------------------------- LOW MEDIUM CPU USAGE --
-- - Events: - GROUP_ROSTER_UPDATE --
-- - UNIT_TARGET --
-- --
-- # Leader: ------------------------------------------- LOW MEDIUM CPU USAGE --
-- - Event: - UNIT_TARGET --
-- --
-- # Level: (only if player level < level cap) ---------------- LOW CPU USAGE --
-- - Event: - UNIT_TARGET --
-- --
-- # Target: -------------------------------------------------- LOW CPU USAGE --
-- - Event: - PLAYER_TARGET_CHANGED --
-- --
-- # Focus: --------------------------------------------------- LOW CPU USAGE --
-- - Event: - PLAYER_FOCUS_CHANGED --
-- --
-- # Enemy Flag/Orb Carrier: ----------------------------- VERY LOW CPU USAGE --
-- - Events: - CHAT_MSG_BG_SYSTEM_HORDE --
-- - CHAT_MSG_BG_SYSTEM_ALLIANCE --
-- - CHAT_MSG_BG_SYSTEM_NEUTRAL --
-- - CHAT_MSG_RAID_BOSS_EMOTE --
-- Flag/Orb detection in case of disconnect, UI reload or mid-battle-joins: --
-- (temporarily registered until each enemy is scanned) --
-- - UNIT_TARGET --
-- - UPDATE_MOUSEOVER_UNIT --
-- - PLAYER_TARGET_CHANGED --
-- --
-- # No SendAdd0nMessage(): ------------------------------------------------- --
-- This AddOn does not use/need SendAdd0nMessage(). SendAdd0nMessage() --
-- increases the available data by transmitting information to other --
-- players. This has certain pros and cons. I may include (opt-in) such --
-- functionality in some future release. maybe. dontknow. --
-- --
-- -------------------------------------------------------------------------- --
-- --
-- slash commands: /bgt - /bgtargets - /battlegroundtargets --
-- --
-- -------------------------------------------------------------------------- --
-- --
-- Thanks to all who helped with the localization. --
-- --
-- Special thanks to Roma. --
-- --
-- -------------------------------------------------------------------------- --
i have no idea why it's taken so long for somebody to write this. i wish i was still actively playing...
might be nice to parse the combat log and associate heals/damage with targets. perhaps identify healers who are healing your target. or healers who are healing flag carriers...
elseif locale == "frFR" then
BattlegroundTargets_BGNames = {
["Vallée d'Alterac"] = "Alterac Valley",
["Goulet des Chanteguerres"] = "Warsong Gulch",
["Bassin Arathi"] = "Arathi Basin",
["L'il du cyclone"] = "Eye of the Storm",
["Rivage des Anciens"] = "Strand of the Ancients",
["Île des Conquérants"] = "Isle of Conquest",
["La bataille de Gilnéas"] = "Battle for Gilneas",
["Pics-Jumeaux"] = "Twin Peaks",
I have a suggestion for this addon. I think that you should add a right click to focus like on gladius and maybe a range finder to see if someone is in range because that would make this addon the proest shit ever made for rbgs
@Jakek321:
Focus: I added a focus indicator and right-click to set focus (focus is set to your current target).
Range check: Range check for enemies is tricky, always wacky and never precise. I think about it.
@Vranx:
Textures: Which textures? You can change any texture by modifying the code and/or the included textures.
Same-faction battlegrounds: Is this really live? I remember some PTR tests but I thought this has never made it to the live servers. And: I never joined a same-faction (rated) battleground. Anyway, I added some additional check to cover such situation.
Some general thoughts:
BattlegroundTargets is simple and I want to keep it simple. What I want to avoid is combatlog scanning and SendAddonMessage(s), especially in combat. I am not a friend of combatlog scanning in combat and I am not a friend of SendAddonMessage(s) in combat. Some suggested features requires such techniques to give an acceptable result.
To be honest: If I do not find a resource-friendly method to add hp/range/whatever check I will not include it.
Current BattlegroundTargets fits all my needs: relative simple, it works as described, no errors, less CPU/memory usage, highly configurable.
@Vranx: There is no texture for the background, it is a simple color.
@Adirelle: GetMapInfo() is bound to the current opened map. If the map is opened GetMapInfo() always returns the name from the opened map, this is why I use GetBattlefieldStatus() and GetRealZoneText(), which both returns the same localized map names from the current zone the player is in, not from the opened map. Sure, I can use SetMapToCurrentZone() before GetMapInfo() that should set it to the correct map, but I want to avoid this if there is another possibility to get the map name, because I do not want to mess around in any map related functions. You are right, your described method is better in some points because it does not require loca.
btw: the additional GetRealZoneText() check is only used if GetBattlefieldStatus() returns nil (which can happen from time to time and looks like a Blizzard bug, same is true for GetRealZoneText(), which can also return nil...do you know if this is the case for GetMapInfo() too?). Anyway, thanks for the hint.
@Adirelle: GetMapInfo() is bound to the current opened map. If the map is opened GetMapInfo() always returns the name from the opened map, this is why I use GetBattlefieldStatus() and GetRealZoneText(), which both returns the same localized map names from the current zone the player is in, not from the opened map.
Then get the current map using GetMapInfo once on PLAYER_ENTERING_WORLD, at that time the world map is closed so either the current map is always set to the current zone or you can SetMapToCurrentZone() without much drawbacks.
Then get the current map using GetMapInfo once on PLAYER_ENTERING_WORLD, at that time the world map is closed so either the current map is always set to the current zone or you can SetMapToCurrentZone() without much drawbacks.
You could do something like this as well:
if not WorldMapFrame:IsVisible() then
SetMapToCurrentZone()
else
...
end
Thank you! I love seeing the specs and healers, and a clean compact UI.
2 feature requests, one has already been mentioned:
1) Range checker
2) Ability to bind abilities or macros to mouse clicks on the enemy player like Gladius.
Also setting focus with a right click seems a bit wonky. Sometimes it works. Sometimes it doesn't. Sometimes it sets it to the player above or below who I right clicked.
This is a fairly handy addon for battlegrounds. I'd like to suggest a few more features to make it better.
1. Include the players level next to the name.
2. Option to display letters instead of class icons. I'm not big on deciphering icons. Just me I guess.
druid icon becomes "D"
priest icon becomes "pR"
paladin icon becomes "pA"
warrior icon becomes "W"
hunter icon becomes "H"
rogue icon becomes "R"
shaman icon becomes "S"
3. Add an indicator to show who's currently carrying the flag. This one is a must have. And if you click on the indicator (or double click the name) that poor sap becomes my focus.
4. Display the current health level for each player. This is a must have too. Although the addon shows targeting count I wanna attk the one with the lowest health. clicking through who's been targeted just takes too long.
@gamemaster128 & Adirelle:
Okay, good. But I will not change the bgname check. It works, that's fine for me.
@medloh:
Range check and an additional macro editing interface...may be in some future release. read previous posts from my...
@rickmende:
- player level:
I will not include this. This addon is for players at max level.
- Option to display letters instead of class icons:
hmm okay may be. The option to show the class icon is mainly for ppl who are not familiar with class colors or can not see colors, but I think about it.
- flag carrier:
the addon Capping from TotalPackage shows efc and fc. But you are right this would be a nice feature, I think about it.
- health:
may be if I find a resource-friendly method. read previous posts from my...
@mollalapalla:
Thanks for the bug report, but please always post some more information, eg.: which BattlegroundTarget version do you use? which client (enUS/deDE/koKR/...)? and/or post a bugreport (copy&paste from: blizz error frame/buggrabber/...).
This bug was reported earlier and I tried to fixed it with version r10 - 2011-08-04 22:57:46 +0000 (Thu, 04 Aug 2011) (BattlegroundTarget-40200-7).
I couldn't test it, because I never joined a (rated) battleground with same faction.
I just submitted BattlegroundTarget-40200-8 which fixes some localization bugs and font issues (mainly esES, koKR, ruRU, zhCN and zhTW).
Please try BattlegroundTarget-40200-8 (http://www.wowace.com/addons/battlegroundtargets/files) and post a message if you still get a bug in same-faction (rated) battleground games. Thanks.
Need loca help:
This addon works with all officially supported languages. (I just tested all supported languages on PTR [4.2.2.14492] - okay PTR..., but PTR is the only way for me to test all(!) supported languages [zhCN was bugged on PTR])
BUT: I need your help if you find an localization error.
This addon relies on localized bgnames and talents!
The Configuration Menu (which has no impact on functionality) needs some love:
If you use this addon with esES/esMX, frFR, koKR, ruRU or zhTW: you are welcome to update the -localization-* files via wowace.com svn repository OR simply post it here (I will add it with credits). Thanks.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Screenshot:
Download:
http://www.wowace.com/addons/battlegroundtargets/files/
kunda
might be nice to parse the combat log and associate heals/damage with targets. perhaps identify healers who are healing your target. or healers who are healing flag carriers...
Bug report :
is not Bassin d'Arathi but Bassin Arathi ;)
elseif locale == "frFR" then
BattlegroundTargets_BGNames = {
["Vallée d'Alterac"] = "Alterac Valley",
["Goulet des Chanteguerres"] = "Warsong Gulch",
["Bassin Arathi"] = "Arathi Basin",
["L'il du cyclone"] = "Eye of the Storm",
["Rivage des Anciens"] = "Strand of the Ancients",
["Île des Conquérants"] = "Isle of Conquest",
["La bataille de Gilnéas"] = "Battle for Gilneas",
["Pics-Jumeaux"] = "Twin Peaks",
http://www.wowace.com/addons/battlegroundtargets/files/
Focus: I added a focus indicator and right-click to set focus (focus is set to your current target).
Range check: Range check for enemies is tricky, always wacky and never precise. I think about it.
@Vranx:
Textures: Which textures? You can change any texture by modifying the code and/or the included textures.
Same-faction battlegrounds: Is this really live? I remember some PTR tests but I thought this has never made it to the live servers. And: I never joined a same-faction (rated) battleground. Anyway, I added some additional check to cover such situation.
http://www.wowace.com/addons/battlegroundtargets/files/
Some general thoughts:
BattlegroundTargets is simple and I want to keep it simple. What I want to avoid is combatlog scanning and SendAddonMessage(s), especially in combat. I am not a friend of combatlog scanning in combat and I am not a friend of SendAddonMessage(s) in combat. Some suggested features requires such techniques to give an acceptable result.
To be honest: If I do not find a resource-friendly method to add hp/range/whatever check I will not include it.
Current BattlegroundTargets fits all my needs: relative simple, it works as described, no errors, less CPU/memory usage, highly configurable.
I think about the suggestions, Thanks.
I have done 6 or 7 rated BG's, twice it has switched my faction so I can verify that its live for sure.
Appreciate your work. Like the mod!
v40200-4
I suppose this need some more code to check for rated battlegrounds and war games.
@Adirelle: GetMapInfo() is bound to the current opened map. If the map is opened GetMapInfo() always returns the name from the opened map, this is why I use GetBattlefieldStatus() and GetRealZoneText(), which both returns the same localized map names from the current zone the player is in, not from the opened map. Sure, I can use SetMapToCurrentZone() before GetMapInfo() that should set it to the correct map, but I want to avoid this if there is another possibility to get the map name, because I do not want to mess around in any map related functions. You are right, your described method is better in some points because it does not require loca.
btw: the additional GetRealZoneText() check is only used if GetBattlefieldStatus() returns nil (which can happen from time to time and looks like a Blizzard bug, same is true for GetRealZoneText(), which can also return nil...do you know if this is the case for GetMapInfo() too?). Anyway, thanks for the hint.
@gamemaster128: This: fail. My failure.
Fixed in BattlegroundTargets-40200-6. http://www.wowace.com/addons/battlegroundtargets/files/
Then get the current map using GetMapInfo once on PLAYER_ENTERING_WORLD, at that time the world map is closed so either the current map is always set to the current zone or you can SetMapToCurrentZone() without much drawbacks.
There is a stupid bug in previous versions (40200-4 to 40200-6) if you join a rated battleground game. Sorry & Thanks.
You could do something like this as well:
2 feature requests, one has already been mentioned:
1) Range checker
2) Ability to bind abilities or macros to mouse clicks on the enemy player like Gladius.
Also setting focus with a right click seems a bit wonky. Sometimes it works. Sometimes it doesn't. Sometimes it sets it to the player above or below who I right clicked.
1. Include the players level next to the name.
2. Option to display letters instead of class icons. I'm not big on deciphering icons. Just me I guess.
druid icon becomes "D"
priest icon becomes "pR"
paladin icon becomes "pA"
warrior icon becomes "W"
hunter icon becomes "H"
rogue icon becomes "R"
shaman icon becomes "S"
3. Add an indicator to show who's currently carrying the flag. This one is a must have. And if you click on the indicator (or double click the name) that poor sap becomes my focus.
4. Display the current health level for each player. This is a must have too. Although the addon shows targeting count I wanna attk the one with the lowest health. clicking through who's been targeted just takes too long.
Okay, good. But I will not change the bgname check. It works, that's fine for me.
@medloh:
Range check and an additional macro editing interface...may be in some future release. read previous posts from my...
@rickmende:
- player level:
I will not include this. This addon is for players at max level.
- Option to display letters instead of class icons:
hmm okay may be. The option to show the class icon is mainly for ppl who are not familiar with class colors or can not see colors, but I think about it.
- flag carrier:
the addon Capping from TotalPackage shows efc and fc. But you are right this would be a nice feature, I think about it.
- health:
may be if I find a resource-friendly method. read previous posts from my...
@mollalapalla:
Thanks for the bug report, but please always post some more information, eg.: which BattlegroundTarget version do you use? which client (enUS/deDE/koKR/...)? and/or post a bugreport (copy&paste from: blizz error frame/buggrabber/...).
This bug was reported earlier and I tried to fixed it with version r10 - 2011-08-04 22:57:46 +0000 (Thu, 04 Aug 2011) (BattlegroundTarget-40200-7).
I couldn't test it, because I never joined a (rated) battleground with same faction.
I just submitted BattlegroundTarget-40200-8 which fixes some localization bugs and font issues (mainly esES, koKR, ruRU, zhCN and zhTW).
Please try BattlegroundTarget-40200-8 (http://www.wowace.com/addons/battlegroundtargets/files) and post a message if you still get a bug in same-faction (rated) battleground games. Thanks.
Need loca help:
This addon works with all officially supported languages. (I just tested all supported languages on PTR [4.2.2.14492] - okay PTR..., but PTR is the only way for me to test all(!) supported languages [zhCN was bugged on PTR])
BUT: I need your help if you find an localization error.
This addon relies on localized bgnames and talents!
The Configuration Menu (which has no impact on functionality) needs some love:
If you use this addon with esES/esMX, frFR, koKR, ruRU or zhTW: you are welcome to update the -localization-* files via wowace.com svn repository OR simply post it here (I will add it with credits). Thanks.