View Single Post
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