0.4.5 -> 0.4.0.1 save file format

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
playback
Engineer
Engineer
Posts: 5
Joined: 11 Feb 2006 20:18

0.4.5 -> 0.4.0.1 save file format

Post by playback »

Hello,

I need to convert the 0.4.5 .sav file to the old 0.4.0.1 format. Any suggestions?

Thanks.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Yes. Learn the difference between "need" and "want".

Then explain why you want to do that. If you've got a good reason and a good grasp of C, someone may be able to point you to portions of the source code that need changing to write a 0.4.0.1 save with 0.4.5.

Even if you have no reason at all, grep for "SaveLoad" and " SL" -- the code that you need to change lives in those functions.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post by Darkvater »

You're probably out of luck unless you know coding yourself and are going to do it. It is however pretty simple (in theory).

Check the savegame version of 0.4.0.1 (which was 15 or something) than that of 0.4.5 (22?), and all the Sl-macros that are saved. If you see something that is saved only from 17 onward, you need to remove it. This is the easy part, you might get into trouble with other things which I have no idea about.

Good luck if you are going to do it, I don't think there are many people around that are willing to really help though.
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
Bjarni
Tycoon
Tycoon
Posts: 2088
Joined: 08 Mar 2004 13:10

Post by Bjarni »

hehe, you need to write an inverted train subtype converter to use the 0.4.0.1 subtype style instead of the 0.4.5 style

there are most likely other issues as well, that I'm not aware of. So I will ask: why?

it's way easier just to update to 0.4.5
User avatar
Killer 11
Tycoon
Tycoon
Posts: 2463
Joined: 06 Jan 2004 18:38
Location: Kaunas, Lithuania
Contact:

Post by Killer 11 »

Maybe he wants PBS :roll:
Bjarni
Tycoon
Tycoon
Posts: 2088
Joined: 08 Mar 2004 13:10

Post by Bjarni »

Killer 11 wrote:Maybe he wants PBS :roll:
then the answer is to get the last nightly build with PBS support (I forgot which one that is)
playback
Engineer
Engineer
Posts: 5
Joined: 11 Feb 2006 20:18

Post by playback »

Many thanks to all of you! :)
I just have the source :roll: and will try to write some kind of converter.
Bjarni
Tycoon
Tycoon
Posts: 2088
Joined: 08 Mar 2004 13:10

Post by Bjarni »

playback wrote:Many thanks to all of you! :)
I just have the source :roll: and will try to write some kind of converter.
I still don't get why you want to use 0.4.0.1. We fixed a lot of really nasty bugs
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Killer 11 wrote:Maybe he wants PBS :roll:
Except that there was no PBS in 0.4.0.1.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 17 guests