PDA

View Full Version : Simple unitframe layout.lua



sergio
06-02-2006, 03:22 PM
screenshots
sp4: 1 (http://sp.cream.org/images/layout/sp4-party.png) 2 (http://sp.cream.org/images/layout/sp4-targetraid.png) 3 (http://sp.cream.org/images/layout/sp4-playerpvp.png) 4 (http://sp.cream.org/images/layout/sp4-playerraid.png)

notes
sp4:
Some minor changes I've made and probably don't remember. One change I do remember is the pet frame isn't ugly as fuck now. I removed the gap between the health bar and the mana/focus bar. I only have a warlock to test it on. I took out the min/max for the mana/focus since I don't care for it. Overall I think it looks a bit better.

Made fonts bigger for a few things but for ToT especially. I'm not sure how it will look for some people but you can just change the font size back in the templates.

P.S.
I'm only keeping the latest stuff up here.

Biba
06-06-2006, 04:00 PM
Works great thanks.

Randuin
06-06-2006, 04:18 PM
Where da LUA at?

elmannis
06-09-2006, 05:10 PM
the unitframes folder i recon

kinkyafro
06-10-2006, 12:14 AM
Where da LUA at?

Start -> search?

Randuin
06-10-2006, 12:42 AM
Sorry :( It didn't show up as an attached file when I took a look at it

sergio
06-14-2006, 12:21 PM
Update

Gigamo
06-14-2006, 01:03 PM
Love you for that last update. ^^

Dunce
06-14-2006, 02:20 PM
nice !! can you do one for a warlock ! please ! then i would give up my hud !

Dogmax
06-18-2006, 01:49 AM
Nice one, but i have a problem
Where in the Wow dir should i place the .lua file? (Yes im a noob at this UI thing :o )

Dunce
06-18-2006, 07:09 AM
Nice one, but i have a problem
Where in the Wow dir should i place the .lua file? (Yes im a noob at this UI thing :o )



search your pc ! or

C:\Program Files\World of Warcraft\Interface\AddOns\Nurfed_UnitFrames

rename your old one before adding the newone

Dogmax
06-18-2006, 07:50 AM
thx for the help :)

sergio
06-18-2006, 10:34 PM
New update

Bloody
06-21-2006, 06:16 PM
Hi Sergio

sorry to ask newbie questions but i suck at coding.

how do u move the edit the hp / mana values?

Would like to move the current hp / Max hp to the middle of the bar and remove the max mana value.

this is for alpha 1.11

Dabogimp
06-21-2006, 06:35 PM
actually also if its not to much can you tell us how you edit the borders? i cant figure that out.

poturta
06-21-2006, 09:21 PM
If you want to use Mobinfo2 with the new nurfed unit frames then you need to goto line 68 in "\Nurfed_Utility\Nurfed_Units.lua"

local currhp, maxhp = UnitHealth(unit), UnitHealthMax(unit);
and add this after it

if(unit == "target") then
currhp, maxhp = MobHealth_GetTargetCurHP(), MobHealth_GetTargetMaxHP();
if(currhp == nil) then
currhp, maxhp = UnitHealth(unit), UnitHealthMax(unit);
end
end
this asumes you have the latest mobinfo2

Edit:
woops the file you need to edit is "\Nurfed_Utility\Nurfed_Units.lua"

MetzelM
06-22-2006, 12:26 AM
There is no such line in any Nurfed_unitframe.lua i am afraid :/

Gigamo
06-22-2006, 01:32 AM
Its in Nurfed_Utility -> Nurfed_Units.lua or sth like that

TheHedgehog
06-22-2006, 02:23 AM
Thanks for making these. Got 3 questions, though:

1) How would I go about for removing the HP left on the right side of my bar?
2) How do I move my HP/MP to the center of the bar?
3) Is it possible to change the font on my HP/MP counter?

Any response at all is greatly appreciated.

mcde
06-22-2006, 03:14 AM
Great work on these sergio.
I was just wondering if you could make a second version of the #2 or make a new "simple" layout without the 3d-model on the target as well. I know ALOT of people have been dying for the option to remove the 3d-models but it seems tivoli doesnt have the time to add that option just yet.

Drauk
06-22-2006, 11:07 AM
I've started to mess a litle with Layout.lua and have 2 questions

1) How do i fix that debufs on enemy targets shows with a huge gap from a target frame ?

2) How do i override a property in a frame that uses template ? I.e. i want to change text alightment in target frame, but dont change it in player frame.

sergio
06-22-2006, 12:03 PM
Hi Sergio

sorry to ask newbie questions but i suck at coding.

how do u move the edit the hp / mana values?

Would like to move the current hp / Max hp to the middle of the bar and remove the max mana value.

this is for alpha 1.11

There are two template blocks for the hp and mana. Nurfed_Unit_hp and Nurfed_Unit_mp.
The line you change is:
JustifyH = "LEFT", to JustifyH = "CENTER",


text = {
type = "FontString",
layer = "OVERLAY",
Font = { NRF_FONT.."framd.ttf", 10, "NONE" },
JustifyH = "CENTER",
TextColor = { 1, 1, 1 },
ShadowColor = { 0, 0, 0, 0.75},
ShadowOffset = { -1, -1 },
Anchor = "all",
vars = { format = "$cur / $max" },


The next block called Nurfed_Unit_mp has the same type of code:
You're changing vars = { format = "$cur / $max" }, to vars = { format = "$cur" },


text = {
type = "FontString",
layer = "OVERLAY",
Font = { NRF_FONT.."framd.ttf", 10, "NONE" },
JustifyH = "LEFT",
TextColor = { 1, 1, 1 },
ShadowColor = { 0, 0, 0, 0.75 },
ShadowOffset = { -1, -1 },
Anchor = "all",
vars = { format = "$cur" },

sergio
06-22-2006, 12:06 PM
actually also if its not to much can you tell us how you edit the borders? i cant figure that out.
Search for:
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
There's also an edgeFile for the mini template (target of target, pets)


Nurfed_UnitsLayout.templates = {
Nurfed_Unit_backdrop = {
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
tile = true,
tileSize = 16,
edgeSize = 16,
insets = { left = 5, right = 5, top = 5, bottom = 5 },
},

sergio
06-22-2006, 12:09 PM
Thanks for making these. Got 3 questions, though:

1) How would I go about for removing the HP left on the right side of my bar?
2) How do I move my HP/MP to the center of the bar?
3) Is it possible to change the font on my HP/MP counter?

Any response at all is greatly appreciated.
Check the previous posts for 1 and 2.

You can add your font to the Nurfed_Utility\Fonts folder and try it out I guess and change the name on the line.


Font = { NRF_FONT.."YOURFONT.ttf", 10, "NONE" }

eddiec312
06-22-2006, 01:31 PM
Hey Sergio,

I was wondering if you can tell me how I can change the debuffs from being how they are. Currently they shrink small when they are full and are in a single line.

How can that be change to be like the previous nurfed where there was two rows on the bottom of the target. Thanks.

Dabogimp
06-22-2006, 02:14 PM
i think i might have messed up my question or i jsut dont understand how to change it the lua im currently playing with has the backgrounds transparent and no border on any unit frames (its the one that was made with the animated party portraits i wanna put a border on that and make it not transparent. is that just one line of code or is it alot of stuff just trying to figure it out thanks for your help.


edit

i also tried looking through the old lua (the one that comes with the alpha) but i got lost in the coding lol i figure its jsut a couple options that are turned off to make it with transparent background and no border

Mekarius
06-22-2006, 04:21 PM
If you want to use Mobinfo2 with the new nurfed unit frames then you need to goto line 68 in "\Nurfed_Utility\Nurfed_Units.lua"

local currhp, maxhp = UnitHealth(unit), UnitHealthMax(unit);
and add this after it

if(unit == "target") then
currhp, maxhp = MobHealth_GetTargetCurHP(), MobHealth_GetTargetMaxHP();
if(currhp == nil) then
currhp, maxhp = UnitHealth(unit), UnitHealthMax(unit);
end
end
this asumes you have the latest mobinfo2

Edit:
woops the file you need to edit is "\Nurfed_Utility\Nurfed_Units.lua"

It doesn't work any more after Patch 1.11.
What's wrong and what can i do to see the MobInfo2 2.97 again?

pis
06-22-2006, 08:28 PM
same problem here

the hp frame ist completly white and mobhealt2 is showhing hp-left/hp somewhere out of the unitframe

sergio
06-22-2006, 10:33 PM
Stop fagging up the thread with mobhealth2. I don't give a fuck about it.

Isuck
06-23-2006, 12:49 AM
Back up your original layout.lua! If you don't like something change it yourself.


sp1 sp1 screenshot (http://sp.cream.org/images/layout/sp1layout.png)

Target of Target on top of the Target frame.
Removed the Target's pvp rank icon outside the frame
Changed the current health (max health) to cur / max
Removed [$key] from party frame before names







Updated all the Layout.luas with the new raid frame templates Tivoli used in the latest Alpha. (Just made them slightly bigger)

nice one, but couldn't you put the pvp rank icon inside the target frame like in the player frame? that would be perfect.

and i have one other question:
do i have to use an addon like mobhealth to see the actually hp of a mob/enemy player in real numbers (not percentage)?

great work so far, thx a lot (i use your sp1).

Bloody
06-23-2006, 01:53 AM
Cheers sergio, working great. Much appreciated.

Xaoc
06-23-2006, 02:57 AM
I must be missing something or didnt enable some option, but I tried to use Sergio's sp3 options for the debuffs on myself, but they wont display. I copied then exactly as they are in the layouts.lua, so I don't know what I might be missing.

Joli
06-23-2006, 07:49 AM
I wanted to use the sp3 version of your custom layout but there is 1 problem. I am a rogue and for the moment debuffs cover my combopoints
:/

spondodge
06-23-2006, 08:41 AM
Anyone know which bits of the code I remove or edit to hide the borders around players frames and remove the target of target buttons on target?

I want no borders but still want the background shaded otherwise SP3 posted here would of been fine :)

removing anything relating to "Edgefile" in lua worked for the border, just target of target to sort out now ;)

Thanks and Regards,

Dan

sergio
06-23-2006, 10:49 AM
I wanted to use the sp3 version of your custom layout but there is 1 problem. I am a rogue and for the moment debuffs cover my combopoints
:/
Try the new version I just uploaded.

pisun
06-23-2006, 11:31 AM
Is there a way to disable target of target ?

Gigamo
06-23-2006, 12:38 PM
Is there any way to change the background opacity in sp3 to transparant black again sergio, but keep the borders gone?

Northy
06-23-2006, 01:32 PM
Two questions:

1) Is it possible to make it simply Target's Target above the Target frame and stretch across? This was an option in older versions

2) I have trouble reading the numbers over the bars at the moment, specifically energy. Is there a way to maybe bold the text?

pisun
06-23-2006, 02:09 PM
Also there r no debuffs on target frame in sp2a layout when target enemy, how it can be fixed?

Sgtkenshin
06-23-2006, 02:47 PM
So in the Unit Frame folder what do I do? Do i get rid of one of the files?

spondodge
06-23-2006, 05:44 PM
If your using default "Layout.lua" which resides in the Nurfed_UnitFrames folder, I figured out you could delete the following line to remove targets of target


target = { template = "Nurfed_Unit_mini", properties = { Anchor = { "TOPLEFT", "$parent", "TOPRIGHT", -4, -3 } } },
targettarget = { template = "Nurfed_Unit_mini", properties = { Anchor = { "BOTTOMLEFT", "$parent", "BOTTOMRIGHT", -4, 3 } } },

Also I figured out you could turn off borders with the default by deleting :


edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", basically delete all "edgefile" lines. Worked for me, no errors.

Meaning
06-23-2006, 06:02 PM
What line in the code did you edit to move the target of target/target of targets target (mouthful) to the top of the target frame... i did a lot of editing on my own but coudln't find this option.

FRUCHT
06-24-2006, 03:55 PM
Thanks! Sp2a is almost perfect, almost!
Is it possible to remove the borders and increase the background opacity?

collinr01
06-24-2006, 11:20 PM
Thanks! Sp2a is almost perfect, almost!
Is it possible to remove the borders and increase the background opacity?

Agree, I love sp2a so far though :)

Gigamo
06-25-2006, 01:02 AM
Thanks! Sp2a is almost perfect, almost!
Is it possible to remove the borders and increase the background opacity?

Put -- in front of this line in the layout.lua:



edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",

FRUCHT
06-25-2006, 06:00 AM
It's getting better! :)

But now the borders are just cut off, in the old Nurfed Unitframes they were "replaced" by the regular background colour.

Here's another thing i noticed: When you're in a party, the party frames have a little class icon to the left which I really don't need (The colour of the name already tells us the class, doesn't it?).
Anyway, how to get rid of it? :)

Thanks in advance for any help!

grom
06-25-2006, 06:23 AM
to "replace" the borders change the 5s in line


insets = { left = 5, right = 5, top = 5, bottom = 5 },

to 0.

to get rid of the classicon delete or put -- in front of those lines


classicon = {
type = "Texture",
size = { 23, 23 },
layer = "OVERLAY",
Texture = "Interface\\Glues\\CharacterCreate\\UI-CharacterCreate-Classes",
Anchor = { "TOPLEFT", "$parent", "TOPLEFT", 5, -4 },
},

arbitrarely
06-25-2006, 12:09 PM
Awesome stuff, one quick question though. For some reason I'm getting "..." as my name of my self and target. I'm not sure why this is happening, any chance you've encountered this problem before? TY again, this is sexy.

sergio
06-25-2006, 12:44 PM
Awesome stuff, one quick question though. For some reason I'm getting "..." as my name of my self and target. I'm not sure why this is happening, any chance you've encountered this problem before? TY again, this is sexy.
Your in game name is probably really fucking long or your scale is really small.

arbitrarely
06-25-2006, 01:02 PM
It must be my scale, since my ingame name is Ftah, haha. Yeah, its not just my Self, all my targets regardless of what it is also has "...", no letters at all. I'll go check it out, thanks again.

http://s11.photobucket.com/albums/a175/arbitrarely/?action=view&current=WoWScrnShot_062506_120834.jpg

Theres a screenshot of what it looks like, :).

Oh, and this is using layout 1.

FRUCHT
06-25-2006, 02:35 PM
The border thing doesn't do anything at all.

http://www.250kb.de/u/060625/p/dd7352bc.png
Can I do something about the empty rectangle?

sergio
06-25-2006, 02:35 PM
It must be my scale, since my ingame name is Ftah, haha. Yeah, its not just my Self, all my targets regardless of what it is also has "...", no letters at all. I'll go check it out, thanks again.

http://s11.photobucket.com/albums/a175/arbitrarely/?action=view&current=WoWScrnShot_062506_120834.jpg

Theres a screenshot of what it looks like, :).

Oh, and this is using layout 1.

Dunno, might be your resolution too. I don't have time to try it out right now.

grom
06-25-2006, 03:15 PM
changed my layout.lua to


Nurfed_Unit_backdrop = {
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
edgeFile = "",
tile = true,
tileSize = 16,
edgeSize = 16,
insets = { left = 0, right = 0, top = 0, bottom = 0 },
},

and this is the result (didnt align tot/tott and framepositioning cause i usually play without those borders)

http://img523.imageshack.us/img523/4426/wowscrnshot0626060009337fq.jpg (http://imageshack.us)

FRUCHT
06-25-2006, 03:57 PM
Thanks, that's working :)
Any idea about that rectangle?

Elee
06-26-2006, 06:06 AM
Can somebody help me please:

1. How can I remove the 3d model? Can't find the line with it....

2. Is it possible to remove the HP/MP shown in the partyframes or to change it that only the percentage is shown there?

3. In the targetframe the HPs are only shown as 100/100 and not the full HPs... whats wrong?

Flybane
06-26-2006, 06:50 AM
Back up your original layout.lua! If you don't like something change it yourself.


sp1 sp1 screenshot (http://sp.cream.org/images/layout/sp1layout.png)

Target of Target on top of the Target frame.
Removed the Target's pvp rank icon outside the frame
Changed the current health (max health) to cur / max
Removed [$key] from party frame before names

i've made a slightly edited version of the sp1 layout to suit my needs, thought others might like them.

sp1 - mistifly modified screenshot (http://www.superfly.fastfreenet.com/wow/targetframelayout.jpg)

Removed target of target's target
Extended target of target to match target frame size
Centered hp/mana values
Enlarged pet frame to match char/other frames
Added another pet frame for hunters/locks pets in the party frames (it used the target of target frame originally and went a bit dodgy when i enlarged it so i created this frame just for them) - and trust me the pet's name does normally come up.. probably coz the person i partied with to get the screenie was out of range at the time (another area totally)


download zip with layout in here (http://www.superfly.fastfreenet.com/wow/Layoutmistifly.zip)

personally i have mobinfo2 setup on my target frames too but thats not inc. in the layout :)

just wanted to share and hope its of use to someone

i'll keep my eye on this so let me know if there are any probs. always backup original Layout.lua first.

Gnomage
06-26-2006, 07:35 PM
Awesome stuff, one quick question though. For some reason I'm getting "..." as my name of my self and target. I'm not sure why this is happening, any chance you've encountered this problem before? TY again, this is sexy.

I had this same problem on my Group number as well as my Target of target Names, and that was when I made my scale *larger*. Like 1.09-1.11. To fix it i just increased the height of the text boxes by 1 and it fixed it. There is definitely some sort of scaling issues at certain UI scalings.

skaska
06-27-2006, 11:21 AM
Thanks for the amazing mod.

Does anyone know how I can keep lua3, but give it the animations for both myself and an animation for everyone in my party?

Much apperciated!

sergio
06-27-2006, 02:25 PM
The newest alpha makes every frame look white I hear if you use sp1-2. I'm too damn lazy to fix it right now so if you want to add BackdropColor = { 0, 0, 0, 0.75 }, after each time you see Backdrop = { template = "Nurfed_Unit_backdrop" }, go for it.

silgit
06-27-2006, 06:12 PM
also after

Nurfed_Unit_mini = {
type = "Button",
size = { 80, 22 },
FrameStrata = "LOW",
Backdrop = {
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
tile = true,
tileSize = 16,
edgeSize = 8,
insets = { left = 2, right = 2, top = 2, bottom = 2 }
},
BackdropColor = { 0, 0, 0, 0.75 },

or the two mini frames ll have a white backgroud

Gnomage
06-27-2006, 08:38 PM
I noticed you removed the feedback on a couple versions of your UI. I've been trying to remove it from my own, but have been getting errors. I've been commenting out the feedback sections in the player section at line 413 and in the target section at line 564.

But I get the error
Interface\FrameXML\CombatFeedback.lua:85 attempt to index local 'feedbackText' (a nil value)

Is there something else i need to modify?

sergio
06-27-2006, 10:36 PM
I noticed you removed the feedback on a couple versions of your UI. I've been trying to remove it from my own, but have been getting errors. I've been commenting out the feedback sections in the player section at line 413 and in the target section at line 564.

But I get the error
Interface\FrameXML\CombatFeedback.lua:85 attempt to index local 'feedbackText' (a nil value)

Is there something else i need to modify?
You have to comment out UNIT_COMBAT.

Gnomage
06-28-2006, 07:13 AM
Thx a lot!

sergio
07-07-2006, 12:58 AM
New sp4 with party changes. Take a look at the screenshots in the original post.

Arcanell
07-08-2006, 11:08 PM
i editted layout2a, now bg colour is black..

but the rank icon on target isn't showing :confused:

arch
07-30-2006, 06:50 PM
bump for being the best so far IMO

a67rhf7823jn8747==