Thread Tools Display Modes
03-03-09, 05:19 PM   #841
MoonWitch
A Firelord
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 455
Question :

I've been trying to nick p3lim's AFK function and use that tag as base for a few of my own. I'm having some issues understanding a few things.

1.
Code:
self:Tag(name, '[name( )][leader( )][offline( )][afk( )]|cff00ffff[(- )assistname( )][assisticon]')
Why the () and what is their function?
2.
Code:
oUF.Tags["[pws]"] = function(u) return UnitAura(u, "Power Word: Shield") and "PwS" end
oUF.TagEvents["[pws]"] = "UNIT_AURA"
Is this corrert? All I did here was change some stuff without really understanding though LOL
 
03-03-09, 05:28 PM   #842
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by MoonWitch View Post
Question :

I've been trying to nick p3lim's AFK function and use that tag as base for a few of my own. I'm having some issues understanding a few things.

1.
Code:
self:Tag(name, '[name( )][leader( )][offline( )][afk( )]|cff00ffff[(- )assistname( )][assisticon]')
Why the () and what is their function?
2.
Code:
oUF.Tags["[pws]"] = function(u) return UnitAura(u, "Power Word: Shield") and "PwS" end
oUF.TagEvents["[pws]"] = "UNIT_AURA"
Is this corrert? All I did here was change some stuff without really understanding though LOL
1: Its a suffix to the tag
2: Yes, but please try before asking.
 
03-03-09, 06:58 PM   #843
lanacan
A Warpwood Thunder Caller
 
lanacan's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 94
Originally Posted by Freebaser View Post
Error message would be nice
Sorry about that... had a busy day and meant to edit that post with an error...



Here is the error

[18:55:45] Interface\AddOns\oUF_Lanacan\oUF_LanacanRaid.lua:21: attempt to concatenate field '?' (a nil value)
[C]: ?
Interface\AddOns\oUF_Lanacan\oUF_LanacanRaid.lua:21: in function `func'
Interface\AddOns\oUF\elements\tags.lua:269: in function `UpdateTag'


Code:
--Line 21
oUF.Tags['[assisticon]'] = function(u) return GetRaidTargetIndex(u..'target') and ICON_LIST[i]..'22|t' end

--Line 25
oUF.TagEvents['[assisticon]'] = 'UNIT_TARGET RAID_TARGET_UPDATE'


--Display In Unit Frame
self:Tag(name, '[name( )][leader( )][offline( )][afk( )]|cff00ffff[(- )assistname( )][assisticon]')
__________________
Busy modifying your code for my own UI.
 
03-03-09, 07:10 PM   #844
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by lanacan View Post
Sorry about that... had a busy day and meant to edit that post with an error...



Here is the error

[18:55:45] Interface\AddOns\oUF_Lanacan\oUF_LanacanRaid.lua:21: attempt to concatenate field '?' (a nil value)
[C]: ?
Interface\AddOns\oUF_Lanacan\oUF_LanacanRaid.lua:21: in function `func'
Interface\AddOns\oUF\elements\tags.lua:269: in function `UpdateTag'


Code:
--Line 21
oUF.Tags['[assisticon]'] = function(u) return GetRaidTargetIndex(u..'target') and ICON_LIST[i]..'22|t' end

--Line 25
oUF.TagEvents['[assisticon]'] = 'UNIT_TARGET RAID_TARGET_UPDATE'


--Display In Unit Frame
self:Tag(name, '[name( )][leader( )][offline( )][afk( )]|cff00ffff[(- )assistname( )][assisticon]')
I see whats wrong, ill upload a fix
 
03-03-09, 07:38 PM   #845
lanacan
A Warpwood Thunder Caller
 
lanacan's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 94
Originally Posted by p3lim View Post
I see whats wrong, ill upload a fix
Cool. ty P3lim.
__________________
Busy modifying your code for my own UI.
 
03-03-09, 07:53 PM   #846
Toran
A Nerdscale Dorkin
 
Toran's Avatar
Premium Member
Join Date: May 2006
Posts: 143
Originally Posted by Toran View Post
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.
Hey all. My question got buried right before a page long quibble between posters. Anyway, can someone confirm that the vehicle swapping issues are just with oUF_Lyn? Is there a solution you can point me to?
 
03-03-09, 09:28 PM   #847
MoonWitch
A Firelord
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 455
Originally Posted by p3lim View Post
1: Its a suffix to the tag
2: Yes, but please try before asking.
Well, I did try it, but I get nothing. Hence asking
Could you please elaborate on the creation of tags? I just change an existing one, without actually having a clue as to what I am doing.

Last edited by MoonWitch : 03-03-09 at 09:32 PM.
 
03-03-09, 09:38 PM   #848
Alkar
A Chromatic Dragonspawn
 
Alkar's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 195
Originally Posted by MoonWitch View Post
Well, I did try it, but I get nothing. Hence asking
Could you please elaborate on the creation of tags? I just change an existing one, without actually having a clue as to what I am doing.
May want to study P3lims oUF_Perfect addon it uses tags for everything might be a good place to start learning what they do and how to use them
__________________
 
03-04-09, 05:35 AM   #849
MoonWitch
A Firelord
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 455
Originally Posted by Alkar View Post
May want to study P3lims oUF_Perfect addon it uses tags for everything might be a good place to start learning what they do and how to use them
Thanks for the advice, I am already using oUF_Perfect to study tags. I'll just ask someone else to just explain the basic buildup, thanks...

I've done :
- studying through oUF_p3lim and perfect, I've even downloaded a bunch of other layouts to see how they use tags. Say tek's layout from his git.
- check tags.lua to see how custom tags get parsed (which is where I get stuck)
- I've editted custom tags others made - some worked, others did not. If after 2hrs of trying you can't figure out why some tags aren't working, yeah, you tend to ask.
- search through threads here and at wowace.

I can completely understand how some are seen as oUF guru's, but when you then ask some assistance (which I freely admit, I've done before) you get nothing but a point that you haven't done anything to verify if it's ok. If I hadn't tried the function, how would I know it wasn't working? I mean, I wouldn't even post here if it was working fine and actually displayed stuff :P
I can't even get p3lim's AFK tag to show up. Which is how I ended up on this wild chase for knowledge regarding tags.
 
03-04-09, 07:49 AM   #850
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
Join Date: May 2006
Posts: 281
New frames from custom templates

Haste, or anyone else, would that be possible to have a .xml example how to spawn a raid.

I know how to spawn frames that would be parented to something created in the layout for example, a .xml for party pets that would be parented to the party i create in the layout, but i don't know how to create new frames that would be, hmm parented to UIParent for example.
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
 
03-04-09, 09:22 AM   #851
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
You can't really spawn partypets that are parented to the UIParent (without manually spawning them directly), as they use the parent's unit id to create theirs.
 
03-04-09, 10:59 AM   #852
Tim
A Rage Talon Dragon Guard
 
Tim's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 309
Confused with focustargets..

I copy my tot frame creation but replace with the focustarget settings.
Code:
    if (unit == "focustarget") then
        self:SetAttribute("initial-height", 20)
	self:SetAttribute("initial-width", 85)

	-- frame skin
        self.Overlay:SetTexture("Interface\\".. framefolder .."\\UI-TargetofTargetFrame")
        self.Overlay:SetTexCoord(0.015625, 0.7265625, 0, 0.703125)
        self.Overlay:SetPoint("CENTER", self, 0, 0)
        self.Overlay:SetHeight(45)
        self.Overlay:SetWidth(93)
        
        self.Name:SetPoint("TOPLEFT", self, "CENTER", -3, -11)
        self.Name:SetJustifyH("LEFT")
        self.Name:SetWidth(100)
        
        self.Health:SetHeight(7)
        self.Health:SetWidth(47)
        self.Health:SetPoint("CENTER", self, 22, 4)

        self.Health.value:SetPoint("CENTER", self, "CENTER", 23, 1)

        self.Portrait:SetPoint("LEFT", self, "CENTER", -43, 0)
        
        self:SetScale(oUF_Basic.unitframe.focustarget.scale)
    end
Then I spawn it with:
Code:
local focustarget = oUF:Spawn("focustarget", "FocusTarget")
focustarget:SetPoint("CENTER", oUF.units.target, "CENTER", 200, -200)
Is there something I'm not getting? I've been looking over styles that do have focustargets but cannot seem to get how they're being done.

..yes I'm new to oUF :P

Last edited by Tim : 03-04-09 at 11:04 AM.
 
03-05-09, 05:49 AM   #853
Wimpface
A Molten Giant
 
Wimpface's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 648
I'm having a lot of trouble adding oUF_DebuffHighlight support for my oUF_Layout, i've tried with adding an icon and adding a colored backdrop, nothing seems to work... I'm posting the whole layout on pastey and the code i'm adding here on wowi with code tags, so it doesn't look too cluttered.

Pastey: http://www.pastey.net/109514

Code:
local dbh = self:CreateTexture(nil, "OVERLAY")
dbh:SetWidth(32)
dbh:SetHeight(32)
dbh:SetPoint("CENTER", self, "CENTER")
self.DebuffHighlight = dbh
self.DebuffHighlightUseTexture = true
Anyone have any clue on what to do? Been trying a lot of stuff out, and it won't show up no matter what i do.

Thanks in advance.
- Wimpsy.
__________________
All I see is strobe lights blinding me in my hindsight.
 
03-05-09, 06:17 AM   #854
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
Join Date: May 2006
Posts: 281
Code:
	self.DebuffHighlight = self.Health:CreateTexture(nil, 'OVERLAY')
	self.DebuffHighlight:SetAllPoints(self.Health)
	self.DebuffHighlight:SetTexture(yourtexture)
	self.DebuffHighlight:SetVertexColor(0, 0, 0, 0)
	self.DebuffHighlight:SetBlendMode('ADD')
	self.DebuffHighlightAlpha = 1
	self.DebuffHighlightFilter = false
Works, just edit position, texture and what not.

edit: if you just installed, it, did you add it to the .toc ?
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }

Last edited by Caellian : 03-05-09 at 06:39 AM.
 
03-05-09, 09:59 AM   #855
Wimpface
A Molten Giant
 
Wimpface's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 648
Originally Posted by Caellian View Post
edit: if you just installed, it, did you add it to the .toc ?
Aww dammit, i knew it was something... Again... Thanks Caellian, it's the second time i forget to add it to the .toc!
__________________
All I see is strobe lights blinding me in my hindsight.
 
03-05-09, 03:02 PM   #856
ant1pathy
A Murloc Raider
Join Date: Jul 2008
Posts: 5
I'm trying to play with "string.sub" in my name tag for raid frames, but I'm not really having any luck. I'm using p3lim's Perfect module, and just need to chop the raid names down to about 7 characters to make everything right. Help?
 
03-05-09, 04:38 PM   #857
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
Join Date: May 2006
Posts: 281
Originally Posted by ant1pathy View Post
I'm trying to play with "string.sub" in my name tag for raid frames, but I'm not really having any luck. I'm using p3lim's Perfect module, and just need to chop the raid names down to about 7 characters to make everything right. Help?
Code:
oUF.Tags['[raidname]']  = function(unit)
	local name = UnitName(unit)
	if (name:len() > 7) then
		return name:sub(1, 7)
	else
		return name
	end
end
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
 
03-05-09, 05:22 PM   #858
Sauerkraut
A Wyrmkin Dreamwalker
 
Sauerkraut's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 52
I am having a rather strange issue with ToT and it's portrait. It seems that all other 3D portraits are working fine but ToT seems to glitch and constantly restarts. i.e it isn't moving smoothly just jitters a bit then starts over.

Any ideas or help would be appreciated.
 
03-05-09, 05:50 PM   #859
ObbleYeah
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 210
i believe thats an oUF bug, as it happened on my layout too, just never remembered to bug report it ><
 
03-05-09, 06:59 PM   #860
fauxpas
A Defias Bandit
Join Date: Sep 2006
Posts: 3
I'm sorry if i'm annoying but I was just wondering whether noone replied to my post because they don't care/I'm stupid or whether it just got overlook cause it's at the bottom of the page
 

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


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