Any way to detect the version of specific map save?

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
changchiyou
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Nov 11, 2024 5:19 am
Contact:

Any way to detect the version of specific map save?

Post by changchiyou »

Hello, I'm working on dockerizing a Factorio map renderer that can accept map saves from any version. However, I'm currently stuck on how to retrieve the version information from a map save file.
MisterDoctor
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Sat Oct 27, 2018 11:10 pm
Contact:

Re: Any way to detect the version of specific map save?

Post by MisterDoctor »

I think I see it at the start of script.dat. first 8 bytes are 4 16 bit integers representing the version.

ex: 02 00 00 00 0f 00 04 00
= 2 0 15 4
= 2.0.15-4

there are similar bytes in level-init.dat but they would give 2.0.7.0.

(note I can't guarantee the meaning of the values. ie: it is not _necessarily_ the game version; could be the file or format version that is close but not identical to the game version or something like that.)

note also this thread from a long time ago where someone else was doing something similar: viewtopic.php?t=47014
changchiyou
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Nov 11, 2024 5:19 am
Contact:

Re: Any way to detect the version of specific map save?

Post by changchiyou »

MisterDoctor wrote: Mon Nov 11, 2024 7:54 am I think I see it at the start of script.dat. first 8 bytes are 4 16 bit integers representing the version.

ex: 02 00 00 00 0f 00 04 00
= 2 0 15 4
= 2.0.15-4

there are similar bytes in level-init.dat but they would give 2.0.7.0.

(note I can't guarantee the meaning of the values. ie: it is not _necessarily_ the game version; could be the file or format version that is close but not identical to the game version or something like that.)

note also this thread from a long time ago where someone else was doing something similar: viewtopic.php?t=47014
I think you're right :D ; I found another thread here (8568) that discusses a similar approach to retrieving the game version from .dat files.
Post Reply

Return to “Technical Help”