Go to Page... |
Thread Tools | Display Modes |
05/24/16, 08:35 PM | #1 |
[outdated] Nameplates, their possible event flood & the unitTag problem
Okay, so Nameplates don't have a lot of API in order to play with them.
In an nice world, something like this could be interesting : nameplateUnitIndex = An ID64 at the creation of EACH unit. This one will stay same for every unit in game until UI reload / character logoff. If the unit is destroyed because it have disppeared from your screen, the ID64 must remain same when the same unit come back. When unit is not visible, all those functions below returns nil If the unit is an NPC and being killed, the respawn of that same npc can provide another id64 if there is any security issue. Then the big question, are those events triggers / function return nil when nameplates are disabled ? So, 2 events : EVENT_NAMEPLATE_UNIT_CREATED(integer eventId, id64 nameplateUnitIndexCreated) Event triggers when a nameplate enters on screen (should trigger only when 1st pixel of text is visible on screen). EVENT_NAMEPLATE_UNIT_DESTROYED(integer eventId, id64 nameplateUnitIndexDestroyed) Event triggers when a nameplate totally disappear from screen (should trigger only when last pixel of text exit screen). Those events can be spammy. If I have 20 units front of me and I turn my camera, the event should fire 20 times. If I look at them back, even should fire 20 more times. Few functions : Lua Code:
The Title problem : Titles are formatted with a translator convenience. They don't follow vanilla titles. Experts could find them in xx.csv For PVP and emperor, they're prefixed. <<Title>> <<YourName>> For PVE, they're suffixed with comma and pronoun. <<YourName>>, <<pronoun>> <<title>> (Except new "Silencer" Title which is prefixed like PVP titles). And, when title is active, title is merged with your name. a GetNamePlateTitle(nameplateUnitIndex) will return the title and your name I guess. So : Lua Code:
to get the Title.. I think we'll have to play with gsub. Setting our own NamePlates : Lua Code:
For SetNamePlateName, if nameplateUnitIndex is a player, the value should follow at least the max length name. For SetNamePlateFullName, the length of the value must not be > max name length + length the longest title available ingame (we have a title in french of 45 chars per ex.) For those 2 last functions : They function should let us play with the format ("<" and ">") if we want to remove them. Without those chars, they must not be displayed. If I set "Something", it must be "Something", not "<Something>" Colors : Lua Code:
If type == UNIT_NAMEPLATE_DEFAULT (the local player), the 2nd function won't do nothing. And 1st function is inverted (the more we zoom, the less we see our nameplate). Finally, the fonts : Lua Code:
That's all It was interesting writing this and we'll maybe never have those functions, maybe because already thinked and considered too intense. but we never know. |
|
ESOUI » Developer Discussions » Wish List » [outdated] Nameplates, their possible event flood & the unitTag problem |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|