Difference between revisions of "CRAFT.DAT"

From UFOpaedia
Jump to navigation Jump to search
(→‎TFTD Structure: More info added based on RE'd code)
(→‎TFTD Structure: Updated item list)
Line 167: Line 167:
  
 
==TFTD Structure==
 
==TFTD Structure==
''(Preliminary Save - currently being edited.)''
 
 
There are 50 records each having 110 bytes long for a file size of 5,500 bytes.  Unless otherwise noted, all values and offsets are in Hex; 2-byte values are signed little-endian integers.
 
There are 50 records each having 110 bytes long for a file size of 5,500 bytes.  Unless otherwise noted, all values and offsets are in Hex; 2-byte values are signed little-endian integers.
  
Line 201: Line 200:
 
   5 - Sonic Wave
 
   5 - Sonic Wave
 
  FF - No Weapon
 
  FF - No Weapon
 
 
* '''1''' - Left Weapon Type
 
* '''1''' - Left Weapon Type
 
* '''2-3''' - Left Ammo Quantity*  
 
* '''2-3''' - Left Ammo Quantity*  
Line 208: Line 206:
 
  1 - Airborne
 
  1 - Airborne
 
  2 - USOs normally get this value, have no idea what it represents.
 
  2 - USOs normally get this value, have no idea what it represents.
 
 
* '''5''' - Right Weapon Type
 
* '''5''' - Right Weapon Type
* '''6-7''' - Right Ammo*
+
* '''6-3C''' - Items on sub.
 +
  6 - Coelacanth/G. Cannon
 +
  7 - Coelacanth/Aqua Jet
 +
  8 - Coelacanth/Gauss
 +
  9 - Displacer /Sonic
 +
  A - Displacer /P.W.T.
 +
  B - Dart Gun
 +
  C -  Dart Clip
 +
  D - Jet Harpoon
 +
  E -  Harpoon Clip
 +
  F - Gas Cannon
 +
10 -  GC-AP Bolts
 +
11 -  GC-HE Bolts
 +
12 -  GC-Phosphorous Bolts
 +
13 - Hydro-Jet Cannon
 +
14 -  HJ-AP Ammo
 +
15 -  HJ-HE Ammo
 +
16 -  HJ-P Ammo
 +
17 - Torpedo Launcher
 +
18 -  Small Torpedo
 +
19 -  Large Torpedo
 +
1A -  Phosphor Torpedo
 +
1B - Gauss Pistol
 +
1C - Gauss Rifle
 +
1D - Heavy Gauss
 +
1E -  Gauss Pistol Clip
 +
1F -  Gauss Rifle Clip
 +
20 -  Heavy Gauss Clip
 +
21 - Magna-Blast Grenade
 +
22 - Dye Grenade
 +
23 - Particle Disturbance Grenade
 +
24 - Magna-Pack Explosive
 +
25 - Particle Disturbance Sensor
 +
26 - Medi-Kit
 +
27 - M.C. Disruptor
 +
28 - Thermal Tazer
 +
29 - Chemical Flare
 +
2A - Vibro Blade
 +
2B - Thermic Lance
 +
2C - Heavy Thermic Lance
 +
2D - Sonic Cannon
 +
2E -  Cannon Power Clip
 +
2F - Sonic-Blasta Rifle
 +
30 -  Blasta Power Clip
 +
31 - Sonic Pistol
 +
32 -  Pistol Power Clip
 +
33 - Disruptor Pulse Launcher
 +
34 -  Disruptor Ammo
 +
35 - Thermal Shok Launcher
 +
36 -  Thermal Shok Bomb
 +
37 - Sonic Pulser
 +
38 - ''(Unused)''
 +
39 - M.C. Reader
 +
3A -  Gauss Pistol Clip
 +
3B -  Gauss Rifle Clip
 +
3C -  Heavy Gauss Clip
 +
* '''3D''' - Unknown.
 +
* '''3E-3F''' - Right Ammo*
 
<small>('''*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).</small>
 
<small>('''*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).</small>
  
* '''8-41''' - Seems to be items on sub - needs to be verified and updated for TFTD.
+
* '''40-41''' - Unknown.
 
* '''42-43''' - Damage, that is the amount it currently has taken. This value divided by the craft's damage capacity gives the percentage shown in-game.
 
* '''42-43''' - Damage, that is the amount it currently has taken. This value divided by the craft's damage capacity gives the percentage shown in-game.
 
* '''44-45''' - Depth of craft.
 
* '''44-45''' - Depth of craft.

Revision as of 23:29, 6 April 2008

This file contains information specific to the crafts in the game. Both XCom and Alien crafts (including hidden ones) are in this file, though the values for the alien craft are still shrouded in mystery.

UFO Structure

There are 50 records each having 104 bytes long for a maximum file size of 5,200 bytes. All offsets and values are in decimal.

  • 0 (1 Byte) - Craft Type, Possible Values are the same as GEODATA.DAT:
    *HUMAN*          *ALIEN*         
0 - Skyranger     5 - Small Scout      255 - Entry Not Used
1 - Lightning     6 - Medium Scout
2 - Avenger       7 - Large Scout
3 - Interceptor   8 - Harvester
4 - Firestorm     9 - Abductor
                 10 - Terror Ship
                 11 - Battleship
                 12 - Supply Ship

Offsets 1 and 5 refer to the weapon placed in the left and right slots respectively. (The Lightning does not have a center weapon type, only a left). Their possible values are listed here:

0 - Stingray
1 - Avalanche
2 - Cannon
3 - Fusion Ball
4 - Laser Cannon
5 - Plasma Cannon
255 - No Weapon
  • 1 (1 Byte) - Left Weapon Type
  • 2-3 (2 Bytes) - Left Ammo*
  • 4 (1 Byte) - Indicates what a craft is doing.
0 - At base
1 - Airborne
2 - UFO's normally get this value, have no idea what it represents.
  • 5 (1 Byte) - Right Weapon Type
  • 6-7 (2 Bytes) - Right Ammo*

(*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).

  • Offsets 8 - 9 are unknown (probably 2 Bytes).
  • 10-11 (2 Bytes) - Damage, that is the amount it currently has taken. This value divided by the crafts damage capacity gives the percentage shown in-game.
  • 12-13 (2 Bytes) - Altitude of craft. Is a index within ENGLISH.DAT for string.
0 = GROUND *
1 = VERY LOW
2 = LOW
3 = HIGH
4 = VERY HIGH
5 = Detected
6 = SIZE
etc

(*NOTE: If craft is airborne and you change it to this value the altitude will remain the same. Speed must be edited to 0 for the change to hold.)

  • 14-15 (2 Bytes) - Speed of craft.
  • 16-17 (2 Bytes) - Unknown, but when an intercept screen is minimized, this changes to a value of 6.
  • 18-19 (2 Bytes) - Unknown
  • 20-21 (2 Bytes) - Unknown
  • 22-23 (2 Bytes) - Unknown
  • 24-25 (2 Bytes) - Fuel, amount remaining. This value divided by the crafts total fuel capacity gives the percentage shown in-game.
  • 26 (1 Byte?) - Base Reference as an index to LOC.DAT
  • 27 (1 Byte?) - Probably the high bit for the LOC.DAT index
  • 28-29 (2 Bytes) - Mission type craft is on. Is an index within ENGLISH.DAT for string.
0 = Alien Research
1 = Alien Harvest
2 = Alien Abduction
3 = Alien Infiltration
4 = Alien Base
5 = Alien Terror
6 = Alien Retaliation
7 = Alien Supply
8 = Pistol
etc
  • 30-31 (2 Bytes) - Zone where mission is being carried out. Is an index within ENGLISH.DAT for string.
0 = North America
1 = Arctic
2 = Antarctica
3 = South America
4 = Europe
5 = North Africa
6 = Southern Africa
7 = Central Asia
8 = South East Asia
9 = Siberia
10 = Australasia
11 = Pacific
12 = North Atlantic
13 = South Atlantic *
14 = Indian Ocean *

(*NOTE: Unused zones.)

  • 32-33 (2 Bytes) - Unknown - Related to UFO's only.
  • 34-35 (2 Bytes) - Unknown - Related to UFO's only.
  • 36-37 (2 Bytes) - Alien Race found on craft. Is index within ENGLISH.DAT for string.
0 = Sectoid
1 = Snakeman
2 = Ethereal
3 = Muton
4 = Floater
5 = Celatid1
6 = Silacoid2
7 = Chryssalid
8 = Reaper
9 = Sectopod
10 = Cyberdisc

1 Editing Celatids as a main race works and sometimes a Silacoid shows up as well.
2 Values 6 or greater produce unpredictable results. Usually the mission crashes (probably due to rank problems) but when it doesn't there are strange issues.

  • 38-39 (2 Bytes) - Unknown
  • 40-41 (2 Bytes) - Unknown
  • 42-43 (2 Bytes) - Craft status. Is an index within ENGLISH.DAT for string.
0 - Ready
1 - Out
2 - Repairs
3 - Refueling
4 - Re-arming

The rest of the known values detail the items on board of the craft. 49-98 refer to offsets 0-49 in OBDATA.DAT.

  • 44 (1 Byte) - Tank/Cannon
  • 45 (1 Byte) - Tank/Rocket Launcher
  • 46 (1 Byte) - Tank/Laser Cannon
  • 47 (1 Byte) - Hover Tank/Plasma
  • 48 (1 Byte) - Hover Tank/Launcher
  • 49 (1 Byte) - PISTOL
  • 50 (1 Byte) - PISTOL CLIP
  • 51 (1 Byte) - RIFLE
  • 52 (1 Byte) - RIFLE CLIP
  • 53 (1 Byte) - HEAVY CANNON
  • 54 (1 Byte) - CANNON AP-AMMO
  • 55 (1 Byte) - CANNON HE-AMMO
  • 56 (1 Byte) - CANNON I-AMMO
  • 57 (1 Byte) - AUTO-CANNON
  • 58 (1 Byte) - AUTO-CANNON AP-AMMO
  • 59 (1 Byte) - AUTO-CANNON HE-AMMO
  • 60 (1 Byte) - AUTO-CANNON I-AMMO
  • 61 (1 Byte) - ROCKET LAUNCHER
  • 62 (1 Byte) - SMALL ROCKET
  • 63 (1 Byte) - LARGE ROCKET
  • 64 (1 Byte) - INCENDIARY ROCKET
  • 65 (1 Byte) - LASER PISTOL
  • 66 (1 Byte) - LASER GUN
  • 67 (1 Byte) - HEAVY LASER
  • 68 (1 Byte) - GRENADE
  • 69 (1 Byte) - SMOKE GRENADE
  • 70 (1 Byte) - PROXIMITY GRENADE
  • 71 (1 Byte) - HIGH EXPLOSIVE
  • 72 (1 Byte) - MOTION SCANNER
  • 73 (1 Byte) - MEDI-KIT
  • 74 (1 Byte) - PSI-AMP
  • 75 (1 Byte) - STUN ROD
  • 76 (1 Byte) - Flare
  • 77 (1 Byte) - empty
  • 78 (1 Byte) - empty
  • 79 (1 Byte) - empty
  • 80 (1 Byte) - CORPSE
  • 81 (1 Byte) - CORPSE & ARMOUR
  • 82 (1 Byte) - CORPSE & POWER SUIT
  • 83 (1 Byte) - Heavy Plasma
  • 84 (1 Byte) - Heavy Plasma Clip
  • 85 (1 Byte) - Plasma Rifle
  • 86 (1 Byte) - Plasma Rifle Clip
  • 87 (1 Byte) - Plasma Pistol
  • 88 (1 Byte) - Plasma Pistol Clip
  • 89 (1 Byte) - BLASTER LAUNCHER
  • 90 (1 Byte) - BLASTER BOMB
  • 91 (1 Byte) - SMALL LAUNCHER
  • 92 (1 Byte) - STUN MISSILE
  • 93 (1 Byte) - ALIEN GRENADE
  • 94 (1 Byte) - ELERIUM-115
  • 95 (1 Byte) - MIND PROBE
  • 96 (1 Byte) - >>UNDEFINED <<
  • 97 (1 Byte) - >> empty <<
  • 98 (1 Byte) - >> empty <<
  • Offsets 99-103 are unknown

TFTD Structure

There are 50 records each having 110 bytes long for a file size of 5,500 bytes. Unless otherwise noted, all values and offsets are in Hex; 2-byte values are signed little-endian integers.

  • 0 - Craft Type, Possible Values are the same as GEODATA.DAT:
Human Alien
0 - Triton 5 - Survey Ship
1 - Hammerhead 6 - Escort
2 - Leviathan 7 - Cruiser
3 - Barracuda 8 - Heavy Cruiser
4 - Manta 9 - Hunter
A - Battleship
B - Dreadnought
C - Fleet Supply Cruiser
FF - Entry Not Used

Offsets 1 and 5 refer to the weapon placed in the left and right slots respectively. (The Manta 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 Wave
FF - No Weapon
  • 1 - Left Weapon Type
  • 2-3 - Left Ammo Quantity*
  • 4 - Indicates what a craft is doing.
0 - At base
1 - Airborne
2 - USOs normally get this value, have no idea what it represents.
  • 5 - Right Weapon Type
  • 6-3C - Items on sub.
 6 - Coelacanth/G. Cannon
 7 - Coelacanth/Aqua Jet
 8 - Coelacanth/Gauss
 9 - Displacer /Sonic
 A - Displacer /P.W.T.
 B - Dart Gun
 C -  Dart Clip
 D - Jet Harpoon
 E -  Harpoon Clip
 F - Gas Cannon
10 -  GC-AP Bolts
11 -  GC-HE Bolts
12 -  GC-Phosphorous Bolts
13 - Hydro-Jet Cannon
14 -  HJ-AP Ammo
15 -  HJ-HE Ammo
16 -  HJ-P Ammo
17 - Torpedo Launcher
18 -  Small Torpedo
19 -  Large Torpedo
1A -  Phosphor Torpedo
1B - Gauss Pistol
1C - Gauss Rifle
1D - Heavy Gauss
1E -  Gauss Pistol Clip
1F -  Gauss Rifle Clip
20 -  Heavy Gauss Clip
21 - Magna-Blast Grenade
22 - Dye Grenade
23 - Particle Disturbance Grenade
24 - Magna-Pack Explosive
25 - Particle Disturbance Sensor
26 - Medi-Kit
27 - M.C. Disruptor
28 - Thermal Tazer
29 - Chemical Flare
2A - Vibro Blade
2B - Thermic Lance
2C - Heavy Thermic Lance
2D - Sonic Cannon
2E -  Cannon Power Clip
2F - Sonic-Blasta Rifle
30 -  Blasta Power Clip
31 - Sonic Pistol
32 -  Pistol Power Clip
33 - Disruptor Pulse Launcher
34 -  Disruptor Ammo
35 - Thermal Shok Launcher
36 -  Thermal Shok Bomb
37 - Sonic Pulser
38 - (Unused)
39 - M.C. Reader
3A -  Gauss Pistol Clip
3B -  Gauss Rifle Clip
3C -  Heavy Gauss Clip
  • 3D - Unknown.
  • 3E-3F - Right Ammo*

(*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).

  • 40-41 - Unknown.
  • 42-43 - Damage, that is the amount it currently has taken. This value divided by the craft's damage capacity gives the percentage shown in-game.
  • 44-45 - 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.)

  • 46-47 - Speed of craft.
  • 48-49 - Unknown - activity type?
  • 4A-4B - Unknown - goes to 0 when tracking a target but not attacking.
  • 4C-4D - Destination coordinates, horizontal.
  • 4E-4F - Destination coordinates, vertical.
  • 50-51 - Fuel, amount remaining. This value divided by the crafts total fuel capacity gives the percentage shown in-game.
  • 52-53 - Base Reference as an index to LOC.DAT
  • 54-55 - 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
  • 56-57 - 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
  • 5C-5D - Primary Alien Race found on craft.
0  - Aquatoid
1  - Gill Man
2  - Lobster Man
3  - Tasoth
4+ - Mixed
  • 62-63 - Craft status.
0 - Ready
1 - Out
2 - Repairs
3 - Refueling
4 - Re-arming
  • 64 - Bit Flags.
40 - Show full Transmission Resolver data
  • 68-69 - Touchdown depth (see entry at 44-45 for possible values).

(The following are mostly taken from the UFO version and new values have been inserted as appropriate, but the presence and location within CRAFT.DAT has not yet been determined in TFTD.)

See Also