ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   displayName from characterName? (https://www.esoui.com/forums/showthread.php?t=10414)

Toirealach 01/12/23 09:03 PM

displayName from characterName?
 
Is there an API for me to take a characterName (raw or otherwise) that is passed to my function and get that character's display name from it to make a decorated display name?

Masteroshi430 01/13/23 02:13 AM

Quote:

Originally Posted by Toirealach (Post 46963)
Is there an API for me to take a characterName (raw or otherwise) that is passed to my function and get that character's display name from it to make a decorated display name?

GetUnitDisplayName(*string* _unitTag_)

Baertram 01/13/23 03:51 AM

afaik there is no such API function to get that data without actually interacting with some player, or having at least the crosshair above the player.


Check some helper functions here:
https://github.com/esoui/esoui/blob/...yername.lua#L1

GetUnitDisplayName awaits as parameter a unittag which would be player, group1, group2, groupn, reticleover, boss1, boss2, bossn, etc.
If you are grouped you can use that one to get the displayname via the groupN tags, and check the group's charactername via GetUnitName(unitTag).

Maybe the functions will work too if you move the crosshair above the player you want to get the data from, and use it with
the unitTag "reticleover".
You can use an event to detect the change of a reticle target:
https://github.com/esoui/esoui/blob/...plete.lua#L146

Toirealach 01/13/23 02:52 PM

Quote:

Originally Posted by Baertram (Post 46965)
afaik there is no such API function to get that data without actually interacting with some player, or having at least the crosshair above the player.

Thanks! Yeah that's the conclusion I came to myself, but I thought I'd check.

I already put character names in a temp list which get converted to display names when you put the reticle over a toon. It works. It's just annoying.


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

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