Thread Tools Display Modes
05/20/14, 10:04 AM   #1
zgrssd
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 280
Addons Communicating Guildwide via Member Notes?

It is general knowledge that addons running on different clients cannot communicate with one another effectively.
While they can send mail (1/5 seconds due to spam protection), this is not very fast.
While they could easily parse chat messages, the top they can do with the chat sending is prepare a message for you that you have to commit via enter or write soemthing that only appears on your client (d() or CHAT_SYSTEM:AddMessage).

But recently somebody asked if we could make a Guild Callendar Addon. And I noticed something:
Addons can communicate to some degree via the Guild Member Notes!
Specifically SetGuildMemberNote(integer guildId, luaindex memberIndex, string note) is totally allowed (there is no indication this is private, propably because one needs to have an addon to parse the events to even notice chagnes there)

There is also an Event Called EVENT_GUILD_MEMBER_NOTE_CHANGED, but the arguments are not fully known (so I cannot say if it would get Changed Member Nots of other users). If not, a polling approach might be feasible (check one member every X MS, start from beginnign ocne you reached end).

We would need a way to serialise & deserilaise the data, wich is not that hard.

We would need to know what exactly the Character limit for Member notes are.
Edit: Tested it. The Textbox to enter only allows 254 Characters. It is likely to be the limit of the Database too, but testing if direct set can exceed this limit won't hurt.

Optionally, the Addons should only affect the member note after a certain "#tag" one puts in the note. That way normal use data (what you normally write there) could stay around, leaving only stuff past a certain Threshold to be used for sending/receving).

Unfortunately I still have to finish my first Addon or risk it becomming an eternal work in Progress. But if anybody else would want to figure out if my Theory works (or has already used it), I would appreciate results.

Last edited by zgrssd : 05/21/14 at 07:35 AM.
  Reply With Quote
05/21/14, 07:50 AM   #2
zgrssd
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 280
More thoughts. First we need a name for this.
How about the MoGMN-Protocol? "Multicast over Guild Member Notes".

I think we would need two versions:
1) This one is limited to one Notes size. It's usefull for normal guild members that want to put in some announcement that can be auto-parsed by other addons.

2) This version is designed to split large messages over multiple notes, so the 254 Character Limit is not so much of a problem. It's designed for higher ups in the ranks that have the right to set Member Notes of other Members in addition to thier own. That way up too 500 * 200 Characters large Messages would be quite feasible.
On the Sender side this one would have to deal with issues like packages vanishing (members leaving or changing thier Note), becomming incomplete (someone needs more of thier Note Space for thier own message) and generally uncertain amount of data/Note (you might have 240 Characters after the headers, or only 20). On the receiver side there must be a way to differentiate between the packages of different messages.
Ideally members should be able to "opt in" for this. i.e. they put the proper Tag into thier notes, and the addon only writes to those who have been tagged (and only as much as the tag position allows).
  Reply With Quote
05/21/14, 09:53 AM   #3
thelegendaryof
 
thelegendaryof's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 161
However one would need to think about the compression/type of data to be send/recv first and foremost i'd say ...
(I'm not really good with that so every input is welcome)

That 's the most promising info I've found:

http://encode.ru/threads/449-Most-ef...ull=1#post9112

As in creating a dictionary of function that are mapped to Strings/ID as short as possible.

HM! Maybe abusing Links will help us working around that Character Limit ... are Links in Notes supported?

Edit: Yes Itemlinks are support that actually pretty great as their Data isn't counted towards the Characterlimit!

Edit 2: Sadly in that case it is , however I think Links are probably the best way to send Addon-Data
without bothering regular Members to much as the Data attached is hidden from the Eye.

Structured like that:

|HFF0000:ADDON_ID:TYPE:FUNCTION:PARAMETER1:PARAMETER2:...|h[MoGMN]|h
Example Pseudocode:

Lua Code:
  1. function SendData(ADDON_ID, TYPE, FUNCID, ...)
  2.     local aid = compress_id(ADDON_ID) -- first letter + lastletter + id in case someone else uses the same name
  3.     local data =  '|HFF0000:'
  4.     data = data..tostring(aid)..':'
  5.     data = data..tostring(TYPE)..':'
  6.     data = data..tostring(FUNCID)
  7.  
  8.     for i,v in ipairs(arg) do
  9.         local arg = compress_arg(v) -- hm not sure how to compress those
  10.         data = data..':'..tostring(arg)
  11.     end
  12.  
  13.     data = data..'|h[MoGMN]|h'
  14. end
  15.  
  16. SendData("HERPERTS_ADDON", 1, 5, "123 GOLD") -- GENERATES: |HFF0000:HN0:1:5:123GOLD|h[MoGMN]|h

Maybe something like this for compressing strings:

http://stackoverflow.com/a/3649531

One could also use that to send Links in Chat to others that have an Addon
and for example Automatically open their Map and point them to the Location.

I'm just not sure if Zenimax likes that and will not just disable that API-Function if they get knowledge of the way it 's used :/ ...

Edit 29058725798:

The Note is actually an Edit-Field that can take as much as 1060 Characters
however like you suspected only 254 of them are actually saved upon
writing it to the Database (tested and confirmed by myself).

Last edited by thelegendaryof : 05/21/14 at 11:09 AM.
  Reply With Quote
05/21/14, 11:51 AM   #4
Tar000un
 
Tar000un's Avatar
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 47
One of the simpliest i see, is to create a dictionnary.

For numerical data, it's possible to rewrite them in base32hex.

But the other problem is see is the multiple access : who write and when ? Assuming two addon want to write the player's guildnote to communicate with a guildmate's addon, an error may occur.

In the other hand, how often is possible to write the guildnote ?
  Reply With Quote
05/21/14, 12:29 PM   #5
thelegendaryof
 
thelegendaryof's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 161
Seems to be time-gated as well - kicks you if it 's writen to often per minute (Error 318)
  Reply With Quote
05/21/14, 02:04 PM   #6
CrazyDutchGuy
 
CrazyDutchGuy's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 89
Please don't abuse objects that are not intended for heavy communication. I agree that we would like an option to have addons communicate with each other, but using guild notes is just not right imo.
  Reply With Quote
05/23/14, 08:14 AM   #7
thelegendaryof
 
thelegendaryof's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 161
Originally Posted by Iyanga View Post
No, it can be a move backward, too. ZOS could for example decide to remove member notes completely and therefore hurting all the people who use that feature for legitimate purposes just because you insisted on abusing it.
Like I've written above

Originally Posted by thelegendaryof View Post

I'm just not sure if Zenimax likes that and will not just disable that API-Function if they get knowledge of the way it 's used :/ ...
And as you see zgrssd already posted in the official forums asking if it 's allowed or not:

http://forums.elderscrollsonline.com...-communciation

Like said before - it 's all just guess- and theorywork right now ... nothing more.

Also "abusing" something is more likely using something in a negative way without any care if that impacts people directly/indirectly or not. You have to take into consideration in what way something is implemented. In that case it would be more likely a workaround for some missing features that don't impact most people at all (aside from seeing a simple link). (applying the above ethics!)

Last edited by thelegendaryof : 05/23/14 at 10:15 AM.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Addons Communicating Guildwide via Member Notes?


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