Wanted to share a few comments about fonts and sizing in PB4 that I think maybe be confusing to some people. I know this stuff has come up somewhere but I'm really not sure where and I can't find it at the moment.
PB4 has a general font infrastructure design to it. Everything in PB4 so far respects this infrastructure except Aura (which it will soon). Within any given layout there is a Default font and Default size.
There is some confusion over the font size. Specially that you're given a scale. The reason font sizes are done by scales is because the layout may be used by multiple frames with multiple different scales. So a particular size is rather meaningless. Size 14 on one frame may not be the same as size 14 on another frame.
That said. The base font size is the size of the ChatFontNormal which is 14. If you have the font set to 100% it will be size 14 ignoring any overall scaling that the frame may be set to do .
If you insist on wanting to set a particular font size you can calculate the proper percentage as follows:
percentage=(((desired_size - 14)/14)+1)*100
Within individual text settings there is also a size setting. This also impacts the font size. So the actual font size is calculates like so:
14 * default_size_percent * specific_size_percent.
As such if you want to return a specific size by to the default size, simply set it back to 100%
Specific texts also have their on font setting. If you wish to put a font back in sync with the default font set it back to the same value as the default font. If you change the default font it will now change that font again for you.
I hope this is helpful to those of you who were confused by the font configuration.
Never mind Shefki - it was my fault. The mob which I was killing had his buffs mixed up with the debuffs as well in PB3, so it's Blizzard's fault. Can I suggest a possibility of being able of adding my own list in the Buff settings of Aura options: "Treat these Debuffs as Buffs." So that they will end up in the correct spot. Sorry for bothering you mate.
I am replicating GridStatus on PB4 raid frames. I have this as a general layout.
local i=1
a,b,c='','',''
while true do
local n=UnitAura(unit,i,"HELPFUL")
if not n then
break
elseif n=="spell" then
w='|cFFFFFFFF.|r'
elseif n=="spell" then
t='|cFFFFFFFF.|r'
elseif n=="spell" then
sm='|cFFFFFFFF.|r'
end
i=i+1
end
Outline()
return '%s%s%s',a,b,c
This returns the buffs on my raid frames as large squares. I have one set for buffs, another for my HoTs (using unitCaster as another nested if statement), and another for lifebloom (using count and expires along with unitCaster), so each raid frame has 3 of these running. This is identical to what I tried with Dogtags (except it had no ismine), and using only Lua Text, this is suppose to run a lot cleaner. What I noticed, however, is that I am getting frame skips in raids during combat.
Is my code flawed? I based it upon the other buff codes on here. I would find it hard to imagine that running buff checks would cause too much strain, because I ran the raid frames with the Aura mod (UpdateIn() for every aura instead of only lifebloom), as well as the Dogtag equivalent.
[2009/06/06 14:01:49-1440-x14]: PitBull4-r20090606062304\Modules\Aura\Update.lua:470: attempt to perform arithmetic on field 'frame_level' (a nil value)
PitBull4-r20090606062304\Modules\Aura\Update.lua:600: in function <Interface\AddOns\PitBull4\Modules\Aura\Update.lua:537>
PitBull4-r20090606062304\Modules\Aura\Update.lua:699: in function `UpdateAuras'
PitBull4-r20090606062304\Modules\Aura\Aura.lua:72: in function `UpdateFrame'
PitBull4-r20090606062304\ModuleHandling\Module.lua:271: in function `Update'
PitBull4-r20090606062304\UnitFrame.lua:493: in function `Update'
PitBull4-r20090606062304\UnitFrame.lua:518: in function `UpdateGUID'
PitBull4-r20090606062304\UnitFrame.lua:243: in function <Interface\AddOns\PitBull4\UnitFrame.lua:239>
<in C code>: in function `Show'
Interface\FrameXML\SecureTemplates.lua:748: in function <Interface\FrameXML\SecureTemplates.lua:660>:
Interface\FrameXML\SecureTemplates.lua:955: in function `SecureGroupHeader_Update':
Interface\FrameXML\SecureTemplates.lua:541: in function <Interface\FrameXML\SecureTemplates.lua:539>:
---
[2009/06/06 14:01:50-1440-x458]: PitBull4-r20090606062304\Modules\Aura\Update.lua:470: attempt to perform arithmetic on field 'frame_level' (a nil value)
PitBull4-r20090606062304\Modules\Aura\Update.lua:600: in function <Interface\AddOns\PitBull4\Modules\Aura\Update.lua:537>
PitBull4-r20090606062304\Modules\Aura\Update.lua:699: in function `UpdateAuras'
PitBull4-r20090606062304\Modules\Aura\Aura.lua:72: in function `UpdateFrame'
PitBull4-r20090606062304\Modules\Aura\Update.lua:877: in function `OnUpdate'
PitBull4-r20090606062304\Modules\Aura\Aura.lua:31: in function <Interface\AddOns\PitBull4\Modules\Aura\Aura.lua:28>
---
Go into your layouts and adjust the frame level. It's under Aura -> Buff Layout/Debuff Layout. The slider is at the bottom. My debuff one was set at '0' and was causing the errors listed above, set it to 1 and it works again.
[2009/06/06 12:42:25-871-x548]: PitBull4-r20090606062304\Modules\Aura\Update.lua:470: attempt to perform arithmetic on field 'frame_level' (a nil value)
PitBull4-r20090606062304\Modules\Aura\Update.lua:600: in function <Interface\AddOns\PitBull4\Modules\Aura\Update.lua:537>
PitBull4-r20090606062304\Modules\Aura\Update.lua:699: in function `UpdateAuras'
PitBull4-r20090606062304\Modules\Aura\Aura.lua:72: in function `UpdateFrame'
PitBull4-r20090606062304\Modules\Aura\Update.lua:877: in function `OnUpdate'
PitBull4-r20090606062304\Modules\Aura\Aura.lua:31: in function <Interface\AddOns\PitBull4\Modules\Aura\Aura.lua:28>
and
[2009/06/06 12:43:20-871-x3]: PitBull4-r20090606062304\Modules\Aura\Update.lua:470: attempt to perform arithmetic on field 'frame_level' (a nil value)
PitBull4-r20090606062304\Modules\Aura\Update.lua:600: in function <Interface\AddOns\PitBull4\Modules\Aura\Update.lua:537>
PitBull4-r20090606062304\Modules\Aura\Update.lua:699: in function `UpdateAuras'
PitBull4-r20090606062304\Modules\Aura\Aura.lua:72: in function `UpdateFrame'
PitBull4-r20090606062304\ModuleHandling\Module.lua:271: in function `Update'
PitBull4-r20090606062304\UnitFrame.lua:493: in function `Update'
PitBull4-r20090606062304\UnitFrame.lua:518: in function `UpdateGUID'
PitBull4-r20090606062304\Main.lua:1113: in function `CheckGUIDForUnitID'
PitBull4-r20090606062304\Main.lua:1117: in function `?'
CallbackHandler-1.0-3:146: in function <...ment\Lib\CallbackHandler-1.0\CallbackHandler-1.0.lua:146>
<string>:"safecall Dispatcher[1]":4: in function <[string "safecall Dispatcher[1]"]:4>
<in C code>: ?
<string>:"safecall Dispatcher[1]":13: in function `?'
CallbackHandler-1.0-3:91: in function `Fire'
AceEvent-3.0-3 (Skinner):119: in function <...ce\AddOns\Skinner\libs\AceEvent-3.0\AceEvent-3.0.lua:118>
<in C code>: in function `TargetNearestEnemy'
<string>:"TARGETNEARESTENEMY":1: in function <[string "TARGETNEARESTENEMY"]:1>
Go into your layouts and adjust the frame level. It's under Aura -> Buff Layout/Debuff Layout. The slider is at the bottom. My debuff one was set at '0' and was causing the errors listed above, set it to 1 and it works again.
Yup sorry about that, I pushed out only part of the changes I'd made in the Options file and missed pushing the default value for frame_level which is 2.
Just pushed the fix. If you want to put it back to default and you've modified your settings to make it work just set it to 2.
Never mind Shefki - it was my fault. The mob which I was killing had his buffs mixed up with the debuffs as well in PB3, so it's Blizzard's fault. Can I suggest a possibility of being able of adding my own list in the Buff settings of Aura options: "Treat these Debuffs as Buffs." So that they will end up in the correct spot. Sorry for bothering you mate.
I'm not really inclined to do that because I've never seen anything like what you're talking about. What mob is this that has buffs mixed up with debuffs. Do you have a screenshot of this?
This returns the buffs on my raid frames as large squares. I have one set for buffs, another for my HoTs (using unitCaster as another nested if statement), and another for lifebloom (using count and expires along with unitCaster), so each raid frame has 3 of these running. This is identical to what I tried with Dogtags (except it had no ismine), and using only Lua Text, this is suppose to run a lot cleaner. What I noticed, however, is that I am getting frame skips in raids during combat.
Is my code flawed? I based it upon the other buff codes on here. I would find it hard to imagine that running buff checks would cause too much strain, because I ran the raid frames with the Aura mod (UpdateIn() for every aura instead of only lifebloom), as well as the Dogtag equivalent.
My guess would be the Lifebloom text you're using is updating the color based on the expires time and you're using UpdateIn() to trigger that update. However, right now there's no way to tell if you're being asked to update because of UNIT_AURA or a timer. Probably what you need is the event that triggered you to be passed as another parameter. That way you can cache the timings and only walk the auras when you get a UNIT_AURA event.
Post the code and I'll look at them and see if I can't make them more efficient.
So I should trigger the color update when the aura changes and not within the update time I'm guessing? My Lua is rough, and there are a lot of conditions to account for with my low skill. I just started learning about events with Lua Texts.
My other counters are similar, but do the returns at the end and set the variables to the formatting, basically cutting everything in the if n=="Lifebloom" and using var='color formatting' instead. I have 2 more of these and recently added a third for debuffs.
local i=1
while true do
local n,_,_,c,_,_,e,u=UnitAura(unit,i,"HELPFUL")
if not n then
break
elseif u=="player" then
if n=="Lifebloom" then
UpdateIn(0.2)
local d=floor(e-GetTime(),1)+1
if c==3 then
return '|cFF00FF00%s|r',d
elseif c==2 then
return '|cFFFFFF00%s|r',d
elseif c==1 then
return '|cFFFF0000%s|r',d
end
end
end
i=i+1
end
Here is what I used as a sort of template for the other ones. How bad is the garbage and stuff on these as well?
local i=1
rj,rg,wg='','','',''
while true do
local n,_,_,c,_,_,e,u=UnitAura(unit,i,"HELPFUL")
if not n then
break
elseif u=="player" then
if n=="Rejuvenation" then
rj='|cFFFF00FF.|r'
elseif n=="Regrowth" then
rg='|cFF00FF00.|r'
elseif n=="Wild Growth" then
wg='|cFF55FF55.|r'
end
end
i=i+1
end
Outline()
return '%s%s%s',wg,rg,rj
I'll put some effort into playing around with the later today. I suspect what is needed is to provide a new variable that let's you know why you're being asked to update. Then you could have code that's something like so (note that this won't work yet because the event variable I'm using doesn't exist yet):
if not lifebloom_count then
lifebloom_count = {}
end
if not lifebloom_expire then
lifebloom_expire = {}
end
if event == "UNIT_AURA" then
local i=1
local found = false
while true do
local n,_,_,c,_,_,e,u=UnitAura(unit,i,"HELPFUL")
if not n then
break
elseif u=="player" then
if n=="Lifebloom" then
found = true
lifebloom_count[font_string] = c
lifebloom_expire[font_string] = e
UpdateIn(0.2)
end
end
end
if not found then
lifebloom_count[font_string] = nil
lifebloom_expire[font_string] = nil
end
end
local c = lifebloom_count[font_string]
local e = lifebloom_expire[font_string]
local d=floor(e-GetTime(),1)+1
if d > 0 then
if c==3 then
return '|cFF00FF00%s|r',d
elseif c==2 then
return '|cFFFFFF00%s|r',d
elseif c==1 then
return '|cFFFF0000%s|r',d
end
end
Basically what this does is it keeps track of the count and expire times of your lifeblooms for each text and then for the timed updates uses the cached data rather than recalling UnitAura.
But again, there's no event variable to let you do this yet. I'll probably add one because it seems like a good idea.
Cool, thanks for the explanation bro. I'll sift through the code a bit more tomorrow. How is the second one, is that an example of proper usage? I think UnitAura is going to be one of the more complex types of texts people are going to make, since they were pretty popular with dogtags for missing buffs and such.
Here's what they look like in a raid setting by the way, with a rough raid layout.
I updated this morning and now I'm getting 40+ errors like this:
PitBull4-r20090607073411\Modules\Aggro\Aggro.lua:5: PitBull4_Aggro requires PitBull4
PitBull4-r20090607073411\Modules\Aggro\Aggro.lua:5: in main chunk
I get one of these for every module plus a couple of "attempt to index 'Pitbull4'" nil-value errors. I tried reinstalling with and without externals and everything is enabled on my addon screen. Any ideas? Thanks.
EDIT: Reverted to previous version and it works fine so seems to be something in the most recent update.
I updated this morning and now I'm getting 40+ errors like this:
PitBull4-r20090607073411\Modules\Aggro\Aggro.lua:5: PitBull4_Aggro requires PitBull4
PitBull4-r20090607073411\Modules\Aggro\Aggro.lua:5: in main chunk
I get one of these for every module plus a couple of "attempt to index 'Pitbull4'" nil-value errors. I tried reinstalling with and without externals and everything is enabled on my addon screen. Any ideas? Thanks.
EDIT: Reverted to previous version and it works fine so seems to be something in the most recent update.
I submitted a ticket for this a bit ago, but wanted to be sure I'm not missing anything.
Is it possible to make the cast bar an entirely independent bar? Right now it takes up space from the character's health bar and I'm really too fond of that.
I submitted a ticket for this a bit ago, but wanted to be sure I'm not missing anything.
Is it possible to make the cast bar an entirely independent bar? Right now it takes up space from the character's health bar and I'm really too fond of that.
PB4 has a general font infrastructure design to it. Everything in PB4 so far respects this infrastructure except Aura (which it will soon). Within any given layout there is a Default font and Default size.
There is some confusion over the font size. Specially that you're given a scale. The reason font sizes are done by scales is because the layout may be used by multiple frames with multiple different scales. So a particular size is rather meaningless. Size 14 on one frame may not be the same as size 14 on another frame.
That said. The base font size is the size of the ChatFontNormal which is 14. If you have the font set to 100% it will be size 14 ignoring any overall scaling that the frame may be set to do .
If you insist on wanting to set a particular font size you can calculate the proper percentage as follows:
percentage=(((desired_size - 14)/14)+1)*100
Within individual text settings there is also a size setting. This also impacts the font size. So the actual font size is calculates like so:
14 * default_size_percent * specific_size_percent.
As such if you want to return a specific size by to the default size, simply set it back to 100%
Specific texts also have their on font setting. If you wish to put a font back in sync with the default font set it back to the same value as the default font. If you change the default font it will now change that font again for you.
I hope this is helpful to those of you who were confused by the font configuration.
This returns the buffs on my raid frames as large squares. I have one set for buffs, another for my HoTs (using unitCaster as another nested if statement), and another for lifebloom (using count and expires along with unitCaster), so each raid frame has 3 of these running. This is identical to what I tried with Dogtags (except it had no ismine), and using only Lua Text, this is suppose to run a lot cleaner. What I noticed, however, is that I am getting frame skips in raids during combat.
Is my code flawed? I based it upon the other buff codes on here. I would find it hard to imagine that running buff checks would cause too much strain, because I ran the raid frames with the Aura mod (UpdateIn() for every aura instead of only lifebloom), as well as the Dogtag equivalent.
Modules\Aura\Update.lua:470: attempt to perform arithmetic on field 'frame_level' (a nil value)
Using the latest revision
[2009/06/06 12:42:25-871-x548]: PitBull4-r20090606062304\Modules\Aura\Update.lua:470: attempt to perform arithmetic on field 'frame_level' (a nil value)
PitBull4-r20090606062304\Modules\Aura\Update.lua:600: in function <Interface\AddOns\PitBull4\Modules\Aura\Update.lua:537>
PitBull4-r20090606062304\Modules\Aura\Update.lua:699: in function `UpdateAuras'
PitBull4-r20090606062304\Modules\Aura\Aura.lua:72: in function `UpdateFrame'
PitBull4-r20090606062304\Modules\Aura\Update.lua:877: in function `OnUpdate'
PitBull4-r20090606062304\Modules\Aura\Aura.lua:31: in function <Interface\AddOns\PitBull4\Modules\Aura\Aura.lua:28>
and
[2009/06/06 12:43:20-871-x3]: PitBull4-r20090606062304\Modules\Aura\Update.lua:470: attempt to perform arithmetic on field 'frame_level' (a nil value)
PitBull4-r20090606062304\Modules\Aura\Update.lua:600: in function <Interface\AddOns\PitBull4\Modules\Aura\Update.lua:537>
PitBull4-r20090606062304\Modules\Aura\Update.lua:699: in function `UpdateAuras'
PitBull4-r20090606062304\Modules\Aura\Aura.lua:72: in function `UpdateFrame'
PitBull4-r20090606062304\ModuleHandling\Module.lua:271: in function `Update'
PitBull4-r20090606062304\UnitFrame.lua:493: in function `Update'
PitBull4-r20090606062304\UnitFrame.lua:518: in function `UpdateGUID'
PitBull4-r20090606062304\Main.lua:1113: in function `CheckGUIDForUnitID'
PitBull4-r20090606062304\Main.lua:1117: in function `?'
CallbackHandler-1.0-3:146: in function <...ment\Lib\CallbackHandler-1.0\CallbackHandler-1.0.lua:146>
<string>:"safecall Dispatcher[1]":4: in function <[string "safecall Dispatcher[1]"]:4>
<in C code>: ?
<string>:"safecall Dispatcher[1]":13: in function `?'
CallbackHandler-1.0-3:91: in function `Fire'
AceEvent-3.0-3 (Skinner):119: in function <...ce\AddOns\Skinner\libs\AceEvent-3.0\AceEvent-3.0.lua:118>
<in C code>: in function `TargetNearestEnemy'
<string>:"TARGETNEARESTENEMY":1: in function <[string "TARGETNEARESTENEMY"]:1>
Yup sorry about that, I pushed out only part of the changes I'd made in the Options file and missed pushing the default value for frame_level which is 2.
Just pushed the fix. If you want to put it back to default and you've modified your settings to make it work just set it to 2.
I'm not really inclined to do that because I've never seen anything like what you're talking about. What mob is this that has buffs mixed up with debuffs. Do you have a screenshot of this?
I put it outside right-up but there is much space between the frame and the text, I like to down it a little.
Thanks
My guess would be the Lifebloom text you're using is updating the color based on the expires time and you're using UpdateIn() to trigger that update. However, right now there's no way to tell if you're being asked to update because of UNIT_AURA or a timer. Probably what you need is the event that triggered you to be passed as another parameter. That way you can cache the timings and only walk the auras when you get a UNIT_AURA event.
Post the code and I'll look at them and see if I can't make them more efficient.
My other counters are similar, but do the returns at the end and set the variables to the formatting, basically cutting everything in the if n=="Lifebloom" and using var='color formatting' instead. I have 2 more of these and recently added a third for debuffs.
Here is what I used as a sort of template for the other ones. How bad is the garbage and stuff on these as well?
Basically what this does is it keeps track of the count and expire times of your lifeblooms for each text and then for the timed updates uses the cached data rather than recalling UnitAura.
But again, there's no event variable to let you do this yet. I'll probably add one because it seems like a good idea.
Here's what they look like in a raid setting by the way, with a rough raid layout.
http://www.sabaren.com/wow/ui/ui3.1.3.raid.png
I get one of these for every module plus a couple of "attempt to index 'Pitbull4'" nil-value errors. I tried reinstalling with and without externals and everything is enabled on my addon screen. Any ideas? Thanks.
EDIT: Reverted to previous version and it works fine so seems to be something in the most recent update.
Fixed. Wrong stuff got pushed last night.
Is it possible to make the cast bar an entirely independent bar? Right now it takes up space from the character's health bar and I'm really too fond of that.
I closed your ticket as a duplicate of this:
http://www.wowace.com/projects/pitbull4/tickets/351-castbar-option/
But yes there's no way to do this currently.