Home   Help Search Login Register  

Author Topic: Saving Units to file in MP  (Read 1255 times)

0 Members and 2 Guests are viewing this topic.

Kabukiman

  • Guest
Saving Units to file in MP
« on: 03 Sep 2003, 16:44:56 »
Hi!

A (hopefully) simple question:

We plan to combine a PHP-MySQL-based Strategy-part with an "online" OFP-MP game...
To achieve this, we need to save the status of all player units after the victory-conditions are met for the played mission.
I found the following script-commands:

person saveIdentity name

Operand types:
person: Object
name: String
Type of returned value:
Boolean
Description:
Saves person's identity to objects.sav file in campaign directory as entry name.

Example:
player saveIdentity "playerIdentity"
---------------------------------------------------------------------- ----------
object saveStatus name

Operand types:
object: Object
name: String
Type of returned value:
Boolean
Description:
Saves object's properties to objects.sav file in campaign directory as entry name.

Example:
player saveStatus "playerState"
---------------------------------------------------------------------- ----------

Then we'll parse this file (with a self-designed C-Tool) and put these playerstates (which hopefully contain position and status, ammo left etc) into the MySQL-Table which can then be viewed by the players and be read out for the next War (not the positions, but the amount of ammo and vehicles) to generate a new mission (again with a C-Program)...

Now the questions:
- Which Info is saved by those 2 commands above?
- This generated "objects.sav", does it ONLY contain our explicitly saved Units, or does it contain more info?

Thanks in advance for your answers...


Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Saving Units to file in MP
« Reply #1 on: 04 Sep 2003, 01:00:47 »
i am pretty sure that weapons loadout is saved and also the players rating

As far as using it in MP is concerned, i havent seen any reference or questions about it and was under the assumption it wasnt possible to use that command in mp
« Last Edit: 04 Sep 2003, 01:03:44 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

duckwilliamson

  • Guest
Re:Saving Units to file in MP
« Reply #2 on: 04 Sep 2003, 07:45:56 »
Ya is it possible to use campaign commands in multiplayer?

-hence can we have a multiplayer campaign!?

Offline CrashDome

  • Members
  • *
Re:Saving Units to file in MP
« Reply #3 on: 05 Sep 2003, 02:21:55 »
saveStatus and saveIdentity are the only commands that work in MP.

My mod (Sinews of War v1.0) used those. I am working on SOW v2.0 and plan on introducing several MP campaigns after the core files have finished.

Check out the site in my sig. It has the v1.0 files and feel free to look through them. They are a little dirty though. Version 2.0 is coming out (very soon) and I am currently working on a website for it. It also uses CoC Network Services to handle client/server relations better.
Your idea is a good one, but I would like to point out that once you save a status anyone who logs into a mission under someone elses name has the ability to muck up that persons save. There is no security there. Just keep that in mind. I have had nightmares trying to figure out a security feature in my own mod, but have yet to come up with a quick and decent one.

Added: I forgot to mention that your tool is of great interest to me. Once I get my site up, I would like to collaborate w/ you on it and possibly others :)
« Last Edit: 05 Sep 2003, 02:23:50 by CrashDome »