YES!!! I Hacked CCEdit!!
========================
OK, too much enthousiasm. The title should be:

"How to change the names and types of the
 different GAME.DAT entries in CCEdit"

But that just sounds too stupid.

Anyway, here it goes:
All entry data are stored in one file, namely "MISC.DB".
Open MISC.DB in a hex editor.
The fifth byte tells you where the first sub-file starts.
This should be 0xC1.

There are three kinds of sub-files in the file. I call them "tables".

They are:
1. The TYPE table
2. The TEXT table
3. The LENGTH table

I will now give some explanation about these tables.

1. The TYPE table:
=-=-=-=-=-=-=-=-=
Used to determine what kind of value an entry is.
(Decimal number, Weapons menu, Owner menu, Yes/No entry...)

Its format is simple: the first byte determines the type for the first entry
of that unit type (aircraft, infantry, units or structures), the second byte
for the second entry, the third byte for the third entry, and so on...

Looks like:
Just a bunch of bytes.

Legenda:
-------
00 : Hexadecimal number (for unknown entries and the Name Offset)
01 : Decimal number (health, cost, armour, power...)
02 : Weapon
03 : Yes/No entry (1/0)
04 : Positive decimal number; can be unlimited (Payload)
05 : Production Type
06 : Owner
07 : Prerequisites

It goes on until you pass a byte with a value that is higher than 0x07.


2. The TEXT table:
=-=-=-=-=-=-=-=-=
Description for every entry. The length of every entry description
is determined in the LENGTH table.
Unknown entries start with a space (byte 0x20)
for example " Unknown 25"

Looks like:
A lot of text without spaces or separators of any kind
between two entry descriptions.


3. The LENGTH table:
=-=-=-=-=-=-=-=-=-=
This table tells the program how many characters an entry description is,
so that he can read them from the TEXT table in a correct way.

When XX is the first value in this table, the program reads the first
XX-1 bytes from the TEXT table, shows them as one entry description,
then reads the next YY-1 bytes (YY being the next value in the table)
from the TEXT table and shows them as the next entry description.
This goes on until he's at the end of his tables.

For some reason, the XX value is one too much every time, so he actually
reads XX-1 bytes from the TEXT table every time. I don't know why though...

Looks like:
A table of bytes. It really looks like a table because there is always a
byte 0x00 between two entry-length bytes, what makes it look very orderly.


Remarks:
=======

1. MISC.DB Version Number:
=-=-=-=-=-=-=-=-=-=-=-=-=
At the end of the Aircraft TEXT table, you will find " Unknown 371.10"
Actually, this is " Unknown 37", then "1.10". This last one is the CCEdit
version number of the MISC.DB file.
Well... I changed it to "1.11", because I changed some errors and added
some new entries to it.

2. CCEdit Version Number:
=-=-=-=-=-=-=-=-=-=-=-=-
At the end of the Infantry TEXT table, you will find " Unknown 12999"
This is actually " Unknown 129" and then "99". This last one is the
CCEdit version number of the executable CCEDIT.EXE. (.99Beta)

It isn't really correct anymore...  I changed the name of the T-Rex from
"Tyrannosaurus Res" to "Tyrannosaurus Rex" (HAHA! Stupid mistake, Andrew!)

But because it is so terribly difficult to add 1 to 99 without using more
space than two characters, I just left the number what it was.


Written by Maarten Meuris (maarten-meuris@tiscalinet.be)
