Download
(21Kb)
Download
Updated: 01-15-14 06:50 AM
Pictures
File Info
Updated:01-15-14 06:50 AM
Created:11-17-10 12:15 AM
Downloads:7,570
Favorites:74
MD5:

Shot Glass Raid Frames  Popular! (More than 5000 hits)

Version: 3.2
by: danltiger, Pinghansen

Shot Glass is a lightweight raid frame, which can be configured to show specific Aura Indicators, in addition to Health, Incoming Healing, Mana, Aggro, Range, and Target.

No Libraries are used, and the code is very simple, which makes it a nice learning tool for people who are learning to program their own raid frames.

Feature Highlights

  • Incoming Heals: You'll see incoming heals as a subtle, semi-transparent bar, indicating the future health of the unit.
  • Aura Indicators: Along the top edge of each unit frame, there are three circular indicators. On the bottom edge, there are three triangular indicators. Stacks are displayed below the indicator.
  • Aggro Indicator: A red border will light up around any unit that acquires aggro.
  • Range: Units out of your range will shrink in size.
  • Mana: Only mana is indicated; Rage, Runic Power, Energy, etc are not shown.

Aura Configuration
I've included two configuration files with the current package. (For Druid and Priest) Feel free to use those files as a template for your own customization.

The configuration file is simply an addon with "## Dependencies: ShotGlass" in the TOC file. You can access the 'TrackedAuras' table from your LUA file. Alternatively, you can edit the included file. An example:

Code:
local TrackedAuras = ShotGlassRaidFrames.TrackedAuras

TrackedAuras[GetSpellInfo(774)] = {position = 1, color = {r = .8,g = 0, b = .8, a = 1},}		-- Rejuvenation
TrackedAuras["Rejuvenation"] = {position = 1, color = {r = .8,g = 0, b = .8, a = 1},}
Note: You can find the spell ID# from Wowhead.

Character Profiles
The "Addon" button on your Character Selection Screen will allow you to Enable or Disable the Aura List for each character.




I'm not going to bug you by popping up an ad whenever you hit "Download". If you enjoy this addon and want to send a monetary "Thank You", please visit our Pledgie page by clicking on the button, above.

3.1:
- TOC Bump

3.0:
- Updated for MoP

2.3:
- Tracked auras can now be assigned a custom function for color and stack text. (See ShotGlass_Druid for an example)
- Delegate functions are passed a table, 'aura', containing information about the evaluated aura: aura.color, aura.stacks, aura.expiration, aura.position, aura.name
- Changed font to Blizzard's Arial Narrow. This will make life easier for international clients, and reduces the whole ZIP package to 15kb.
- Command line has returned: /shotglass [show|hide|lock|unlock]

2.1 & 2.2:
- Trying to fix the overlap bug. I've disabled the option for the frames to grow to the right, until it's fixed.

2.0:
+ TOC Bump for 4.3
+ Auras will display a countdown from 5 seconds (it will replace stack-count text, temporarily)
+ Added GUI Interface panel
+ Added quick link to interface panel, via right-click on the drag handle
- Removed slash commands, except for /shotglass (which will bring up the new interface panel)

1.15:
Merely a TOC bump for 4.2

1.14:
DUH! When you bump the TOC, then you should do it correctly. /facepalm

1.13:
Merely a TOC bump for 4.1

1.12:
Bug Fix: Priority bug.
Integrated ShotGlass_Priest.

1.11:
Implemented slash-commands. See readme.txt for a list of commands.

0.10:
Bug Fix: Priority Bug.

0.9:
Added Vehicle Support, Spell Priority, External Configuration for Auras.

0.4-0.8:
Clique Support, Bug fixes, Incoming Heals.

0.3:
Bug Fix: Certain events reset the attributes of the unit frame, breaking the link. This update will restore those links when attributes are changed.
Optional Files (2)
File Name
Version
Size
Author
Date
Type
0.3
893B
04-27-11 12:38 PM
Addon
0.3
1kB
02-13-11 04:47 PM
Addon


Post A Reply Comment Options
Unread 12-03-10, 11:17 PM  
enkil80
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 22
Uploads: 1
Originally posted by danltiger
Very cool! Thanks!

What you might want to do is change the project settings (or reupload) to appear as an optional file for Shot Glass. If you click the Optional Files tab, you'll see that there's a list of a few files that have been uploaded already. It makes it easier for people to find your plugin, and easier for the people who've already found it to find Shot Glass.
I tried and it wont let me because the other project its up, I reported myself to see if they take it down, in the meanwhile if you want you can copy paste the info, I did nothing lol just added the spell id order
Report comment to moderator  
Reply With Quote
Unread 12-04-10, 12:19 AM  
danltiger
A Murloc Raider
 
danltiger's Avatar
AddOn Author - Click to view AddOns

Forum posts: 9
File comments: 1522
Uploads: 13
Oh, don't report yourself! lol

Just send a PM to Seerah, and ask her to remove that project. (Or maybe she could edit it to be an optional addon for Shot Glass)

Originally posted by enkil80
I tried and it wont let me because the other project its up, I reported myself to see if they take it down, in the meanwhile if you want you can copy paste the info, I did nothing lol just added the spell id order
__________________
Author Portal
Tidy Plates, Tidy Threat, and Tidy Bar
Report comment to moderator  
Reply With Quote
Unread 12-04-10, 03:07 AM  
Pinghansen
Certified Insane
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 75
Uploads: 2
Localisation & multiple spell ID's for same spell name

I have one concern about using spell names when adding spells to TrackedAuras: localization!

But what we want to handle a spell called "GummyBear", and it turns out that there is a series of spell ID's, 234, 2346 and 3546, that all share the same spell name, Arrgh!, how do we handle that? After having a dumb moment, the light finally went on for me:
we don't

If they all have the same spell name, then they all have the same spell name, and we only need to handle ONE of them: GetSpellInfo(234) == GetSpellInfo(2346) == GetSpellInfo(3546) == "GummyBear". Handle one of them, and you have handled all of them. Duh! Pretty obvious - eventually
Last edited by Pinghansen : 12-04-10 at 03:11 AM.
Report comment to moderator  
Reply With Quote
Unread 12-04-10, 04:01 AM  
Pinghansen
Certified Insane
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 75
Uploads: 2
Re: Re: Priorities

Originally posted by danltiger
I was missing this:
Code:
priority[aura.position] = aura.priority
Duh! I, of all people, should have noticed that
Report comment to moderator  
Reply With Quote
Unread 12-04-10, 05:28 AM  
Pinghansen
Certified Insane
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 75
Uploads: 2
Re: Re: Fear, possession and frame color

Originally posted by danltiger
Try it out! Let us know how it turns out!
I have this wee problem: gave away my old account and all my new characters are still level kindergarten. My new healer is only 21. That translates to not getting the full picture, as the most "challenging" stuff I've done lately, is Vailing Caverns. It will be a while before I get to the interesting stuff. Thus the need for feedback.

Apart from that, it's nice seeing all the changes from the bottom up, and I'm having fun relearning the classes I play (priest, lock, mage, rogues, druids, hunters). Much is changed, yet much is the same.

I do however miss my heirlooms - had a full set for each class. Constantly having best-in-range gear in five to seven of the slots, makes it easy to twink your character. My wee ones kicked ass, as soon as they could get to a mailbox.
Report comment to moderator  
Reply With Quote
Unread 12-04-10, 05:53 AM  
Pinghansen
Certified Insane
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 75
Uploads: 2
Post Slashcommands

I have implemented parsing of slash commands and partially implemented saving the state of the handle. Partially because while the state is saved, it's not re-applied correctly.

ShotGlass.toc:
Code:
## SavedVariablesPerCharacter: sgShown
ShotGlass.lua, near top:
Code:
local sgShown = sgShown or true
ShotGlass.lua, at bottom:
Code:
function sgShowHandle(show)
    if show == false then
        ShotGlassRaidFrames.HandleFrame:Hide()
        sgShown = false
    else
        ShotGlassRaidFrames.HandleFrame:Show()
        sgShown = true
    end
end -- sgShowHandle

function sgParseCommand(cmd)
    local param1, param2, param3 = cmd:lower():match("^([%S]+)%s*([%S]*)%s*(.*)$");
    param1, param2 = param1 or "", param2 or "";
    if param1 == "toggle" or param1 == "" then
        sgShowHandle(not sgShown)
    end
end -- sgParseCommand

ShotGlassRaidFrames = CreateGroupHeader()
ShotGlassRaidFrames.TrackedAuras = TrackedAuras

SLASH_SHOTGLASS1 = "/shotglass";
SlashCmdList["SHOTGLASS"] = sgParseCommand;
sgShowHandle(sgShown)
Report comment to moderator  
Reply With Quote
Unread 12-04-10, 06:24 AM  
danltiger
A Murloc Raider
 
danltiger's Avatar
AddOn Author - Click to view AddOns

Forum posts: 9
File comments: 1522
Uploads: 13
Re: Re: Re: Fear, possession and frame color

Crazy! ;-)

Originally posted by Pinghansen
I have this wee problem: gave away my old account and all my new characters are still level kindergarten.
__________________
Author Portal
Tidy Plates, Tidy Threat, and Tidy Bar
Report comment to moderator  
Reply With Quote
Unread 12-04-10, 06:34 AM  
danltiger
A Murloc Raider
 
danltiger's Avatar
AddOn Author - Click to view AddOns

Forum posts: 9
File comments: 1522
Uploads: 13
Re: Slashcommands

There's a couple things to know when dealing with saved variables.
  • They need to be a global variable
  • The saved values are loaded separately, after the addon code is loaded

http://www.wowwiki.com/Saving_variab..._game_sessions
http://www.wowwiki.com/AddOn_loading_process

I like to watch for the events, PLAYER_ENTERING_WORLD (happens each time you see a loading screen) or PLAYER_LOGIN (happens when you login, or /reload).

When the event is called, the addon's saved variables will be loaded, and you can set the state properly.

Originally posted by Pinghansen
I have implemented parsing of slash commands and partially implemented saving the state of the handle. Partially because while the state is saved, it's not re-applied correctly.

ShotGlass.toc:
Code:
## SavedVariablesPerCharacter: sgShown
ShotGlass.lua, near top:
Code:
local sgShown = sgShown or true
ShotGlass.lua, at bottom:
Code:
function sgShowHandle(show)
    if show == false then
        ShotGlassRaidFrames.HandleFrame:Hide()
        sgShown = false
    else
        ShotGlassRaidFrames.HandleFrame:Show()
        sgShown = true
    end
end -- sgShowHandle

function sgParseCommand(cmd)
    local param1, param2, param3 = cmd:lower():match("^([%S]+)%s*([%S]*)%s*(.*)$");
    param1, param2 = param1 or "", param2 or "";
    if param1 == "toggle" or param1 == "" then
        sgShowHandle(not sgShown)
    end
end -- sgParseCommand

ShotGlassRaidFrames = CreateGroupHeader()
ShotGlassRaidFrames.TrackedAuras = TrackedAuras

SLASH_SHOTGLASS1 = "/shotglass";
SlashCmdList["SHOTGLASS"] = sgParseCommand;
sgShowHandle(sgShown)
__________________
Author Portal
Tidy Plates, Tidy Threat, and Tidy Bar
Report comment to moderator  
Reply With Quote
Unread 12-04-10, 08:54 AM  
Pinghansen
Certified Insane
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 75
Uploads: 2
Re: Re: Re: Re: Fear, possession and frame color

Originally posted by danltiger
Crazy! ;-)
That's me in a nutshell

I just about blew a gasket when Blizzard not only nerfed hunters into near uselessness, but also changed quite a few mechanisms that I relied on for other classes. They also persisted in removing all the little challenges that made wow fun to play, and a blue post informed us, that they would continue to do so.

At the same time, my wife was nagging me about spending too much time playing wow, so I figured I'd rid me of two problems at the same time, and gave away the account.

What I didn't take into account, was the need for something to replace it with in the evenings - my workshop in the basement is wet, the beekeeping season has ended and I'm not (yet) allowed to go out in a kayak, as I've recently had an eye operation. I ran out of things to read and got rather bored with watching TV, so here I am.
Report comment to moderator  
Reply With Quote
Unread 12-04-10, 01:35 PM  
enkil80
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 22
Uploads: 1
Originally posted by danltiger
Oh, don't report yourself! lol

Just send a PM to Seerah, and ask her to remove that project. (Or maybe she could edit it to be an optional addon for Shot Glass)
lol it worked
Report comment to moderator  
Reply With Quote
Unread 12-04-10, 06:34 PM  
Jimmerz28
A Kobold Labourer

Forum posts: 0
File comments: 42
Uploads: 0
Just in case anyone uses the F keys for 5 mans and wants the units in order just change line 459 in ShotGlass.lua from:


Code:
RaidGroupHeader:SetAttribute("point","RIGHT")
to

Code:
RaidGroupHeader:SetAttribute("point","LEFT")
Love the design thanks for this minimal addon!
Report comment to moderator  
Reply With Quote
Unread 12-05-10, 12:27 AM  
danltiger
A Murloc Raider
 
danltiger's Avatar
AddOn Author - Click to view AddOns

Forum posts: 9
File comments: 1522
Uploads: 13
Re: Re: Re: Re: Re: Fear, possession and frame color

I can understand. They've hit druids with some funky changes, which hasn't gotten me so excited. My wife and I are expecting twins in February, so that's cooled me down, too.

So, we'll see where that takes me...

Originally posted by Pinghansen
That's me in a nutshell

I just about blew a gasket when Blizzard not only nerfed hunters into near uselessness, but also changed quite a few mechanisms that I relied on for other classes. They also persisted in removing all the little challenges that made wow fun to play, and a blue post informed us, that they would continue to do so.

At the same time, my wife was nagging me about spending too much time playing wow, so I figured I'd rid me of two problems at the same time, and gave away the account.

What I didn't take into account, was the need for something to replace it with in the evenings - my workshop in the basement is wet, the beekeeping season has ended and I'm not (yet) allowed to go out in a kayak, as I've recently had an eye operation. I ran out of things to read and got rather bored with watching TV, so here I am.
__________________
Author Portal
Tidy Plates, Tidy Threat, and Tidy Bar
Report comment to moderator  
Reply With Quote
Unread 12-05-10, 06:00 PM  
Pinghansen
Certified Insane
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 75
Uploads: 2
Healing using ShotGlass

Until now, I have only been using ShotGlass for DPS (gotta have good gear first), but today I got back into healing today. Me thinks my big party frames are going bye bye

The frames are nice to use as a DPS, but even nicer as a healer. The size is just right and fits nicely between my unit frames, giving me a much better overview than my larger party frames, that, in order not to obscure things, have to be placed to a side. The little indicators are very easy on the eyes, yet highly visible.

I did miss my timeouts. It would be nice, if the visible part of the indicator doubled in size, when the buff is about to expire. Ideally the indicator border should be colored like the center at a few seconds before, then changed to golden at one second before.

I noticed that aggro on a unit is hard to see, if the unit is selected as your target. Perhaps aggro should be the higher priority.

I've dropped coloring the frame like Decursive. Gave me some Oooooh-shit moments, until I realized that the unit wasn't about to take a break, but merely was debuffed. Don't go there
Last edited by Pinghansen : 12-06-10 at 10:42 AM.
Report comment to moderator  
Reply With Quote
Unread 12-06-10, 02:35 PM  
Widersinnes
A Kobold Labourer

Forum posts: 0
File comments: 51
Uploads: 0
Is there a way to scale them?

Very nice but would like to see everything scaled to about 1.5 times what the default is. Is there a scaling option somewhere in the options or would it be a completely manual operation?
Report comment to moderator  
Reply With Quote
Unread 12-06-10, 05:34 PM  
Pinghansen
Certified Insane
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 75
Uploads: 2
Re: Is there a way to scale them?

Originally posted by Widersinnes
Very nice but would like to see everything scaled to about 1.5 times what the default is. Is there a scaling option somewhere in the options or would it be a completely manual operation?

I'll answer that with a quote:


Originally posted by Danltiger
Add this line near the end of the file:

ShotGlass:SetScale(2)

... where "2" stands for the scale multiplier. 2 = 200% size.

If you've never worked with LUA before, here's a tip: You can edit the file while the game is running by alt-tabbing, and then use the command '/reload' to apply the changes.
Last edited by Pinghansen : 12-07-10 at 04:43 AM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: