Closed Thread
Thread Tools Display Modes
Unread 02-24-09, 08:39 PM   #801
Toran
A Nerdscale Dorkin
 
Toran's Avatar
Premium Member
Join Date: May 2006
Posts: 142
During the quest "A means to an end" where you get to steal horses, my playerbar doesn't always turn into the "vehicle" health bar. My pet bar ends up being my health also, which is supposed to happen. However the main playerframe is supposed to change into the vehicle health bar, which it doesn't seem to in the case of stealing the horses. Anyone know where I should start looking to troubleshoot this?

It's on my warlock w/pet out while stealing the horse.
Toran is offline  
Unread 02-25-09, 03:15 AM   #802
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
Join Date: May 2006
Posts: 268
.colorReaction // UnitSelectionColor

I really need some help with this please:

I'm trying to modify the color table that's going to be used by .colorReaction // UnitSelectionColor, i've tried all the way i knew but none worked.
I can't even find anything about UnitSelectionColor on wowwiki, or anywhere else for that matter, and that's what i get from wowprogramming
This function has not yet been documented. You could document this function by logging in, and clicking the 'Edit' tab.
Here's what i've tried anyway:

Code:
local colors = setmetatable({
	reaction = setmetatable({
		['civilian'] = { 0.2, 0.2, 1.0 },
		['friendly'] = { 0.2, 1.0, 0.2 },
		['hostile'] = { 1.0, 0.2, 0.2 },
		['neutral'] = { 1.0, 1.0, 0.2 },
	}, {__index = oUF.colors.reaction}),
}, {__index = oUF.colors})
And also
Code:
local	reaction = {
	civilian = {.55, .57, .61},
	friendly = {.33,.59,.33},
	hostile = {.69,.31,.31},
	neutral = {.65,.63,.35},
}
And finally
Code:
oUF.colors.reaction = {...chain all the colors in here...}
None of these works, so, does anyone know exactly how i could override the color used by .colorReaction // UnitSelectionColor and show me an example ?
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
Caellian is offline  
Unread 02-25-09, 05:57 AM   #803
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 983
Since this is the third (or fourth) time you bump the thread with this:

oUF doesn't have an internal reaction color table. It uses UnitSelectionColor to get the colors, and the only way to override it is through a enviorment proxy. Or simply use a post-update to handle it.

It's been like this for almost half a year and yet no-one has made a request to have the reaction colors moved back into a table format.
haste is offline  
Unread 02-25-09, 06:13 AM   #804
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
Join Date: May 2006
Posts: 268
Originally Posted by haste View Post
Since this is the third (or fourth) time you bump the thread with this:
I wouldn't have if it wasn't the second post i do and yet completely ignored, on a total of 3 questions, none has been answered that non haste people could understand and as a result fix their issue.

But i guess Dawn wasn't completely wrong with this...

Originally Posted by Dawn View Post
Don't expect anything here. The "pro's" like use their time to post a one liner, telling you how you should know it yourself, instead of pointing you in a direction.
Originally Posted by haste View Post
oUF doesn't have an internal reaction color table. It uses UnitSelectionColor to get the colors, and the only way to override it is through a enviorment proxy. Or simply use a post-update to handle it.

It's been like this for almost half a year and yet no-one has made a request to have the reaction colors moved back into a table format.
Originally Posted by Caellian View Post
I really need some help with this please:

does anyone know exactly how i could override the color used by .colorReaction // UnitSelectionColor and show me an example?
I first though i was clear enough but apparently it's pointless to even ask anything, you know... not everyone is haste here.

EDIT: I really miss wowace, at least the community there was large enough so this would never happen...
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }

Last edited by Caellian : 02-25-09 at 06:19 AM.
Caellian is offline  
Unread 02-25-09, 06:18 AM   #805
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 983
It wasn't ignored. I saw it the first time, but it doesn't mean I have the time to do a proper reply.
haste is offline  
Unread 02-25-09, 06:34 AM   #806
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,319
Originally Posted by Caellian View Post
I wouldn't have if it wasn't the second post i do and yet completely ignored, on a total of 3 questions, none has been answered that non haste people could understand and as a result fix their issue.

But i guess Dawn wasn't completely wrong with this...







I first though i was clear enough but apparently it's pointless to even ask anything, you know... not everyone is haste here.

EDIT: I really miss wowace, at least the community there was large enough so this would never happen...
Well I dont know myself, so I have no reason to post..
p3lim is offline  
Unread 02-25-09, 06:49 AM   #807
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
Join Date: May 2006
Posts: 268
Originally Posted by p3lim View Post
Well I dont know myself, so I have no reason to post..
I wasn't pointing at you, far from it. And if 'you' don't know, well then i guess i'm screwed...
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
Caellian is offline  
Unread 02-25-09, 06:59 AM   #808
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 983
Originally Posted by Caellian View Post
EDIT: I really miss wowace, at least the community there was large enough so this would never happen...
There's nothing preventing you from posting on wowace.

And a hostile attitude isn't going to get you anywhere.
haste is offline  
Unread 02-25-09, 07:11 AM   #809
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
Join Date: May 2006
Posts: 268
Originally Posted by haste View Post
There's nothing preventing you from posting on wowace.

And a hostile attitude isn't going to get you anywhere.
I am not hostile, i am more than willing to learn things i don't know, but have you ever tried to learn without a teacher ?
What were you expecting when releasing oUF, that it would only be used by some elitist community of what... 5 people ?
Well sadly that's not what happened and as a result you have to answer to some stupid players with stupid questions... yet, half of the time... you don't.

I am not hostile, i am just stating the obvious. As proof, i still didn't get any answer, but nevermind.
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
Caellian is offline  
Unread 02-25-09, 08:52 AM   #810
Krag72
A Deviate Faerie Dragon
Join Date: Sep 2008
Posts: 14
Originally Posted by Caellian View Post
Well sadly that's not what happened and as a result you have to answer to some stupid players with stupid questions... yet, half of the time... you don't.

I am not hostile, i am just stating the obvious. As proof, i still didn't get any answer, but nevermind.
What exactly are you expecting? I don't think it's a tremendous stretch to think that maybe Haste doesn't have time to babysit the thread and cook up tutorial examples for everything or even answer.

There's quite a few things I don't know how to do in oUF yet and while it would of course be perfect if someone could just answer every one of my questions, that just isn't feasible and some things I will have to just experiment with or even put on hold until someone else does it so I can look at the code.
Krag72 is offline  
Unread 02-25-09, 09:13 AM   #811
Slakah
A Molten Giant
 
Slakah's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 863
I am not hostile, i am more than willing to learn things i don't know, but have you ever tried to learn without a teacher ?
Yep, thats how I've "learnt" how to code with lua and the WoW API, only using guides and forums (I had never looked at coding until lua).
What were you expecting when releasing oUF, that it would only be used by some elitist community of what... 5 people ?
iirc it was resurrected a while back when p3lim asked where haste had put it, and was only released due to popular demand. So you cannot really blame haste, and tbh you shouldn't anyway.

EDIT: I really miss wowace, at least the community there was large enough so this would never happen...
Quite a lot of people who used to give "advice" on ouf in the ol' wowace forums, have quit. I personally don't help out as much with this thread because most of the questions have turned oUF specific (of which I have never used), and I prefer to answer generic WoWLua questions.
Slakah is offline  
Unread 02-25-09, 09:39 AM   #812
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 983
Originally Posted by Caellian View Post
I am not hostile, i am more than willing to learn things i don't know, but have you ever tried to learn without a teacher ?
Yes, I've completed several classes without a teacher. All I know about programming is also self-taught.
Originally Posted by Caellian View Post
What were you expecting when releasing oUF, that it would only be used by some elitist community of what... 5 people ?
Well sadly that's not what happened and as a result you have to answer to some stupid players with stupid questions... yet, half of the time... you don't.
The only reason it was released was to provide some stability for the layouts that were posted here on WoWI. Right now I keep layout breaking changes in local branches, and merge them into oUF at a later point, so that at least bug fixes can be pushed without breaking layouts.

What I expected with oUF was to simplify the creation of different unit frame layouts for myself. To let me test a layout for a day, without having to redo all the core work every single time. The fact that other people started releasing their locked layouts into public was of course a stupid action by them. I did however modify oUF to allow people to toggle and update elements live.

The next argument here would be that there currently aren't anyone using the system, because they don't know how. But then again, I've yet to see anyone actually go on IRC, or here for that matter.

Why do I say IRC and not the forums? Well, I find forums to be horrendous applications. They are filled with features that destroy the flow of conversation and horrible solutions when it comes to text formatting.

And now I'm wondering away from the topic... so let's try to get back to your issue.

There are three ways to solve it:
1) Post a feature request asking for it. You already have the past on your side - it was there before. The reason I ask for a feature request is simply that I'll forget it if it's posted on the forums here, or just asked for on IRC. The end result will be that I either shoot down your idea on the spot or leave it open for consideration and implement it when I have the time.

2) Implement it through the PostUpdate. All the old code is on git. But as you know the UnitReactionColor table was removed, which means you have two solutions there.

2.1) Implement your own UnitReactionColor.
2.2) Use the table defined in ReputationFrame.lua.

3) Use a environment proxy to trick oUF into calling your function. You don't really want to use this solution however. But they look like this. Why mention is at all? It is a solution.

I could of course spend less time on this, and just write all three solutions and toss you the code, but then we're back to the fact that:
1) You don't learn ****. "It works, let's move on to our next issue!"
2) You get the opinion that other people will churn out code for your.
3) I don't have a third one, and my number two here contradicts with number one/two above, so let's move on to that.

You can consider it a loophole in my theory. The scope restrictions in oUF boil down to:
Does Blizzard do this in the default UI? Yes/No
Is this something that is commonly done for Unit Frames? Yes/No
Does it make sense to do this? Yes/No
How much work would this require? <insert LoC estimate>

The above is also used when it comes to answering questions in this thread. There are many more factors involved in that however:
Is this the original author of the layout?
What layout is this layout based on?
How does the overall code of the layout look?
Was the code provided relevant and if not - how much off was the poster?
How is the post written?

I also try to look at what questions aren't answered and what has been answered before. As we already know... I find forums (especially those that only allow BBCode and try do think formatting for you) -- horrendous.

Originally Posted by Caellian View Post
EDIT: I really miss wowace, at least the community there was large enough so this would never happen...
What Slakah says is pretty much the case. I miss the days when wowace was just a developer community, with a couple of dedicated users.

Originally Posted by Krag72 View Post
What exactly are you expecting? I don't think it's a tremendous stretch to think that maybe Haste doesn't have time to babysit the thread and cook up tutorial examples for everything or even answer.
The time I have. I'm not going to use that argument here. I don't have the drive and motivation to spend time on answering questions and explaining why people should X and not Z. It's not a very rewarding task really.

Another issue is that forums aren't great for helping. When someone posts a question, I have to make assumptions because I can't really ask around the case.

Let's take the partypet/partytarget discussion a while ago as an example. The general problem seemed to be positioning (if I remember correctly). The easiest solution to that is to move over to the template, which allows you to define the relative positions of the frame before they are spawned.

The issue that arrived due to that change was the fact that children inherit the alpha of their parents. How can you fix this? Move back to the old solution. Ironic isn't it :)?

Point is, most posts are very vague. All I can do is to answer by assumption.

I think this post is long enough now, so I'm just going to stop here.

Last edited by haste : 02-25-09 at 09:44 AM. Reason: BBCodes are overcomplicated, and I suck at using the preview function \:D/.
haste is offline  
Unread 02-25-09, 06:58 PM   #813
arnath_vp
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 9
I updated to the latest version of oUF today for my layout and suddenly the combat icon is showing all the time on all non-player units (where it was working before I updated). Has there been some kind of change in how this is handled?
arnath_vp is offline  
Unread 02-25-09, 07:17 PM   #814
arnath_vp
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 9
Also, is there no default rune bar implementation in oUF? When I load up my layout on a DK, I see a rune bar but it shows up under my unit frame and I can't find anything in any of the elements files that I could use to move it.
arnath_vp is offline  
Unread 02-26-09, 09:10 AM   #815
Alkar
A Chromatic Dragonspawn
 
Alkar's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 195
just tryin to figure out what this error is sayin to me cant seem to figure it out

[2009/02/26 08:09:48-344-x1]: oUF_Moo-1.0\oUF_Moo.lua:135: '<eof>' expected near 'end'
__________________
Alkar is offline  
Unread 02-26-09, 09:44 AM   #816
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 983
Originally Posted by Alkar View Post
just tryin to figure out what this error is sayin to me cant seem to figure it out

[2009/02/26 08:09:48-344-x1]: oUF_Moo-1.0\oUF_Moo.lua:135: '<eof>' expected near 'end'
You have a syntax error, which most likely is an "end" too much.
haste is offline  
Unread 02-26-09, 09:45 AM   #817
Alkar
A Chromatic Dragonspawn
 
Alkar's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 195
cool thank ya haste
__________________
Alkar is offline  
Unread 02-26-09, 09:48 AM   #818
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 983
Originally Posted by arnath_vp View Post
I updated to the latest version of oUF today for my layout and suddenly the combat icon is showing all the time on all non-player units (where it was working before I updated). Has there been some kind of change in how this is handled?
You can see a full list of changes here. The shouldn't have been any changes made to that element however.
Originally Posted by arnath_vp View Post
Also, is there no default rune bar implementation in oUF? When I load up my layout on a DK, I see a rune bar but it shows up under my unit frame and I can't find anything in any of the elements files that I could use to move it.
You'll have to move it yourself manually. I don't know play a DK, so I don't really know what I should focus on in such an element.
haste is offline  
Unread 02-26-09, 11:04 AM   #819
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
Join Date: May 2006
Posts: 268
Two functions, both give exactly the same result and works fine.

Codewise, which one is the best and if possible to know why ?

OLD
Code:
local function UpdateColor(self, element, unit, func)
	local colorA, colorB

	if(UnitIsDead(unit) or UnitIsGhost(unit) or not UnitIsConnected(unit)) then
		colorA = colors.disconnected
	elseif(UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit)) then
		colorA = colors.tapped
	elseif(unit == 'player' or unit == 'pet') then
		local num, str = UnitPowerType(unit)
		colorA = colors.power[str]
	elseif(UnitIsPlayer(unit)) then
		local _, class = UnitClass(unit)
		colorA = colors.class[class]
	else
		colorB = FACTION_BAR_COLORS[UnitReaction(unit, 'player')]
	end

	if(colorA) then
		if(func == 'SetVertexColor') then
			element[func](element, colorA[1] * .33, colorA[2] * .33, colorA[3] * .33)
		else
			element[func](element, colorA[1], colorA[2], colorA[3])
		end
	elseif(colorB) then
		if(func == 'SetVertexColor') then
			element[func](element, colorB.r * .33, colorB.g * .33, colorB.b * .33)
		else
			element[func](element, colorB.r, colorB.g, colorB.b)
		end
	end
end
NEW
Code:
local function Hex(r, g, b)
	if(type(r) == 'table') then
		if(r.r) then r, g, b = r.r, r.g, r.b else r, g, b = unpack(r) end
	end

	if(not r or not g or not b) then
		r, g, b = 1, 1, 1
	end

	return r, g, b
end

local function UpdateColor(self, element, unit, func)
	if(UnitIsDead(unit) or UnitIsGhost(unit) or not UnitIsConnected(unit)) then
		r, g, b = Hex(colors.disconnected)
	elseif(UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit)) then
		r, g, b = Hex(colors.tapped)
	elseif(unit == 'player' or unit == 'pet') then
		local num, str = UnitPowerType(unit)
		r, g, b = Hex(colors.power[str])
	elseif(UnitIsPlayer(unit)) then
		local _, class = UnitClass(unit)
		r, g, b = Hex(colors.class[class])
	else
		local reaction = UnitReaction(unit, 'player')
		r, g, b = Hex(FACTION_BAR_COLORS[reaction])
	end

	if(func == 'SetVertexColor') then
		element[func](element, r * .33, g * .33, b * .33)
	else
		element[func](element, r, g, b)
	end
end
Now in case it is the second one:

is it possible to merge oUF original Hex function (with the string) with this one ?
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
Caellian is offline  
Unread 02-26-09, 11:23 AM   #820
lanacan
Random, Crazy, Mental...
 
lanacan's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 94
Originally Posted by zynix View Post
how in the earth do you move stuff, do you need to edit something in the .lua files or something


would love you help

Zynix
Correct, LUA Edit
__________________
4 Years later I returned to find Shaman still suck.
lanacan is offline  
Closed Thread

Go BackWoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF - Layout discussion

Thread Tools
Display Modes

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