ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   character name function? (https://www.esoui.com/forums/showthread.php?t=331)

Vuelhering 03/20/14 02:07 PM

character name function?
 
I cannot find the function to return your character's name. It looks like you can get the login name but I don't see how to find your currently logged in character. I would expect a simple call for that.

Would GetUnitName("player") be what I need?

Xrystal 03/20/14 02:57 PM

There were 3 functions that returned your name. One for your character , one including the server name and one for your @ name. I put it in one of the threads somewhere but will check again when I get home.

Vuelhering 03/20/14 03:26 PM

Thanks!

I can't test these out until live, but I've been coding an addon and I just couldn't find that functionality.

Xrystal 03/20/14 03:32 PM

Here you go:

local charName = GetUnitName("player")
local serverCharName = GetUniqueNameForCharacter(charName)
local accountName = GetDisplayName()

This was tested during the weekend test before the last one so about a month or so old testing wise. But I don't recall these functions amongst the ones that were deprecated.

Vuelhering 03/20/14 03:38 PM

Quote:

Originally Posted by Xrystal (Post 1538)
Here you go:

local charName = GetUnitName("player")
local serverCharName = GetUniqueNameForCharacter(charName)
local accountName = GetDisplayName()

This was tested during the weekend test before the last one so about a month or so old testing wise. But I don't recall these functions amongst the ones that were deprecated.

Thanks!

I saw GetDisplayName(), but was pretty sure that was the @name.

But now, that leads to another question... what's the server? Is that EU/US/PTR?

Xrystal 03/20/14 03:49 PM

Can't remember what was displayed when I tested it on myself but it was something along the lines of charname - server name .. I'll see if I happened to screenshot it but I don't think I did.

nope: Just screenshotted the big data grabs I did in case I needed to check the info.

Lodur 03/21/14 01:14 PM

Let's follow this up with the extra character after character names.

What is the deal with these? I know all player names from EVENT_COMBAT_EVENT have about 3 extra characters on the end. A few NPC characters do too...

Any one know why or have any details here?

Xrystal 03/22/14 05:44 AM

And another interesting name function I hadn't spotted before :

DecorateDisplayName(string displayName)

With its UnDecorate and IsDecorated.. sister functions. Wonder what that does.

Vuelhering 03/22/14 01:09 PM

Xrystal, I saw that too. I figured it was the extra stuff added to indicate a boss or elite.

Xrystal 03/22/14 01:21 PM

Ah yeah that would make sense

Vuelhering 03/22/14 02:06 PM

Quote:

Originally Posted by Lodur (Post 1598)
Let's follow this up with the extra character after character names.

What is the deal with these? I know all player names from EVENT_COMBAT_EVENT have about 3 extra characters on the end. A few NPC characters do too...

Any one know why or have any details here?

Are they blank, or gibberish, or what?

Lodur 03/23/14 10:06 AM

Quote:

Originally Posted by Vuelhering (Post 1638)
Are they blank, or gibberish, or what?

Generally they are something like "Bob the Builder^Mx"

Just remove the '^' and all that follows for the cleanup. But the question is why is it there at all???

Xrystal 03/23/14 11:56 AM

That looks similar to what I was seeing when I was looking at items looted. I think it was the itemLink or itemString but not 100% sure now.

Vuelhering 04/01/14 04:23 PM

Quote:

Originally Posted by Lodur (Post 1598)
Let's follow this up with the extra character after character names.

What is the deal with these? I know all player names from EVENT_COMBAT_EVENT have about 3 extra characters on the end. A few NPC characters do too...

Any one know why or have any details here?

Finally figured out what you were talking about, Lodur.

The strange characters are because it's a "raw" name. What does that mean? No idea.

GetRawUnitName() vs GetUnitName()

I don't know how to reliably convert it, either.

Xrystal 04/01/14 05:07 PM

I also noticed after a few item names '^p' being added. Can't think what it is but just added code to remove those characters if they exist in the hopes that it works but not come across another one yet to test it out.


All times are GMT -6. The time now is 01:01 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI