Thread Tools Display Modes
07-01-12, 11:38 AM   #1
Coldkil
A Cliff Giant
 
Coldkil's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 70
oUF for MoP beta

Just asking here, anyone knows if oUF is going to be updated and/or a release date?

Also, i've seen a 1.6.0 version mentioned, but i cannot find it anywhere. Still using 1.5.x but i wanted only to look at it.

if hanyone has a "working" oUF version for beta, please write it here or send me a pm, thanks.
  Reply With Quote
07-01-12, 05:02 PM   #2
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
That is the question.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
07-01-12, 10:45 PM   #3
Coldkil
A Cliff Giant
 
Coldkil's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 70
haha

atm the "only" problem i have is that my oUF layout won't load the custom color table and tags (it just return me a lua error "cannot index oUF variable (nil)").

I think that editing oUF directly would solve the issue, but it's a thing i want to avoid :P
  Reply With Quote
07-02-12, 01:44 AM   #4
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
https://github.com/haste/oUF

Unreleased versions of oUF is always there, and haste has updated it for MoP (just API changes, no new stuff yet)
  Reply With Quote
07-02-12, 01:51 AM   #5
Coldkil
A Cliff Giant
 
Coldkil's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 70
Thanks p3lim.

I was going actually there, and as i've found now he fixed 20 hours ago the metadata problem - which is the issu i'm having.

I suppose that for now the manual update of the files is the key

Any other is messing with oUF in MoP beta? So we can share issues and work over them.
  Reply With Quote
07-02-12, 04:13 AM   #6
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Just testing out the new stuff, creating elements and whatnot.
  Reply With Quote
07-02-12, 08:32 AM   #7
Coldkil
A Cliff Giant
 
Coldkil's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 70
finally managed to load my interface.

apart from nameplates (i need to set up the new rolecheck with the new api), i managed to fix pretty much all apart:

- personalized tags, it just returns me a "tagEvents = nil" error; i added manually my tag into the tags.lua file and it works, but bringing them externally seems still broken;

- when i load the unitframes, i get this
Code:
Message: Interface\AddOns\oUF\elements\aura.lua:279: Division by zero
Time: 07/02/12 16:22:34
Count: 335
Stack: Interface\AddOns\oUF\elements\aura.lua:279: in function <Interface\AddOns\oUF\elements\aura.lua:266>
Interface\AddOns\oUF\elements\aura.lua:398: in function <Interface\AddOns\oUF\elements\aura.lua:314>
Interface\AddOns\oUF\elements\aura.lua:430: in function `func'
Interface\AddOns\oUF\ouf.lua:161: in function `UpdateAllElements'
Interface\AddOns\oUF\ouf.lua:32: in function <Interface\AddOns\oUF\ouf.lua:28>

Locals: icons = <unnamed> {
 1 = <unnamed> {
 }
 2 = <unnamed> {
 }
 3 = <unnamed> {
 }
 __owner = ColdToT {
 }
 PostUpdateIcon = <function> defined @Interface\AddOns\oUF_Coldkil\lib.lua:473
 ForceUpdate = <function> defined @Interface\AddOns\oUF\elements\aura.lua:452
 PostCreateIcon = <function> defined @Interface\AddOns\oUF_Coldkil\lib.lua:441
 0 = <userdata>
 visibleBuffs = 3
 anchoredIcons = 0
 createdIcons = 3
}
from = 1
to = 3
sizex = 16
sizey = 16
anchor = "BOTTOMLEFT"
growthx = 1
growthy = 1
cols = 0
(for index) = 1
(for limit) = 3
(for step) = 1
i = 1
button = <unnamed> {
 overlay = <unnamed> {
 }
 stealable = <unnamed> {
 }
 duration = 0
 remaining = <unnamed> {
 }
 cd = <unnamed> {
 }
 icon = <unnamed> {
 }
 isPlayer = true
 UpdateTooltip = <function> defined @Interface\AddOns\oUF\elements\aura.lua:68
 owner = "player"
 0 = <userdata>
 count = <unnamed> {
 }
 overlayFrame = <unnamed> {
 }
 elapsed = 0.073000002652407
 first = true
 timeLeft = 0
 filter = "HELPFUL"
}
(*temporary) = 0
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "Division by zero"
EDIT: i've become a kind of noob, how can i format a string from "55 min" to "55m"?

Last edited by Coldkil : 07-02-12 at 09:23 AM.
  Reply With Quote
07-02-12, 10:27 AM   #8
Kesava
A Murloc Raider
 
Kesava's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 4
Tags have changed, I'm adding mine like this:
Lua Code:
  1. oUF.Tags.Methods['tagName'] = tagFunction
And events like this:
Lua Code:
  1. oUF.Tags.Events['tagName'] = 'EVENT_LIST'
Note oUF.Tags is now its own table. Other than that, they're unchanged as far as I can tell.

Last edited by Kesava : 07-02-12 at 10:30 AM.
  Reply With Quote
07-02-12, 10:54 AM   #9
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
1.6 actually means there are layout breaking changes.

Originally Posted by Coldkil View Post
- when i load the unitframes, i get this
Without knowing your code: I assume your aura widget frames (.Auras, .Buffs, .Debuffs) don't have a proper size set.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
07-02-12, 11:38 AM   #10
Coldkil
A Cliff Giant
 
Coldkil's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 70
Thanks for the tag syntax, going to fix it as soon as i can.

As for buffs/debuffs, the thing is a little different. I'm getting A LOT of "division by zero" errors, tied to many different frames and such.

I used to have the frames defined at the start of the file and then governed by some boolean variables. I tried to definie everything at start, but still if i don't define the frame for every unit it returns me that error.

Atm i have "fixed" it by just displaying 0 auras, but still the frames are there.

Now i'm getting this error when i target NPCs only (probably because they have changed something in the power bar for non player units)
Code:
 Interface\AddOns\oUF_Coldkil\lib.lua:261: Division by zero
Time: 07/02/12 19:35:19
Count: 1
Stack: Interface\AddOns\oUF_Coldkil\lib.lua:261: in function <Interface\AddOns\oUF_Coldkil\lib.lua:255>
(tail call): ?
(tail call): ?
Interface\AddOns\oUF\ouf.lua:161: in function <Interface\AddOns\oUF\ouf.lua:152>
(tail call): ?
[C]: in function `Show'
Interface\FrameXML\SecureStateDriver.lua:83: in function <Interface\FrameXML\SecureStateDriver.lua:73>
Interface\FrameXML\SecureStateDriver.lua:137: in function <Interface\FrameXML\SecureStateDriver.lua:119>
Thanks again haste if you have a better solution for me posting these kind of errors, tell me where i should do it.

EDIT: probably i found the reason for this, it happens when i target a player with 0 power (doesn't mean if a player or whatever).

Has soemthing chnaged bad in the health/Power updates?

Last edited by Coldkil : 07-02-12 at 12:01 PM.
  Reply With Quote
07-02-12, 11:47 AM   #11
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
As I tried to mention, your aura elements don't have proper sizes set. More specifically, width. Fix that and the errors should go away.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
07-02-12, 01:03 PM   #12
Coldkil
A Cliff Giant
 
Coldkil's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 70
Originally Posted by haste View Post
As I tried to mention, your aura elements don't have proper sizes set. More specifically, width. Fix that and the errors should go away.
I fixed that, but the second one i get is about the power bar, when it reaches 0 os is 0 by default (like npcs). Probably i copy/pasted the wrong one?
  Reply With Quote
07-02-12, 01:14 PM   #13
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
No, just me not having reading comprehension...

It errors within your layouts lib, can't help you there.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
07-02-12, 10:06 PM   #14
Coldkil
A Cliff Giant
 
Coldkil's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 70
Originally Posted by haste View Post
No, just me not having reading comprehension...

It errors within your layouts lib, can't help you there.
Thanks anyway It's really strange, it goes wild when loading min/max power and i don't know why a simple thing lik d = min/max returns me the error since it worked fine and still works fine on live.

Well, i got the same error (division by zero) on the xpbar, that was "solved" by unregistering the "PLAYER_ENTERING_WORLD" event - the xp bar worked fine even with the error, really i don't understand why the two things are tied

Last, a feedback on the auras thing - even setting manually the size of the frames at the start didn't work. I had to manually create the frame for every unitframe, then hide/show as needed. For the end-user is fine since the change is invisible, but again i want to understand what i'm doing wrong :P

Kudos to your awesome work haste and thanks for the support you're giving me
  Reply With Quote
07-03-12, 03:43 AM   #15
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Division by zero: It's a form of optimization. You aren't allowed to divide by zero, which mean you need to guard against it in your code.

And unregistering PLAYER_ENTERING_WORLD will probably break more than it fixes, unless you only do it for the xpbar.

Auras: I was talking about the size of the frames that hold your aura icons. Those that are referred to as self.Auras, self.Buffs and/or self.Debuffs. Those are the ones you had to fix the width on.

I suggest you post some code if you want further assistance.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
07-03-12, 04:24 AM   #16
Coldkil
A Cliff Giant
 
Coldkil's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 70
xpbar: it's a plugin i made myself. I'm not using the oUF one so i don't want to make you waste time in something not realetd to you work (until obviously you want it).

auras: here's a pastebin of the code http://pastebin.com/E86umSu6 everything related by auras should be included, if you want to get a look at it.

I included the layout file also if you want to look at it too http://pastebin.com/EwJsT3gH EDIT: i need to do a lot of cleaning - i could even rewrite it it won't take much time if it's a more elegant solution.

As a side note, could the error on power bar depending by the fat that the size id defined by anchors to self and not by the stabdard SetWitdh() method? I'm going to give some try this afternoon.

EDIT: probably i've found the arcane - it all depends from that d variable which is the calculated %, dunno why it goes wild. if i remove that everything goes smoothly and i hadn't anymore errors. I used the same method in the xp bar, so that's why it gave the same error.

Last edited by Coldkil : 07-03-12 at 09:03 AM.
  Reply With Quote
07-03-12, 12:44 PM   #17
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
No. Now you're fixing where the problem is reported, not where it's created.

The reason you get the error is because you create the buff and debuff frames at line 154 and 158. However, you only "fully" use them when certain conditions are met (layout.pbuffs == true, for example).

Move the registration (and creation) to the point where you check the conditions. Right now your telling oUF that you will have a Buff and Debuff element, but you never give it the correct UI widget settings, so it errors out.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
07-03-12, 11:06 PM   #18
Coldkil
A Cliff Giant
 
Coldkil's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 70
Ok, that will be done for sure. Thanks. It should also fix the error i was getting about the buffframes for ToT and other frames? (I think yes, since if i've understood the issue i create the frames only when needed and if i don't create them everything is fine since nothing is fired).

I also fixed the issue of the "division by 0" errors - it seems that when the PLAYER_ENTERING_WORLD triggers, the addon still cannot get values like UnitMaxPower() or UnitMaxXp() and since i'm using them to calculate a couple of percentages, it fails.

So i made a check of these values - to set them to 1 if they return 0. The update is fired so often you don't even see it. Just asking, is this the correct way to proceed? I want to fix them and not to just put patches over holes
  Reply With Quote
07-04-12, 03:10 AM   #19
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Coldkil View Post
So i made a check of these values - to set them to 1 if they return 0. The update is fired so often you don't even see it. Just asking, is this the correct way to proceed?
A better "patch" would be to actually skip the whole update if the value is zero:

Code:
function DoStuff()
	local hp, maxhp = UnitHealth("target"), UnitHealthMax("target")
	if maxhp == 0 then
		-- Skip the whole update.
		return
	end
	-- Do actual stuff here.
end
However, as far as a real fix, you should try to figure out why you're getting 0 values. Are you calling the functions on units that don't exist? Are you calling the functions during a loading screen? If you can identify specific conditions under which UnitHealthMax (or whichever function you're actually having the issue with) returns 0, and rework your code to avoid those situations if possible. Adding debug prints may help:

Code:
function DoStuff(self, event, ...)
	local hp, maxhp = UnitHealth("target"), UnitHealthMax("target")
	if maxhp == 0 then
		-- Skip the whole update, but print a debug statement first:
		print("UnitHealthMax returned 0 in", event)
		return
	end
	-- Do actual stuff here.
end
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
07-04-12, 05:44 AM   #20
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Actually there are npcs with 0 max mana. Thus an exception for max value = 0 should be added anyway.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 07-04-12 at 05:48 AM.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF for MoP beta


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off