CRAFT.DAT (TFTD)
Jump to navigation
Jump to search
This file contains information specific to the crafts in the game. Both X-COM and Alien crafts (including hidden ones) are in this file, though the values for the alien craft are still shrouded in mystery.
Note that UFO:EU uses a different version of this file. Compared to the previous game, the TFTD copy is jumbled; presumably this was to prevent players "importing" their "uber craft" from their previous save-games.
TFTD Structure
There are 50 records each having 110 bytes long for a file size of 5,500 bytes. 2-byte values are signed little-endian integers.
Offset (Decimal) |
Offset (Hex) |
Usage |
---|---|---|
0 | 0x00 | Craft type, possible values are the same as GEODATA.DAT:
*HUMAN* *ALIEN* 0 - Triton 5 - Survey Ship 255 - Entry Not Used 1 - Hammerhead 6 - Escort 2 - Leviathan 7 - Cruiser 3 - Barracuda 8 - Heavy Cruiser 4 - Manta 9 - Hunter 10 - Battleship 11 - Dreadnought 12 - Fleet Supply Cruiser |
Offsets 1 and 5 refer to the weapon placed in the left and right slots respectively. (The Hammerhead does not have a center weapon type, only a left). Their possible values are listed here:
0 - Ajax Launcher 1 - D.U.P. Head Launcher 2 - Craft Gas Cannon 3 - P.W.T. Cannon 4 - Gauss Cannon 5 - Sonic Oscillator FF - No Weapon | ||
1 | 0x01 | Left weapon type. |
2-3 | 0x02-0x03 | Left ammo quantity (NOTE: Ammo values normally do not exceed 100, but since the variable is stored as 2 bytes you can crank the total up to 32,767). |
4 | 0x04 | Indicates what a craft is doing.
0 - At base 1 - Moving 2 - USOs often get this value, no idea what it represents. |
5 | 0x05 | Right weapon type. |
The following values, 6-60 (0x06-0x3C), keep track of how many of item X is stored on the craft. | ||
6 | 0x06 | Coelacanth/G. Cannon |
7 | 0x07 | Coelacanth/Aqua Jet |
8 | 0x08 | Coelacanth/Gauss |
9 | 0x09 | Displacer /Sonic |
10 | 0x0A | Displacer /P.W.T. |
11 | 0x0B | Dart Gun |
12 | 0x0C | Dart Clip |
13 | 0x0D | Jet Harpoon |
14 | 0x0E | Harpoon Clip |
15 | 0x0F | Gas Cannon |
16 | 0x10 | GC-AP Bolts |
17 | 0x11 | GC-HE Bolts |
18 | 0x12 | GC-Phosphorous Bolts |
19 | 0x13 | Hydro-Jet Cannon |
20 | 0x14 | HJ-AP Ammo |
21 | 0x15 | HJ-HE Ammo |
22 | 0x16 | HJ-P Ammo |
23 | 0x17 | Torpedo Launcher |
24 | 0x18 | Small Torpedo |
25 | 0x19 | Large Torpedo |
26 | 0x1A | Phosphor Torpedo |
27 | 0x1B | Gauss Pistol |
28 | 0x1C | Gauss Rifle |
29 | 0x1D | Heavy Gauss |
30 | 0x1E | Magna-Blast Grenade |
31 | 0x1F | Dye Grenade |
32 | 0x20 | Particle Disturbance Grenade |
33 | 0x21 | Magna-Pack Explosive |
34 | 0x22 | Particle Disturbance Sensor |
35 | 0x23 | Medi-Kit |
36 | 0x24 | M.C. Disruptor |
37 | 0x25 | Thermal Tazer |
38 | 0x26 | Chemical Flare |
39 | 0x27 | Vibro Blade |
40 | 0x28 | Thermic Lance |
41 | 0x29 | Heavy Thermic Lance |
42 | 0x2A | (Unused) |
43 | 0x2B | (Unused) |
44 | 0x2C | (Unused) |
45 | 0x2D | Sonic Cannon |
46 | 0x2E | Cannon Power Clip |
47 | 0x2F | Sonic-Blasta Rifle |
48 | 0x30 | Blasta Power Clip |
49 | 0x31 | Sonic Pistol |
50 | 0x32 | Pistol Power Clip |
51 | 0x33 | Disruptor Pulse Launcher |
52 | 0x34 | Disruptor Ammo |
53 | 0x35 | Thermal Shok Launcher |
54 | 0x36 | Thermal Shok Bomb |
55 | 0x37 | Sonic Pulser |
56 | 0x38 | (Unused) |
57 | 0x39 | M.C. Reader |
58 | 0x3A | Gauss Pistol Clip |
59 | 0x3B | Gauss Rifle Clip |
60 | 0x3C | Heavy Gauss Clip |
61 | 0x3D | Unknown use. |
62-63 | 0x3E-0x3F | Right ammo quantity (NOTE: Ammo values normally do not exceed 100, but since the variable is stored as 2 bytes you can crank the total up to 32,767). |
64-65 | 0x40-0x41 | (Unused) |
66-67 | 0x42-0x43 | Damage, that is the amount it currently has taken. This value divided by the craft's damage capacity gives the percentage shown in-game. |
68-69 | 0x44-0x45 | Depth of craft.
0 - Touched Down * 1 - Shallow 2 - Normal 3 - Deep 4 - Very Deep (*NOTE: If craft is moving and you change it to this value the depth will correct itself automatically. Speed must also be edited to 0 for the change in depth to hold.) |
70-71 | 0x46-0x47 | Speed of craft. |
72-73 | 0x48-0x49 | Index into LOC.DAT referencing the destination - for example, waypoints for X-COM craft, or X-COM bases for alien craft. |
74-75 | 0x4A-0x4B | Unknown - goes to 0 when tracking a target but not attacking. -1 means the ship is airborne despite the value of byte 0x44 |
76-77 | 0x4C-0x4D | Destination coordinates, horizontal (longitude). |
78-79 | 0x4E-0x4F | Destination coordinates, vertical (latitude). |
80-81 | 0x50-0x51 | Fuel, amount remaining. This value divided by the crafts total fuel capacity gives the percentage shown in-game. |
82-83 | 0x52-0x53 | Base reference as an index to LOC.DAT. |
84-85 | 0x54-0x55 | Mission type craft is on.
0 - Alien Probe Mission 1 - Alien Interdiction 2 - Alien Resource Raid 3 - Alien Infiltration 4 - Alien Colony Expansion 5 - Alien Surface Attacks 6 - Floating Base Attack 7 - Colony Supply Missions |
86-87 | 0x56-0x57 | Zone where mission is being carried out.
0 - North Atlantic 1 - South Atlantic 2 - North Pacific 3 - South Pacific 4 - Mediterranean 5 - South China Sea 6 - Indian Ocean 7 - Sea of Japan 8 - North Sea 9 - Caribbean A - Antarctic B - Arctic C - Eurasia D - North America E - Africa |
88-89 | 0x58-0x59 | Unknown use. |
90-91 | 0x5A-0x5B | Unknown use. |
92-93 | 0x5C-0x5D | Primary alien race found on craft.
0 - Aquatoid 1 - Gill Man 2 - Lobster Man 3 - Tasoth 4 - Mixed Tasoth based 5 - Mixed Lobster Man based |
94-95 | 0x5E-0x5F | USO attack timer. |
96-97 | 0x60-0x61 | USO escape maneuver timer. |
98-99 | 0x62-0x63 | Craft status.
0 - Ready 1 - Out 2 - Repairs 3 - Refueling 4 - Re-arming |
100-103 | 0x64-0x67 | Bit Flags.
40 - Show full Transmission Resolver data |
104-105 | 0x68-0x69 | Touchdown depth (see entry at [68-69] for possible values). |
106 | 0x6A | Used to determine if Xcraft are able to intercept. |
107 | 0x6B | Used to determine if Xcraft are able to intercept. |
108 | 0x6C | Used to determine if Xcraft are able to intercept. |
109 | 0x6D | Unknown. |