extrating a var from other savegame?
So ..
if you say
save_game(12) at some point in a script
can you load a variable value from that save game?
without actually loading that save game?
--
I assume no, thought it mite be possible though.
--
I know why would i want too?,
My reason is
To have a backup of variable values.
if you say
save_game(12) at some point in a script
can you load a variable value from that save game?
without actually loading that save game?
--
I assume no, thought it mite be possible though.
--
I know why would i want too?,
My reason is
To have a backup of variable values.
Nope don't think so.
It sounds like you might want to take a look at supervars
Edit: The only similar thing you can do is
But I doubt that helps. Unless you want loads of saved games cluttering up the place.
Edit 2: Re. supervars, search for "Multiple values in one variable" in that file as they aren't called supervars there (I think that's what Redink1 called them?)
It sounds like you might want to take a look at supervars
Edit: The only similar thing you can do is
int &somevariable = 1234; save_game(&somevariable); //and then later check if that number exists: if (game_exist(&somevariable)) { //do something }
But I doubt that helps. Unless you want loads of saved games cluttering up the place.
Edit 2: Re. supervars, search for "Multiple values in one variable" in that file as they aren't called supervars there (I think that's what Redink1 called them?)
Magicman was able to carry some form of data from one save file to another. I don't remember exactly what he did, but you might want to have a look at this. As that file provides an example doing some weird stuff with save data and it might be what you're looking for.
alrightly i'll have look, Thanks ..
well thats answered my for loop question, no while either i assume ..
so just to check that box, flow control is done by goto only ?
well thats answered my for loop question, no while either i assume ..
so just to check that box, flow control is done by goto only ?
Goto and if, that is correct and very annoying...
As for loading variables from other save games: it's possible, but probably not in the way you want. When you load a save game, it will load ALL variables that are stored in it. However, the current function continues running (at least if it's used script_attach(1000), which you probably want to do in that case). This means you can load a game and then refuse to continue where it left off.
Magicman did not do that in waitwut; that's a trick where he changed the ini file during runtime and showed that this change was preserved even through restart_game() (but not through save+quit+start+load.)
An example of what I described can be found in my dmod "Karel ende Elegast". It uses only one save game (-1) and checks if it contains a completed game. If so, it stays in the title screen when you try to load it.
As for loading variables from other save games: it's possible, but probably not in the way you want. When you load a save game, it will load ALL variables that are stored in it. However, the current function continues running (at least if it's used script_attach(1000), which you probably want to do in that case). This means you can load a game and then refuse to continue where it left off.
Magicman did not do that in waitwut; that's a trick where he changed the ini file during runtime and showed that this change was preserved even through restart_game() (but not through save+quit+start+load.)
An example of what I described can be found in my dmod "Karel ende Elegast". It uses only one save game (-1) and checks if it contains a completed game. If so, it stays in the title screen when you try to load it.