As far as optimizing goes, with the Power Bar set to "Hide on cast", we now have Power Bars that listen for cast events, which is less optimal than the official code. However, while the bar is now hidden we (hopefully) aren't updating any LuaTexts on it and we aren't redrawing it constantly. If this was done properly, I'm not convinced such behaviour will have a net deficit on performance.
I'd actually thought about this request when I was working on the CastBar stuff this weekend and pretty much came to the conclusion that I'd need to move the tracking of casts out of the CastBar module. Which isn't really a horrible thing because it would let me have LuaTexts and the CastBar share the same code for tracking casts. However, this work will have to be done carefully because they both have slightly different needs and we need to track only the casts we're actually interested in.
All that said some comments on your changes. Your registering and unregistering of the UNIT_SPELLCAST events isn't going to work the way you think it will. The event is being registered/unregistered to the entire module not the specific layout/frame that the parameter applies to. So disabling the hide_on_cast on one layout will break it on all of them until you toggle one off and on again.
You're either going to have to iterate all the layouts to see if they need it (not pretty) or just always listen and simply ignore the events when you don't need them.
Your use of unit_is_casting as just a boolean is going to create race conditions. This is probably working fine when testing with just yourself because the update cycle for the PowerBar updates the players frames first to provide fast power updates for the player. But when it comes to other units there is no guarantee that the first guid to be updated will be the guid of the unit that you last received the _START event for. When multiple units are casting at the same time the unit_is_casting single boolean is going to be insufficient. So basically you need a guid_is_casting table. You'd set it similar to how you set the guids_to_update table to trigger the update. Except when you turn off a unit_is_casting you'd use = nil instead of = false (so that the table entry is removed).
Getting this feature right as far as CPU intensiveness is going to be difficult. It's just not easy to turn the events on and off as you need them in PB4's architecture.
Ah, k. As always, Shefki, you're input is very welcome. Your posts should all be coloured blue. :)
I figured I'd gotten things quite wrong when my frames started doing weird stuff when I was in a raid.
If there are some architectural changes required before this topic is more feasible, I'll just shut my trap and have another go later. Cheers for putting up with my derailments. :P
Ok.. I think I've read about half of these 115 pages :) And know everything I ever wanted to know about Pitbull... however I cannot seem to find one small item.
Basically I'd like to create a duplicate targetframe, with a few minimal items in the center area of my screen that only shows during combat. I used to use Discord Unitframes eons ago to acomplish this and it worked nicely.. sadly it seems that mod is dead and buried. Was hoping perhaps Pitbull would at least be able to duplicate a frame or let me create new ones somehow. The conditional is probably out of the question.. but at least this is a start :)
If it's answered somewhere in this post, I appologize.. but 115 pages is quite a bit to try to read at once.
At the moment we can create new Groups and specify which unit type (out of the possible types of groups: party, partypet, etc) to display in said Group. We can do this in-game and at-will. However, all of the non-group units are hardcoded. We are currently unable to make a new Frame and tell it to be the Player, we can't have another one that is just PartyPet4, etc.
Looking at the configuration pages for Units and Groups there are many similarities, although there are certainly many things that only apply to group-type units. I wonder if those two pages could be unified somehow.
At the very least, I agree that it would be nice if the "New group" textbox on the Groups page was copied over to the Units page so we could make our own custom frames.
At the moment we can create new Groups and specify which unit type (out of the possible types of groups: party, partypet, etc) to display in said Group. We can do this in-game and at-will. However, all of the non-group units are hardcoded. We are currently unable to make a new Frame and tell it to be the Player, we can't have another one that is just PartyPet4, etc.
For the most part the core was coded to support adding this ability. There's some configuration and storage work that has to be done to support this. In particular we need to find a good way to transition the existing hard coded units into a system where units can have arbitrary names. It's something I intend to do, however it's not high on my list because not many people need multiple frames for the same unit.
Basically I'd like to create a duplicate targetframe, with a few minimal items in the center area of my screen that only shows during combat.
[snip]
The conditional is probably out of the question.. but at least this is a start :)
Actually this particular condition is not entirely out of the question. Things that can be known by macro conditionals are possible with the secure state driver. It's complicated but not completely off the table. Even without the state driver it's possible to show a frame just before entering combat and then hide it after. There is a brief chance where even insecure code can do actions as you enter combat.
I'm sure supporting hiding and showing some singletons based upon entering/leaving combat would be popular.
the option to swap the player with the vehicle (pet) is really nice and seems to work everywhere except for one place - party/party pet frames when including the player in the group.
the pet frame for the player always displays the vehicle, it never swaps to the player, all the other party members get swapped though.
Just an update. Blizzard has adopted code similar to what I've requested (little different style wise, but effectively identical). So this will be fixed in 3.2.2.
PitBull4 is my only Addon that uses DogTag and the DogTag module is disabled.
But if I type /dogtag ingame, the DogTag frame is shown. Is DogTag now using performance?
If yes, how to disable it? Or should I delete the library and/or module?
Btw: Many thanks for the multiple castbar colors! And I think you can also close Ticket 558, since it was a duplicate.
PitBull4 is my only Addon that uses DogTag and the DogTag module is disabled.
But if I type /dogtag ingame, the DogTag frame is shown. Is DogTag now using performance?
If yes, how to disable it? Or should I delete the library and/or module?
Sadly yes. This is pretty high up on my todo list to deal with. It requires making the modules install as separate addons and moving the LibDogTag stuff as embeds into DogTagTexts. See this post for directions to disable it for now: http://forums.wowace.com/showpost.php?p=287166&postcount=1137
I can't get my head around a few things in LUA, specifically..
How would I go about getting class-colored names BUT instead of < AFK (x.xx)> just " AFK" or " DND" in white
Text that shows a players class and level (in the format of "[80] Death Knight") and colors the level by difficulty and class by it's corresponding class-color OR if it's a mob- displays whether it is a "Boss, "Elite", "Rare" or a "Rare-Elite" as well as having its level colored by difficulty and the elite/rare bit, well, default (in the format of "[81] Elite") and if it is a mob that isn't rare or elite just displays its level and colors it by difficulty (format of "[80]")
Also, how do I add the users power-color to this:
local max = MaxPower(unit)
if max > 0 then
return (Power(unit))
end
^--(All I want this to do is show me how much current power the unit has and its colo, there is probably an easier way to code this >_<)
Lastly, How would i go about getting health% (default LUA text) just showing "Dead" instead of Dead x:xx
Sadly yes. This is pretty high up on my todo list to deal with. It requires making the modules install as separate addons and moving the LibDogTag stuff as embeds into DogTagTexts. See this post for directions to disable it for now: http://forums.wowace.com/showpost.php?p=287166&postcount=1137
Ok, thanks.
But I'm wondering then why Ticket 50 was closed as fixed if it wasn't done yet.
@RiddellR
There is a own thread for LuaTexts questions.
Really silly question before I start playing with the option of a "unitframeless" UI...
I was going to use pitbull, to not draw frames lol
Let me explain, I want to use something like IceHud for my player, target, ToT frames, however, i really dislike the text disply options...
So my question is, can i realistically use pitbull to draw "empty" health/mana bars so i can format my text the way i want it?
I know it sounds stupid, and i'm probably not saying it right, i dont' want any visable pitbull bars, just the texts, using multiple bars allows me multiple "tiers" of text, case in point i could do this?
(BlankspaceBar) - Name (player/target or ToT)
(Healthbar) - Display health in numbers only, no visable animated bar
(Powerbar) - like Healthbar but for power/rage etc
You might be able to do something like this using a blank texture (I think one is included in SharedMedia) and a transparent background. However the bars would still be animated even though you can't see them, not sure if that's exactly what you are going for.
That would work, I just don't want to see 'color" bars, I just want to be able to format the text, as text options in all the huds i have tested are pretty bad. :P
Can i move pitbull4 off of lua text, and have it use dogtags instead? (I think I saw that option)
Ok, thanks.
But I'm wondering then why Ticket 50 was closed as fixed if it wasn't done yet.
Support for LOD was done. But the packaging wasn't changed to default to that. You'd have to rename all the folders and drag them out right now. On top of that LibDogTag is embedded in the top level not in DogTagTexts. So that still wouldn't fix the issue. Basically the ticket was closed because the work intended to be done for the ticket was done. There's just other incidental stuff that isn't done.
I'm sure supporting hiding and showing some singletons based upon entering/leaving combat would be popular.
Can't wait for it to happen!! Really.. I can't wait... I want it NOW! :) Till then I'm sifting through all these HUD addons to figure out which one can give me the simplest display without all the fancy graphic circles and stuff.
Also.. is there any way to 'vote' on Tickets? Or do you prioritize them manually? I saw one or two that someone posted above about this issue.. wasn't sure if commenting on them is the best way to show that <users> want that feature added/fixed/etc..
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I'd actually thought about this request when I was working on the CastBar stuff this weekend and pretty much came to the conclusion that I'd need to move the tracking of casts out of the CastBar module. Which isn't really a horrible thing because it would let me have LuaTexts and the CastBar share the same code for tracking casts. However, this work will have to be done carefully because they both have slightly different needs and we need to track only the casts we're actually interested in.
All that said some comments on your changes. Your registering and unregistering of the UNIT_SPELLCAST events isn't going to work the way you think it will. The event is being registered/unregistered to the entire module not the specific layout/frame that the parameter applies to. So disabling the hide_on_cast on one layout will break it on all of them until you toggle one off and on again.
You're either going to have to iterate all the layouts to see if they need it (not pretty) or just always listen and simply ignore the events when you don't need them.
Your use of unit_is_casting as just a boolean is going to create race conditions. This is probably working fine when testing with just yourself because the update cycle for the PowerBar updates the players frames first to provide fast power updates for the player. But when it comes to other units there is no guarantee that the first guid to be updated will be the guid of the unit that you last received the _START event for. When multiple units are casting at the same time the unit_is_casting single boolean is going to be insufficient. So basically you need a guid_is_casting table. You'd set it similar to how you set the guids_to_update table to trigger the update. Except when you turn off a unit_is_casting you'd use = nil instead of = false (so that the table entry is removed).
Getting this feature right as far as CPU intensiveness is going to be difficult. It's just not easy to turn the events on and off as you need them in PB4's architecture.
I figured I'd gotten things quite wrong when my frames started doing weird stuff when I was in a raid.
If there are some architectural changes required before this topic is more feasible, I'll just shut my trap and have another go later. Cheers for putting up with my derailments. :P
A few months ago someone asked about 2nd Player Frames..
http://forums.wowace.com/showthread.php?t=16754
Basically I'd like to create a duplicate targetframe, with a few minimal items in the center area of my screen that only shows during combat. I used to use Discord Unitframes eons ago to acomplish this and it worked nicely.. sadly it seems that mod is dead and buried. Was hoping perhaps Pitbull would at least be able to duplicate a frame or let me create new ones somehow. The conditional is probably out of the question.. but at least this is a start :)
If it's answered somewhere in this post, I appologize.. but 115 pages is quite a bit to try to read at once.
There are some related tickets:
316 - about units setting
561 - player available as an option in groups drop down
39 - unlinking frame families (albeit loosely related)
At the moment we can create new Groups and specify which unit type (out of the possible types of groups: party, partypet, etc) to display in said Group. We can do this in-game and at-will. However, all of the non-group units are hardcoded. We are currently unable to make a new Frame and tell it to be the Player, we can't have another one that is just PartyPet4, etc.
Looking at the configuration pages for Units and Groups there are many similarities, although there are certainly many things that only apply to group-type units. I wonder if those two pages could be unified somehow.
At the very least, I agree that it would be nice if the "New group" textbox on the Groups page was copied over to the Units page so we could make our own custom frames.
For the most part the core was coded to support adding this ability. There's some configuration and storage work that has to be done to support this. In particular we need to find a good way to transition the existing hard coded units into a system where units can have arbitrary names. It's something I intend to do, however it's not high on my list because not many people need multiple frames for the same unit.
[snip]
Actually this particular condition is not entirely out of the question. Things that can be known by macro conditionals are possible with the secure state driver. It's complicated but not completely off the table. Even without the state driver it's possible to show a frame just before entering combat and then hide it after. There is a brief chance where even insecure code can do actions as you enter combat.
I'm sure supporting hiding and showing some singletons based upon entering/leaving combat would be popular.
Just an update. Blizzard has adopted code similar to what I've requested (little different style wise, but effectively identical). So this will be fixed in 3.2.2.
But if I type /dogtag ingame, the DogTag frame is shown. Is DogTag now using performance?
If yes, how to disable it? Or should I delete the library and/or module?
Btw: Many thanks for the multiple castbar colors! And I think you can also close Ticket 558, since it was a duplicate.
Sadly yes. This is pretty high up on my todo list to deal with. It requires making the modules install as separate addons and moving the LibDogTag stuff as embeds into DogTagTexts. See this post for directions to disable it for now:
http://forums.wowace.com/showpost.php?p=287166&postcount=1137
How would I go about getting class-colored names BUT instead of < AFK (x.xx)> just " AFK" or " DND" in white
Text that shows a players class and level (in the format of "[80] Death Knight") and colors the level by difficulty and class by it's corresponding class-color OR if it's a mob- displays whether it is a "Boss, "Elite", "Rare" or a "Rare-Elite" as well as having its level colored by difficulty and the elite/rare bit, well, default (in the format of "[81] Elite") and if it is a mob that isn't rare or elite just displays its level and colors it by difficulty (format of "[80]")
Also, how do I add the users power-color to this:
local max = MaxPower(unit)
if max > 0 then
return (Power(unit))
end
^--(All I want this to do is show me how much current power the unit has and its colo, there is probably an easier way to code this >_<)
Lastly, How would i go about getting health% (default LUA text) just showing "Dead" instead of Dead x:xx
Any help would be appreciated :~D, Red.
Ok, thanks.
But I'm wondering then why Ticket 50 was closed as fixed if it wasn't done yet.
@RiddellR
There is a own thread for LuaTexts questions.
I was going to use pitbull, to not draw frames lol
Let me explain, I want to use something like IceHud for my player, target, ToT frames, however, i really dislike the text disply options...
So my question is, can i realistically use pitbull to draw "empty" health/mana bars so i can format my text the way i want it?
I know it sounds stupid, and i'm probably not saying it right, i dont' want any visable pitbull bars, just the texts, using multiple bars allows me multiple "tiers" of text, case in point i could do this?
(BlankspaceBar) - Name (player/target or ToT)
(Healthbar) - Display health in numbers only, no visable animated bar
(Powerbar) - like Healthbar but for power/rage etc
Thanks in advance :P
Can i move pitbull4 off of lua text, and have it use dogtags instead? (I think I saw that option)
Now to figure out a small bartender issue lol
Support for LOD was done. But the packaging wasn't changed to default to that. You'd have to rename all the folders and drag them out right now. On top of that LibDogTag is embedded in the top level not in DogTagTexts. So that still wouldn't fix the issue. Basically the ticket was closed because the work intended to be done for the ticket was done. There's just other incidental stuff that isn't done.
snip
snip
Can't wait for it to happen!! Really.. I can't wait... I want it NOW! :) Till then I'm sifting through all these HUD addons to figure out which one can give me the simplest display without all the fancy graphic circles and stuff.
Also.. is there any way to 'vote' on Tickets? Or do you prioritize them manually? I saw one or two that someone posted above about this issue.. wasn't sure if commenting on them is the best way to show that <users> want that feature added/fixed/etc..