View Full Version : Name, Level, Class
Codereddict
07-05-2006, 10:08 AM
I'd like to add the name, level, and class of my target to the HUD. At the top of the layout file (I think not working from my computer right now) it shows the different variables for information such as $cur $max $per $nam $cla $lev etc...
I tried adding a new child to the target but it didn't work at all. Then when I tried adding $nam to the end of the health it actually showed up as $nam. So I'm guessing that the reason the child I added didn't show up was because the variables I wanted to use weren't working ($nam $lev $cla). Is there something else they need to get those variables into that structure.
And while I'm asking about it, I'd like it if the name showed up in the color scheme by class.
If you can't tell already I'm not terribly familiar with the LUA coding.
Okerhs
07-12-2006, 06:08 AM
I'd like to be able to add Target of Target to the Hud if possible as well
Okerhs
07-15-2006, 02:16 AM
No one knows how to do this? perhaps a screeny would give you a better idea of what I am after;
http://www.zen57679.zen.co.uk/WoW/ToT.jpg
In Nurfed_HUD\lib.lua, search for the following:
function Nurfed_Hud:UpdateInfo(infotype)
Add these lines right underneath that line (they should be 3 of the first 4 lines of the function):
local name = UnitName(this.unit);
local class, eclass = UnitClass(this.unit);
local level = UnitLevel(this.unit);
Scroll down a bit and you'll see something that says
text = string.gsub(text, "$cur", curr);
text = string.gsub(text, "$max", max);
text = string.gsub(text, "$perc", perc.."%%");
text = string.gsub(text, "$miss", missing);
Add the following directly beneath those lines:
text = string.gsub(text, "$nam", name);
text = string.gsub(text, "$lev", level);
text = string.gsub(text, "$cla", class);
$nam, $lev, and $cla should now work.
Okerhs
07-21-2006, 05:34 PM
Ooo thanks
Using that and some copy and paste action I managed this, just need to fiddle with the placement and size etc now
http://www.zen57679.zen.co.uk/WoW/HUDnam2.jpg
Oh and replace the Target of Target info you see here with text direct from the HDU and not a seperate addon
nyxtyr
07-29-2006, 06:55 PM
how did you add the full values next to the percents like that for yourself and target?
Okerhs
07-30-2006, 01:20 AM
I used the info from this thread
http://forums.nurfed.com/showthread.php?t=10042
Zelyn
08-04-2006, 09:11 AM
can somebody gives me a example, how i do it right, cause i have no idea to handle this! Please help me :o
Lacindas
08-07-2006, 01:12 AM
i saw this thread and it got me to thinkin, wow, good idea... lol
anyways, im new to nurfed hud but i love the idea of being able to customise it both graphically and in code.
so in the line of posts above, im trying to add in target's name, race, class at the top of my hud (i use the gloss actual numbers layout with the numbers at the bottom)
i followed the steps outlined here in updating/editing lib.lua but havent been able to get them to work. (im fairly inexperienced with lua coding, so maybe im missing something obvious)
this is the code i added as a child to the target parent
info = {
type = "FontString",
layer = "OVERLAY",
Font = { NRF_FONT.."framd.ttf", 11, "OUTLINE" },
JustifyH = "LEFT",
Anchor = { "TOPLEFT", "$parent", "TOPLEFT", -70, 0 },
vars = { format = "$nam $lev $cla" },
},
now the odd thing is i was able to add my players name infront of the hp text but cant seem to be able to get a new child referenced.
any ideas or am i just missing the obvious? lol
thanks in advance :-D
also, any idea on target of target info?
m0rPh3uS
08-15-2006, 06:03 AM
i want that to. the name lvl and class on top of the hud in the middle. someone have this and can upload or exactly can describe how to make it?
and one more question. in your screenshots Okerhs there is a background behind the bars. like in the 2nd shot the HP bar 94%. how do you get there the background? mine look like so:
http://img291.imageshack.us/img291/7489/hudef5.jpg
Jenack
08-16-2006, 12:04 PM
In Nurfed_HUD\lib.lua, search for the following:
function Nurfed_Hud:UpdateInfo(infotype)
Add these lines right underneath that line (they should be 3 of the first 4 lines of the function):
local name = UnitName(this.unit);
local class, eclass = UnitClass(this.unit);
local level = UnitLevel(this.unit);
Scroll down a bit and you'll see something that says
text = string.gsub(text, "$cur", curr);
text = string.gsub(text, "$max", max);
text = string.gsub(text, "$perc", perc.."%%");
text = string.gsub(text, "$miss", missing);
Add the following directly beneath those lines:
text = string.gsub(text, "$nam", name);
text = string.gsub(text, "$lev", level);
text = string.gsub(text, "$cla", class);
$nam, $lev, and $cla should now work.
Do i just need to add that in the lib.lua? and add the $nam, $lev, and $cla in Layout.lua? To make it work ore... Do i need more Lua codeing?
Naveronski
08-22-2006, 01:52 PM
I used the info from this thread
http://forums.nurfed.com/showthread.php?t=10042
Heh, thanks for the reference.
Minipuff
09-06-2006, 07:21 AM
Ooo thanks
Using that and some copy and paste action I managed this, just need to fiddle with the placement and size etc now
http://www.zen57679.zen.co.uk/WoW/HUDnam2.jpg
Oh and replace the Target of Target info you see here with text direct from the HDU and not a seperate addon
how did u get the targets target?
Ralrra
09-06-2006, 09:08 AM
how did u get the targets target?
In that screen he's using a seperate addon to do it. Dunno if anyone's managed to actually have ToT incorporated into the hud yet.
Minipuff
09-06-2006, 09:13 AM
shouldnt be that hard to get the same info about targets target as the target but i ahve no idea where to start look :P
Okerhs
09-28-2006, 08:06 AM
Heres some files for the latest version, didn't like the dragon HUD so managed to get a working version in the same style as the Alpha HUD and added the bits needed for Name,Level,Class and for the actual values of hp/mp etc.
Still trying to figure out how to add the Target of Target to the HUD tho :(
The Addon I'm using at the mo to compensate for this lack is TitanAggro which is kinda misnamed as it doesn't need Titan to function
http://www.curse-gaming.com/en/wow/addons-2666-1-titan-aggro-29.html
Anyway I've attached a screenshot and a rar of my Nurfed_Hud folder, just replace the latest one (after backing up of course)
hope this is of use
http://forums.nurfed.com/attachment.php?attachmentid=385&d=1159455954
romeocat
09-28-2006, 04:17 PM
Here is a picture of the HUD with target of target. I will post the the .zip at http://www.dawnofdragons.com/xzzy/nurfed/nurfed_hud.rar when I get home.
If there is enough demand I can add an option to enable/disable it in the options frame.
I am by no means good with images so I plundered the status image from somewhere. The new texture is "target_target.tga" for the ToT HP and Mana bars.
http://www.dawnofdragons.com/xzzy/nurfed/hud_tot.jpg
Enjoy
jbrow15d
09-29-2006, 11:22 AM
Is there a way to make the hud dissapper when out of combat instead of just fading. Also is there a way to make the colors of the hud be the colors they should be ... rage = red, energy = yellow, health = green, Mana = blue?
Edit if you lose energy/rage/mana/health it comes back?
Jaerba
09-29-2006, 11:27 AM
Is this not working anymore? :o
Found a typo in your new Nurfed_hud.lua... there us a "hut" instead of "hud" in one of the ToT functions.
I was also unable to get the health and mana bars of the ToT to show anything but the background texture.
romeocat
09-30-2006, 09:01 PM
On my changes? I just Rar'd the one I am currently running. It seems to be working fine for me. Do you get any script errors?
Romeocat,
from the nurfed_hud.lua file in the .rar file you linked
function Nurfed_Hut_InitToT(frame)
and yes.. for some reason all I ever see is the background bars for the ToT statusbars and the name of the target. The rest of the hud works as advertised.
I get no script errors even with the 'hut'
Killkenny
10-01-2006, 02:02 AM
Thanks for the file.
I want to remove the target frame completly and just use the hud, but there's still one thing i need. Its the target menu.
Is it possible to get the target dropown menu with a rightclick on the targetname?
not that I know for sure but, that will probably be a rather difficult implementation for the Hud as it is an overlay to the screen and has no "mouse awareness" at all.
romeocat
10-02-2006, 10:31 AM
Strange, I don't think that function gets called to the typo likely didn't matter. Are you just seeing the black transparent background, or are you seeing white bars? Do you see the target name at all?
romeocat
10-02-2006, 10:32 AM
It's possible to get mouse events, it's just like any other frame in the UI. However, in order to get clicks, it will eat any clicks that take place within it's bounds. (e.g. within the name) it's not hard to add the code if it's what you want.
Name is there.. and the transparent grey bars are there.. just no color for the health or mana. I various tweaks to the code and I either come up with the same thing or completely broken :P
initially all I did was copy and paste your rar'd files into my directory. It's a complete and total mystery because I read through the code and can't find anything wrong with it.
romeocat
10-03-2006, 10:14 AM
I am guessing that is with a target? Something as gone awry if that's the case. It sounds like UpdateInfo() is failing to the correct thing.
It will be extermly wordy but try putting a DEFAULT_CHAT_FRAME:AddMessage() into the Nurfed_Hud_UpdateToT function (inside of the if that actually does the work) to see if it's being called.
shoefly
10-03-2006, 08:04 PM
Strange, I don't think that function gets called to the typo likely didn't matter. Are you just seeing the black transparent background, or are you seeing white bars? Do you see the target name at all?
wouldnt happen to have this code handy would ya?
thanks for the rest of the stuff tho.
edit:
this sorta works for me, not sure what im missing. basically sometimes it updates sometimes it doesnt sometimes itll keep the same tot even tho ive switched to someone else with a different target. The health/mana also doesnt seem to update well either.
to clarify basically itll update and show the ToT the first time but to get it to update i have to deselct my target let the ToT dissappear then reselt my target, rinse repeat
any ideas?
OK... I got the bars working but I had to make some significant changes to Romeocat's Layout.lua file in the ToT section. I will try to post my version later today when i get home from work.
I still have some problems though... It's nice to have the bars but at the moment I can not get them to "map" to the texture, and I can't get the bars to resize appropriately. Like I said i will post my file when I get home from work today.
PS I forgot to try the AddMessage() thing. I'll go back to the unaltered layout and try it today as well
shoefly
10-04-2006, 03:22 PM
im still stuck :/
Ive successfully made it a button, (silly me, wasnt that hard) however it still doesnt update well and the bars only update on the initial update after that the name/bars stay the same even tho it could now be a totally different target
This is my layout.lua file... note that most of the ToT code is commented out becuase I was unable to do the things I described in my previous post but still wanted to know wht my ToT was.
shoefly
10-04-2006, 05:10 PM
This is my layout.lua file... note that most of the ToT code is commented out becuase I was unable to do the things I described in my previous post but still wanted to know wht my ToT was.
ok thats whats ive got. i mean ive got the bars working too but have u actually tried it out yet? when i select someone it takes a bit to update or if i cast a spell/do an action itll update. however after that if my target changes targets or i change targets the bar/text wont update
shoefly
10-04-2006, 11:13 PM
nvm im stupid, figured it out :P
romeocat
10-05-2006, 03:20 PM
Okay, that's all wierd, I am running this code just fine without any of these problems. Are you runnign anything else, any other changes to the core nurfed code? I will update my RAR when I get home to make sure it has the changes. I've never seen it behave the way you mention.
romeocat
10-05-2006, 03:25 PM
wouldnt happen to have this code handy would ya?
thanks for the rest of the stuff tho.
edit:
this sorta works for me, not sure what im missing. basically sometimes it updates sometimes it doesnt sometimes itll keep the same tot even tho ive switched to someone else with a different target. The health/mana also doesnt seem to update well either.
to clarify basically itll update and show the ToT the first time but to get it to update i have to deselct my target let the ToT dissappear then reselt my target, rinse repeat
any ideas?
Which code do you mean? That sounds like the update function is not doing the correct thing.... It's hard to debug remotely and i've never seen it act that way. Can you tell me by chance if your running at a low frame rate?
Does the ToT on the target unit frame behave in a similar manner?
shoefly
10-05-2006, 03:58 PM
i fixed it :P, i missed part of your nurfedhud.lua code. I copied and pasted instead of just using your .lua :P
romeocat
10-05-2006, 04:10 PM
I just put a new copy up at http://www.dawnofdragons.com/xzzy/nurfed/nurfed_hud.rar
It's a few fixes and some text changes (meaning i changed the format strings which and simply be changed back).
Running the Nurfed from 28 Sep... only changes are yours that were made to the hud code and mine to your layout file. Now I am a complete addon whore.. just about everything I use is ace or ace2 based, even so, I find it hard to believe that any of them is affecting the hud especialy since the rest of the hud works just fine. At the moment I am getting what I need in that I can see who my target is targeting. With a hunter main that's all I need. However, i wil have to do some tweaking because as a raid leader I need to know when to yell at the priests to heal the MT faster :P
romeocat
10-05-2006, 04:14 PM
This is my layout.lua file... note that most of the ToT code is commented out becuase I was unable to do the things I described in my previous post but still wanted to know wht my ToT was.
I wrote the code to use a StatusBar widget, which isn't the same kind of widget that the player/target mana/hp bars use. I suspect that's causing it not to work.
I would need to research a bit more how they work. It shouldn't be hard to make it use that type of texture update. I only had a simple texture, and leveraged the Unitframe code to update the status bar.
shoefly
10-05-2006, 04:37 PM
works/worked fine for me. ive changed your code to only show hp status bar and be a clickable button on the hud.
So yah... I didn't change a single thing and it started working... Last thing I did was update my ace addons. Something screwy was happening.
/shrug
then I switched to the StatusBar method and it worked too
romeocat
10-06-2006, 09:13 AM
Strange, I am also running mostly Ace2 addon's as well. Don't know why it wasn't working.
I more meant did you have any changes to nurfed, such as a custom unit frame that changed the stuff in nurfed utility.
If it's wokring now then great.
Okerhs
01-07-2007, 06:38 AM
Working 2.0 version of the Gloss Bars with actual mobhealth and Name, Level and Class of target uploaded to the download page, still needs a bit of work on it, some alignment issues and ToT to add
http://forums.nurfed.com/downloads.php?do=file&id=18
http://forums.nurfed.com/downloads//glosshud_jrB.jpg
Powered by vBulletin® Version 4.1.9 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.