PDA

View Full Version : Persistency / state save for online missions



SoW Reddog
Dec-03-2013, 06:18
Been mulling over some ideas for missions, and thinking that it should be possible to write a small txt file at the end of a mission saving the states of objectives, front lines, that sort of thing, which next time the mission runs get read in to start the mission from that point, or maybe rebalance the mission automatically.

Example 1 something like Homeplate where the number of aircraft to destroy is fixed at 60. Lets say Blues win the map, the next time the map is run the number is 58 instead, but the blues win again, so the number comes down to 55 and so on.

Example 2 a mission with moving front lines, say a Battle of France scenario or maybe fictional Sea Lion. We don't want the mission to last more than 4-5 hrs to allow players to get some variety, but the scenario demands a longer playing time therefore next time it loads in the rotation we pick up from where we left off.

Has anyone tried this sort of approach, and if so does it work, or if not why not? Please note I'm not expecting to save every aspect of the mission, and buildings destroyed in one I fully expect to be "alive" in the next mission as that sort of thing is probably beyond the engine at the moment.

Reddog

AKA_Recon
Dec-03-2013, 07:42
great idea - give it a try! :thumbsup:

Nephilim
Dec-03-2013, 08:10
I do work on something like that... All data is basically saved in MySQL database and then during mission load state of last mission is being read out of it. However lately i lack time to do work on it properly.

SoW Reddog
Dec-03-2013, 08:27
I do work on something like that... All data is basically saved in MySQL database and then during mission load state of last mission is being read out of it. However lately i lack time to do work on it properly.

Thanks Nephilim. I'm not able to look at an SQL database as I want the mission to be hosted by whoever, ATAG, Storm of War, etc. I don't want to have to set up DB's to do it. I think a text file will work but of course I'm currently at work so unable to do anything about it!

ATAG_Lolsav
Dec-03-2013, 08:28
Ive throw my ideas here some time ago.

http://theairtacticalassaultgroup.com/forum/showthread.php?t=6510

But i do fully support what you trying to do.

SoW Reddog
Dec-03-2013, 09:23
Indeed, it was your post which made me think through some of the technicalities. What I'm trying to do is create a framework mission that could be easily edited by anyone (as in changing a couple of text files and limited FMB work). This could then form the basis of a squad server or main server mission. I don't know quite where I'm going with it all at the moment, but I know London Raids has a lot of code in cs file which would preclude someone tinkering with it easily and making a variant for their own use. It's also not very well scripted, or doesn't flow well but it does work which is something to build upon.

The main reason for this thread is to understand the limitations before going too far down the path. What I'm thinking is a map which in theory could offer a single Blue objective per session, end the session when it's done, and save the results for the next play. With this you could play a campaign the length of the BoB from a single file. I'm not going that far, but we shall see what's possible.

vranac
Dec-03-2013, 09:36
Yes, that is possible. One talented guy, podvoxx wrote scripts for moving front online war. The results of the mission ( during one day) he saved using xml files.
Next day when server restarts file is loaded and situation on the front is like it was at the end of previous mission.

Here is the translation of the manual so you can see what is possible. But lot of work is needed for that.

http://www27.zippyshare.com/v/4536164/file.html

EG14_Marcast
Dec-03-2013, 10:46
great idea - give it a try! :thumbsup:

+1 :thumbsup: