Experimental savegame compatibility across addition of units/buildings [TESTING]

jooe

Warlord
Joined
Oct 25, 2014
Messages
120
With @Nightinggale's help and suggestions, I have implemented an experimental workaround for the savegame incompatibilities incurred each time we add new buildings or units.
Now the EXE calls requesting the number of units/buildings are intercepted and the EXE receives an arbitrary (high) number. I set this to 372, so we have a buffer of around 100 units/buildings each.
Initially this caused problems in World Builder (WB), but after disabling the "faking" of numbers for a single function call in the WB Python script, it seems to work as intended now.

As of now, this does apparently has no downsides, but I'm not entirely sure about the stability of this feature across XML data changes. We'll see how it works next time some of us have games running on the current version and additional units/buildings get added. In the worst case savegames will still be incompatible afterwards, which is how it was before, so at least I don't expect any regression.
I will commit this now, because I think we should have time to test this for as long as possible before it is included in a release.

If it works, there is a good chance we won't break savegame compatibility anymore between point-Releases. :)
 
Last edited:
Top Bottom