Thread Tools Display Modes
05-31-14, 11:33 PM   #1
Robertw445
A Murloc Raider
Join Date: Jul 2010
Posts: 4
New to LUA, trying though.

I am trying to make it so I have 2 Unit Frames for 1 toon.

I am wondering if this is possible and if someone might be able to help.

I am using Stuf Unit Frames. I have been looking at the LUA coding but its pretty new to me. I have wierd ideas and try to figure out how to do them. But since this is new to me, I cant quite figure it out yet

I appreciate any help. And thanks in advance.
  Reply With Quote
06-01-14, 10:17 AM   #2
Malsomnus
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Apr 2013
Posts: 203
Welcome aboard
You'll probably get better responses if you provide more details (I should know, I always have that problem!). An important one might be: why do you want 2 unit frames? Do you just want the existing unit frame to appear twice, or do you mean something else?

Anyway, having 2 unit frames definitely sounds possible to me, even though I don't know what Stuf is.
__________________
SanityCheck - If you've ever said the words "Sorry, I forgot" then you need this add-on.

Remember, every time you post a comment on an add-on, a kitten gets its wings!
  Reply With Quote
06-01-14, 10:17 AM   #3
10leej
A Molten Giant
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 583
If you want a basic unitframe you can look at how I create the frames in my BobHUD addon. It doesn't have a unit menu, but that can be coded and its ridiculously light.
__________________
Tweets YouTube Website
  Reply With Quote
06-01-14, 10:31 AM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
1. Lua isn't an acronym/initialism, so there's no reason to write it in all-caps. The Lua programming language was created in Brazil, and its name is simply the Portuguese word for "moon".

2. Trying to modify a very large and (over)complicated addon like Stuf (or PitBull, etc) to make them work in a way they were not designed to work is not a simple undertaking, and not something I'd recommend to anyone, let alone someone with no experience in Lua (or programming in general?). While it may sound counter-intuitive, you'll have a much easier time creating your own unit frames from scratch than trying to hack your way through the huge codebase of an addon that is just not compatible with your goal.

3. As others have already said, more details! There's a big difference between "I want a regular player frame in the corner and a HUD in the middle of the screen so it's easier to watch my health in combat" vs. "I want two identical frames for every unit so I can duplicate my entire UI on each of my dual monitors".
__________________
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
06-01-14, 12:14 PM   #5
10leej
A Molten Giant
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 583
Oh I wasn't even going that far, it's literally easy to change BobHUD into an actual unit frame

BobHUD>modules>units>PickAFile.lua (linked file is player, they're all the same) lines textures are lines 13, 41 for backdrops the statusbars are 20 and 47

To make the bars horizontal rather than verticle remove lines 23 and 51
__________________
Tweets YouTube Website
  Reply With Quote
06-01-14, 01:59 PM   #6
Robertw445
A Murloc Raider
Join Date: Jul 2010
Posts: 4
10leej, I will check it out later today.

What I am trying to do is have my main unit frame close to the middle of my screen with a second unit frame frame off to the side.

I multibox 2 toons and am trying to have my unit frames in the same place for healing. The problem I am running into is with healbot or any other unit frame puts the player first if you choose. I am wanting Account 1 to be top unit frame on both accounts. With stuf unit frames I can move each party frame separately. But I am wanting an extra unit frame for account 1, not for all the other toons just my unit frame
  Reply With Quote
06-01-14, 02:44 PM   #7
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,974
If my understanding of Multiboxing is correct (seperate accounts, seperate instances of the game) then I don't think this would be possible.

The closest would be the second account being a party member (frame) but you don't get to choose which member goes to which frame, if it's order of joining, that might help a little if you're always Leader & Party2 otherwise you would be constantly moving frames around.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 06-01-14 at 02:50 PM.
  Reply With Quote
06-01-14, 02:52 PM   #8
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
If they're in your party player names become a valid unit token, so presumably you can create a unit frame for them.
  Reply With Quote
06-01-14, 03:03 PM   #9
Tim
A Rage Talon Dragon Guard
 
Tim's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 311
You can sort the Blizzard Raid Frames. Cdew does it everytime he enters arena *after* he has leader so that he's always the last player in the group. Here's a link to the macro http://us.battle.net/wow/en/forum/topic/9397369916
__________________
AddOns: Tim @ WoWInterface
Battle Tag: Mysterio#11164
Current PC Setup: PCPartPicker List
  Reply With Quote
06-01-14, 03:31 PM   #10
Robertw445
A Murloc Raider
Join Date: Jul 2010
Posts: 4
Ok, little clarification. Here is a screenshot of what I am trying to do. I want the party frames on the right hand side to look the same on both accounts. So I need an extra Player unit frame

I am willing to try out other unit frames but I need one that I can move Party frames independently

On the second account, I want Rockdew on top and Stardew as second inline. then 3,4 and 5.


Last edited by Robertw445 : 06-01-14 at 03:40 PM.
  Reply With Quote
06-01-14, 05:38 PM   #11
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 454
If what Tim posted above works without issues and you use Blizzard's compact unit frames, and you set your sorting order to "Group", you could change the macro from Tim's link to that:

Code:
/run LoadAddOn("Blizzard_CompactRaidFrames") CRFSort_Group=function(t1,t2) local n1,n2=(UnitName(t1)),(UnitName(t2)) if n1=="Rockdew" then return true elseif n1=="Stardew" and n2~="Rockdew" then return true else return t1<t2 end end
and run it once on both accounts prior to creating your group. This will set the following group order on both accounts:

Rockdew
Stardew
party2
party3
party4

I don't know for sure if this works though and I don't know if this would cause taint. I would assume that this is doable in an addon, when you create the party frames without using the secure group header, but I lack knowledge to say this for sure.
  Reply With Quote
06-01-14, 06:13 PM   #12
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
Originally Posted by Rainrider View Post
I don't know if this would cause taint.
It's replacing the sort function for the default raid frames, frankly I'm surprised it doesn't break every unit frame the second it tries to sort them in combat.
  Reply With Quote
06-01-14, 07:01 PM   #13
10leej
A Molten Giant
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 583
I'm surprised its not either. Its almost like we can actually do something that we want to do with the raid frames without breaking them for once.
__________________
Tweets YouTube Website
  Reply With Quote
06-02-14, 03:46 PM   #14
Robertw445
A Murloc Raider
Join Date: Jul 2010
Posts: 4
I ended up using Pitbull for my main Unit Frame and Target Frame. Then I have Stuf off to the right and its exact order as Main for healing
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » New to LUA, trying though.


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