UP.DAT

From UFOpaedia
Jump to: navigation, search

UP.DAT is used by the geoscape for information in the UFOpaedia. Each record is 12 bytes long with 116 records making it a fixed size of 1392 bytes.

There seems to really only be 4 'fields' used in each record. All other bytes are all 0.

NOTE: This structure was gleaned from looking at the values and finding a correlation in other files. I have not actually tried editing most of these values, however Hatfarm has made entries available by editing UP[8] -Pi Masta 15:07, 6 February 2007 (PST)

Structure

  • Offset 0 (1 Byte) - Category Index. They go in order from 0 to 8 in the file. Unsure if this is a requirement however.

Possible values and their meanings:

0 - Craft and Armament
1 - Heavy Weapons Platforms
2 - Weapons and Equipment
3 - Alien Artifacts
4 - Base Facilities
5 - Alien Life Forms
6 - Alien Research
7 - UFO Components
8 - UFOs
  • Offset 2 (1 byte) - Sub-index. These values increment inside each category and reset to 0 on each new one, with 2 exceptions: Weapons and Equipment, and Alien Artifacts. Instead the subindex references the index in OBDATA.DAT (0 based as well) for both of these. They are entered in increasing order inside of these categories. However, there is an exception to this, the Personal/Powered/Flying Armours are listed before all other items in the category (as well as in the file) and have values of 100-102 respectively.

no ammo for normal weapons is referenced, yet the UFOpaedia displays them on the weapon at hand, unsure if it simply reads the next 3 or so ammo entries after this or actually looks up the references for ammo in OBDATA[26-28]. Clips for alien items are referenced in here.

  • Offset 5 (1 byte) - SPK file number. A vast majority of entries are 0, but for items like the Skyranger and Alien Alloys they refer to GEOGRAPH\UP0##.spk where ## is the number in this file (prepend a 0 as necessary).

I don't believe what SPK/SCR is shown for weapons and other entries are in this file, they could quite possibly be in the executable, and are based on the category value.

  • Offset 6 (2 Bytes, low then high) - English.dat (or French/German.dat as appropriate) string index. Note that this is 2 bytes long as some of the indexes are well over 255. The array values here are NOT 0-Based, thus an index of 1 in the file is the first string in English.dat (not 0 as would normally be expected). Also the strings are sometimes ignored. For instance the text for craft weapons like the laser cannon aren't displayed, yet they are indexed correctly.
  • Offset 8 (1 Byte) - Research Flag. Possible Values and their meaning:
0 - Not yet researched 
2 - Researched
3 - Available from begining of the game

Hat Farm has mentioned that editing values that are 3 to 1 will remove them, so perhaps they are only shown if this value is > 1. As to why there is a distinction between researched and always available is unknown.

List of Records

Ripped from Hatfarm's excellent page, and without it I would probably still be cracking this file.

Listed as appeared in the file.

  • Category 0 - Craft and Armament
    • Skyranger
    • Lightning
    • Avenger
    • Interceptor
    • Firestorm
    • Stingray Launcher
    • Avalanche Launcher
    • Cannon
    • Fusion Ball Launcher
    • Laser Cannon
    • Plasma Beam
  • Category 1 - Heavy Weapons Platforms
    • Tank/Cannon
    • Tank/Rocket Launcher
    • Tank/Laser Cannon
    • Hovertank/Plasma
    • Hovertank/Launcher
  • Category 2 - Weapons and Equipment
    • Personal Armour
    • Power Suit
    • Flying Suit
    • Pistol
    • Rifle
    • Heavy Cannon
    • Auto-Cannon
    • Rocket Launcher
    • Laser Pistol
    • Laser Rifle
    • Heavy Laser
    • Grenade
    • Smoke Grenade
    • Proximity Grenade
    • High Explosive
    • Motion Scanner
    • Medi-kit
    • Psi-Amp
    • Stun Rod
    • Electro-flare
  • Category 3 - Alien Artifacts
    • Heavy Plasma
    • Heavy Plasma Clip
    • Plasma Rifle
    • Plasma Rifle Clip
    • Plasma Pistol
    • Plasma Pistol Clip
    • Blaster Launcher
    • Blaster Bomb
    • Small Launcher
    • Stun Bomb
    • Alien Grenade
    • Elerium-115
    • Mind Probe
  • Category 4 - Base Facilities
    • Access Lift
    • Living Quarters
    • Laboratory
    • Workshop
    • Small Radar System
    • Large Radar System
    • Missile Defense
    • General Stores
    • Alien Containment
    • Laser Defense
    • Plasma Defense
    • Fusion Ball Defense
    • Grav Shield
    • Mind Shield
    • Psionic Laboratory
    • Hyper-wave Decoder
    • Hangar
  • Category 5 - Alien Life Forms
    • Sectoid
    • Sectoid Corpse
    • Snakeman
    • Snakeman Corpse
    • Ethereal
    • Ethereal Corpse
    • Muton
    • Muton Corpse
    • Floater
    • Floater Corpse
    • Celatid
    • Celatid Corpse
    • Silacoid
    • Silacoid Corpse
    • Chryssalid
    • Chryssalid Corpse
    • Reaper
    • Reaper Corpse
    • Sectopod
    • Sectopod Corpse
    • Cyberdisc
    • Cyberdisc Corpse
  • Category 6 - Alien Research
    • Alien Origins
    • Martian Solution
    • Cydonia or Bust
    • Alien Research
    • Alien Harvest
    • Alien Abduction
    • Alien Infiltration
    • Alien Base
    • Alien Terror
    • Alien Retailiation
    • Alien Supply
  • Category 7 - UFO Components
    • UFO Power Source
    • UFO Navigation
    • UFO Construction
    • Alien Food
    • Alien Reproduction
    • Alien Entertainment
    • Alien Surgery
    • Examination Room
    • Alien Alloys
  • Category 8 - UFOs
    • Small Scout
    • Medium Scout
    • Large Scout
    • Harvester
    • Abductor
    • Terror Ship
    • Battleship
    • Supply Ship

See Also