Ship construction data
Disassembly reveals a data structure at location $1e560 in the main K240 executable, beginning "1402011400020302". This stores construction data for all Terran ships. All values below are hexadecimal.
Arm. | Spd. | HP | Build | Ore 1 | Ore 2 | ID | Name | Cost | Len | ?? 1 | ?? 2 | Ship name |
---|---|---|---|---|---|---|---|---|---|---|---|---|
14 | 02 | 01 | 14 | 0002 | 0302 | 0200 | 007f | 1770 | 000d | 00000000 | 00000000 | Assault Fighter |
1e | 02 | 02 | 1e | 0004 | 0304 | 0300 | 0080 | 1f40 | 000a | 00000000 | 00000000 | Combat Eagle |
05 | 01 | 01 | 14 | 0004 | 0302 | 0400 | 0081 | 0bb8 | 000c | 00000000 | 00000000 | Scout Ship |
28 | 01 | 03 | 30 | 0008 | 0306 | 3500 | 0082 | 3a98 | 0022 | 00080b0a | LAB_0BFC | Destructor |
32 | 00 | 04 | 50 | 0008 | 0702 | 3600 | 0083 | 84d0 | 0034 | 00080b0e | LAB_0BFD | Terminator |
28 | 00 | 02 | 72 | 0006 | 0701 | 3700 | 0084 | 5dc0 | 0069 | 00030f0f | LAB_0BFE | Transporter |
46 | 00 | 06 | 72 | 0008 | 0706 | 3800 | 0085 | ea60 | 005c | 00030f0f | LAB_0BFE | Fleet Battleship |
78 | 00 | 04 | 56 | 050a | 0714 | 3900 | 00ad | ffff | 00d7 | 00010312 | LAB_0BFB | Orbital Space Dock |
Armour is the default amount of armour the ship has. Speed is the ship's speed measured in FN, minus one. HP is number of hardpoints. Build is build time in days. Ore1 and Ore2 are the ores required; the first byte refers to the [[[project:k240-ores|type of ore]] starting with Selenium at 00, and the second is the amount required. ID is the ship's ID number to identify its type. Cost is the price in credits. Name is the index of the ship's name in the game strings set. Leng is ship length as listed on the build screen.
The eight following bytes are unknown. Both are blank for the small ships and only apply to large ships (ships which cannot land on a Landing Pad). The first four bytes are unknown. The second four bytes are pointers to later data as follows. It's worth noting that Transporter and Fleet Battleship share both fields.
LAB_0BFB: Orbital Space Dock
000000f0 00101000 00e00020 10f01010
f8f0f810 20f010e0 18d820e0 20001020
201030f0 30002020 182830e0 40e040f0
301050e0 50f048d8 40004010 30204020
50105020 48285000 600060f0 68f06010
681060e0 6020ffff
LAB_0BFC: Destructor
00001000 0808ffff
LAB_0BFD: Terminator
00000010 10001010 1808ffff
LAB_0BFE: Transporter / Fleet Battleship
000000f0 0010f800 100010f0 20f02000
101030f0 20e83000 20103010 20184000
40f04010 4800ffff
As the code is larger for larger ships, it may be coordinates for scaffold placement.
Current ship data
PART3 of the save game format stores the current game state of 700 ships using 54 bytes each. This data structure can also be located in memory.
Datatype | Bytes (hex) | Description |
---|---|---|
8 bytes | $0 - $7 | ?? |
byte | $8 | Ship identifier |
12 bytes | $9 - $15 | ?? |
Byte | $16 | Unknown cycling digits, perhaps initiative count / time-to-fire? |
20 bytes | $17 to $29 | ?? |
6 bytes | $2a to 2f | Hardpoint slots (one per byte) |
Byte | $30 | Fleet ID |
Byte | $31 | ?? |
Word | $32-33 | Current armour value |
Alien ships
The alien file format has yet to be decoded.
Analysis of WinUAE save state files suggests that the aliens use the following ship configurations. This list is incomplete.
Tylaran
ID | Armor | Hardpoints | Name |
---|---|---|---|
3D | 30 | Photon Cannon, Ion Cannon, Vortex Mine | Tylaran ship 3D |
3F | 5 | Laser | Tylaran ship 3F (scout ship?) |
40 | 30 | Photon Cannon, Plasma Cannon | Tylaran ship 40 |
41 | 100 | Static Inducer, Plasma Cannon, Vortex Mine, Shield x20 | Tylaran ship 41 |
42 | 15 | Photon Cannon, Photon Cannon | Tylaran ship 42 |
44 | ?? | ?? | Tylaran ship 44 |
Swixaran
ID | Armor | Hardpoints | Name | Notes |
---|---|---|---|---|
3C | 20 | Photon Cannon, Ion Cannon, Warp Generator | Combat vessel 3C | Swixarans begin with 12 |
41 | 20 | Plasma Cannon, Ion Cannon | Transporter plant 41 | |
4B | 100 | Plasma Cannon, Plasma Cannon, Plasma Cannon, Plasma Cannon | Large station 4B | Swixarans begin with 2 |