Page 1 of 1

Storing additional save game values

Posted: Fri Mar 04, 2011 8:48 am
by Killer Wolf
before i put this in the feature tracker i thought it would be worth dicussing here.
i think this might have been touched on before, would it be possible to have OXPs save additional info at a save game stage? the idea i'm primarily thinking of is to show a more "believeable" progression of the universe as you comtinue playing, so that, eg, you could compare a value loaded from the save game and compare it to current values to take some action.

Re: Storing additional save game values

Posted: Fri Mar 04, 2011 8:55 am
by Commander McLane
I think that should be entirely possible with the existing mission variables. Depending on what exactly you want to save, it would potentially make for a very large file, but I guess that would also be true if something else than mission variables would be used.

So what are you thinking about?

Re: Storing additional save game values

Posted: Fri Mar 04, 2011 9:05 am
by Thargoid
There are a couple of new items for 1.75 beta that may well be useful in doing this, as detailed in Ahruman's post detailing the updates in 1.75.

Specifically:

Ahruman wrote:
Native JSON support may be useful for storing structured data in mission variables.
Ahruman wrote:
playerWillSaveGame(saveType) (Feature request #5095)
The former effectively expands what can be stored in a missionVariable (or at least simplifies doing it) and the latter triggers when players save their game (automatically or manually) and can be used to cunningly refresh and update said mission variables so their correct values get put into the save.

The comparison with a save game can already be done at this.startUp - many OXPs already do this in the sense that they will take a value from a save game or use a default value (initialise the missionVariable or the script variable that is given the value from the MV for example) depending on circumstance. Almost every OXP that uses MV's will do that - I know all of mine do.

But as McLane says, it gives larger save game files, especially for OXPs that save everything to a MV for save to save consistency (for example Random Hits).[/color]

Re: Storing additional save game values

Posted: Fri Mar 04, 2011 10:04 am
by Killer Wolf
my initial idea was a fairly simplish (?) one for a new station or Coriolis : i wanted to have a framework one that would gradually become more and more completed (by replacing the models) as time went on, so it would look like a living/expanding universe : if you kept trading in that system you'd see the construction progress until you were finally able to trade there too. this would be a simple one i think as you'd just have to save an indicator to show what stage the build was at, and a game time value of the time the model changed so you could calculate a value, say 50 game days, to move to the next stage.

Re: Storing additional save game values

Posted: Fri Mar 04, 2011 11:05 am
by Commander McLane
Yep. That would be basically one mission variable indicating the stage of progress, and a script exchanging the station according to this mission variable, and raising the mission variable over time.

Re: Storing additional save game values

Posted: Fri Mar 04, 2011 11:21 am
by Thargoid
Or perhaps just use the game clock time and forget mission variables altogether?

It's actually a little easter egg built into Aquatics - if you "earn the right" to buy certain equipment at the corporate HQ, after a period of time it will also become available more widely at suitable tech level systems around the galaxy...

Re: Storing additional save game values

Posted: Fri Mar 04, 2011 11:44 am
by JensAyton
Thargoid wrote:
Or perhaps just use the game clock time and forget mission variables altogether
You’d probably want at least a starting time mission variable so that the player actually has an opportunity to see the process. The idea of background events happening on a schedule entirely irrespective of the player looks nice in principle, but you’d need hundreds of events to ensure that people actually saw some of them.

Re: Storing additional save game values

Posted: Fri Mar 04, 2011 12:14 pm
by Disembodied
Ahruman wrote:
You’d probably want at least a starting time mission variable so that the player actually has an opportunity to see the process. The idea of background events happening on a schedule entirely irrespective of the player looks nice in principle, but you’d need hundreds of events to ensure that people actually saw some of them.
Yes, you'd need something to keep drawing players back to the same location: perhaps have them shuttling in some special cargo to keep the build going. It would introduce a bit of player-centricity but that's not a bad thing for a mission. You could always fiddle it a bit by making every successful delivery by the player add on some extra points to the value: over time the station would get built, with or without the player, but if the player's making deliveries then a) it'll happen faster, and b) the player would get to see it changing.

Re: Storing additional save game values

Posted: Fri Mar 04, 2011 12:22 pm
by Smivs
I like this idea. Could commodities like Alloys and Machinery command a higher price?

Re: Storing additional save game values

Posted: Fri Mar 04, 2011 12:38 pm
by Killer Wolf
some of these ideas are more complex than i was planning, but if we can go this far it'd be great. i was simply thinking of designing a new station that would be either in one particular location (i tend to stick to the same planets but then again i hardly play much, i'm too busy building!) or in all systems of a given tech level. that way you'd pretty much be guaranteed to see something take shape.
mind, doing it in reverse could be good - simulate battle damage from a pirate uprising or Thargoid assault.

Re: Storing additional save game values

Posted: Fri Mar 04, 2011 7:23 pm
by Switeck
In earlier threads about similar subjects, I asked if OXP stations could save whether they were destroyed in certain systems. ...With the understanding that only the current Galaxy Map is remembered. But now with a means of quickly going through 1 round trip of ALL the Galaxy Maps, that may still break consistency too easily. :?