Civ2 *.sav files: anyone knows what each bit does?

M

moksliukas

Guest
I am not sure if I should post this under this forum, but here I go anyway.

Today I had an idea to write a program that would convert Civ2 MGE save files to TOT saves or any other version, so that the sharing between different players with different versions of civ would be easier. However, I do not know anything about the structure of Civ2 save files and what each bit in them means.

Today I have tried do see what the structure of save files in Civ2 was by myself. Does anyone know exactly the structure of save file and what each bit does? I'd like to hear from you.
So, after palying around for 15 minutes, I figured out this:

Civilization savefile dissection
--------------------------------

******* CHEAT MODE AND HOW IT IS RECORDED IN SAVE FILES

differences between the same save files with cheat mode on and off --
1) 0xf=15 to 0xf=15 (1 bytes)
2) 0x14=20 to 0x14=20 (1 bytes)

CHEAT ENABLED:
0xf = 10110010 (b2)
0x14 = 00011000 (18)

NO CHEAT:
0xf = 00110010 (32)
0x14 = 00001000 (08)

Hypothesis: two bits turned on at 0xf (1--- ----) and 0x14 (---1 ----) means cheat mode is enabled

It seems that the bit at 0xf means that the cheat mode is enabled. When it is turned on, the game will not ask if you really want to enable cheat mode when you select it from the menu. The offset 0x14 however has the real "cheat mode enabled" bit that is taken into account when the score is calculated.

So, in short, to make a normal game out of a cheat game, you have to turn off offset 0x14 4th bit, but you could also turn off 1st bit at 0xf offset so that the game will give you a warning when you try to access cheat mode. I have tried this and it does seem to work.

******* CIVILIZATION SAVE FILE VERSION

In the header, just after `CIVILIZE', at offset 0xa, there is a version of savefile. For MGE, it is 0x2C. If you put this value below that (for example 0x00), you'll get a notice that the save file is written in an obsolete way. If you put it higher (for example 0x3C), the notice will appear that will say that this version is not supported. I could not figure out what the value 0x1A at offset 0x9 meant, cause changing it didn't seem to make any noticable effect.


------------------
My doctor says that I have a malformed public-duty gland and a natural deficiency in moral fibre and that I am therefore excused from saving universes
 
Yeah moxliukas, whatever...

No wonder you got 7 from maths...



------------------
"The weak have one weapon: the errors of those who think they are strong."

- Georges Bidault
 
OK, thanx, Slowthinker, but still, does anyone know anything about save file header?
 
Download this. It's a document that maps some of the civ 2 save file format.
http://users.sgi.net/~harden/downloads/hex-edit.zip

------------------
<FONT size="1">"There is no tiddle-taddle nor pibble-pabble in Pompey's camp." -- from Henry V</FONT s>
 
Just to keep this thread from faling off the bottom of the list because I found it very useful.
 
Top Bottom