Thread Tools Display Modes
04-28-06, 12:47 AM   #1
cbielich
A Kobold Labourer
Join Date: Apr 2006
Posts: 1
Connecting to Mysql through LAU

I know this has been asked before but why not ask again to see if there are any changs.

Can someone tell me if it is possible to connect to a external db like MySQL and get data down to the client for a mod?
  Reply With Quote
04-28-06, 12:51 AM   #2
KprOfTime
A Kobold Labourer
AddOn Author - Click to view addons
Join Date: Apr 2006
Posts: 1
No external communication is allowed. You used to be able to save and load data from LUA files while in game (used for mods like MP3 playing controllers), but I believe that functionality has been disabled.
  Reply With Quote
04-28-06, 04:08 AM   #3
wereHamster
A Black Drake
 
wereHamster's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 80
Originally Posted by cbielich
Can someone tell me if it is possible to connect to a external db like MySQL and get data down to the client for a mod?
You will never ever be able (officially) to directly communicate with an outside application. No reason to ever ask for it.
The only way to pass data in and out of WoW is through SavedVariables.
  Reply With Quote
05-14-06, 04:41 AM   #4
MilkmanWes
A Murloc Raider
Join Date: May 2006
Posts: 4
I can see where it would be useful to have a data connection to an outside source in game, such as connecting to an xml feed from allakhazam.com for in game research or live data collection to their website, or connecting to a guild database of bank info and DKP rankings.

As a work around - could the save variables file be used as a cache for an asynchronous communication method between an external app and a mod? Update the saved variables with new information that is reparsed when the add on is called? If new information is added to the end of an array or if a specific variable is altered then the next operation on either end would take the new or altered data and use it for it's intended function.

An scenario I just thought of:
Raid leader decrements DKP for a player which is saved in dkp.lua
Background app on the raid leaders computer on a 90 second (configurable) interval uploads the dkp.lua file to a web site
Raid members running a client version of the app retrieve the dkp.lua file every 90 seconds (configurable) and overwrite the existing one.
The raid members open their DKP standings window which checked the DKP.lua file and fills in the window with the values currently stored there.

The raid leaders app could check a byte at the beginning of the file to see if it has been updated since the last polling. If true the file is uploaded and the byte is changes to false, if false poll is completed without upload. When the raid leader opens the master window a check box is bound to the true/false byte. This way they can check it if they want to initiate an update and see that it is unchecked to be alterted to the last update having completed correctly.
  Reply With Quote
05-14-06, 06:02 AM   #5
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
All lua files are compiled when the addon first loads and ignored thereafter (including SavedVariables lua files with an obvious difference when game world closes).

The dkp.lua/savedvariables idea is an approach some use, but the data will only be able to change when the UI loads.

Re-loading a LoadOnDemand mod has no effect also, if wondering.
  Reply With Quote
05-14-06, 08:59 PM   #6
Iriel
Super Moderator
WoWInterface Super Mod
Featured
Join Date: Jun 2005
Posts: 578
Furthermore to Gello's point, the list of available AddOns is compiled when the client starts, so you can't add new AddOns once the client is running.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Connecting to Mysql through LAU


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