Skip to content
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

Old savegame loader corrupts data #2126

Closed
DorpsGek opened this issue Jul 3, 2008 · 7 comments
Closed

Old savegame loader corrupts data #2126

DorpsGek opened this issue Jul 3, 2008 · 7 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Jul 3, 2008

Lord opened the ticket and wrote:

Some old original TTD savegames/scenarios are corrupted when opened as a new game in OpenTTD. I attached a simplistic TTD scenario for illustration. TTDPatch loads it correctly, with no previous expenses/income, but OpenTTD shows a mess in the finances window. The values that appear there seem to be read from the L3 landscape array, as I found out from searching those values in the scenario file with a hex-editor, at least the ones I checked.

Attachments

Reported version: 0.6.1
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/2126
@DorpsGek
Copy link
Member Author

DorpsGek commented Jul 3, 2008

SmatZ wrote:

It is possible this has been fixed in nighly builds.
Could you please verify this in nightly builds?


This comment was imported from FlySpray: https://bugs.openttd.org/task/2126#comment4413

@DorpsGek
Copy link
Member Author

DorpsGek commented Jul 3, 2008

Rubidium wrote:

The savegame looks more like a TTO savegame/scenario than a real TTD savegame/scenario. You should actually be very lucky that it even loaded something instead of completely and horribly crashing.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2126#comment4414

@DorpsGek
Copy link
Member Author

DorpsGek commented Jul 3, 2008

Lord wrote:

The problem also exists in the newest nightly r13671 (July 2), I just checked that.

Rubidium, it is indeed a converted TTO savegame. I'd be glad to know how you noticed. This whole playing around is part of my effort to find the reasons for some converted savegames not being loaded flawlessly in OpenTTD while they are with TTDPatch. I still feel like this is rather an OpenTTD issue than SVXConverter (no offense, really!). Many people have asked me to make SVXConverter compatible with OpenTTD, which I'm kind of struggling with, as OpenTTD handles invalid data in a very strict way.

The scenario should be in TTD format - you've got to admit that OpenTTD reading data from the L3 array as financial data is a weird thing, even given that the savegame was converted.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2126#comment4418

@DorpsGek
Copy link
Member Author

DorpsGek commented Jul 3, 2008

Rubidium wrote:

According to the "TTD savegame internals" page a TTD savegame has 47 bytes for it's name and a TTO savegame has 39 bytes for it's name. As there is no easy way to determine whether something is TTO or TTD and because we do not officially support TTO savegames we assume it to be 47 bytes. However, in your savegame the zero-bytes stopped after 39 bytes which made me assume it is/was a TTD savegame.

Changing this assumption to the 39 bytes still makes it break horribly on loading and I don't have any real clue why that would be the case, though I've got no idea about what differs between the TTD and TTO savegame format. I furthermore do not know what TTD/TTO uses to determine whether a station/industry/town is valid; OpenTTD uses the location (valid if non-zero), but I could imagine TTD/TTO using something else which makes loading break.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2126#comment4426

@DorpsGek
Copy link
Member Author

DorpsGek commented Jul 4, 2008

Rubidium wrote:

I've tried loading the scenario in TTD (DOS) and TTDP (DOS) and neither could load the savegame, so I am quite sure that the given savegame isn't valid a TTD(P) savegame.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2126#comment4427

@DorpsGek
Copy link
Member Author

DorpsGek commented Jul 4, 2008

Lord wrote:

OMG, I'm terribly sorry, I uploaded the wrong file, it is indeed the TTO scenario. Here comes the one for TTD.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/2126#comment4428

@DorpsGek
Copy link
Member Author

DorpsGek commented Jul 4, 2008

Rubidium closed the ticket.

Reason for closing: Fixed

In r13676.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2126

@DorpsGek DorpsGek closed this as completed Jul 4, 2008
@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant