Go to Page... |
Updated: | 04-19-08 10:55 AM |
Created: | unknown |
Downloads: | 5,068 |
Favorites: | 12 |
MD5: |
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.
Comment Options |
Coldfury |
View Public Profile |
Send a private message to Coldfury |
Find More Posts by Coldfury |
Add Coldfury to Your Buddy List |
04-19-08, 05:08 AM | |
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 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 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 |
View Public Profile |
Send a private message to Gaenjin |
Find More Posts by Gaenjin |
Add Gaenjin to Your Buddy List |
04-19-08, 10:50 AM | ||
|
Re: Druid Fix
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 |
View Public Profile |
Send a private message to Coldfury |
Find More Posts by Coldfury |
Add Coldfury to Your Buddy List |
04-20-08, 02:51 AM | ||||
A Deviate Faerie Dragon
Forum posts: 10
File comments: 56
Uploads: 0
|
Re: Re: Druid Fix
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.
Code:
-- Lib support locals local LibMobHealth, LibDruidMana Code:
-- Lib support locals local LibMobHealth, LibDruidMana, druidMana
Last edited by Gaenjin : 04-20-08 at 02:56 AM.
|
|||
|
Gaenjin |
View Public Profile |
Send a private message to Gaenjin |
Find More Posts by Gaenjin |
Add Gaenjin to Your Buddy List |
04-20-08, 03:50 AM | ||
A Deviate Faerie Dragon
Forum posts: 10
File comments: 56
Uploads: 0
|
Re: Re: Druid Fix
|
|
|
Gaenjin |
View Public Profile |
Send a private message to Gaenjin |
Find More Posts by Gaenjin |
Add Gaenjin to Your Buddy List |
04-20-08, 02:51 PM | ||
|
Re: Re: Re: Druid Fix
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 |
View Public Profile |
Send a private message to Coldfury |
Find More Posts by Coldfury |
Add Coldfury to Your Buddy List |
04-27-08, 08:52 AM | |
A Murloc Raider
Forum posts: 9
File comments: 19
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 |
View Public Profile |
Send a private message to Hakker |
Visit Hakker's homepage! |
Find More Posts by Hakker |
Add Hakker to Your Buddy List |
04-27-08, 09:51 AM | ||
|
|
|
|
Coldfury |
View Public Profile |
Send a private message to Coldfury |
Visit Coldfury's homepage! |
Find More Posts by Coldfury |
Add Coldfury to Your Buddy List |
07-30-08, 03:14 PM | |
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? |
|
Luckybob88 |
View Public Profile |
Send a private message to Luckybob88 |
Visit Luckybob88's homepage! |
Find More Posts by Luckybob88 |
Add Luckybob88 to Your Buddy List |
01-01-09, 03:10 PM | |
|
Any chance on getting this updated to the latest version of oUF ?
|
|
sweede |
View Public Profile |
Send a private message to sweede |
Visit sweede's homepage! |
Find More Posts by sweede |
Add sweede to Your Buddy List |