Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: SQL database and Arma 2

  1. #1

    SQL database and Arma 2

    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?

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

    http://community.bistudio.com/wiki/C...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


    Quote Originally Posted by pwnstar23 View Post
    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?

  3. #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.

  4. #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.

  5. #5
    Quote Originally Posted by Nutty_101 View Post
    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#.

  6. #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;

  7. #7
    Quote Originally Posted by Nutty_101 View Post
    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).

  8. #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.

  9. #9
    Quote Originally Posted by kalxen View Post
    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.
    Last edited by W0lle; Mar 18 2010 at 03:52.

  10. #10
    Any updates on the release of this?

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •