Page 1 of 1

save everywhere feature

Posted: Thu Jan 29, 2009 9:20 am
by Ark
Sorry in advance to the dev team

I was wondering how difficult it would be to implement the possibility of save everywhere as a standard feature in the game.

I took a look into saveeverywhere.oxp. What frame actually do is to save into the save file some additional information about the type of the station the player is docked and the position of that station. It is not necessary to save the whole status that the system has when the player docked (number of ships, and other random things).

From my point of view the only essential information in the save file for this to work is
1. The type of the station (rock hermit, Tesco constore ect)
2. The location of the station.
Frame may correct me in the above assessment.

Additionally there must be some more checks in the code. For example what will happen if the oxp station inside the save file does not exit anymore (the oxp has been removed). In that case there must be a warning similar with the one we have when we are trying to load a save game with a player’s ship (oxp ship) that does not exist anymore.
Also what will be the extent of this new feature (it will not be wise to be allowed to save in behemoths), maybe an additional key in the shipdata.plist allowsave = yes (and with the default value of no) or this new possibility to be applied only to ships with scan class station.

I am not trying to playing it a “smart ass” here since I do not know how deeper will be the changes in the code and most important what will be the consequences of this to the stability of the game. I am definitely sure that there must be a very serious reason that forbids this possibility but due to the lack of knowledge I do not now that reason.
I just want to share some thoughts I had with the rest of you.

Posted: Thu Jan 29, 2009 9:30 am
by DaddyHoggy
Hi Ark, I'm going to have to install the save anywhere oxp since I've started using the constores a lot while play testing the WIP (and I've started a new pilot as my old one "disappeared" last year). It seems mighty strange to trade with a constore and then still have to fly to a main station so your progress can be saved.

A long time ago I suggested (as have many others) that for stations that are permanent (as long as the generating oxp is installed) then it would be v. nice to have the save facility at these stations too (i.e. the dodec at the Tionsla graveyard, the station at the Tianve Pulsar, the constores, Black Monks, Seedy Space Bars, etc.).

One of the few things I liked about Federation of Free Traders (FOFT) in my Amiga days was that you could save at anytime - including in flight - the game paused briefly while you and the universe around you was stored and was reconstructed when you reloaded. I know this is probably very difficult in Oolite because the system is populated as you jump into it...

Re: save everywhere feature

Posted: Thu Jan 29, 2009 9:33 am
by JensAyton
Ark wrote:
I was wondering how difficult it would be to implement the possibility of save everywhere as a standard feature in the game.
Effectively impossible.

Re: save everywhere feature

Posted: Thu Jan 29, 2009 9:34 am
by Ark
Ahruman wrote:
Ark wrote:
I was wondering how difficult it would be to implement the possibility of save everywhere as a standard feature in the game.
Effectively impossible.
End of discussion :lol: sorry!!!

Posted: Thu Jan 29, 2009 1:01 pm
by Eric Walch
Saving somewhere else will never be perfect because no current script anticipates to this. E.g. when you want to have a station with some custom asteroids around it, you give your asteroids a custom role. But, it is hard coded that only stuff with role "asteroid" breaks into boulders. To let custom asteroids have boulders, all ups-asteroids have a script that reset their role to "asteroid" once spawned. (since ups-1.5.0 to avoid the conditions key in the shipdata). A save everywhere only will see asteroids in this case and will put the standard asteroids back. It is impossible to back trace in what role they were originally spawned.

Therefor a save everywhere option will never be able to set the station surroundings well as intended. This will only work if every station has a startup script hat sets its own surroundings and the save option has not to worry about this. (e.g. the buoy repair station and some ups stations scripts are setting up their own buoys). And in this case a save-everywhere that tries to set up the surrounding must first analyse the script to see if he has to set up the stuff or that a station-script will set up the stuff itself on addition. Looks impossible to me.

Same problem with variables. Only mission variables are saved. For other stations you can use other variables to keep track of things. And as normal variables are faster to process I try to use them where I can.

You probably could make something that will work 99% reliable but it will never be foolproof unless you completely redesign oolite and throw away existing oxp's.