New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loading JGRPP savegames in official OpenTTD gives "too new" instead of "modified version" error #8987
Comments
This ticket presents a solution rather than a problem, so it is always a bit tricky to look through that. I am not a fan of using That said, under this ticket is of course the question: when you load a savegame from a patchpack (any patchpack), it says it is made with a What I have been thinking for a while, that maybe we should include a string in the savegame to indicate what "version" it is. We set it to "vanilla", JGRPP can set it to "JGRPP", and any other patchpack to what-ever the want to be called. That means that if we spot a mismatch, we can tell where the savegame came from. The other approach is to upstream some parts of the savegame system JGRPP uses, which allows us to detect if there are blocks we don't understand. That also makes it possible to give a more clear error. All in all, there is a bit of investigation that needs to be done here, to solve the question: "can we better tell users when they are using the wrong patch-pack". But, using |
In case it's not clear -- the quoted comment including It seems strange to 'officially' recommend this approach and then decline to support it. Also, JGR's has been by far the most-used patchpack for several years, so there will be many existing savegames even if future versions switch to a hypothetical alternative. |
…o load JGRPP savegames
That is fair; I guess I didn't write that part as a "official" recommendation, but your reasoning is sound to me. We have to be a bit careful, as it is fairly recent we added that (as you pointed out). I still think that we should do better in making it more clear where savegames came from, but as I said, this ticket presents a solution, not a problem, which makes that a bit hard. |
…ad JGRPP savegames Previously 'newer version' which was unhelpful.
The current savegame header is a fixed 8 bytes in size, and doesn't include any spare bits which could be used to indicate "extended header follows", because of that there isn't an obvious place to put such a version string as suggested above. You could this in a chunk, but it's also worth noting that historically patchpacks have had different chunk headers which aren't ordinarily readable by trunk. (SpringPP and ChillPP both had this, my branch only has this for extra-large chunks). For what it's worth more recent versions of my branch do include the complete version string in the extended version info chunk, specifically so that user of my branch get a friendlier error message when trying to load saves from an even newer version of my branch. |
Personally, I am not against vanilla being to read (and also use) your extended version info chunk, but I know that indeed it won't be trivial to get there :) It is just the more proper solution .. tnx for explaining this in high detail, much appreciated! |
Version of OpenTTD
1.11.0
Expected result
Attempting to load a JGRPP savegame (with version
>= 0x8000
) in the official master or release branch results in the errorGame Load Failed - Savegame is made with a modified version
.Actual result
Attempting to load a JGRPP savegame (with version
>= 0x8000
) in the official master or release branch results in the errorGame Load Failed - Savegame is made with newer version
.Steps to reproduce
Game Load Failed - Savegame is made with newer version
as it attempts to load a savegame whose version is approx.0x8000
greater than the current latest savegame version.Justification
The following text explains why using
STR_GAME_SAVELOAD_ERROR_PATCHPACK
would be more helpful instead ofSTR_GAME_SAVELOAD_ERROR_TOO_NEW_SAVEGAME
:OpenTTD/src/saveload/saveload.h
Lines 308 to 320 in e98aed8
The text was updated successfully, but these errors were encountered: