Thread Tools Display Modes
05-12-10, 03:00 PM   #1
DaKu2k10
A Defias Bandit
Join Date: May 2010
Posts: 2
Question Exchange data between players through an AddOn

Hi,

i am getting into AddOn Dev with Lua. First of all i want to know what is possible in general. I have seen lots of AddOns that deal with improving the gameplay experience for a player, e.g. the Omen Threat Meter, which only operate with local data. What i am curious about is if it is possible to share data between AddOns.

I am trying to give an example:

My Addon has extracted some game data (like the names of the players i have met) that ist stored in a lua table.
Now i want to make this lua table available for every other user who uses My Addon

Is there a way of doing that?

Thanks
  Reply With Quote
05-12-10, 03:39 PM   #2
cloudwolf
A Black Drake
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 87
It depends on waht you mean by sharing the info. If you want everyone who downloads your addon to get everything you added then it has to be saved in a hardcoded way. If you want to transfer data/share it with people using the same addon while they are both online this is done through a custom addon channel and specific commands (i don't know too much about this) but it only sends the info when the players online and only works for people in raid/party/guild. so there are limitations.
  Reply With Quote
05-12-10, 04:51 PM   #3
Akryn
A Firelord
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 479
http://www.wowwiki.com/API_SendAddonMessage

or create a custom chat channel and then hide it, for things that addon messages can't do.
  Reply With Quote
05-13-10, 08:44 AM   #4
DaKu2k10
A Defias Bandit
Join Date: May 2010
Posts: 2
Originally Posted by cloudwolf View Post
It depends on waht you mean by sharing the info. If you want everyone who downloads your addon to get everything you added then it has to be saved in a hardcoded way.
What do you mean by hardcoded? I know that it is possible to save variables to a file (like xml for example). But is it possible to store and retrieve data from a database like mysql or something.

Thanks for your help
  Reply With Quote
05-13-10, 08:49 AM   #5
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,928
Nope, unfortunately or fortunately when you look at it security wise, addons cannot access anything outside of the game.

You would have to 1) Write to the normal savedgame variables 2) use an external program to extract the information and format it into a format you need 3) import the reformatted data into external database.

Step 1 is handled within the game itself via the addon.
Step 2 and 3 can only be handled outside of the game after the user has logged out and the saved variables have been written. Although I have seen reloadUIs writing the saved variables too.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Exchange data between players through an AddOn


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