Jump to content

Photo
- - - - -

SQL database and Arma 2


  • Please log in to reply
16 replies to this topic
Thread Starter
pwnstar23
pwnstar23

    Lance Corporal

  • Members
  • 45 posts

  • Joined: 04-December 2009

Posted 14 January 2010 - 05:38 #1

Anyone know how to script arma 2 to make it link up with a SQL database? I know its possible the various life mods have it working. I need to know where to start reading (tried searching but no luck) is there any documentation on this somewhere? Googling and searchin the forums came up zip for arma 2 except the armalib for arma1 does that work with arma 2?

VictorFarbau
VictorFarbau

    Gunnery Sergeant

  • Members
  • 552 posts

  • Joined: 13-January 2007

Posted 14 January 2010 - 10:51 #2

One way to shorten the time waiting for some hacked API would be to look here:

http://community.bis..._Commands_ArmA2

Check out those "copyFromClipboard" and "copyToClipboard" commands. They do work fine and it's one way to exchange data between ARMA and windows programs.

Cheers,
VictorFarbau


Anyone know how to script arma 2 to make it link up with a SQL database? I know its possible the various life mods have it working. I need to know where to start reading (tried searching but no luck) is there any documentation on this somewhere? Googling and searchin the forums came up zip for arma 2 except the armalib for arma1 does that work with arma 2?



kalxen
kalxen

    Rookie

  • Members
  • 6 posts

  • Joined: 22-November 2009

Posted 25 January 2010 - 22:03 #3

Unfortunately, there appears to be no native API to allow this. Sparta (www.legionofsparta.com) has built a bridge app using the clipboard copy to access a SQL DB. We use it to to track all approved/registered players who can fly helo/planes or drive the MHQ for our maps. Its fairly customized for our server, but one day MH6 (the dev) may release it.

It would be nice to see Bohemia provide a cleaner way instead.

Nutty_101
Nutty_101

    Gunnery Sergeant

  • Members
  • 522 posts

  • Joined: 30-January 2007

Posted 13 February 2010 - 21:37 #4

I fixed the older version of DSTS but I don't like that one that much. I have a newer version coming soon. I should have it testable in a week or so. It will have all the older functions as well as a couple new ones. Since they allowed the clipboard I am utilizing that method to move data in and out of the game. More stable and less issues for people to get it working. Only downside is that it only allows for a single instance of the game server per login.

Anunnaki Nibiru
Anunnaki Nibiru

    Private First Class

  • Members
  • 34 posts

  • Joined: 01-December 2009

Posted 14 February 2010 - 13:03 #5

I fixed the older version of DSTS but I don't like that one that much. I have a newer version coming soon. I should have it testable in a week or so. It will have all the older functions as well as a couple new ones. Since they allowed the clipboard I am utilizing that method to move data in and out of the game. More stable and less issues for people to get it working. Only downside is that it only allows for a single instance of the game server per login.


Hi Nutty !
It is good to hear you again :)
Where can i download latest version of your DSTS for ARMA2 v1.5 (i can do beta testing too when you wish, i have WIN dedicated server with small community playing there) ? I wish to collect statistics from the game storing them to the mySQL server thru DSN access, and reading that data later, to assign the RANKS to players. Perhaps i wish to SAVE/LOAD some mission state to the database too, so the mission can continue afther server restart.

About more servers using clipboard, it is on mission makers, they should use something like "keyword", which they will add to every transaction to the clipboard as "identification of database connection", and they must wait for reply with the same identification. So they can add a mission startup parameter something like DSTS string to select: "DSTS1,DSTS2,DSTS3 or DSTS4".

And you in your DSTS tool in config file can add for every DSTSn keyword different DSN connection (different connection to different database).

PS: in which language are you programing your tool ? perhaps i can help you with my basic programming skills in VB.NET and C#.

Nutty_101
Nutty_101

    Gunnery Sergeant

  • Members
  • 522 posts

  • Joined: 30-January 2007

Posted 14 February 2010 - 18:22 #6

I need to test the older version of DSTS on Arma 2. I have it working but i really didn't like how i did that one. The new version is in C# and I will put the source out for this one. That way when I fall off the planet again others can update it. :)

The commands are a bunch of scripts in arma and I allow people to set the names to their system. Helps avoid people being able to call them with ease. The database side they tell it what DSN to open or provide a connection string. Once you open the database it is held open until another db is pulled open or it's told to close. So no need to setup anything different.

Here is how the commands will work:

// String split [{String to split},{delimiter}] = String
_sResult = [_sSomeString,"|"] call DSTS_STRING_SPLIT;

// Database open [{DSN/Priovider}] = Boolean
_bResult = ["DSN=MyDatabase"] call DSTS_DATABASE_OPEN;

Anunnaki Nibiru
Anunnaki Nibiru

    Private First Class

  • Members
  • 34 posts

  • Joined: 01-December 2009

Posted 14 February 2010 - 18:41 #7

I need to test the older version of DSTS on Arma 2...
// String split [{String to split},{delimiter}] = String
_sResult = [_sSomeString,"|"] call DSTS_STRING_SPLIT;

// Database open [{DSN/Priovider}] = Boolean
_bResult = ["DSN=MyDatabase"] call DSTS_DATABASE_OPEN;


Great ... i was using you old version on ARMA1, but have not tested anything on ARMA2. And the way you wish to integrate DSN connection to OPEN/CLOSE directly from ARMA2 scripts is GREAT ! I like using database connections thru DSN, because it is independent on type of used database server (SQL/mySQL atc).

Nutty_101
Nutty_101

    Gunnery Sergeant

  • Members
  • 522 posts

  • Joined: 30-January 2007

Posted 14 February 2010 - 19:24 #8

Yeah the old does not work on it. Simple issues to be honest on why it didn't. However I only got a debug script working and nothing else. I really didn't like that version that much because it paused the server. Horrible way to do things.

MH6
MH6

    Corporal

  • Members
  • 63 posts

  • Joined: 18-June 2009

Posted 15 February 2010 - 01:35 #9

Unfortunately, there appears to be no native API to allow this. Sparta (www.legionofsparta.com) has built a bridge app using the clipboard copy to access a SQL DB. We use it to to track all approved/registered players who can fly helo/planes or drive the MHQ for our maps. Its fairly customized for our server, but one day MH6 (the dev) may release it.

It would be nice to see Bohemia provide a cleaner way instead.


Just a heads up, SpartaLib is now finalized and currently beginning testing over on the Sparta servers.
When I am satisfied that SpartaLib is ready for public release I will be releasing the source code for both the RCON Client and the SpartaLib Utility.

545 kb

The SpartaLib utility allows the ArmAII dedicated server to contact the outside world via the clipboard, adding quite a bit of functionality to the game, and enabling support of such things as:
  • SQL
  • PHP
  • HTTP/FTP
  • File I/O
  • Remote Admin (RCON)
  • ...plus more to come!
Both programs will update themselves should a new version become available, though if you build them from source you can disable this.

I've also set it up in such a way as to be fairly easy to extend SpartaLib via plugins, so those that wish to can add their own custom code to ArmA.

The Legion of Sparta currently uses this tool for keeping track of certified pilots for each aircraft and for remote admin capabilities.
Come visit us on the forums and join us on teamspeak--we're always interested to meet new folks.

Oh, and no, Leonidas will not be making an appearance in the public release. :D

Edited by W0lle, 18 March 2010 - 03:52.


Joshii
Joshii

    Sergeant

  • Members
  • 172 posts

  • Joined: 23-July 2009

Posted 17 February 2010 - 19:50 #10

Any updates on the release of this?

Nutty_101
Nutty_101

    Gunnery Sergeant

  • Members
  • 522 posts

  • Joined: 30-January 2007

Posted 18 February 2010 - 22:57 #11

Any updates on the release of this?


What one? Mine is close to working but to be honest I only have maybe 3 hours total into the software. Though it is working and able to move data rather quickly.

Joshii
Joshii

    Sergeant

  • Members
  • 172 posts

  • Joined: 23-July 2009

Posted 19 February 2010 - 16:30 #12

Well if you need someone to test around with it feel free to drop me a pm with a download link.

Nutty_101
Nutty_101

    Gunnery Sergeant

  • Members
  • 522 posts

  • Joined: 30-January 2007

Posted 21 February 2010 - 03:50 #13

Well if you need someone to test around with it feel free to drop me a pm with a download link.


I will be posting up the program "maybe" this weekend. Tonight if I get that far. It will be a testing only and mostly be for people who want to help get it completed..

Need people who know more about addons than I do. Want someone to convert the scripts into a mod that will offer the ability for a server admin to edit the settings on that side.

Also looking for someone to help with documentation.

And some nice example scripts...

Joshii
Joshii

    Sergeant

  • Members
  • 172 posts

  • Joined: 23-July 2009

Posted 22 February 2010 - 15:05 #14

I will be posting up the program "maybe" this weekend. Tonight if I get that far. It will be a testing only and mostly be for people who want to help get it completed..

Need people who know more about addons than I do. Want someone to convert the scripts into a mod that will offer the ability for a server admin to edit the settings on that side.

Also looking for someone to help with documentation.

And some nice example scripts...


I could help you out with example scripts. And about completing it well maybe gotta check the code if it's to complicated for my little head

Nutty_101
Nutty_101

    Gunnery Sergeant

  • Members
  • 522 posts

  • Joined: 30-January 2007

Posted 22 February 2010 - 15:33 #15

Cool, I only have the SQL portion and player section to finish up.

http://forums.liveca...p?showtopic=123

I posted the scripts on my board already. I should have the current source and plug-in up on the site tonight as well. Need to clean up a few things on the main program but I will have at least the program up. The source will be up shortly as well. The nice part is that I have not used anything commercial or external on any of my stuff so there are no 3rd party Dll's or applications to install for anything.

Oh, after the Rcon stuff comes open we will have 100% open source for everything. The only piece I don't want to release open to the public is a plug in that can monitor the entire network stream from each client. Mostly cause it maps pretty much everything out that the game sends to the server. I use it to see what traffic is coming in and monitor for cheats and other garbage.

The application also runs as a windows service, command prompt or in a window. Debugging works in both console or windows. I have a telnet plug in as well that will get released after this portion is done so that people can get in there from remote should they want.

Edited by Nutty_101, 22 February 2010 - 15:37.
update


oktane
oktane

    Gunnery Sergeant

  • Members
  • 518 posts

  • Joined: 11-March 2002

Posted 05 March 2010 - 09:33 #16

Register an account for the CIT and vote on this issue here:
http://dev-heaven.net/issues/9436

fREAk.
fREAk.

    Lance Corporal

  • Members
  • 58 posts

  • Joined: 16-August 2009

Posted 02 April 2010 - 10:43 #17

@octane .... Noob Question: Im registered, how can i vote?

I'd like to vote this Request 1.000.000 times, cause a working
I/O would be the key to many many Features for the Comm.

Thinking about things like Career mode, Qualifikations, User-Tracker, ArmA2TS3 improvements, WebViewers, aso. Indeed its a key feature to get ArmA2 to
where it belongs: a top title for a wide Community.

Appeal:
BIS! Dont sleep. The whole AmericasArmy community is breaking down,
and many of them are looking for a new game to play. But they all prefer BF2BC,
cause they want career modes. You even haven't to develop it by your self,
there are lots of people willing to do that for you. All we need is this I/O.
You can get a Piece of that (large) cake - if you want. Its a Win-Win.