Okay. Now for saved maps loading support, this is weird. This is the documentation in the
old topic:
0x0 0x19 "OUTPOST 2.00 SAVED GAME", 0x1A, 0 - String must match exactly or else load error
---------------------------
Note: The following is repeated as an array of 0x74 (116 decimal) elements
0x19+i*0x1E0 4 **TODO** Figure this out
0x1D+i*0x1E0 0x1DC **TODO** Figure this out
---------------------------
Note: From here, the format matches that of .map files
This is what hexdump says about the first part of the file:
00000000 4f 55 54 50 4f 53 54 20 32 2e 30 30 20 53 41 56 |OUTPOST 2.00 SAV|
00000010 45 44 20 47 41 4d 45 1a 00 94 c9 21 8c f8 75 1c |ED GAME....!..u.|
00000020 4a 00 00 00 00 62 6c 61 61 74 73 63 68 61 61 70 |J....blaatschaap|
00000030 20 6e 61 61 6d 20 76 61 6e 20 73 61 76 65 67 61 | naam van savega|
00000040 6d 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |me..............|
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000070 00 00 00 00 00 94 c9 83 b8 15 8d a0 c8 15 8d a0 |................|
00000080 c8 15 8d a0 c8 15 8d a0 c8 15 8d a0 c8 15 8d a0 |................|
*
("blaatschaap naam van savegame" is some foo long name I came up with in a split second)
- so I can see the "OUTPOST 2.00 SAVED GAME\x1a\x00" but then there's 8 bytes, 4 zero bytes, then 64 bytes containing the name of the savegame and the rest null... and then semi-random data. Those 8 bytes at the top could mean, in numbers:
94 c9 21 8c = 148 201 33 140 / 51604 35873 / 2351024532
f8 75 1c 4a = 248 117 28 74 / 30200 18972 / 1243379192
Now I checked, at least I tried to check, the length of the data behind that header. It was nothing near 51604, 35873, 30200 or 18972, but the data seemed to switch to something else after 0x10880 (= 67712 bytes). The bytes themselves seem to be mostly repeated all the time except for the first three bytes, 94 c9 83, which could be 148 201 131 / 51604 / 33737 / 8636820 - numbers which also make few sense, except that the first two are the same as the two bytes right after "OUTPOST 2.00 SAVED GAME\x1a\x00"... if these are check bytes, that leaves 131 as a mysterious number....
The file size is 467026 bytes, I've found the location where the actual .map format part starts, that's at 0x1e025 = 122917 bytes. 467026-122917=344109 which may come close to 35873 or 33737 or so, but now I'm just doing random guesses.
Is anything other than this already known about this, Hooman (or anybody else)?
As you've probably understood by now, I'm trying to recreate some of Outpost 2's code, in order to have something as a community to build upon and improve. In the spirit of
OpenTTD, a remake of Transport Tycoon Deluxe, I've named my project OpenOutpost2. Once I'm happy with what I have, it will be freely available under the GNU General Public License - i.e. freely modifiable by anyone as long as they put a patch available...
(and some other stuff, read the license if you want to know, it's not that big)
So I have two concrete questions:
1) Could you clear up what's on that topic? So there's an array of 116 times 480 bytes, is there nothing known about the values of that? Also, so the array is 55680 bytes; could you maybe even send me the save file you have done your testing on to see if that 116 is named somewhere? That could be the mysterious 131 number; if mine is 131 times 480 bytes, that leaves 62880 bytes, which comes close to the 67712 number already there. Any ideas?
2) Is there maybe even an existing implementation to read the save files? I found this old topic:
http://forum.outpostuniverse.net/index.php?showtopic=882 - is BlackBox still active and around? Does he have any idea how to go about and start parsing this?
Thanks!