Location of Target Mods in EAW
==============================

These results are provisional. Please experiment and let us all know what else you find out.

There seem to be two coordinate systems in EAW. One controls locations throughout the EAW
world, the other controls placing of target mods within local areas.

TARGETS.DAT places "markers" for airbases and towns using the larger coordinate system.

TARDATA.DAT places the mods in local areas with respect to that marker.

This is what I have found out about these two files (and the larger amount I haven't found out!) :


TARGETS.DAT
===========

Contains 302 records each 32 bytes long.

0000-0004 File header, 2E01 0000 - 012e(h) or 302(d) number of records

0005 Start of target area records with the following format:


1-2    unknown


3-4    3 is North/South coordinate of marker
       4 is ff,fe, fd, 00-06 not known but seems to relate to nationality

5-6    unknown


7-8    coordinate of aircraft take-off point


9-10   unknown


11-12  NULL


13-14  unknown


15-16  unknown


17-18  refers to line number in TARGETS.STR i.e. name of location


19-20  19 unknown
       20 is number of records (mods) for this area in TARDATA.DAT

21-22  East/West coordinate of marker


23-24  unknown


25-26  unknown


27-28  unknown


29-30  unknown


31-32  NULL

If you zero off any record in this file, that town/base disappears off the EAW map. If you change the coordinates, you can move the base/town marker.


TARDATA.DAT
===========

Contains 3,826 records each 32 bytes long

0000-0004 File header, F20E 0000 - 0ef2(h) or 3826(d) number of records

0005 Start of target area records with the following format:


1-2    1 is 01, 09, 81, 89 
       2 is 00 or 01          both these seem to relate to nationality

3-4    NULL
       

5-6    5 is hex number of Tmod file. Airbase groups always start with 05 - the base layout

       (05 is an unused Tmod file number. There are 10 different airbase layout 3dz files.
        I haven't yet found the place which matches location with specific airfield 3dz.
        i.e. Hawkinge uses the filename airfld06.3dz) 

       6 is always 00

7-8    NULL


9-10   9 is record number in TARGETS.DAT i.e. area code
       10 is 00 or 01 unknown

11-12  NULL


13-14  First part of local coordinate for placing mod


15-16  0*00 or F*FF unknown


17-18  Second part of local coordinate for placing mod


19-20  0*00 or F*FF unknown
       

21-22  More coordinates - connected with orientation?


23-24  0000 or FFFF unknown


25-26  More coordinates - connected with orientation - Many are 0000 


27-28  NULL


29-30  NULL


31-32  NULL


If you zero off any record in this file, that mod disappears. Bytes can be added to the file and new mods inserted. Mods can be substituted by changing the Tmod file ref. Mods can be moved by changing the coordinates and orientation. 

Perhaps new mods could be placed in the sim by creating wireframes and extending the range of Tmod filenames (currently 00-72 (d)). The slot for Tmod refs could theoretically allow FE(h) or 254 mods.

This file seems to deal mainly with permament targets such as buildings. Other target mods 
- ships, vehicles, trains - must be controlled elsewere. You can however substitute any of the mods for the ones used in this file (turning hangars into tanks for example)

Other non-target mods (trees, farmhouses etc) must also be controlled eslewhere. 


Moggy
29th October 2000



