Quantcast
Download
(2 Kb)
Download
Updated: 09/16/20 12:01 AM
Pictures
File Info
Compatibility:
Stonethorn (6.1.5)
Greymoor (6.0.5)
Harrowstorm (5.3.4)
Updated:09/16/20 12:01 AM
Created:04/15/20 12:54 PM
Monthly downloads:261
Total downloads:874
Favorites:4
MD5:
6.1.5
Group User ID  Updated this week!
Version: 1.1.6
by: Jarva [More]
This addon changes the group frame view and leaderboards view to respect the display name preference in your user settings.

When the preference for display names is set to userIds it will display @UserId in the group menu with character names on hover.
v.1.1.6
Add stonethorn compatibility

v1.1.5
Internal addon rewrite to use MoonScript under the hood
Optional Files (0)


Archived Files (7)
File Name
Version
Size
Uploader
Date
1.1.5
2kB
Jarva
09/15/20 11:19 PM
1.1.4
1kB
Jarva
08/21/20 10:30 AM
1.1.3
1kB
Jarva
04/16/20 12:26 PM
1.1.2
1kB
Jarva
04/16/20 12:20 PM
1.1.1
1kB
Jarva
04/16/20 07:04 AM
1.1.0
1001B
Jarva
04/16/20 06:58 AM
1.0.0
1kB
Jarva
04/15/20 12:54 PM


Post A Reply Comment Options
Unread 04/16/20, 07:05 AM  
Jarva
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 3
Uploads: 4
This has now been updated to PostHook both methods and update the values as required as well as checking to align with the user social display preference. Thanks for your help.
Report comment to moderator  
Reply With Quote
Unread 04/16/20, 04:32 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3094
File comments: 3718
Uploads: 63
I see, but if you ONLY want to change the character name to display name or vice versa you should ONLY change the affected line then and leave all other code normal.
Use a SecurePostHook on the SetupGroupEntry function. This will render all with vanilla code first.
Then in your callback function of the SecurePostHook only change the line:
Code:
control.characterNameLabel:SetText(zo_strformat(SI_GROUP_LIST_PANEL_CHARACTER_NAME, data.index, ZO_FormatUserFacingCharacterName(data.rawCharacterName)))
Or you PreHook the SetupGroupEntry function and set a variable in your addon to true, then PreHook the function ZO_FormatUserFacingCharacterName and change it to return the displayname instead IF the variable in your addon is true, and then let all other stuff run like normal.

This could be reused in other UIs if you want to change the character to display name as well e.g.


Edit:
This is what works fine for me (including an idea for settings to change the tooltip at the group member row between displayId or charactername):
Lua Code:
  1. local settings = {}
  2. settings.displayNameInTooltip = true
  3.  
  4. ZO_PreHook("ZO_GroupListRowCharacterName_OnMouseEnter", function(control)
  5.     if settings.displayNameInTooltip then
  6.         ZO_SocialListKeyboard.CharacterName_OnMouseEnter(GROUP_LIST, control)
  7.         return true
  8.     else
  9.         ZO_SocialListKeyboard.DisplayName_OnMouseEnter(GROUP_LIST, control)
  10.         return true
  11.     end
  12.     return false
  13. end)
  14.  
  15. SecurePostHook(GROUP_LIST, "SetupGroupEntry", function(self, control, data)
  16.     control.characterNameLabel:SetText(zo_strformat(SI_GROUP_LIST_PANEL_CHARACTER_NAME, data.index, data.displayName))
  17. end)
Last edited by Baertram : 04/16/20 at 06:16 AM.
Report comment to moderator  
Reply With Quote
Unread 04/15/20, 11:00 PM  
Jarva
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 3
Uploads: 4
Unfortunately this is basically the only place that doesn't follow the games social settings.

I know overwriting the methods is currently a hack and isn't the long term intended implementation however when playing around with the hook methods I couldn't find a way to make the changes I required. When changing the values in ZO_PreHook they don't propagate through to the hooked method.

For now the implementation matches the ingame code, with a singular variable changed, which should only cause other addons to fail where they rely on the characters name being present there.

I will however add a disclaimer about potential incompatibilities with other group panel addons.
Report comment to moderator  
Reply With Quote
Unread 04/15/20, 01:56 PM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3094
File comments: 3718
Uploads: 63
Isn't this handled by the game's settings, if you prefer user or character names?
If so you might maybe better build a switch to "show the opposite of the game settings" in the group menus.

btw: Overwriting total ZOs code like
GROUP_LIST:SetupGroupEntry(control, data)
ZO_GroupListRowCharacterName_OnMouseEnter

will definetaly make other addons fail to work properly!
You should either use a ZO_PreHook and change the values you need to your need, then return false so other addons still work as intended or find a different way
Last edited by Baertram : 04/15/20 at 01:58 PM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: