a workaround with 2 revisions on save-game breaking
No clue atm. Is the procedure described somewhere ?
it would clumber the code imo.
Just a little bit imho. Let's make sure we both are thinking of the same approach.
My idea was to pass the (already existing) savegameVersionNr to all those *_Load() functions.
Inside those functions we then could do
load this
load that // old stuff
if (savegameVersionNr >= 27)
load newAttrib
else
newAttrib = 42; //reasonable default
As long as we just add attributes to the end of existing structs that would be affordable imho.
Adding completely new structs could be handled by adding a column 'sinceVersion' to the table of _Load/_Save functions.
Admittably, changing the format (eg. short to int) of existing attribs or inside nested structs would clutter the code much more.
Of course you have the better overview of the frequency and type of savegame changes (as I have none).
So let me put it this way:
My plan is to enjoy playing through a 2.3 campaign and report and/or fix every bug I encounter. Guessing from how long it took me to play through 2.2.1, this will take at least 3 months. So from your experience, how many savegame incompatibilities (ie. campaign restarts ?) will I encounter during an average 3 months ?
Or will the workaround you mentioned above allow me to finish the campaign ?