FACIL.DAT

From UFOpaedia
Jump to: navigation, search

Contains Information on the Base Facilities you can build. This information was ripped from Hatfarm's Website.

Structure

Each record is 16 bytes long with a fixed size of 272 bytes (17 records). Offsets and values below are in hexadecimal

  • Offset 00 - This is a pointer to string in english.dat.
  • Offset 01 - High bit for the string pointer.
  • Offset 02 & 03 - Price to build/$k (low bit then high bit respectively) - Possible values = no more than FF 7F (which translates to 7F FF), going beyond that makes it negative. Values are in multiples of 1000. For example, entering a cost of 56 in here will result in $56,000 in-game.
  • Offset 04 - Amount of days it takes to build - Possible values = 00 to FF
  • Offset 05 - Upkeep/$k - Possible Values = 00 to FF. Like building costs, values will be in multiples of 1000.
  • Offset 06 - These seems to be related to the capacity, possibly in line items, 10 for Alien Containment and Psi Labs, 1 for Hangar, 250 for Stores certainly all make sense, then 10 for Labs, 50 for Workshops, and 30 for quarters. The quarters limit does not come in when you have 30+ soldiers on a base with a single quarters, and increasing the value for hangars doesnt allow you stack more than one per hangar, so many not be used at all.
  • Offset 07 - NEED HELP
  • Offset 08 & 09 - Defense strength (low bit then high bit respectively) - Possible values = no more than FF 7F (which translates to 7F FF), going beyond that makes it
  • Offset 0A - Hit ratio percentage. For defenses. Possible values = 00 to 64, you can't really have more than a 100% chance.
  • Offset 0B - NEED HELP
  • Offset 0C - Build flag, see below for values
  • Offset 0D to 0F - NEED HELP

Here is the list of each facility. I'll list them with the number of the first offset as it still counts up easily. The first number after the name is the value that will make this facility NOT able to build, the second is the value that WILL make this facility available for building (this number should be larger than the first).

 00 - Access Lift - 01 - 05
 10 - Living Quarters - 00 - 04
 20 - Laboratories - 00 - 04
 30 - Workshop - 00 - 04
 40 - Small Radar System - 01 - 05
 50 - Large Radar System - 00 - 04
 60 - Missile Defenses - 01 - 05
 70 - General Stores - 00 - 04
 80 - Alien Containment - 00 - 04
 90 - Laser Defenses - 0A - 0E
 A0 - Plasma Defenses - 0A - 0E
 B0 - Fusion Ball Defenses - 0A - 0E
 C0 - Grav Shield - 09 - 0D
 D0 - Mind Shield - 09 - 0D
 E0 - Psionic Lab - 08 - 0C
 F0 - Hyper-wave Decoder - 09 - 0D
100 - Hangar - 00 - 04

Build Flag breakdown: Bit 1 - [Access Lift, Small Radar, Missile Defense, Grav Shield, Mind Shield, HyperWave] Bit 2 - [Laser, Plasma, Fusion Defenses] Bit 4 - Can you currently build it? Bit 8 - Needs to be researched to be buildable

See Also