Download
(11Kb)
Download
Updated: 03-15-12 04:11 AM
Pictures
File Info
Updated:03-15-12 04:11 AM
Created:12-26-11 02:36 AM
Downloads:3,818
Favorites:10
MD5:

Cowmonster's CombatMeters

Version: 1.1.4
by: Cowmonster [More]

This is a simple combat meters addon that I've been toying with and I finally decided to post it. It lacks a lot of features of some of the other damage meter addons, but does add one of its own.

It does not store tons of information about fights so if you want a larger memory foot print and tons of data about the fight keep looking because this isn't the addon for you.

What this addon will do for you is display information about the current/last fight about total damage, dps, hps, interrupts, dispells or threat.

For those of you who do BGs or even rBGs. Unlike other combat meter addons, my addon gets blizzard's information which covers the entire BG (both factions) not just those that were in-range of your combat log. This actually allows you to scroll through the list of people prior to the beginning of a BG and see what classes and specs are on both sides and to keep track of where you stack up in damage or healing for the whole BG at a glance without opening the score panel. Selecting horde/alliance/all on the score panel will change the information displayed in the combat meters as well.

The addon will not report information to chat. I had this feature at one time and decided to remove it. Too many people spam meters already. Everyone else should have a meter if they want to know what it says.

This is still a work in progress and does have some odd little nuances. I am still working to integrate a threat meter (another one of my addons I decided would be best incorporated in this addon for release). I will be updating as I find bugs or bugs are reported in the comments.

The addon can be resized by dragging the bottom right corner and moved by dragging with the right mouse button on the buttons across the top. Later I may add some configuration options, but for now it is a work in progress.

To allow the addon to become extra small and compact, if the addon gets to small to fit all the buttons the interrupts and dispells buttons will each disappear in turn to allow room for the other buttons.

The addon has a slash command for some basic options like hiding/showing the addon, resetting its position on the screen and setting the scale of the addon. There may be additional options in the future and a list of options can be obtained by simply using the slash command "/cm" or "/combatmeters" without any options.

------------------------------------------------------------------------
Version 1.1.4
------------------------------------------------------------------------

* General debugging and error fixing.

------------------------------------------------------------------------
Version 1.1.3
------------------------------------------------------------------------

* General debugging and error fixing.

------------------------------------------------------------------------
Version 1.1.2
------------------------------------------------------------------------

* General debugging and error fixing.

------------------------------------------------------------------------
Version 1.1.1
------------------------------------------------------------------------

* Added preliminary support for my item level tooltip addon
so item levels of group members can be displayed in order
from highest to lowest.

------------------------------------------------------------------------
Version 1.1.0
------------------------------------------------------------------------

* Tweaked sizing issues for text some more.

* Added a scale option to the slash command.

* Adjusted the resizing so it can be resized even smaller by hiding
interrupts and then dispells if the frame is made smaller than what
can accommodate all the buttons.

------------------------------------------------------------------------
Version 1.0.9
------------------------------------------------------------------------

* Fixed a typing error which caused the addon to not work and not give
any error messages.

* Adjusted a sizing issue for text on bars.

------------------------------------------------------------------------
Version 1.0.8
------------------------------------------------------------------------

* Added ability to resize the frame.

------------------------------------------------------------------------
Version 1.0.7
------------------------------------------------------------------------

* Updated the slash command(s). /cm or /combatmeters to see a list of
possible options.

------------------------------------------------------------------------
Version 1.0.6
------------------------------------------------------------------------

* Following suggestions from comments the structure of the addon has
been modified and hopefully no more superfluous globals.

* Refresh function has been split into a function for BGs and one for
non-BGs.

* Addon no longer continuously refreshes meter unless in BG.

* Killing Blows / Deaths / Honorable Kills replaces DPS in BGs.

* Settings table at the top of CombatMeters.lua should now allow for
some lua based configuration for those interested in using it, but
changing these settings is not required to move the frame or use the
addon in general.

* Code has been cleaned up some which includes re-organising and
defining variables and various unspecified tweaks.

------------------------------------------------------------------------
Version 1.0.5
------------------------------------------------------------------------

* Unspecified updated and bug fixes.

------------------------------------------------------------------------
Version 1.0.4
------------------------------------------------------------------------

* Unspecified updated and bug fixes.

------------------------------------------------------------------------
Version 1.0.3
------------------------------------------------------------------------

* Unspecified updated and bug fixes.

------------------------------------------------------------------------
Version 1.0.2
------------------------------------------------------------------------

* Unspecified updated and bug fixes.

------------------------------------------------------------------------
Version 1.0.1
------------------------------------------------------------------------

* Unspecified updated and bug fixes.

------------------------------------------------------------------------
Version 1.0.0
------------------------------------------------------------------------

* Original release.
Optional Files (0)


Post A Reply Comment Options
Unread 12-26-11, 04:42 AM  
Haleth
This Space For Rent
 
Haleth's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1173
File comments: 1146
Uploads: 17
This looks very promising.
Report comment to moderator  
Reply With Quote
Unread 12-26-11, 06:41 AM  
sacrife
An Onyxian Warder
 
sacrife's Avatar
AddOn Author - Click to view AddOns

Forum posts: 384
File comments: 144
Uploads: 3
Add a small LUA only configuration to change:
Size
Barsize
Texture
Border
Position
Smoothhealth on/off
Hide in/out of combat

And this will be the addon I most certainly will use.

These settings can be altered through the LUA already, but gathering them would be simpler for the common person.
__________________

Report comment to moderator  
Reply With Quote
Unread 12-26-11, 04:21 PM  
Cowmonster
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 40
File comments: 117
Uploads: 14
Originally Posted by Haleth
This looks very promising.
Thank you. :-)
__________________


Author of:
Equipped Average Item Level :: ExtraBar :: Killing Blow Emote :: RecordTip
Report comment to moderator  
Reply With Quote
Unread 12-26-11, 04:31 PM  
Cowmonster
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 40
File comments: 117
Uploads: 14
Originally Posted by sacrife
Add a small LUA only configuration to change:
Size
Barsize
Texture
Border
Position
Smoothhealth on/off
Hide in/out of combat

And this will be the addon I most certainly will use.

These settings can be altered through the LUA already, but gathering them would be simpler for the common person.
Top of the main lua file sound like a good place to you? It will take a little bit to replace the static values all over the lua file with the config variables, but that seems like a very reasonable request. If it all works out well I may add an in-game config to do it.

Now the smooth health are you referring to the refresh rate? Right now it is on a 2 second interval.

As for hiding in/out of combat, right now that presents a problem. Because of the buttons for damage, dps, heals, interrupts, threat and reset across the top the addon can't be moved or shown/hidden in combat. I've tried configuring it different ways using different frame types and such, but the result remains the same. If anyone knows a better way to handle those elements, I'm all ears.
__________________


Author of:
Equipped Average Item Level :: ExtraBar :: Killing Blow Emote :: RecordTip
Report comment to moderator  
Reply With Quote
Unread 12-26-11, 05:13 PM  
sacrife
An Onyxian Warder
 
sacrife's Avatar
AddOn Author - Click to view AddOns

Forum posts: 384
File comments: 144
Uploads: 3
Originally Posted by Cowmonster

Top of the main lua file sound like a good place to you? It will take a little bit to replace the static values all over the lua file with the config variables, but that seems like a very reasonable request. If it all works out well I may add an in-game config to do it.

Now the smooth health are you referring to the refresh rate? Right now it is on a 2 second interval.

As for hiding in/out of combat, right now that presents a problem. Because of the buttons for damage, dps, heals, interrupts, threat and reset across the top the addon can't be moved or shown/hidden in combat. I've tried configuring it different ways using different frame types and such, but the result remains the same. If anyone knows a better way to handle those elements, I'm all ears.
Top of the main lua is fine by me
I personally dont like ingame configs because I set it up the way I want and its fixed for every character, every server, forever

The smooth health is that when you lose a big chunk of health, the entire chunk of health doesnt vanish right away, but it shrinks instead. Most unitframes has this, it just look sexier , not very important though.

The hiding thing was just a bonus, and I understand the frustration with the buttons, one solution could be to not hide them with the Show() command, but just set the alpha to 0, or if possible make the buttons secure frames with blizzard button templates, though this is harder to skin.
__________________

Report comment to moderator  
Reply With Quote
Unread 12-27-11, 01:26 AM  
Cowmonster
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 40
File comments: 117
Uploads: 14
Originally Posted by sacrife
Originally Posted by Cowmonster

Top of the main lua file sound like a good place to you? It will take a little bit to replace the static values all over the lua file with the config variables, but that seems like a very reasonable request. If it all works out well I may add an in-game config to do it.

Now the smooth health are you referring to the refresh rate? Right now it is on a 2 second interval.

As for hiding in/out of combat, right now that presents a problem. Because of the buttons for damage, dps, heals, interrupts, threat and reset across the top the addon can't be moved or shown/hidden in combat. I've tried configuring it different ways using different frame types and such, but the result remains the same. If anyone knows a better way to handle those elements, I'm all ears.
Top of the main lua is fine by me
I personally dont like ingame configs because I set it up the way I want and its fixed for every character, every server, forever

The smooth health is that when you lose a big chunk of health, the entire chunk of health doesnt vanish right away, but it shrinks instead. Most unitframes has this, it just look sexier , not very important though.

The hiding thing was just a bonus, and I understand the frustration with the buttons, one solution could be to not hide them with the Show() command, but just set the alpha to 0, or if possible make the buttons secure frames with blizzard button templates, though this is harder to skin.
It's just stupid that I have to use secure templates for something that is incapable of affecting game play. I can understand for action buttons, but something that is completely incapable of performing a combat action...rediculous!
__________________


Author of:
Equipped Average Item Level :: ExtraBar :: Killing Blow Emote :: RecordTip
Report comment to moderator  
Reply With Quote
Unread 12-27-11, 01:06 PM  
Cowmonster
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 40
File comments: 117
Uploads: 14
Originally Posted by Cowmonster
Originally Posted by sacrife
Originally Posted by Cowmonster

Top of the main lua file sound like a good place to you? It will take a little bit to replace the static values all over the lua file with the config variables, but that seems like a very reasonable request. If it all works out well I may add an in-game config to do it.

Now the smooth health are you referring to the refresh rate? Right now it is on a 2 second interval.

As for hiding in/out of combat, right now that presents a problem. Because of the buttons for damage, dps, heals, interrupts, threat and reset across the top the addon can't be moved or shown/hidden in combat. I've tried configuring it different ways using different frame types and such, but the result remains the same. If anyone knows a better way to handle those elements, I'm all ears.
Top of the main lua is fine by me
I personally dont like ingame configs because I set it up the way I want and its fixed for every character, every server, forever

The smooth health is that when you lose a big chunk of health, the entire chunk of health doesnt vanish right away, but it shrinks instead. Most unitframes has this, it just look sexier , not very important though.

The hiding thing was just a bonus, and I understand the frustration with the buttons, one solution could be to not hide them with the Show() command, but just set the alpha to 0, or if possible make the buttons secure frames with blizzard button templates, though this is harder to skin.
It's just stupid that I have to use secure templates for something that is incapable of affecting game play. I can understand for action buttons, but something that is completely incapable of performing a combat action...rediculous!
Oh btw the frame is movable. You have to grab it by a border, but you can drag it around. I'm gonna make it drag from anywhere on the frame, but for right now it is just the borders. This is actually all relatively new functionality since this was static positioned in the bottom right corner of a UI I wrote, but never published. I've had too many requests from friends for this mod or that mod from the UI that I started breaking them down into individual addons and posting them. This particular addon was actually four different addons that I'm mushing together into one.
__________________


Author of:
Equipped Average Item Level :: ExtraBar :: Killing Blow Emote :: RecordTip
Report comment to moderator  
Reply With Quote
Unread 12-27-11, 01:39 PM  
sacrife
An Onyxian Warder
 
sacrife's Avatar
AddOn Author - Click to view AddOns

Forum posts: 384
File comments: 144
Uploads: 3
Hehe, Yeah. Don't shoot the messenger

I personally like setting its position in lua and never worry about it again. Really see no need to move it around. However, I guess most people like this so I would just edit the lua and set movable to false
You could add a movable true/false to the "config" though if you would as well as pos x and pos y for us that set it to false.
__________________

Report comment to moderator  
Reply With Quote
Unread 12-27-11, 03:26 PM  
Cowmonster
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 40
File comments: 117
Uploads: 14
Originally Posted by sacrife
Hehe, Yeah. Don't shoot the messenger

I personally like setting its position in lua and never worry about it again. Really see no need to move it around. However, I guess most people like this so I would just edit the lua and set movable to false
You could add a movable true/false to the "config" though if you would as well as pos x and pos y for us that set it to false.
Okay check out the new version once it is actually up. I just uploaded. It has a Settings table at the top, which should cover the majority of what we've discussed. I still have to do the barsize stuff and the buttons don't scale right yet and I haven't swapped to secure frame to do the in/out of combat show/hide (grumble grumble grumble), but you should be able to set position and control a few of the things you wanted from there. The addon can be right button dragged if movable is set to true which will make static positioning easy if you just read the SavedVariables once you've placed it where you want it. Specifically CombatMetersDB.pos_x and CombatMetersDB.pos_y if you want to do a /run print(CombatMetersDB.pos_x, CombatMetersDB.pos_y) to make life easier. ;-)
__________________


Author of:
Equipped Average Item Level :: ExtraBar :: Killing Blow Emote :: RecordTip
Report comment to moderator  
Reply With Quote
Unread 12-29-11, 03:42 AM  
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1360
File comments: 829
Uploads: 56
Originally Posted by Cowmonster
I haven't swapped to secure frame to do the in/out of combat show/hide (grumble grumble grumble),
Sorry to butt in
This comment intrigued me.

You don't need secure frames to do incombat show/hide unless your addon is trying to take protected actions.

A damage meter normally wouldn't actually "do" anything (like trying to cast / use / move etc) so :Hide() :Show() should work without any issues.
Report comment to moderator  
Reply With Quote
Unread 12-29-11, 04:05 AM  
Cowmonster
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 40
File comments: 117
Uploads: 14
Originally Posted by Dridzt
Originally Posted by Cowmonster
I haven't swapped to secure frame to do the in/out of combat show/hide (grumble grumble grumble),
Sorry to butt in
This comment intrigued me.

You don't need secure frames to do incombat show/hide unless your addon is trying to take protected actions.

A damage meter normally wouldn't actually "do" anything (like trying to cast / use / move etc) so :Hide() :Show() should work without any issues.
Should and does are two very different things. Use the addon get in combat with the training dummies and try a /run CombatMetersFrame:Hide(). I can't figure why it wouldn't work, but if you can I would love to know.
__________________


Author of:
Equipped Average Item Level :: ExtraBar :: Killing Blow Emote :: RecordTip
Report comment to moderator  
Reply With Quote
Unread 12-29-11, 07:24 AM  
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1360
File comments: 829
Uploads: 56
Originally Posted by Cowmonster
Should and does are two very different things. Use the addon get in combat with the training dummies and try a /run CombatMetersFrame:Hide(). I can't figure why it wouldn't work, but if you can I would love to know.
There were quite a few unwanted globals*, I can only assume the problem was with one of those if you were experiencing taint.

I tidied up a little but tried to "tread lightly" so the code should remain very close to the original

I added visibility settings at the top and some barebones functionality to show hide automatically.
(it would need to apply the setting on load as well but I saw you haven't yet "plugged in" addon_loaded or P_E_W so didn't mess further)

I don't have a pet class so can't test the full functionality but I don't think I broke anything.

Modified file:
http://pastebin.com/5WuHH0X1
Hope it's of use.
Edit: I tested the modified version in combat had no problems with show/hide functionality.

* "OnEvent" was a particularly dangerous global as it's a very common name, there's no way to tell what it was overwriting.
Last edited by Dridzt : 12-29-11 at 07:47 AM.
Report comment to moderator  
Reply With Quote
Unread 12-29-11, 10:13 AM  
Cowmonster
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 40
File comments: 117
Uploads: 14
Originally Posted by Dridzt
Originally Posted by Cowmonster
Should and does are two very different things. Use the addon get in combat with the training dummies and try a /run CombatMetersFrame:Hide(). I can't figure why it wouldn't work, but if you can I would love to know.
There were quite a few unwanted globals*, I can only assume the problem was with one of those if you were experiencing taint.

I tidied up a little but tried to "tread lightly" so the code should remain very close to the original

I added visibility settings at the top and some barebones functionality to show hide automatically.
(it would need to apply the setting on load as well but I saw you haven't yet "plugged in" addon_loaded or P_E_W so didn't mess further)

I don't have a pet class so can't test the full functionality but I don't think I broke anything.

Modified file:
http://pastebin.com/5WuHH0X1
Hope it's of use.
Edit: I tested the modified version in combat had no problems with show/hide functionality.

* "OnEvent" was a particularly dangerous global as it's a very common name, there's no way to tell what it was overwriting.
I never got taint. It would show/hide outside combat, but not in-combat. It gave no taint and no error messages. It works now though. Honestly not sure what has changed, but it works.
__________________


Author of:
Equipped Average Item Level :: ExtraBar :: Killing Blow Emote :: RecordTip
Report comment to moderator  
Reply With Quote
Unread 12-29-11, 04:32 PM  
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1360
File comments: 829
Uploads: 56
Glad you got it working but you're still leaking globals alot... that was the main issue.

When you have a global function named OnEvent you can't really tell what you might be overwriting from other addons or even blizzard stuff.

If you look at the code I posted I just wrapped your functions inside your addon private table so there's 0 chance of conflicts
and in the process local-ized some variables (_, dps1, dps2, missing etc) that there's no reason to have as globals.

That said, it's your addon so I'm butting out again
Report comment to moderator  
Reply With Quote
Unread 12-29-11, 07:41 PM  
Cowmonster
A Cyclonian
AddOn Author - Click to view AddOns

Forum posts: 40
File comments: 117
Uploads: 14
Originally Posted by Dridzt
Glad you got it working but you're still leaking globals alot... that was the main issue.

When you have a global function named OnEvent you can't really tell what you might be overwriting from other addons or even blizzard stuff.

If you look at the code I posted I just wrapped your functions inside your addon private table so there's 0 chance of conflicts
and in the process local-ized some variables (_, dps1, dps2, missing etc) that there's no reason to have as globals.

That said, it's your addon so I'm butting out again
Now perhaps I've missed something, but in every other language I've ever used when you define anything with local it is not global. Is this not the case with lua? Seems if local doesn't make functions and variable definitions local then there wasn't much point in including it in the language.

You can't but out yet, teach, class is still in session. :-)
__________________


Author of:
Equipped Average Item Level :: ExtraBar :: Killing Blow Emote :: RecordTip
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: