Thread Tools Display Modes
01/28/24, 05:47 PM   #1
Kelinmiriel
AddOn Author - Click to view addons
Join Date: May 2017
Posts: 7
Please restore public guild info functions

I was working last year on a library addon that utilized these two functions:
Code:
GetGuildName(guildnum)
GetGuildRecruitmentMessageAttribute(guildnum)
Both of these worked perfectly when I started working on it, but now they return an empty string unless called by a guild member.

I can't see any reason why a guild name or its recruitment message should be hidden. That was public information until a few months ago. Is there any reason why it's not now?

I would really appreciate it if these could be restored to their previous functionality, and the library would be very useful to myself and others. Thank you!
  Reply With Quote
01/28/24, 07:07 PM   #2
sinnereso
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 253
Originally Posted by Kelinmiriel View Post
I was working last year on a library addon that utilized these two functions:
Code:
GetGuildName(guildnum)
GetGuildRecruitmentMessageAttribute(guildnum)
Both of these worked perfectly when I started working on it, but now they return an empty string unless called by a guild member.

I can't see any reason why a guild name or its recruitment message should be hidden. That was public information until a few months ago. Is there any reason why it's not now?

I would really appreciate it if these could be restored to their previous functionality, and the library would be very useful to myself and others. Thank you!
I'm no expert but I dont see how that was ever possible. That function requires a guildID which you can only get from your own personal guild index.
  Reply With Quote
01/28/24, 08:39 PM   #3
Kelinmiriel
AddOn Author - Click to view addons
Join Date: May 2017
Posts: 7
Originally Posted by sinnereso View Post
I'm no expert but I dont see how that was ever possible. That function requires a guildID which you can only get from your own personal guild index.
You can get the guild ID easily from any guild finder link. Also, the guilds I want to use info from are my own (one on NA, and one on EU), so I don't have any problem there. I just want it to be seen by my addon regardless of who's running it, or it's useless, except with Dolgubon's workaround. (In this case, anyway - there are other potential applications as well.)

Last edited by Kelinmiriel : 02/01/24 at 04:35 PM.
  Reply With Quote
01/28/24, 07:36 PM   #4
Dolgubon
 
Dolgubon's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2016
Posts: 410
The functions do still work as expected, however, the functionRequestGuildFinderAttributesForGuild(guildID) must be called first. It should return true, and then a short time after (200 ish ms, probably dependent on ping) you can use the other information functions. The general idea of 'this should be possible' comes from the fact that the guild finder and guild application links work. Using the esoui source code, I then worked back from the guild link handler to find the request function
  Reply With Quote
02/02/24, 10:12 AM   #5
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,588
These functions work the same way as they did back when the guild finder was introduced. My guess is, last year you simply happened to request data for guilds you had already opened in the guild finder, which made it seem like it worked the way you describe.

The game client only knows a very limited amount about guilds that exist on the server. Loading information about a couple ten thousand guilds for every single user at login is unfeasible. So in order to reduce server strain it only automatically requests data for the guilds you are a member of when you log in and it can also manually request data for guilds in the guild finder when it is needed.

Since it takes time to ask the server for guild data and receive it, this cannot happen during a simple GetGuildName or GetGuildRecruitmentMessageAttribute call.
You have to keep in mind that Lua operates on a single thread together with the rest of the game, which means it can only process one line at a time and if it had to wait for the server response, the whole game client would freeze for that duration.

This is why you'd have to call RequestGuildFinderAttributesForGuild(guildID) and wait for EVENT_GUILD_INFO_REQUEST_COMPLETE. However the game already offers a ZO_GuildBrowser_Manager class which wraps these low level functions and even provides a cache. That's why you should better use GUILD_BROWSER_MANAGER:RequestGuildData(guildId) and GUILD_BROWSER_MANAGER:RegisterCallback("OnGuildDataReady", function(guildId) end).

Also please keep in mind when you write your library or addon, that automatically requesting data for many guilds could potentially destabilize the server and force ZOS to lock the guild finder api like they had to do with the guild history api when Master Merchant became too popular.

(also moving this to general discussion since it's not really a valid wish)

EDIT: Another thing that could also explain your issue is that the guild finder does not return data when guild recruitment is deactivated. That can either happen when the guild master opts to disable it, or when the guild is full.

Last edited by sirinsidiator : 02/02/24 at 10:17 AM.
  Reply With Quote
02/02/24, 07:31 PM   #6
Kelinmiriel
AddOn Author - Click to view addons
Join Date: May 2017
Posts: 7
Originally Posted by sirinsidiator View Post
Also please keep in mind when you write your library or addon, that automatically requesting data for many guilds could potentially destabilize the server and force ZOS to lock the guild finder api like they had to do with the guild history api when Master Merchant became too popular.
Thanks for the info, and for the warning. If it's really a problem with "requesting data for many guilds", that won't be an issue with my addon, as it's only using the codes from my own guilds (one NA, and one EU). So it won't be looking for any others. (On the PTS, it'll try for EU first since most of the time there's an EU copy, then NA if it can't find that.)

Even if it's the frequency of GetGuildRecruitmentMessageAttribute(guildID) pings (the only one I'm using, once I have access to it), I don't expect my library to ever have so much popularity that it would be a problem.

Unless someone else decides that this concept works for something that they're doing, that's a lot more popular - then it could potentially a problem. I hope that doesn't happen.

Originally Posted by sirinsidiator View Post
EDIT: Another thing that could also explain your issue is that the guild finder does not return data when guild recruitment is deactivated. That can either happen when the guild master opts to disable it, or when the guild is full.
Correct - the information is definitely not accessible when the guild is not listed. I've tested that.

(Guild listings are also automatically disabled when the GM has been offline for a month.)
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Please restore public guild info functions

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off