I'd like to write a module for Grid2 that allows a (very) limited set of spellbuttons to be added. A bit what Clique does now but more visual. Any hints how to go about this?
With indicators and statuses being objects could I feasibly add SecureActionButtons out of combat?
I'm thinking about sth like... Lifebloom, Rejuv, Regrowth and Nourish. 4 tiny actionbuttons to the side of every grid2-unitframe. i could feed them "buff/debuff is active" as a status so that Nourish can show how many hots are active. I can dim Rejuv if it's already on there. I can show LB's stack-count and duration in the button. etc...
This is basically a marriage of my long time maintained, but now defunct and abandoned BeneCast and my now favorite healing addon (it's so deliciously screen-estate saving, even w big unitframes) Grid.
I actually started hacking at GridBuffIcons, but then I read how Grid2 should make things a lot easier.
I'd like to write a module for Grid2 that allows a (very) limited set of spellbuttons to be added. A bit what Clique does now but more visual...
I really do not know how much of that is possible. Blizzard restricts actions to buttons a lot during combat. Certainly you could possibly create a Grid2IndicatorButton and a Grid2StatusSpell. The indicator would register to use the type "spell" and the status would export as a provider of "spell". This would allow the button types to be created and laid out and bind to their spell when out of combat. They can then display the icon of the spell they cast.
The indicator could use regular statuses for possibly dimming / coloring or something an overlay icon of the spell. You would have to investigate this part yourself. AutoBarTest has really old but stripped down code for buttons, but may not work atm since its been a few patches. You can certainly use it to google relevant documentation and api's and to find iriel's guide to buttons etc. Also trace the patch notes in the UI & Macros forum.
Vaguely related, AutoBar supports LibStickyFrames-2.0, Grid2 does not yet but Grid does via another mod. This lets you attach AutoBar bars to the Grid frame. (I have it do a bar of druid spells below grid, and pots, stones, and other consumables on the right edge) It is certainly a proof of concept of sorts. The unknown part is what exactly is required to have a bunch of buttons on each unit, and can it be made to work on pet frames which come and go during the fight.
Personally I am not a fan of clicking, I like keybinds. However this would help clickers heal more better or something. Do not forget the debuff spells. You could possibly add them via alt / ctrl / click of one of your buttons to save on space and reduce clutter. Similarly, you can use a modifier on regrowth or something to do NS + HT etc.
My first goal is to simply get the buttons up there. That'd be 90% of the usefulness for me...
Adding spellindicators and modifier-bindigs is "fluff and polish".
My experience with BeneCast taught me that you CAN do a lot with buttons as long as you don't touch 'em in combat.
As for pets that pop in and out I just need to set those as parent and the buttons will dissapear along w the unit frame.
What I'd really need right now (barring you writing it yrself :p) is:
Do you have anything in the way of "how to write a module for Grid2". I can study existing modules but they give me little differentiation of what is required by Grid2 and what is "own code" of the module.
Something like:
- Implement method x, y and z at the bare minimum and what should each method do
- do this or that to "subscribe" to a status
- do this to get the actual unit frame (or which parameter is it in which method)
- Grid2 will call this on load, that on ... whatever
- do this or that to "throw" a status change
I don't think that me, a mediocre addon dev, should start trying to get to the nitty-gritty detail of Grid2's code. I do sometimes and I often learn, but it's terribly timeconsuming and time is one of the things I have the least of these days (and the reason I had to abandon BeneCast).
Seems i could to make a generic "spellbutton" indicator similar to the text indicators. Then I'd make a status-maker similar to how buffs are done... Someone fills in a spellname, hits Add and a status is made.
At first these would always say "on" and the spellbutton-indicator that is "subscribing" to it would show it's icon.
Later I could add stuff like
- "default on, but fade if effect x is found" with x being the buff/hot name(s)
- "default faded, but unfade if effect y is found"
- "default faded, but unfade if a debuff of type z is found"
and so on... eventually reproducing the BeneCast featureset within Grid2 :).
...What I'd really need right now (barring you writing it yrself :p) is:
Do you have anything in the way of "how to write a module for Grid2". I can study existing modules but they give me little differentiation of what is required by Grid2 and what is "own code" of the module...
For a status it is really simple. Just look at Grid2StatusAFK. It fits on one page. Same with its config part.
For an indicator its a bit more complex. There are no standalone ones atm so it is possible the code needs modification to support them. When I have time I may mess with the mana bar stuff as an example and to make sure its possible.
...Seems i could to make a generic "spellbutton" indicator similar to the text indicators. Then I'd make a status-maker similar to how buffs are done... Someone fills in a spellname, hits Add and a status is made.
...So, am I a bit on track??
Yes that is on track. I would recommend making it Grid2IndicatorButton though and not specifically spell buttons.
That would let it eventually support macros and the 15+ other things a button can do. The expansion can be handled by supporting "spell", "macro", etc.
Added Grid2StatusGroup for leader / raid-assist and master-looter statuses. Supports icons colors and texts. This is a port of GridStatusParty. Probably needs a better name. Maybe Grid2StatusGroupIcons?
Not sure what you mean here. Set them up and dont config them in combat?
Of course. Grid's unit frames have the same restrictions..
Once in combat you can't touch their position-/size or any of those funky secure attributes. After all, my intention is merely to dim them when their buff is found, not hide them completely... Dimming in combat by overlaying a non-clickable half-transparant icon is fine iirc.
I am busy applying Jerry's patch. It will be a bit before it is all stable again. Currently disabling all plugins works with a reset and then a reload.
All right, the patch is in and things are mostly working. There is an issue with range initial conditions after the SV reset. Toggling range distance fixes it, as does a reloadUI. The code is a bit skanky and needs some refactoring. Should probably make all options into modules and hang some of the common options functions off that.
I'm getting this error with version r266, but it sounds like you already know about it since toggling the range distance seems to fix my frames, but I thought I'd post it just in case it's something different.
This is after I log in or do a reloadui:
[21:58:01] Interface\AddOns\Grid2\GridDefaults.lua:134: bad argument #1 to 'pairs' (table expected, got nil)
(tail call): ?
[C]: in function `pairs'
Interface\AddOns\Grid2\GridDefaults.lua:134: in function `CreateCategories'
Interface\AddOns\Grid2\GridDefaults.lua:184: in function `Setup'
Interface\AddOns\Grid2\GridCore.lua:218: in function <Interface\AddOns\Grid2\GridCore.lua:197>
(tail call): ?
[C]: ?
[string "safecall Dispatcher[1]"]:9: in function <[string "safecall Dispatcher[1]"]:5>
(tail call): ?
...Ons\ag_UnitFrames\libs\AceAddon-3.0\AceAddon-3.0.lua:531: in function `EnableAddon'
...Ons\ag_UnitFrames\libs\AceAddon-3.0\AceAddon-3.0.lua:621: in function <...Ons\ag_UnitFrames\libs\AceAddon-3.0\AceAddon-3.0.lua:607>
[C]: in function `LoadAddOn'
Interface\FrameXML\UIParent.lua:232: in function `UIParentLoadAddOn'
Interface\FrameXML\UIParent.lua:255: in function `CombatLog_LoadUI'
Interface\FrameXML\UIParent.lua:502: in function <Interface\FrameXML\UIParent.lua:474>
Not sure if you're meaning you fixed this bug in the latest AuraGroup or not, but I still get the error I posted above even with the newest AuraGroup you just uploaded today.
Not sure if you're meaning you fixed this bug in the latest AuraGroup or not, but I still get the error I posted above even with the newest AuraGroup you just uploaded today.
What about if you click the reset button in the Debugging section? This is on a druid right?
After resetting the SVs, the error message I received above does go away. The frames are still greyed out like out of range, but going in the options and toggling the range under Status does fix the problem.
I still have problems with the range status after a reset.
I'm using a deDE client with Grid2 r269.
* In the Grid2Options dropdown menu for range there is only 38 yards not 40:
Options/GridStatuses.lua: [38] = (L["%d yards"]:format(38))
Changing to 38 yards results in this message:
[2009/10/07 11:06:06-3486-x1]: Grid2-3.2.0.224\modules\StatusRange.lua:43: attempt to call upvalue 'check' (a nil value)
Grid2-3.2.0.224\modules\StatusRange.lua:16: in function <Grid2\modules\StatusRange.lua:14>
Grid2-3.2.0.224\modules\StatusRange.lua:51: in function `Grid_RangesUpdated'
Grid2Options\GridStatuses.lua:685: in function <Grid2Options\GridStatuses.lua:683>
(tail call): ?:
<in C code>: ?
<string>:"safecall Dispatcher[2]":9: in function <[string "safecall Dispatcher[2]"]:5>
(tail call): ?:
AceConfigDialog-3.0-36:794: in function <...nfig-3.0\AceConfigDialog-3.0\AceConfigDialog-3.0.lua:609>
(tail call): ?:
<in C code>: ?
<string>:"safecall Dispatcher[3]":9: in function <[string "safecall Dispatcher[3]"]:5>
(tail call): ?:
AceGUI-3.0-28 (Ace3):305: in function `Fire'
...ns\Ace3\AceGUI-3.0\widgets\AceGUIWidget-DropDown.lua:426: in function <...ns\Ace3\AceGUI-3.0\widgets\AceGUIWidget-DropDown.lua:417>:
(tail call): ?:
<in C code>: ?
<string>:"safecall Dispatcher[3]":9: in function <[string "safecall Dispatcher[3]"]:5>
(tail call): ?:
AceGUI-3.0-28 (Ace3):305: in function `Fire'
...3\AceGUI-3.0\widgets\AceGUIWidget-DropDown-Items.lua:333: in function <...3\AceGUI-3.0\widgets\AceGUIWidget-DropDown-Items.lua:328>:
---
I changed it to 40 but the range status is still ~2 yards/meters to short.
I still have problems with the range status after a reset.
I'm using a deDE client with Grid2 r269...
1) First, thank you for using Buggrabber and Bugsack and making this easy to diagnose.
2) Please get the latest version 3.2.0.273, your 3.2.0.224 is rather old.
The only acceptable ways of getting Grid2 at the moment are via the Curse Clients with the type set to alpha, or by going to the wowace project pages and looking for the VERY latest under the files tab.
Also added configmode support in Grid2.
With indicators and statuses being objects could I feasibly add SecureActionButtons out of combat?
I'm thinking about sth like... Lifebloom, Rejuv, Regrowth and Nourish. 4 tiny actionbuttons to the side of every grid2-unitframe. i could feed them "buff/debuff is active" as a status so that Nourish can show how many hots are active. I can dim Rejuv if it's already on there. I can show LB's stack-count and duration in the button. etc...
This is basically a marriage of my long time maintained, but now defunct and abandoned BeneCast and my now favorite healing addon (it's so deliciously screen-estate saving, even w big unitframes) Grid.
I actually started hacking at GridBuffIcons, but then I read how Grid2 should make things a lot easier.
I really do not know how much of that is possible. Blizzard restricts actions to buttons a lot during combat. Certainly you could possibly create a Grid2IndicatorButton and a Grid2StatusSpell. The indicator would register to use the type "spell" and the status would export as a provider of "spell". This would allow the button types to be created and laid out and bind to their spell when out of combat. They can then display the icon of the spell they cast.
The indicator could use regular statuses for possibly dimming / coloring or something an overlay icon of the spell. You would have to investigate this part yourself. AutoBarTest has really old but stripped down code for buttons, but may not work atm since its been a few patches. You can certainly use it to google relevant documentation and api's and to find iriel's guide to buttons etc. Also trace the patch notes in the UI & Macros forum.
Vaguely related, AutoBar supports LibStickyFrames-2.0, Grid2 does not yet but Grid does via another mod. This lets you attach AutoBar bars to the Grid frame. (I have it do a bar of druid spells below grid, and pots, stones, and other consumables on the right edge) It is certainly a proof of concept of sorts. The unknown part is what exactly is required to have a bunch of buttons on each unit, and can it be made to work on pet frames which come and go during the fight.
Personally I am not a fan of clicking, I like keybinds. However this would help clickers heal more better or something. Do not forget the debuff spells. You could possibly add them via alt / ctrl / click of one of your buttons to save on space and reduce clutter. Similarly, you can use a modifier on regrowth or something to do NS + HT etc.
That reminds me, I need to add stickyframes.
Adding spellindicators and modifier-bindigs is "fluff and polish".
My experience with BeneCast taught me that you CAN do a lot with buttons as long as you don't touch 'em in combat.
As for pets that pop in and out I just need to set those as parent and the buttons will dissapear along w the unit frame.
What I'd really need right now (barring you writing it yrself :p) is:
Do you have anything in the way of "how to write a module for Grid2". I can study existing modules but they give me little differentiation of what is required by Grid2 and what is "own code" of the module.
Something like:
- Implement method x, y and z at the bare minimum and what should each method do
- do this or that to "subscribe" to a status
- do this to get the actual unit frame (or which parameter is it in which method)
- Grid2 will call this on load, that on ... whatever
- do this or that to "throw" a status change
I don't think that me, a mediocre addon dev, should start trying to get to the nitty-gritty detail of Grid2's code. I do sometimes and I often learn, but it's terribly timeconsuming and time is one of the things I have the least of these days (and the reason I had to abandon BeneCast).
Seems i could to make a generic "spellbutton" indicator similar to the text indicators. Then I'd make a status-maker similar to how buffs are done... Someone fills in a spellname, hits Add and a status is made.
At first these would always say "on" and the spellbutton-indicator that is "subscribing" to it would show it's icon.
Later I could add stuff like
- "default on, but fade if effect x is found" with x being the buff/hot name(s)
- "default faded, but unfade if effect y is found"
- "default faded, but unfade if a debuff of type z is found"
and so on... eventually reproducing the BeneCast featureset within Grid2 :).
So, am I a bit on track??
For a status it is really simple. Just look at Grid2StatusAFK. It fits on one page. Same with its config part.
For an indicator its a bit more complex. There are no standalone ones atm so it is possible the code needs modification to support them. When I have time I may mess with the mana bar stuff as an example and to make sure its possible.
Not sure what yuou mean here. Set them up and dont config them in combat?
Yes that is on track. I would recommend making it Grid2IndicatorButton though and not specifically spell buttons.
That would let it eventually support macros and the 15+ other things a button can do. The expansion can be handled by supporting "spell", "macro", etc.
Of course. Grid's unit frames have the same restrictions..
Once in combat you can't touch their position-/size or any of those funky secure attributes. After all, my intention is merely to dim them when their buff is found, not hide them completely... Dimming in combat by overlaying a non-clickable half-transparant icon is fine iirc.
This is after I log in or do a reloadui:
[21:58:01] Interface\AddOns\Grid2\GridDefaults.lua:134: bad argument #1 to 'pairs' (table expected, got nil)
(tail call): ?
[C]: in function `pairs'
Interface\AddOns\Grid2\GridDefaults.lua:134: in function `CreateCategories'
Interface\AddOns\Grid2\GridDefaults.lua:184: in function `Setup'
Interface\AddOns\Grid2\GridCore.lua:218: in function <Interface\AddOns\Grid2\GridCore.lua:197>
(tail call): ?
[C]: ?
[string "safecall Dispatcher[1]"]:9: in function <[string "safecall Dispatcher[1]"]:5>
(tail call): ?
...Ons\ag_UnitFrames\libs\AceAddon-3.0\AceAddon-3.0.lua:531: in function `EnableAddon'
...Ons\ag_UnitFrames\libs\AceAddon-3.0\AceAddon-3.0.lua:621: in function <...Ons\ag_UnitFrames\libs\AceAddon-3.0\AceAddon-3.0.lua:607>
[C]: in function `LoadAddOn'
Interface\FrameXML\UIParent.lua:232: in function `UIParentLoadAddOn'
Interface\FrameXML\UIParent.lua:255: in function `CombatLog_LoadUI'
Interface\FrameXML\UIParent.lua:502: in function <Interface\FrameXML\UIParent.lua:474>
My bad, didn't check in the AuraGroup files.
Not sure if you're meaning you fixed this bug in the latest AuraGroup or not, but I still get the error I posted above even with the newest AuraGroup you just uploaded today.
What about if you click the reset button in the Debugging section? This is on a druid right?
Yes this is on my drood. Will clicking reset erase all my settings though, so I have to resize and position my frames and set everything up again?
yes, it resets SVs for you
I'm using a deDE client with Grid2 r269.
* In the Grid2Options dropdown menu for range there is only 38 yards not 40:
Options/GridStatuses.lua: [38] = (L["%d yards"]:format(38))
Changing to 38 yards results in this message:
[2009/10/07 11:06:06-3486-x1]: Grid2-3.2.0.224\modules\StatusRange.lua:43: attempt to call upvalue 'check' (a nil value)
Grid2-3.2.0.224\modules\StatusRange.lua:16: in function <Grid2\modules\StatusRange.lua:14>
Grid2-3.2.0.224\modules\StatusRange.lua:51: in function `Grid_RangesUpdated'
Grid2Options\GridStatuses.lua:685: in function <Grid2Options\GridStatuses.lua:683>
(tail call): ?:
<in C code>: ?
<string>:"safecall Dispatcher[2]":9: in function <[string "safecall Dispatcher[2]"]:5>
(tail call): ?:
AceConfigDialog-3.0-36:794: in function <...nfig-3.0\AceConfigDialog-3.0\AceConfigDialog-3.0.lua:609>
(tail call): ?:
<in C code>: ?
<string>:"safecall Dispatcher[3]":9: in function <[string "safecall Dispatcher[3]"]:5>
(tail call): ?:
AceGUI-3.0-28 (Ace3):305: in function `Fire'
...ns\Ace3\AceGUI-3.0\widgets\AceGUIWidget-DropDown.lua:426: in function <...ns\Ace3\AceGUI-3.0\widgets\AceGUIWidget-DropDown.lua:417>:
(tail call): ?:
<in C code>: ?
<string>:"safecall Dispatcher[3]":9: in function <[string "safecall Dispatcher[3]"]:5>
(tail call): ?:
AceGUI-3.0-28 (Ace3):305: in function `Fire'
...3\AceGUI-3.0\widgets\AceGUIWidget-DropDown-Items.lua:333: in function <...3\AceGUI-3.0\widgets\AceGUIWidget-DropDown-Items.lua:328>:
---
I changed it to 40 but the range status is still ~2 yards/meters to short.
Elbereth.
1) First, thank you for using Buggrabber and Bugsack and making this easy to diagnose.
2) Please get the latest version 3.2.0.273, your 3.2.0.224 is rather old.
The only acceptable ways of getting Grid2 at the moment are via the Curse Clients with the type set to alpha, or by going to the wowace project pages and looking for the VERY latest under the files tab.
This means: http://www.wowace.com/addons/grid2/files/
The same goes for the plugins you use.