Thread Tools Display Modes
01-24-13, 11:18 PM   #1
LinkKnight
A Defias Bandit
Join Date: Oct 2012
Posts: 3
Unit frame for just my friends

So I'm looking for a add on that looks like the default party frames / focus target frame that can be set to my friends for when we are in bgs together.

only features I'm looking for is:
to look and act like the party frames.
be able to specify what players are added to the frames
be able to track 5 players at most...
be able to position them individuality
save the members that it tracks

i hope this is possible, and if there is a similar add on already out there, can you point it out to me...
  Reply With Quote
01-25-13, 02:57 AM   #2
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Actually that may be possible via oUF.

oUF allows you to spawn units. All you need to do before is create unit style.

The unitframe layout that matches the default UI is:
http://www.wowinterface.com/download...-oUF_Neav.html

Of course you would have to edit that. What you need to create and register a style function first. This can be done like this:
Lua Code:
  1. --unit frame layout function
  2.   local CreateStyle = function(self)
  3.     --do stuff here
  4.   end
  5.  
  6.   --register the style with Ouf under a unique name
  7.   oUF:RegisterStyle("mylayout:private", CreateStyle)

Now you can use a macro to spawn the unitframe.

Lua Code:
  1. /run oUF:SetActiveStyle("mylayout:private")
  2. /run oUF:Spawn("NAMEOFYOURFRIEND1", "mylayoutPrivateParty1")
  3. /run oUF:Spawn("NAMEOFYOURFRIEND2", "mylayoutPrivateParty2")
  4. /run oUF:Spawn("NAMEOFYOURFRIEND3", "mylayoutPrivateParty3")
  5. /run oUF:Spawn("NAMEOFYOURFRIEND4", "mylayoutPrivateParty4")
  6. /run oUF:Spawn("NAMEOFYOURFRIEND5", "mylayoutPrivateParty5")

If your frame is dragable in any way you could just spawn it and move it into position. Or you can change that to:
Lua Code:
  1. /run oUF:SetActiveStyle("mylayout:private")
  2. /run oUF:Spawn("NAMEOFYOURFRIEND1", "mylayoutPrivateParty1"):SetPoint("CENTER",UIParent,"CENTER",0,200)
  3. /run oUF:Spawn("NAMEOFYOURFRIEND2", "mylayoutPrivateParty2"):SetPoint("CENTER",UIParent,"CENTER",0,100)
  4. /run oUF:Spawn("NAMEOFYOURFRIEND3", "mylayoutPrivateParty3"):SetPoint("CENTER",UIParent,"CENTER",0,0)
  5. /run oUF:Spawn("NAMEOFYOURFRIEND4", "mylayoutPrivateParty4"):SetPoint("CENTER",UIParent,"CENTER",0,-100)
  6. /run oUF:Spawn("NAMEOFYOURFRIEND5", "mylayoutPrivateParty5"):SetPoint("CENTER",UIParent,"CENTER",0,-200)

A really simple and absolute basic style function is this one:
Lua Code:
  1. local function CreateStyle(self)
  2.    
  3.     --basic frame settings
  4.     self:SetPoint("CENTER",UIParent,"CENTER",0,0)
  5.     self:SetSize(270,25)
  6.     self:SetScale(1)
  7.  
  8.     --tooltip
  9.     self:SetScript("OnEnter", UnitFrame_OnEnter) --tooltip
  10.     self:SetScript("OnLeave", UnitFrame_OnLeave) --tooltip
  11.  
  12.     --health bar
  13.     local health = CreateFrame("StatusBar", nil, self)
  14.     health:SetHeight(20)
  15.     health:SetWidth(270)
  16.     health:SetPoint("TOP",0,0)
  17.     health.bg = health:CreateTexture(nil, "BACKGROUND")
  18.     health.bg:SetTexture(1,1,1)
  19.     health.bg:SetAllPoints(health)
  20.  
  21.     --power bar
  22.     local power = CreateFrame("StatusBar", nil, self)
  23.     power:SetHeight(5)
  24.     power:SetWidth(270)
  25.     power:SetPoint("BOTTOM",0,0)
  26.     power.bg = power:CreateTexture(nil, "BACKGROUND")
  27.     power.bg:SetTexture(1,1,1)
  28.     power.bg:SetAllPoints(power)
  29.  
  30.     --name string
  31.     local name = health:CreateFontString(nil, "OVERLAY")
  32.     name:SetFont(STANDARD_TEXT_FONT, 12)
  33.     name:SetPoint("LEFT", health, 2, 0)
  34.     name:SetJustifyH("LEFT")
  35.    
  36.     --hpval string
  37.     local hpval = health:CreateFontString(nil, "OVERLAY")
  38.     hpval:SetFont(STANDARD_TEXT_FONT, 12)
  39.     hpval:SetPoint("RIGHT", health, 2, 0)
  40.     hpval:SetJustifyH("RIGHT")
  41.    
  42.     --fix to make sure the name gets cut if it is to long
  43.     name:SetPoint("RIGHT", hpval, "LEFT", -5, 0)    
  44.  
  45.     --register a tag for the name
  46.     self:Tag(name, "[name]")
  47.     self:Tag(hpval, "[perhp]")
  48.    
  49.     --health settings
  50.     self.Health = health
  51.     self.Health.colorClass = true
  52.     self.Health.colorHealth = true
  53.     self.Health.bg.multiplier = 0.3
  54.  
  55.     --power settings
  56.     self.Power = power
  57.     self.Power.colorPower = true
  58.     self.Power.bg.multiplier = 0.3
  59.  
  60.   end
__________________
| 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 : 01-25-13 at 03:24 AM.
  Reply With Quote
01-25-13, 10:06 AM   #3
LinkKnight
A Defias Bandit
Join Date: Oct 2012
Posts: 3
sounds good, but im completely lost on were to put anything. never played with the luas for wow addons

Could you point out were eveything goes? once i understand that i should be able to play around with it till i get it to what i want !

thanks
  Reply With Quote
01-29-13, 03:54 PM   #4
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
Originally Posted by zork View Post
Actually that may be possible via oUF.

oUF allows you to spawn units. All you need to do before is create unit style.
Would it not be smarter to spawn a header for the style instead? That way you get a better feel because the frames attach to each other.
lua Code:
  1. local header = oUF:Spawn('customGroup', 'SecureGroupHeaderTemplate', 'raid party solo')
  2. header:SetAttribute("nameList", "slimyorc,idiotretpally,stupiddk,pointyears")
  3. header:Show()
Something like that, but iirc that can create a list from user defined members. This is what oUF_Freebgrid uses to support oRA3 maintainks.

Last edited by ravagernl : 01-29-13 at 04:04 PM.
  Reply With Quote
01-30-13, 02:32 AM   #5
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Yes. That is smart.
I fortgot that the group-header supports the nameList attribute.

http://wowprogramming.com/docs/secur.../Group_Headers
__________________
| 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
02-27-18, 10:12 AM   #6
LinkKnight
A Defias Bandit
Join Date: Oct 2012
Posts: 3
So, i know this is a necro, but ive just come back to Wow, and im asking if this is still possible as i never fully understood it last time.

I've got the oUF installed but im not sure which LUA file i add this to get it to work.
  Reply With Quote
02-27-18, 10:32 AM   #7
jeffy162
A Pyroguard Emberseer
 
jeffy162's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 2,364
Well, I'm sorry but I can't help you with your problem, but, I can tell you that it's Lua, and not LUA - it is the Portuguese word for "moon" and not an acronym.

I'm sorry, but that drives me up a wall (and I don't know why, either),

EDIT\ You could always download freebgrid ( http://www.wowinterface.com/download...Freebgrid.html ) (I had to do the link like that because I'm using an Android tablet to post with and just didn't feel like BBC coding a link [like this was less ........ oh, never mind]) anyway, you could always download freebgrid and search through the Lua files 'til you find it. It shouldn't take too much.

I know this is a bit late but I figured that "What the heck....", and you've probably already done that anyway, so...... \EDIT

EDIT 2\ Well how 'bout that ... they automagically parse links now (?)! Maybe they did that all along and I just never noticed it (or just don't remember...). \EDIT 2
__________________
Ahhhh, the vagueries of the aging mind. Wait.... What was I saying?


Carbonite <----- GitHub main module (Maps ONLY) download link. The other modules are also available on GitHub.
Carbonite-CLASSIC<----- GitHub link to Carbonite Classic. Thanks to ircdirk for this!

Last edited by jeffy162 : 03-02-18 at 06:12 AM. Reason: more blah blah blah.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Unit frame for just my friends


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