PURCHASE.DAT
General Notes
PURCHASE.DAT is found in the savegame directory (GAME_1 through GAME_10) and contains both buying and selling prices for all items. It also contains the value for delivery time (even for manufactured and alien items) and a flag for whether or not an item may purchased on the Purchase/Recruit Screen.
There are 91 entries, each of which is 20 bytes long, for a total of 1,820 bytes long.
Items are divided into three general categories: Personnel, Crafts, and all other items. Of the 91 entries, 3 are for Personnel, 5 for Crafts, and 83 for other items, including 11 for alien corpses (5 for the major races + 6 for the terrorists they bring along), and 3 entries that the game doesn't seem to use (UFO Construction, Alien Reproduction, and Alien Habitat.)
The order of items in this file is generally the same as on the Purchase/Recruit, Sell/Sack, or Transfer Screens. Each entry also contains a value that generally conforms to the sort order on the Base Information->Stores screen (which is slightly different from the sort order of the other screens.) See Notes on Sorting at the end of this article for more details.
Values are presented according to offset (0 to 19) in bold.
Structure
0 (1 Byte): Item Category:
0 General Item...basically, anything not Personnel or Crafts 1 X-Com Craft 2 Soldier 3 Scientist 4 Engineer
Entry Index
|
|
|
|
Notes on Sorting
NOTE: Based on some hacking of GEOSCAPE.EXE, the 'sort' value appears to be an index to arrays. See User:Pi Masta for more details.
1) For all screens, the order of the manufactured craft weapons is reversed (i.e. they are listed as Plasma Beam, Laser Cannon, Fusion Ball Launcher in this file, and follow that order for the 'Sort Order' (offset 1) value as well, but are displayed as Fusion Ball Launcher, Laser Cannon, Plasma Beam on the screens)
2) Except as noted in 1), above, the Purchase/Recruit screen displays items in the order of their entries. If you hack Offset 18 so everything is purchaseable, they will display in that order.
3) On the Transfer and Sell/Sack screens, all soldiers not currently assigned to crafts will list individually first, then all crafts (but not neccessarily by the order listed in this file, e.g. in my test file, Interceptor-1 listed before Lightning-2,) then scientists and engineers, then the rest of the items will sort in the order of their entries (except as noted in 1), above)
4) Finally, on the Base Information->Stores screen, only General Items (i.e. anything for which Offset 0 = 0) will display, sorted according to the Sort Order (Offset 1) value (except as noted in 1), above.) This basically means that E-115, which normally sorts between Electro-flare and Heavy Plasma, will instead sort to between Alien Grenade and Mind Probe, and that HWP Ammo sorts to the end of the list instead of immediately following its HWP entry.
See Also
- BASE.DAT - Items bases have in stores
- OBDATA.DAT - Stats on most of the items listed here
- TRANSFER.DAT - Items being transfered to bases including purchased items
- Saved Game Files