Download
(13 Kb)
Download
Updated: 04-19-08 10:55 AM
Addon for:
oUF.
Pictures
File Info
Updated:04-19-08 10:55 AM
Created:unknown
Downloads:4,377
Favorites:12
MD5:
oUF Lighterfluid
Version: 1.4
by: Coldfury [More]
This is my layout for the unitframes addon "oUF".

You need some basic LUA knowledge to edit the layout as all configurations are done trough "layout.lua" by coding.

Note: I've commented the code a lot to ease your experience so, please, read carefully "layout.lua" before asking things. The "if - elseif - then" are pretty much self explanatory.

Note²: Atm, the party is horizontal, and only the first 3 raid groups are spawned. But i added/commented the code to revert back to vertical party and 1 raid group showing every members.

Useful Links
oUF - The core mod for the unitframes layout.

oUF_Lily - Layout for oUF by haste.

oUF_P3lim - Layout for oUF by P3lim.

oUF_Banzai - Plugin for oUF to color UFs based on aggro. (*You need LibBanzai-2.0*)

oUF_DispelColor - Plugin for oUF to color UFs based on curable debuffs.

Wowace Forums - oUF modifications/layouts thread.
v1.4
- Fixed LibDruidMana support. (Thanks Gaenjin)

v1.3
- Small fix to the "numberize" function.

v1.2
- Added "numberize" function which format numbers.(ie. 10234 becomes 10.2k and 1929394 becomes 1.9M) It will only "numberize" number over 10k.
- Added separate "updateraidHealth" function for raid units.
- Fixed the pet happiness display on the pet power/mana bar.
(Red=unhappy, Yellow=content, Green=happy)

v1.0
- Initial Release
Optional Files (0)


Post A Reply Comment Options
Old 01-01-09, 02:10 PM  
sweede
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 18
File comments: 16
Uploads: 3
Any chance on getting this updated to the latest version of oUF ?
sweede is offline Report comment to moderator  
Reply With Quote
Old 07-30-08, 03:14 PM  
Luckybob88
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
having a problem with this layout.

I changed the font sizes, the player and target widths and it has suddenly come up with an error saying:

"Interface\Addons\oUF_Lighterfluid\layout.lua
:Line 561: Attempt to call method: SetManyAttributes(a nil value)"

Now i understand that this is because i'm not in a party but when i party up to see if it shows then I get no party frames? Any idea if this was maybe me changing the wrong this (altough all i changed was the setwidth on the spawns and the setfont sizes.) Had this problem with oUF_Sweedy as well, just happened all of a sudden, and hadn't changed anything with that one. Any ideas?
__________________


When the going gets tough, the tough hide under the duvet.
Luckybob88 is offline Report comment to moderator  
Reply With Quote
Old 04-27-08, 09:51 AM  
Coldfury
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 18
File comments: 78
Uploads: 3
Originally posted by Hakker
a little heads up for you Coldfury

Haste has changed oUF a bit however I could only find it in the oUF-Lily file what

Code:
-local party = oUF:Spawn"party"
+local party = oUF:Spawn("header", "oUF_Party")
party:SetPoint("TOPLEFT", 30, -30)
-party:SetManyAttributes("yOffset", -25)
+party:SetManyAttributes("showParty", true, "yOffset", -25)
+party:Show()
yeah i know, i just don't have my account anymore for the moment to test things up. i should have it tonight tho so ill post an update, if not, ill post a drycoded update
Coldfury is offline Report comment to moderator  
Reply With Quote
Old 04-27-08, 08:52 AM  
Hakker
A Murloc Raider

Forum posts: 9
File comments: 26
Uploads: 0
a little heads up for you Coldfury

Haste has changed oUF a bit however I could only find it in the oUF-Lily file what

Code:
-local party = oUF:Spawn"party"
+local party = oUF:Spawn("header", "oUF_Party")
party:SetPoint("TOPLEFT", 30, -30)
-party:SetManyAttributes("yOffset", -25)
+party:SetManyAttributes("showParty", true, "yOffset", -25)
+party:Show()
__________________
This is my spam and your forumflood
Hakker is offline Report comment to moderator  
Reply With Quote
Old 04-20-08, 02:51 PM  
Coldfury
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 18
File comments: 78
Uploads: 3
Re: Re: Re: Druid Fix

Originally posted by Gaenjin
BTW, is floor(currMana / maxMana * 100) supposed to be floor((currMana / maxMana) * 100) or is LUA more forgiving about parentheses? I assumed it was a typo, so edited it, and some other line, forget which.
don't need to apologize for anything

well floor(currMana / maxMana * 100) and floor((currMana / maxMana) * 100) are the same since its calculates from left to right normally,
so firstvalue/second value, then that result *third value is the same as (firstvalue/second value) then that resuslt *third value.
If you would want to do the maxMana*100 first tho, you would need to put (currMana / (maxMana*100)) since it will calculate the parenthesis before the single value.

hehe im french and my english isnt top notch yet so it might be a little hard to understand me but anyway lol, i hope you understand
Coldfury is offline Report comment to moderator  
Reply With Quote
Old 04-20-08, 03:50 AM  
Gaenjin
A Deviate Faerie Dragon

Forum posts: 10
File comments: 56
Uploads: 0
Re: Re: Druid Fix

Originally posted by Coldfury
Finally - Thanks for fixing/testing this . I made some minor change to the code you posted and i just uploaded the new version with the druidMana fix.
Update works great, thanks much! Now I can test out how DC will work for me using your frames. I don't consider it "my" code changes at all... I had the resources to test and troubleshoot, and just relayed my findings back to the dev.
Gaenjin is offline Report comment to moderator  
Reply With Quote
Old 04-20-08, 02:51 AM  
Gaenjin
A Deviate Faerie Dragon

Forum posts: 10
File comments: 56
Uploads: 0
Re: Re: Druid Fix

Originally posted by Coldfury
2nd - mm i looked trought the code and i didnt see "it has a lot of typos, improper function calls and critical snippets are scattered throughout the file". It had some minor errors, but the code is almost exactly the same, its just the way to do it that changed.
But i updated my code to the one you posted. Thanks
My apologies if I came across as critical. Its been 4 years since I've screwed with LUA, 7 years since I worked at M$ doing software testing so its probably just my ignorance and rustiness. I'd downloaded everyone's oUF layouts on Friday, and was testing to see which one I liked. I'd noticed that everyone pretty much had the same code in certain portions, so I assumed these layouts were all conceived from a similar base layout and shared parts, recycled code, etc. So I tried to be general without assumptions as to which code was whose.

Addon was refusing to load with the concatate error, so I looked at the file and found some missing () and just went from there trying to troubleshoot, but I found it was easier to just paste in sections from other layouts that worked. Once I got things to work, I then tried to backtrack to find out where the failure was. I discovered that druid:SetText(druidMana.."|cff0090ff%%") was throwing a concatate error if called from the player unit section, rather than if it was set in the druid function area, like the other layouts. Once I moved it there, I started getting an index nil error, and thats when I discovered that druidMana = floor(currMana / maxMana * 100) and SetText(druidMana) just would not work together, and I needed to set a separate variable to floor(currMana / maxMana * 100), then call it with druidMana to display the text. Also, for the player frame, druid variable had to be set to druidMana. So, I just assumed those were errors and stuff because the original was confusing.

BTW, is floor(currMana / maxMana * 100) supposed to be floor((currMana / maxMana) * 100) or is LUA more forgiving about parentheses? I assumed it was a typo, so edited it, and some other line, forget which.

Anyway, thats what I meant about the errors and typos.

3rd - "and combo" is to only load things proper to druid or rogue. If its not a druid, no need to load the LibDruidMana listener and no need to create combo points.
I think that your layout is the only one that uses that, and I actually like that concept now I'm starting to understand things a bit better and I think I'll start making sure that line is written like that in other Layouts I try, since I play non-Druid toons too.

4th - i do call "druidMana" in my lib support section as its the exact same one as p3lim. You are right that its not really "needed", but its better to leave it there otherwise druidMana becomes a global instead of a local, and being a global is not needed in that situation.
Code:
--  Lib support locals
local LibMobHealth, LibDruidMana
is what I have in my LF file, downloaded uhm.. Friday? and the oUF_p3lim file has
Code:
--  Lib support locals
local LibMobHealth, LibDruidMana, druidMana
which is what I meant there. But after reading something p3lim wrote about using locals versus globals, I grasp the idea a bit better now.
Last edited by Gaenjin : 04-20-08 at 02:56 AM.
Gaenjin is offline Report comment to moderator  
Reply With Quote
Old 04-19-08, 10:50 AM  
Coldfury
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 18
File comments: 78
Uploads: 3
Re: Druid Fix

Originally posted by Gaenjin
it has a lot of typos, improper function calls and critical snippets are scattered throughout the file. (I'm also not sure why the " and combo" is even in line 50, it has nothing to do with druidMana, but it seems to harm nothing. /shrug) I also noticed that P3lim makes a call for druidMana in his lib support locals section, and I discovered its not really needed (its missing from the LF layout, but LF works just fine once the druidMana code is repaired)
1st - its was taken from p3lim's code but i guess he updated it again after and i didnt update.

2nd - mm i looked trought the code and i didnt see "it has a lot of typos, improper function calls and critical snippets are scattered throughout the file". It had some minor errors, but the code is almost exactly the same, its just the way to do it that changed.
But i updated my code to the one you posted. Thanks

3rd - "and combo" is to only load things proper to druid or rogue. If its not a druid, no need to load the LibDruidMana listener and no need to create combo points.

4th - i do call "druidMana" in my lib support section as its the exact same one as p3lim. You are right that its not really "needed", but its better to leave it there otherwise druidMana becomes a global instead of a local, and being a global is not needed in that situation.

Finally - Thanks for fixing/testing this . I made some minor change to the code you posted and i just uploaded the new version with the druidMana fix.
Coldfury is offline Report comment to moderator  
Reply With Quote
Old 04-19-08, 05:08 AM  
Gaenjin
A Deviate Faerie Dragon

Forum posts: 10
File comments: 56
Uploads: 0
Druid Fix

Been playing with it to reverse engineer exactly what they(whoever tried to rewrite the druidMana functions) was trying to do, and the only way I've found to get it to work is to just copy/paste the druid portions directly from p3lim's oUF layout. Interestingly, the comment in the LF layout for druidMana says "-- druid function taken from p3lim", but its not the same code... it has a lot of typos, improper function calls and critical snippets are scattered throughout the file. (I'm also not sure why the " and combo" is even in line 50, it has nothing to do with druidMana, but it seems to harm nothing. /shrug) I also noticed that P3lim makes a call for druidMana in his lib support locals section, and I discovered its not really needed (its missing from the LF layout, but LF works just fine once the druidMana code is repaired)

(Short version: I gave up after 2 hours and resorted to good old copy/paste bandaid from working code. )

@Coldfury: It almost seems like someone was tinkering with trying to change P3lim's druidMana display code for some reason (not sure if thats even originally p3lim's code, sorry if wrong about who wrote what), but they left the sections incomplete... so I'd suggest just copying over the druidMana sections using P3lim's druidMana parts and be done with it since you can't test it out, and the layout is totally broke and refuses to load for any druid, shapeshift or not.

@Anyone who's interested: The P3lim replacement sections (modified for my font+color tastes) that you'll want to paste into Lighterfluid are:
(~ Line 50)
Code:
-- Enable the druidbar support
if LibDruidMana then
	LibDruidMana:AddListener(function(currMana, maxMana)
		if (currMana==maxMana) then
			druidMana:SetText()
		else
			local perc = floor((currMana / maxMana) * 100)
			druidMana:SetText("|cff33AAEE"..perc.."|r%") -- colorize the DM display
		end
	end)
end
and (~Line 357 under "if unit=="player" then -- Player frame modification")
Code:
if LibDruidMana then -- Show druidbar values
			local druid = hp:CreateFontString(nil, "OVERLAY")
			druid:SetFont(font, 12, "OUTLINE") -- sets dm font to that of the layout
			druid:SetTextColor(.8,.8,.8) -- set color brightness
			druid:SetPoint("CENTER", pp) -- sets dm display to center of power bar
			druidMana = druid
		end
I also fixed druidMana font/color to equal the font of this layout, I'd designed it to be generic for my personal tastes in my Kosken layout.

DISCLAIMER: I take no credit for anything I've posted here, all credit goes to the original authors. I'd had problems loading the layout on my Druid, came here to see WTF and noticed that Coldfury said he did not have a druid, so since I play one, and I wanted to see his Layout working, I tackled fixing it, since it refused to load at all for my Druid.
Last edited by Gaenjin : 04-19-08 at 05:17 AM.
Gaenjin is offline Report comment to moderator  
Reply With Quote
Old 04-13-08, 07:27 PM  
Coldfury
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 18
File comments: 78
Uploads: 3
Originally posted by neov
works great for all my tunes - except my druid!

druidmana error

layout.lua 358 attempt to concatenate global "druidmana" a nil value

ouf.lua 236 in function ouf.lua 221

ouf.lua.342 in function spawn

layout.lua 530 in main chunk
kk i will check this out, i dont play a druid so i didnt test it at all.
Coldfury is offline Report comment to moderator  
Reply With Quote
Old 04-13-08, 07:22 PM  
neov
A Deviate Faerie Dragon

Forum posts: 13
File comments: 63
Uploads: 0
works great for all my tunes - except my druid!

druidmana error

layout.lua 358 attempt to concatenate global "druidmana" a nil value

ouf.lua 236 in function ouf.lua 221

ouf.lua.342 in function spawn

layout.lua 530 in main chunk
neov is offline Report comment to moderator  
Reply With Quote
Old 04-12-08, 10:35 PM  
Miaxi
A Murloc Raider

Forum posts: 4
File comments: 9
Uploads: 0
Originally posted by Flarin
Be sure to uncomment

Code:
self.PostCreateAuraIcon = auraIcon
As well. Works fine.
Win, thank you.
Miaxi is offline Report comment to moderator  
Reply With Quote
Old 04-12-08, 07:21 PM  
Flarin
A Frostmaul Preserver
 
Flarin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 290
File comments: 152
Uploads: 1
Originally posted by Miaxi
The aura reskin code doesn't seem to work. :/ Getting ugly white borders instead of your custom texture.
Be sure to uncomment

Code:
self.PostCreateAuraIcon = auraIcon
As well. Works fine.
__________________

"I will crush and destroy and...ooo...shiny..."

[SIGPIC][/SIGPIC]
Flarin is offline Report comment to moderator  
Reply With Quote
Old 04-12-08, 06:48 PM  
Miaxi
A Murloc Raider

Forum posts: 4
File comments: 9
Uploads: 0
The aura reskin code doesn't seem to work. :/ Getting ugly white borders instead of your custom texture.
Miaxi is offline Report comment to moderator  
Reply With Quote
Old 04-11-08, 10:33 PM  
Coldfury
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 18
File comments: 78
Uploads: 3
Originally posted by Flarin
I am not sure is this is intended - my health is 10,100 or so - your numbers report it as 1.0k. Should be 10.0k or 10.1k imho.
not intended - fixed in 1.3 - thanks
Coldfury is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: