I have just been investigating EAW_TTD.DAT files to finalise my editor for the 1.28F/TM2 system.
One of its features will be to convert an older EAW_TTD.DAT file to the new Geawttd.dat format that 1.28F uses.
For those who may be unaware, these files contain the data that the exe uses to place things like trees, farms and houses on tiles.
There are four versions of the file:
The original (1.2) which worked on the basis of here being 59 tiles and a maximum of 64 objects per tile.
It has a file length of 303260 bytes.
This is calculated from there being 59 sections (1 for every tile), and each section having a 20 byte header followed by 80 bytes of data for each of the 64 possible objects.
Add the 20 byte header 5140
Multiply by 59 = 303260
This was extended in the 1.28 series to one with 64 tiles and a length of 328960 bytes.
Later we switched to a maximum of 128 objects per tile and a length of 656640 bytes.
There is also a 59 tile version upgraded to 128 objects per tile and a length of 605340 bytes.
These are the only possible correct lengths.
Checking for files to convert I looked in the heap of scenarios on my external HDD which have EAW_TTD.DAT files and it is amazing how many of them have file lengths which are different from those four. This indicates that they are faulty in some way.
It is probably due to the vagaries of hex editing!