GROUP BUTTONS
by Lozareth
This was a simple mod at conception aimed at making a healer's job easier (gods know healers need all the help they can get). Since then it has become a great tool for any class.
Overview
The Features
Supported Unit Frame Mods
Mods That Add Additional Functionality
Pet and Raid Bars
Options Overview
Slash Commands
Bar Options
Action Cast Options
Action Display Options
Annouce Options
Thresholds
Misc. Options
I CAN'T DRAG MY PARTY FRAMES or MY PARTY FRAMES GET STUCK ON THE CURSOR
HOW TO ADD OUT OF RANGE INDICATORS TO YOUR TARGET BARS
HOW TO ADD OUT OF RANGE INDICATORS TO YOUR PARTY BARS
I CAN'T CLICK SOME BUTTONS, HOW DO I FIX IT?
Acknowledgements
File List
Contact the Author
Overview:
This mod provides you with action bars attached to yourself, your pet, each member of your party, each of thier pets, each raid member, hostile targets, and friendly targets. Each one of these bars auto-targets the person it is attached to when one of its buttons is clicked, uses that button's action, then returns you to your original target. There is also a Lowest Health bar that auto-targets the party member with the lowest percentage of health remaining when a heal spell is clicked. For cure spells it auto-targets the first person it finds in need of that particular cure, same for buffs.
Additionally, you can set an action to used when you hold a combination of shift, ctrl, and/or alt and click one of your mouse buttons on a person's frame (thier portrait and health/mana bars). See below for a list of unit frame mods for which this feature works.
Back to Top
The Features:
- Does not use any of your action button slots. This mod creates its own "virtual" action buttons.
- Easy to use GUI for setting up your bars. Type /gb to open it.
- Drag each bar to where you want it
- Many display options to customize bar/button appearance: resize individual bars, transparency, change the layout of the buttons, and more
- Define when you want buttons to be shown and they'll remain hidden until conditions meet those you specified
- Set spells to assist a bar's target before being cast
- Set a spell to auto-update to its highest rank on training
- Set a spell to prevent you from rebuffing a target
- Set a heal to scale down to a lower rank that matches your target's lost health better
- Options to announce you're casting spell, option to configure the text you use on announcements
- Target the bar target's pet on shift-click, spells set to assist will assist that pet
- Friendly-targetted spells (heals, buffs, etc.) on the Hostile Target bar will default to self-cast.
- Override the Prevent Overhealing and Prevent Overkill options when holding Ctrl and clicking a button.
Back to Top
Supported Unit Frames Mods:
The following mods are supported for click-casting and showing a bar when mousing over a unit frame.
- The default Blizzard frames
- Discord Unit Frames
- CT_RaidAssist
- MiniGroup
- Nymbia's Perl Unit Frames
- Nurfed Unit Frames
- WatchDog
Back to Top
Mods That Add Additional Functionality:
- MobHealth2 -- This mod is required for the Prevent Overkill option to work.
- MapLibrary -- This mod is required to display an out of range indicator on the party bars. See the section HOW TO ADD OUT OF RANGE INDICATORS TO YOUR PARTY BARS.
  Back to Top
  Pet and Raid Bars:
  Only buttons 1 through 5 will be displayed in the pet and raid action bars. The rest of the buttons can only be used with click-casting.
  Back to Top
  Options Overview:
  You can open the options window by typing /gb or /groupbuttons or setting a keybinding to toggle the options window. Use the red buttons on the top-left to get to settings for the bar you want to set-up. The Misc Settings, Thresholds, and Announce Options buttons will bring up options that aren't tied to a specific bar. Mini Spellbook will pop up a window listing all the spells you have available by just thier icons. If you're having trouble dragging and dropping from the default spellbook, use the mini spellbook. Unlock/Lock Bars enables/disables the ability to drag the bars around the screen. Unlock/Lock Buttons enables/disables the ability to drag an action out of a button. Show/Hide Empty causes buttons without an action to show/hide when you close the options window. Show/Hide Labels shows/hides a label for each bar that tells you what bar that is. Show/Hide Clickboxes shows/hides the invisible (grey when the options window is open) buttons Group Buttons draws over your unit frames. Hide them when you need to drag a unit frame or if you want to disable click-casting. You close the window by click the big X in the upper-right or by typing /gb again. The window can be dragged to wherever you want it.
  You setup your buttons by dragging and dropping spells or items into empty buttons on the bars (just like regular action bars) or you can drag and drop them into the boxes in the options window. Clicking on the Options button next to a button's box in the options window will pop-up a window with options specifically for that button (see Action Cast Options and Action Display Options below). Options will drag and drop with an action when you move it around. All sliders in all the options windows have an edit box to the right showing thier current value. A value can be typed into that edit box and it will update the setting when you press enter. Typed-in values can also be greater than what the slider allows as long as it makes sense (i.e., alpha can't be set to greater than 100).
  Back to Top
  Slash Commands:
  You can use /groupbuttons in place of /gb below.
- /gb -- Toggle display of the options window.
- /gb help -- Display a list of slash commands in-game.
- /gb clearall -- Erases all settings for the current character.
- /gb toggle labels -- Shows/hides the bar labels.
- /gb toggle empty -- Shows/hides buttons that don't hold an action.
- /gb toggle spellbook -- Shows/hides the Group Buttons Mini-Spellbook.
- /gb toggle barlock -- Locks/unlocks the bars for dragging.
- /gb toggle buttonlock -- Locks/unlocks the ability to drag actions out of a button.
- /gb setkeybar bar -- Sets the dynamic keybindings to the specified bar. Valid bars are self, pet, party1 to party4, partypet1 to partypet4, raid1 to raid40, and target.
- /gb useaction bar button -- Simulates a press of the specified button on the specified bar. This causes its action to be used with all of Group Buttons's options applied and targetting that bar's unit. Valid bars are self, pet, party1 to party4, partypet1 to partypet4, raid1 to raid40, lowesthealth, hostiletarget, and friendlytarget. Button is a number from 1 to 20.
Back to Top
Bar Options:
The options on the top right are for controlling an entire bar's appearance.
- Hide Bar -- Hides this set of bars all the time. Nothing will cause them to display except opening the options window.
- Collapse Hidden Buttons -- This causes visible buttons on the bar to shift to the left to fill in blank spots left by hidden buttons.
- Attach to Unit Frame -- This causes the bar to anchor to the appropriate unit frame so that it drags along with it.
- Show On Mouseover -- This causes the bar to remain hidden until you mouseover its corresponding unit frame. I.E. If it's set on your self bar, the bar won't show up until you move your mouse over your portrait and/or health and mana bars.
- Button Size -- Use this slider to set the height and width off all buttons in the bar.
- Button Transparency -- Use this slider to set the alpha level of all buttons in the bar.
- Button Spacing -- Use this slider to set the amount of space between the buttons in a bar.
- Button Rows -- Use this slider to set how many rows in which the buttons display. If you set the rows equal to the number of buttons on the bar you will have a 1 column vertical layout.
- Attach Point -- Use this option to set which part of the bar attaches to its unit frame.
- Attach To -- Use this option to set which part of the unit frame the bar attaches to.
- Bar X Offset -- Use this option to set the amount of horizontal distance between a bar's Attach Point and Attach To points.
- Bar Y Offset -- Use this option to set the amount of vertical distance between a bar's Attach Point and Attach To points.
- Copy Bar Settings -- Select a bar in the drop-down menu and click the Copy button to copy the selected-bar's settings to the bar you're currently modifying.
Back to Top
Action Cast Options:
- Assist Unit Before Casting -- This will cause you to automatically target a person's target before the button's action is used.
- Announce Spellcast -- This will cause you to send a message via say, whisper, party chat, or raid chat that you are using the button's action. It will also announce when that action has failed or been interrupted. You can configure the text you send in Announce Options.
- Use Announce Number -- This menu is used to select which of 5 announce texts you want to use with this button.
- Auto-Update to Next Rank -- This option will cause a spell to be automatically updated to the next highest rank whenever you visit a trainer.
- Prevent Re-buff -- This option will prevent you from casting a buff if the target already has the button's buff.
- Scale Buff's Rank to Target's Level -- This will change your spellcast to the highest rank of the buff the target can receive if it the target can't receive the rank currently in the button.
- Prevent Overhealing -- This option will change a heal spell to another heal spell that more closely matches the amount of damage the target has taken. It can be overridden by holding Ctrl when clicking a button.
- Match Spell Name -- This option will cause Prevent Overhealing to only choose from spells with the same name as the spell in the button.
- Match Casting Time -- This option will cause Prevent Overhealing to only choose from spells with the same casting time as the spell in the button.
- Prevent Overkill -- This option requires you to have MobHealth2 installed. It will change a damage spell to a lower rank that more closely matches the amount of damage needed to kill your target.
- Cast Lower Rank When Mana's Low -- This will change the spell to the highest rank you have enough mana to cast without exceeding the rank to which the button is set.
- Cancel Spellcast if Target is Healed -- This will cancel your spellcast if the target's lost health becomes less than the amount you set for the Cancel Spellcast Threshold.
Back to Top
Action Display Options:
The term "in context" means conditions meet all the options you've set for when the button should be displayed and "out of context" is its opposite.
- Show When: -- This is used to set a specific condition that must be true in order for the button to be in context. These conditions are:

> Always Show
> Unit Damage > Heal Amount -- The target has taken more damage than the average amount the button's spell heals.
> Unit Past Health Threshold 1-4 -- The target has taken more damage than one of the health thresholds you've set.
> Unit Past Mana Threshold -- The target has lost more mana that what you've set for the mana threshold.
> Party Past Area Threshold -- The number of party members you defined in Thresholds options have taken more damage than what you've set for the Area Threshold.
> Unit Isn't Buffed/Debuffed -- The target isn't currently affected by the buff/debuff the button holds.
> Unit Is Magic Debuffed -- The target is affected by any magic debuff.
> Unit Is Cursed -- The target is affected by any curse.
> Unit Is Poisoned -- The target is affected by any poison.
> Unit Is Diseased -- The target is affected by any disease.
> Unit Is Dead

- Show For Shapeshift Form -- Use this option to set a form for which the button is in context. The No Form setting means the button is only in context when you aren't in a specific shapeshift form. This is used for druid animal forms, rogue stealth, and warrior stances.
- When Out of Context -- Use this option to set what happens when a button is out of context. Hide will cause the button to be hidden. Flash will cause the button to remain visible and start flashing. Grey Out will cause the button to remain visible and become greyed-out.
- Hide Button -- When checked this button is always hidden no matter its context. Useful for buttons you want to use only for click-casting.
- Flash When In Context -- The button will flash in and out when it's in context.
- Show When I'm In Combat -- The button will only be in context when you're in combat.
- Show When I'm Not In Combat -- The button will only be in context when you're not in combat.
- Show if Unit is a Valid Target -- The button will only be in context when the target is something that spell is able to target. For example, setting this option for Mana Burn will cause Mana Burn to only be in context when you're targetting a unit that has mana.
- Show For Classes: -- The button is only in context when the bar's unit is one of the checked classes.
Back to Top
Announce Options:
When setting text you want to be diplayed for an announcement you can use $t for target's name, $s for spellname, $r for spell rank, $c for casting time, $a for heal amount, and $m for percent of mana you have left. Interruption and Failure announcements are only sent for buttons which are set to announce a spellcast.
- Announce Text 1-5 -- These boxes are used to set the text that's sent when you start casting a spell.
- Cast Failed Text -- This box is used to set the text that's sent when your spellcast fails.
- Cast Interrupted Text -- This box is used to set the text that's sent when your spellcast is interrupted.
- Do not use say/party chat/raid chat to announce -- These boxes are used to prevent announcements from going to certain channels. If you don't use raid, it's sent to party. If you don't use party, it's sent to say. If you don't use say, it's sent as a whisper to the action's target.
- Do not announce when soloing -- This is used to turn off all announcements when you're not in a party or raid.
- Turn Off All Announcements -- This is a quick way to disable all announcements without having to go through them button by button. Useful when someone requests that you stop spamming chat.
Back to Top
Thresholds:
All thresholds refer to amount of health or mana lost. Thresholds are considered to be an actual damage amount unless you place a % after the number.
- Health Threshold 1-4 -- These refer to the amount of health the bar's unit has lost.
- Mana Threshold -- This refers to the amount of mana the bar's unit has lost.
- Area Heal Threshold -- This refers to the amount of health a number of members in your party has lost. It is the amount of damage a specific person has taken. So if you set it to 500 and set Number of Party Members to Check to 3, then 3 or more people must have taken more than 500 damage each for the Party Past Area Heal Threshold context to be valid.
- Number of Party Members to Check -- This tells the mod how many members of your party have to be past the Area Heal Threshold.
- Cancel Spellcast Threshold -- This refers to amount of health the bar's unit has lost. If the unit's lost health becomes less than this threshold while a spell is casting, then spells set to Cancel Spellcast if Target Is Healed will be cancelled.
Back to Top
Misc. Options:
- Do Not Auto-Attack -- Checking this option will stop you from automatically entering attack mode when using an action.
- Disable Tooltip -- Checking this option will stop the tooltip from popping up when your mouse is over a button.
- Do Not Target Pet on Shift-Click -- Checking this option will stop you from targetting a unit's pet when shift-clicking a button.
- Include Pet in the Lowest Health Bar -- This will cause the Lowest Health bar to include party pets in the units it checks for lowest health/in need of a cure/in need of a buff.
- Include Raid Members in the Lowest Health Bar -- This will cause the Lowest Health bar to include raid members in the units it checks for lowest health/in need of a cure/in need of a buff.
- Hide Static Keybindings -- This will stop the regular keybindings from displaying in the buttons.
- Hide Dynamic Keybindings -- This will stop the dynamic keybindings from displaying in the buttons.
- Disable Out of Range Indicator on the Party Bars
- Show Cooldown Count -- This will display a timer in the middle of a button showing how much time is remaining on its cooldown.
- Disable Spam: Group Buttons -- This will disable all the messages this mod sends to notify of certain things: an option changed a spell, buttons can't be clicked because bars are unlocked, etc.
- Disable Spam: Can't Do That Yet -- This will prevent you from attempting to use an action while it's cooling down.
- Disable Spam: Another Action Is In Progress -- This will prevent you from attempting to use an action when you're in the middle of casting a spell.
- Disable Spam: Out of Range -- This will prevent you from attempting to cast a spell when your target is out of range.
- Adjust Clickbox -- Use the drop-down menu to choose a clickbox to modify and use the offset sliders to move a specific edge of the clickbox until it's where you want it.
- Colors -- This is used to set what colors are used to re-color a button. Range will set the color for when a button's out of range. Mana will set the color for when you don't have enough mana to cast a button's spell. Grey will set the color used when a button is greyed-out from being out of context.
Back to Top
I CAN'T DRAG MY PARTY FRAMES or MY PARTY FRAMES GET STUCK ON THE CURSOR
I've done what I can to make Group Buttons not interfere with other mods but some of them are coded in ways I just can't work around. If you're having the problem above, open Group Buttons's options window and click the Hide Clickboxes button so you have direct access to the unit frames. This will disable click-casting and showing a bar on mouseover until you click Show Clickboxes.
Back to Top
HOW TO ADD OUT OF RANGE INDICATORS TO YOUR TARGET BARS
All you have to do is make sure there's a spell on one of your regular action bars, visible or hidden, that has the same range as a spell on one of the target bars. It's best to use an action bar that uses the highest-numbered action button IDs (bar 7 in the default bars for instance). It's also best to place 1, and only 1, rank of each spell on your Group Buttons target bars on that action bar so that Group Buttons always has an exact match to refer to. Once you have the action bar setup, relog or type /console reloadui to get Group Buttons to update which spells use which action button.
Back to Top
HOW TO ADD OUT OF RANGE INDICATORS TO YOUR PARTY BARS
*NOTE: The following has been known to cause a lot of lag for some people and will not work inside instances. *
There's now a way to check whether an action is out of range of the party member the bar is attached to. First, download and install MapLibrary from curse-gaming.com: http://www.curse-gaming.com/mod.php?addid=1305. Then open GB_Buttons.lua in any text editor. Find these lines:

>     --			elseif (MapLibrary_Updater and (not GB_Settings[GB_INDEX].disablePartyRange)) then
>     --				local inInstance = MapLibrary.InInstance();
>     --				if (MapLibrary.Ready and (not inInstance)) then
>     --					local dist = MapLibrary.UnitDistance(unit, "player", 1);
>     --					if (dist and dist > range) then inRange = false; end
>     --				end

Remove the -- in front of each line and you'll have out of range indicators on your party bars.
Back to Top
I CAN'T CLICK SOME BUTTONS, HOW DO I FIX IT?
Some mods create invisible button frames that you can't click through to get to these buttons. The best thing for you to do is move the bars into a new position until you can click them. The alternative is modifying GB_Templates.xml and setting the bars to display above EVERYTHING (spellbook, questlog, bags, etc.). Here's how you do that: Open GB_Templates.xml in any text editor. Find this line:

> <Frame name="GB_ActionBarTemplate" virtual="true" frameStrata="low" movable="true">

Change frameStrata="low" to frameStrata="high".
Back to Top
Acknowledgements:
First, a special thank you to Guon who's Group Health Warning mod inspired me to write this and provided the original code.
A HUGE thank you to the communities at ui.worldofwar.net and www.curse-gaming.net/mod.php for so many terrific suggestions that really made this mod's versatility explode.
Thank you to Florkenaar, Grenor, and others who helped with the original French and German translations.
Thank you to IDispatch, Boergen, and Nicorg for French and German translations since v4.0.
Thank you to Shaniquaa for lots of support when my motivation was waning.
Back to Top
The Files:
- Bindings.xml -- Keybindings xml
- EmptyButton.tga -- A texture for buttons without actions
- GB_Buttons.lua -- Processing of buttons on update and events that affect when a button should be displayed
- GB_Display.lua -- Functions that show/hide bars and buttons and set other appearance attributes
- GB_Main.lua -- Initialization, Slash Commands, stuff that happens when you click a button, and other miscellaneous functions
- GB_MiniSpellbook.lua -- Functions that deal with the MiniSpellbook
- GB_MiniSpellbook.xml -- Defines the MiniSpellbook frame
- GB_Options.lua -- Functions that receive input from the options windows and update your settings
- GB_Options_Bar.xml -- Defines the bar options window inside the main options window
- GB_Options_Main.xml -- Defines the main options window and the misc. settings window
- GB_Options_Spell.xml -- Defines the spell options window that appears when you right-click a button or click an Options button in a bar options window
- GroupButtons.toc
- GB_Templates.xml -- Holds the templates for the bars, buttons, clickboxes, and anything that's not part of the options window.
- localization.lua -- Globals and localization settings
- Notes_V#_# -- Patch notes for the latest version. I keep it updated as I'm coding to help keep me from forgetting anything
- readme.html -- Yer looking at it now
Back to Top
Contact the Author
I run a forum and a guild at www.clandiscord.com where there's a thread on this mod. Good place for suggestions and bug notifications.
Email me at lozareth@clandiscord.com if email's your thing and you don't want to use a forum.
The latest version of this file can be found at http://www.clandiscord.com/GroupButtons/readme.html.
Back to Top