PDA

View Full Version : Shrinking debuffs



eddiec312
06-22-2006, 02:42 AM
Hello,

I'm using the the nurfed alpha unit frames and I don't like how the debuffs work. When the debuffs are full on a mob they shrink very small and are in a single line.

I really liked them how they were in the original nurfed frames, two rows of eight debuffs, so that's how I would like to change them to.

Can anyone help me and show me where in the .lua file I can change that and what I would have to change? Thanks for any help.

frayed
06-26-2006, 10:54 AM
id like to know how to do this as well

grom
06-26-2006, 11:22 AM
attach debuff9 to debuff1. in this example debuff 9-16 would be below the first 8 debuffs.


debuff9 = { template = "Nurfed_Unit_aura", properties = { Anchor = { "TOP", "$parentdebuff1", "BOTTOM", 0, 0 } } },

edit: wrong debuff has to be debuff9 :o

Dunce
06-26-2006, 12:29 PM
thx for the info but can you tell me how to move the defbuff frame onthe target form the bottom to the top

eddiec312
06-26-2006, 12:55 PM
attach debuff9 to debuff1. in this example debuff 9-16 would be below the first 8 debuffs.


debuff9 = { template = "Nurfed_Unit_aura", properties = { Anchor = { "TOP", "$parentdebuff1", "BOTTOM", 0, 0 } } },

edit: wrong debuff has to be debuff9 :o

Could you please tell me what debuff1 line I should attach that to?

There are various debuff1 lines and I'm not sure on which one do you mean, thanks.

grom
06-26-2006, 01:27 PM
i'm sorry my description wasnt really that clear. you dont have to add the line but to change the anchoring of debuff9.
just scroll down to the unitframe you want to edit and change the line for debuff9 to


debuff9 = { template = "Nurfed_Unit_aura", properties = { Anchor = { "TOP", "$parentdebuff1", "BOTTOM", 0, 0 } } },

this attaches the top debuff9 to the bottom debuff1 (not in the file but in lua and thats the important point ;) )

i hope everything is understandable :D

Dunce
06-26-2006, 01:36 PM
i'm sorry my description wasnt really that clear. you dont have to add the line but to change the anchoring of debuff9.
just scroll down to the unitframe you want to edit and change the line for debuff9 to


debuff9 = { template = "Nurfed_Unit_aura", properties = { Anchor = { "TOP", "$parentdebuff1", "BOTTOM", 0, 0 } } },

this attaches the top debuff9 to the bottom debuff1 (not in the file but in lua and thats the important point ;) )

i hope everything is understandable :D


will that work for me as well since i want to move mine from the bottom to the top

grom
06-26-2006, 01:41 PM
my previously posted change would make it look like that:

01 02 03 04 05 06 07 08
09 10 11 12 13 14 15 16

if you want to put 09-16 on top of 01-08 do this


debuff9 = { template = "Nurfed_Unit_aura", properties = { Anchor = { "BOTTOM", "$parentdebuff1", "TOP", 0, 0 } } },

Dunce
06-26-2006, 03:10 PM
my previously posted change would make it look like that:

01 02 03 04 05 06 07 08
09 10 11 12 13 14 15 16

if you want to put 09-16 on top of 01-08 do this


debuff9 = { template = "Nurfed_Unit_aura", properties = { Anchor = { "BOTTOM", "$parentdebuff1", "TOP", 0, 0 } } },


will that move the whole debuff frame to the top the unitframe ?

grom
06-27-2006, 03:25 AM
no, to move the whole debuffframe change the targetframes' debuff1 line:


debuff1 = { template = "Nurfed_Unit_aura", properties = { Anchor = { "TOPLEFT", "$parent", "BOTTOMLEFT", 5, 3 } } },

change the red parts to something that is fitting your needs. try "BOTTOMLEFT" "TOPLEFT" and then play around with the numbers.

Maraka
06-27-2006, 05:04 AM
Where am I supposed to add this line?

I'm looking through all the folders and I don't know which file I am supposed to edit to add this.

Dunce
06-27-2006, 06:53 AM
Where am I supposed to add this line?

I'm looking through all the folders and I don't know which file I am supposed to edit to add this.


to the layout.lua in you unitframes folder

eddiec312
06-27-2006, 06:10 PM
I haven't had a chance to test this Dunce, thanks for the help though :)

eddiec312
06-28-2006, 08:03 PM
Dunce, the code line worked.

I have two rows now, however they still shrink. Do you know or anyone know how I can stop making them shrink?

tknp
06-28-2006, 11:32 PM
hey Dunce, this is looking great except for the debuffs still shrinking as more are added. If there's some lines of code to stop um from shrinking it would be greatly appreciated

Feuren
06-29-2006, 01:24 AM
it's not an elegant solution, but it works ;)

to stop the debuff lines from shrinking, simply open up your
"world of warcraft\interface\addons\nurfed_unitframes\lib.lu a" file.

do a search for the line:
buffsize = width / total;

and change it to:
buffsize = size;

then do a search for the line:
debuffsize = width / total;

and change it to:
debuffsize = size;

this should stop the resizing of the buffs/debuffs lines

Hope it helps! :D

EDIT: To be sure, to make it 2 lines of 8 debuffs, follow the code posted earlier in this thread, and then do this step.
That way you get 2 lines of 8 that don't resize :D otherwise you'll have debuffs stretching up to 16 wide below your target frame, looking very ugly o_O

Floppy
06-29-2006, 01:03 PM
Hi all,

Can anyone explain me this line:

buff1 = { template = "Nurfed_Unit_aura", properties = { Anchor = { "TOPLEFT", "$parent", "BOTTOMLEFT", 4, 2 } } },

TOPLEFT is what ?

$parent is target frame ?

BOTTOMLEFT is what ?

and numbers 4 and 2. is this like Y axis and Y axis. And again for what are they ?

Thank you.

CaliberX
06-29-2006, 01:57 PM
To make the debuffs stop resizing, here is a better solution. Find line 561 and change it to something like this.


vars = { aurawidth = 280, aurasize = 17 },

Aurasize is the normal size of a debuff, 17 by 17. Aurawidth just has to be bigger than 16 * aurasize if you don't want them to resize.

Floppy: It is basically saying to anchor the top left of this frame to the bottom left of its parent frame. The #s are the x and y offset for this anchor. Without them it would attach it exactly to that point, these move it from that point.

Gnomage
06-30-2006, 06:38 PM
If you replace ur Nurfed_UnitFrames funciton with this (in NurfedUnitframes/Lib.lua) they wont shrink anymore. It may still waste calculation time figuring out how to shrink them, but it wont actually shrink them. Alternatively, you can just DL my lib.lua.


function Nurfed_UnitFrames:UpdateAuras()
local aura, applications, count, buffsize, debuffsize, check;
local total = 0;
local resize = {};
local i= 1;
local size = this.aurasize;
local width = this.aurawidth;
local button = getglobal(this:GetName().."buff"..i);
while (button) do
aura = UnitBuff(this.unit, i);
if (aura) then
getglobal(button:GetName().."icon"):SetTexture(aura);
button:Show();
button.id = i;
total = total + 1;
table.insert(resize, { a = button, t = "buff" });
else
button:Hide();
end
i = i + 1;
button = getglobal(this:GetName().."buff"..i);
end
--[[ if (width and (size > (width / total))) then
buffsize = width / total;
else ]]--
buffsize = size;
--end

total = 0;
i = 1;
if (string.find(this.unit, "^party[1-4]")) then
check = true;
end
button = getglobal(this:GetName().."debuff"..i);
while (button) do
aura, applications = UnitDebuff(this.unit, i);
if (aura) then
count = getglobal(button:GetName().."count");
getglobal(button:GetName().."icon"):SetTexture(aura);
button:Show();
if (not button.isdebuff) then
local border = getglobal(button:GetName().."border");
border:Show();
button.isdebuff = true;
end
button.id = i;
total = total + 1;
if (applications > 1) then
count:SetText(applications);
count:Show();
else
count:Hide();
end
if (check) then
local debuff = UnitDebuff(this.unit, i, 1);
if (debuff) then
if (not button:GetScript("OnUpdate")) then
button.flashtime = GetTime();
button.update = 0;
button.flashdct = 1;
button:SetScript("OnUpdate", function() unitlib:Fade(arg1) end);
end
else
button:SetScript("OnUpdate", nil);
button:SetAlpha(1);
end
end
table.insert(resize, { a = button, t = "debuff" });
else
button:Hide();
button:SetScript("OnUpdate", nil);
end
i = i + 1;
button = getglobal(this:GetName().."debuff"..i);
end
--[[ if (width and (size > (width / total))) then
debuffsize = width / total;
else ]]--
debuffsize = size;
--end

if (width and table.getn(resize) > 0) then
local newsize;
for _, v in resize do
if (v.t == "buff") then
newsize = buffsize;
else
newsize = debuffsize;
end
v.a:SetWidth(newsize);
v.a:SetHeight(newsize);
end
end
end

Grukar
07-07-2006, 04:42 AM
Thanks for the information in this thread. My target frame is nearly perfect. :D

What I'd like to see is that if I target a friendly unit the buffs are shown right under the target frame,
but if I target a hostile unit the debuffs are shown instead.

Hostile:
Line1: Debuff 01-08
Line2: Debuff 09-16
Line3: Buff 01-08
Line4: Buff 09-16

Fiendly:
Line1: Buff 01-08
Line2: Buff 09-16
Line3: Debuff 01-08
Line4: Debuff 09-16

Does anyone have an idea how to do that?

TIA,
Grukar

Zentradi
07-10-2006, 07:31 AM
to the layout.lua in you unitframes folder

i don't have any layout.lua in my unitframes folder.....

i found that line in default.lua file

Firehawk
07-10-2006, 09:21 AM
Aurasize is the normal size of a debuff, 17 by 17. Aurawidth just has to be bigger than 16 * aurasize if you don't want them to resize.
Doesn't need to be larger than 16*aurasize - 272 worked just fine =)
but thx for the tip

Elladia
07-30-2006, 12:06 AM
This is exactly what I was looking for. Thank you for the edit.

vengiss
08-27-2006, 09:01 PM
Thanks for the information in this thread. My target frame is nearly perfect. :D

What I'd like to see is that if I target a friendly unit the buffs are shown right under the target frame,
but if I target a hostile unit the debuffs are shown instead.

Hostile:
Line1: Debuff 01-08
Line2: Debuff 09-16
Line3: Buff 01-08
Line4: Buff 09-16

Fiendly:
Line1: Buff 01-08
Line2: Buff 09-16
Line3: Debuff 01-08
Line4: Debuff 09-16

Does anyone have an idea how to do that?

TIA,
Grukar

I'd like to know how to do this again, anyone know how to?

Dix3n
09-10-2006, 07:37 PM
Thanks for the information in this thread. My target frame is nearly perfect. :D

What I'd like to see is that if I target a friendly unit the buffs are shown right under the target frame,
but if I target a hostile unit the debuffs are shown instead.

Hostile:
Line1: Debuff 01-08
Line2: Debuff 09-16
Line3: Buff 01-08
Line4: Buff 09-16

Fiendly:
Line1: Buff 01-08
Line2: Buff 09-16
Line3: Debuff 01-08
Line4: Debuff 09-16

Does anyone have an idea how to do that?

TIA,
Grukar

i'd like to know how to do this aswell :P

Rub
10-03-2006, 08:06 AM
Does anyone have a current update on how to unshrink the debuffs into the 2 rows again? :)

Everything from here worked great from me on the last version, but the latest has some of the code changed (wording) and when i try to replicate the changes, it didnt work.

Ralrra
10-03-2006, 02:50 PM
By default they don't shrink anymore. They'll only shrink if you add in the aurawidth variable.

To make them 2 rows you'll have to anchor the top of debuff 9 to the bottom of debuff 1.

maladils
10-06-2006, 06:35 AM
Mine are shrinking too. I tried the fix action for the previous version and it did not work. They get so small now I can't see ignites or how high scorch debuff is stacked.

I did use someone's layout.lua but didn't think that affected buff sizes.

I looked though the files that I had modified before the new version and did the same things I did before, and still see shrinking debuffs.

Very frustrating in raids. I can only squint sooo much.

a67rhf7823jn8747==