Code: Select all
Defines the locations of a variety of the mech cockpit displays as a series of rectangles. The HDI file defines the rest, but I haven't decoded it yet :-)
* Rectangle format:
0 - 1 : X
2 - 3 : Y
4 - 5 : Width
6 - 7 : Height
* Rectangles appear in the file (from offset 0) in the following order:
- VPC_LSTACK (unused - always 0)
- VPC_RSTACK (unused - always 0)
- VPC_LPANEL (unused - always 0)
- VPC_HTGRAF (unused - always 0)
- VPC_COUNTDN (unused - always 0)
- VP_NAV (radar display)
- VP_STATUS (systems/status display - ie: damage display)
- VP_COM (com/camera display - ie: rear/weapons view)
- VP_LEFTx (left side weapon status displays - there are 5 in 31cc, 7 in GBL & Mercs)
- VP_RIGHTx (right side weapon status displays - there are 5 in 31cc, 7 in GBL & Mercs)
- VP_??? (target display - ie: image/wireframe of current selected enemy/friendly/building)
- VP_??? (target information - ie: name, distance, inspection text)
- (in GBL & Mercs, there are a few more bytes here, which are unused)
* NB: The names/descriptions for these fields mostly come from MW2DOC.HTM in Mercs/Tools directory, except for the VP_??? which are not mentioned.
Code: Select all
0 - 3 : Number of entries in file.
This is then followed by that number of 45/46 byte records of the following format:
0 - 2 : Two character name of mech (NUL terminated)
3 - 6 : Three character name of mech (NUL terminated)
7 - 15 : Eight character name of mech (NUL terminated)
16 - 40 : Long name of mech (NUL padded/terminated)
41 - 44 : Tonnage
45 : 0 = Clan, 1 = IS (????) (Only present in Mercs version of the file).
Since byte 45 is missing from the 31cc file and there is no version marker or any such, I think the simplest way to detect which version of the file is in use would be to read the byte at offset 49 and if:
* It is an ASCII character, this is the 31cc file (it is byte zero of the second record)
* It is 0/1, this is the Mercs file (it's byte 45 of the first record)
NB: For some reason, both the 31cc and Mercs versions of the files give the tonnage of an Elemental as 100 :-P
Code: Select all
This one defines additional geometry parameters for gamepieces (why these values weren't just included in the BWD is beyond me). I've done some sim testing to get this description, but need to do some more to make sure it's completely accurate.
0 - 3 : y_origin (distance from origin to GP root DUMMY object) ?
4 - 7 : always 0 ?
8 - 11 : appears to always equal -y_origin and doesn't seem to have any purpose ?
12 - 15 : always 0 ?
16 - 19 : always 0 ?
20 - 23 : max_rot (16:16 fixed point, degrees)
24 - 27 : eye_origin (distance from EYEO to camera, when in external camera mode) ?
NB: If you wanted to make a whole new mech from scratch that the MW2 sim would play well with, I think you would need to make one of these files for it.
Code: Select all
There is one of these TBL files in the TABL directory for most of the other project file directories, each containing records for every valid entry in that directory. I'm not sure why this data is present (given that it seems to just duplicate the SYMB chunk in the project file for the most part), and I'm not sure if the sim itself uses it (haven't tested that yet), but it is definately used by WASM (you'll notice, for example, that if you try to use a non-existant piece of geometry, WASM will tell you it couldn't find any such reference in the "GEOTABLE"). I suspect that if you wanted to add new files to the PRJ file, you would also need to update these files.
[ Header ]
0 - 3 : "TABL"
4 - 7 : ? always 0 ?
8 - 11 : Entry count
This is followed by "entry count" Entry Records, and then terminated with the Footer.
[ Entry Record ]
0 - 7 : Mangled name
8 - 9 : ? always 0 ?
10 - 11 : ID
[ Footer ]
0 - 11 : ? garbage ?
NB: In the "mangled name", each character is represented by the 2's complement negation of its ASCII code - so -65 for 'A' instead of 65; the exception to this rule is '~' which is represented by 0 (which is also used to pad strings to 8 bytes), but this character is rare. This name mangling seems to be used a lot in MW2.
Code: Select all
Not much of a format - it's just plain ASCII text that's been mangled (refer to the TBL file format description above for information about the mangling).
Code: Select all
Yet another image format.
0 - 1 : Width
2 - 3 : Height
4 - 5 : ? unk ? (X border?)
6 - 7 : ? unk ? (Y border?)
8 - * : (Width x Height) 8bpp pixels (requires a palette)