Difference between revisions of "Game Files"

From UFOpaedia
Jump to navigation Jump to search
 
(29 intermediate revisions by 16 users not shown)
Line 8: Line 8:
 
[http://www.stonepool.com/xcom/hacking/index.html Hatfarm / Chris Voss] and [http://www.daishiva.com/phpBB2/generic.php?page=progLinks.shtml DaiShiva] (see [http://www.daishiva.com/programs/XCFormat.html file formats]) also have notes on a number of XCOM's file formats not yet detailed on this wiki.
 
[http://www.stonepool.com/xcom/hacking/index.html Hatfarm / Chris Voss] and [http://www.daishiva.com/phpBB2/generic.php?page=progLinks.shtml DaiShiva] (see [http://www.daishiva.com/programs/XCFormat.html file formats]) also have notes on a number of XCOM's file formats not yet detailed on this wiki.
  
 +
= General File Information =
 
== Program Files ==
 
== Program Files ==
  
Line 14: Line 15:
 
<table {{StdDescTable}}>
 
<table {{StdDescTable}}>
 
<th {{StdDescTable_Heading}}>File</th><th {{StdDescTable_Heading}}>Description</th>
 
<th {{StdDescTable_Heading}}>File</th><th {{StdDescTable_Heading}}>Description</th>
<tr><td>[[GEODATA]]</td><td>Text for localization. Includes [[OBDATA.DAT]] object data file.</td></tr>
+
<tr><td>[[GEODATA]]</td><td>Geoscape data. Includes localization strings, [[OBDATA.DAT]] for objects like weapons, [[WORLD.DAT]] for globe terrain.</td></tr>
 
<tr><td>[[GEOGRAPH]]</td><td>Graphics for [[UFOpaedia]] and research screen backgrounds.</td></tr>
 
<tr><td>[[GEOGRAPH]]</td><td>Graphics for [[UFOpaedia]] and research screen backgrounds.</td></tr>
 
<tr><td>[[MAPS]]</td><td>Pre-generated Battlescape terrain blocks (.MAP). These are filled in with terrain tiles. A few dozen blocks make up a battlescape.</td></tr>
 
<tr><td>[[MAPS]]</td><td>Pre-generated Battlescape terrain blocks (.MAP). These are filled in with terrain tiles. A few dozen blocks make up a battlescape.</td></tr>
<tr><td>[[Saved_Game_Files#Missdat_Files|MISSDAT]]</td><td>Holds the data from the previous mission. (Can be [[Exploits#Helpless_Tactical_Mission|exploited]]).</td></tr>
+
<tr><td>[[Saved_Game_Files#Missdat_Files|MISSDAT]]</td><td>Holds the data from the previous mission. (Can be [[ExploitsA#Score_Points_For_Free|exploited]]).</td></tr>
 
<tr><td>[[ROUTES]]</td><td>Alien route maps (.RMP) for moving around the pre-generated Battlescape terrain blocks.</td></tr>
 
<tr><td>[[ROUTES]]</td><td>Alien route maps (.RMP) for moving around the pre-generated Battlescape terrain blocks.</td></tr>
 
<tr><td>[[SOUND]]</td><td>1990-era sound drivers, or MIDI files for Windows version.</td></tr>
 
<tr><td>[[SOUND]]</td><td>1990-era sound drivers, or MIDI files for Windows version.</td></tr>
Line 29: Line 30:
  
 
== Geoscape Files ==  
 
== Geoscape Files ==  
These are savegame files used by the Geoscape portion of the game. This can be considered a 'standard' save.
+
These are savegame files used by the [[Geoscape]] portion of the game. This can be considered a 'standard' save.
  
 
<table {{StdDescTable}}>
 
<table {{StdDescTable}}>
Line 37: Line 38:
 
<tr><td>[[ALIEN.DAT]]</td><td>Contains Alien activity in Countries and areas, for graphs.</td></tr>
 
<tr><td>[[ALIEN.DAT]]</td><td>Contains Alien activity in Countries and areas, for graphs.</td></tr>
 
<tr><td>[[ASTORE.DAT]]</td><td>Has the info on aliens in [[Alien Containment]].</td></tr>
 
<tr><td>[[ASTORE.DAT]]</td><td>Has the info on aliens in [[Alien Containment]].</td></tr>
<tr><td>[[BASE.DAT]]</td><td>Has all of the [[X-COM Bases|base]] layout and contents information, radar scanning abilities and other base information.</td></tr>
+
<tr><td>[[BASE.DAT]]&nbsp;[[BASE.DAT_(TFTD)|(TFTD)]]</td><td>Has all of the [[X-COM Bases|base]] layout and contents information, radar scanning abilities and other base information.</td></tr>
<tr><td>[[BPROD.DAT]]</td><td>List of goods being [[manufacturing|produced]].</td></tr>
+
<tr><td>[[BPROD.DAT]]&nbsp;[[BPROD.DAT_(TFTD)|(TFTD)]]</td><td>List of [[Equipment (EU)|equipment]] being [[manufacturing|produced]].</td></tr>
<tr><td>[[CRAFT.DAT]]</td><td>Has all the [[craft]] info, weapons, fuel, damage and items onboard. Also stores UFO information, although information is handled differently from friendly aircraft.</td></tr>
+
<tr><td>[[CRAFT.DAT]]&nbsp;[[CRAFT.DAT_(TFTD)|(TFTD)]]</td><td>Has all the [[craft]] info, [[Craft Weapons|weapons]], fuel, damage and items onboard. Also stores UFO information, although information is handled differently from friendly aircraft.</td></tr>
 
<tr><td>[[DIPLOM.DAT]]</td><td>Diplomacy info, and current and historical [[Country Funding]].</td></tr>
 
<tr><td>[[DIPLOM.DAT]]</td><td>Diplomacy info, and current and historical [[Country Funding]].</td></tr>
 
<tr><td>[[DUM.BIN]]</td><td>Dummy file for keeping directory structure. Not used.</td></tr>  
 
<tr><td>[[DUM.BIN]]</td><td>Dummy file for keeping directory structure. Not used.</td></tr>  
 
<tr><td>[[FACIL.DAT]]</td><td>Info on [[Base Facilities]] you can build.</td></tr>
 
<tr><td>[[FACIL.DAT]]</td><td>Info on [[Base Facilities]] you can build.</td></tr>
 
<tr><td>[[IGLOB.DAT]]</td><td>Date and time.</td></tr>
 
<tr><td>[[IGLOB.DAT]]</td><td>Date and time.</td></tr>
<tr><td>[[INTER.DAT]]</td><td></td></tr>
+
<tr><td>[[INTER.DAT]]</td><td>Info on interception windows</td></tr>
 
<tr><td>[[LEASE.DAT]]</td><td></td></tr>
 
<tr><td>[[LEASE.DAT]]</td><td></td></tr>
 
<tr><td>[[LIGLOB.DAT]]</td><td>Money! Also financial graph information.</td></tr>
 
<tr><td>[[LIGLOB.DAT]]</td><td>Money! Also financial graph information.</td></tr>
<tr><td>[[LOC.DAT]]</td><td>Location of bases on the planet as well as other things like ships, waypoints and missions. Basically anything that is an icon on the [[Geoscape Overview|Geoscape]] world view.</td></tr>
+
<tr><td>[[LOC.DAT]]</td><td>Location of bases on the planet as well as other things like ships, waypoints and missions. Basically anything that is an icon on the Geoscape world view.</td></tr>
 
<tr><td>[[MISSIONS.DAT]]</td><td>Contains counters and race info on the ongoing alien acts.</td></tr>
 
<tr><td>[[MISSIONS.DAT]]</td><td>Contains counters and race info on the ongoing alien acts.</td></tr>
<tr><td>[[PRODUCT.DAT]]</td><td>Info on things you can produce.</td></tr>
+
<tr><td>[[PRODUCT.DAT]]&nbsp;[[PRODUCT.DAT_(TFTD)|(TFTD)]]</td><td>Info on things you can produce.</td></tr>
<tr><td>[[PROJECT.DAT]]</td><td>These are things you are [[research]]ing.</td></tr>
+
<tr><td>[[PROJECT.DAT]]&nbsp;[[PROJECT.DAT_(TFTD)|(TFTD)]]</td><td>These are things you are [[research]]ing.</td></tr>
<tr><td>[[PURCHASE.DAT]]</td><td>Info on stuff you can buy.</td></tr>
+
<tr><td>[[PURCHASE.DAT]]&nbsp;[[PURCHASE.DAT_(TFTD)|(TFTD)]]</td><td>Info on stuff you can buy.</td></tr>  
<tr><td>[[RESEARCH.DAT]]</td><td>Completed research.</td></tr>
+
<tr><td>[[RESEARCH.DAT]]&nbsp;[[RESEARCH.DAT_(TFTD)|(TFTD)]]</td><td>Completed research.</td></tr>
 
<tr><td>[[SAVEINFO.DAT]]</td><td>Name of the saved game.</td></tr>
 
<tr><td>[[SAVEINFO.DAT]]</td><td>Name of the saved game.</td></tr>
<tr><td>[[SOLDIER.DAT]]</td><td>Data about the [[soldiers]].</td></tr>
+
<tr><td>[[SITE.DAT]]</td><td>List of recent Terror Sites.  (May be TFTD-only.)</td></tr>
<tr><td>[[TRANSFER.DAT]]</td><td>Personnel and [[equipment|goods]] being transferred.</td></tr>
+
<tr><td>[[SOLDIER.DAT]]&nbsp;[[SOLDIER.DAT (TFTD)|(TFTD)]]</td><td>Data about the [[soldiers]].</td></tr>
 +
<tr><td>[[TRANSFER.DAT]]</td><td>Personnel and equipment being transferred.</td></tr>
 
<tr><td>[[UIGLOB.DAT]]</td><td>Holds the next numbers for [[UFOs]], Terror Sites, [[Interceptor]]s, etc. Also contains monthly scores for research.</td></tr>
 
<tr><td>[[UIGLOB.DAT]]</td><td>Holds the next numbers for [[UFOs]], Terror Sites, [[Interceptor]]s, etc. Also contains monthly scores for research.</td></tr>
 
<tr><td>[[UP.DAT]]</td><td>[[UFOpaedia]] info.</td></tr>
 
<tr><td>[[UP.DAT]]</td><td>[[UFOpaedia]] info.</td></tr>
<tr><td>[[XBASES.DAT]]</td><td>[[Alien Missions#Alien Base|Alien Base]] information.</td></tr>
+
<tr><td>[[XBASES.DAT]]</td><td>Schedules [[Base Defence|attacks on X-COM bases]].</td></tr>
 
<tr><td>[[XCOM.DAT]]</td><td>Contains X-Com activity in Countries and areas, for graphs.</td></tr>
 
<tr><td>[[XCOM.DAT]]</td><td>Contains X-Com activity in Countries and areas, for graphs.</td></tr>
 
<tr><td>[[ZONAL.DAT]]</td><td>Information on which zones and with what priority aliens are going to attack.</td></tr></table>
 
<tr><td>[[ZONAL.DAT]]</td><td>Information on which zones and with what priority aliens are going to attack.</td></tr></table>
Line 70: Line 72:
 
<th {{StdDescTable_Heading}}>File</th><th {{StdDescTable_Heading}}>Description</th>
 
<th {{StdDescTable_Heading}}>File</th><th {{StdDescTable_Heading}}>Description</th>
 
<tr><td>[[BGLOB.DAT]]</td><td>Describes ambient light on map.</td></tr>
 
<tr><td>[[BGLOB.DAT]]</td><td>Describes ambient light on map.</td></tr>
<tr><td>[[GEODATA.DAT]]</td><td></td></tr>
+
<tr><td>[[GEODATA.DAT]]</td><td>Details the map type and overall map structure.</td></tr>
 
<tr><td>[[MAP.DAT]]</td><td>Stores tile information for the whole map. Basically all static structures, such as trees, walls, floors and furniture.</td></tr>
 
<tr><td>[[MAP.DAT]]</td><td>Stores tile information for the whole map. Basically all static structures, such as trees, walls, floors and furniture.</td></tr>
 
<tr><td>[[MISDATA.DAT]]</td><td>Contains information on craft in use and which alien artefacts are available for use in combat.</td></tr>
 
<tr><td>[[MISDATA.DAT]]</td><td>Contains information on craft in use and which alien artefacts are available for use in combat.</td></tr>
Line 108: Line 110:
 
(12 unique files, plus 27 standard save files (does not use dum.bin), totaling 39).
 
(12 unique files, plus 27 standard save files (does not use dum.bin), totaling 39).
 
-----
 
-----
'''Did You Know?''' If your game crashes and you are returned to previous mission, the game is actually referring to the battlescape information in the MISSDAT directory.
 
  
Also, if a tactical mission is abnormally aborted, the results are obtained from the MISSDAT folder as well. Because the game was not able to update the files that hold the results of the last mission, your current game will be updated with information from the ''previous'' mission that was able to end normally.
+
=File Format information=
  
Abnormal program termination simply means that the tactical game engine crashed or was forced to crash by the user.
+
==Graphics==
 +
 
 +
A list of specific image formats used by EU/TFTD.
 +
 
 +
<table {{StdDescTable}}>
 +
<th {{StdDescTable_Heading}}>Extension</th><th
 +
{{StdDescTable_Heading}}>Description</th>
 +
<tr><td>[[Image Formats#PCK|PCK]]</td><td>A run-length-encoded image format for storing one or more images with a dimension of 32x40 pixels. Used for sprites, tiles and inventory images. Usually accompanied by a TAB file, serving as an index to the image archive.</td></tr>
 +
<tr><td>[[Image Formats#SCR & DAT|SCR & DAT]]</td><td>Stores uncompressed image data for the full screen backgrounds and the inventory screen icons.</td></tr>
 +
<tr><td>[[Image Formats#SPK|SPK]]</td><td>Paper doll and UFOpedia images, among other full screen pictures.</td></tr>
 +
<tr><td>[[Image Formats#BDY|BDY]]</td><td>Often used by TFTD in place of SPK.</td></tr>
 +
</table>
 +
 
 +
=Did You Know?=
 +
* If your game crashes and you are returned to previous mission, the game is actually referring to the battlescape information in the MISSDAT directory. Also, if a tactical mission is abnormally aborted, the results are obtained from the MISSDAT folder as well. Because the game was not able to update the files that hold the results of the last mission, your current game will be updated with information from the ''previous'' mission that was able to end normally. Abnormal program termination simply means that the tactical game engine crashed or was forced to crash by the user. This [[ExploitsA#Score_Points_For_Free|can be abused]].
 +
 
 +
* Other exploits with gamefiles can be found [[ExploitsF|here]].
 +
 
 +
=See Also=
 +
 
 +
[[Game editors]]
  
 
[[Category:Game Files]]
 
[[Category:Game Files]]
 +
[[Category:Enemy Unknown/UFO Defense]]
 +
[[Category:TFTD]]

Latest revision as of 14:06, 21 March 2016

Not-for-profit, just-for-fun reverse engineering.

Contains a quick introduction to using a most unlikely program to edit your game files, and suggestions on other editors out there.
Information on how to manage directories, files, plus other neat tricks that can be done through the command console that should not be forgotten in today's era of point and click madness.

Hatfarm / Chris Voss and DaiShiva (see file formats) also have notes on a number of XCOM's file formats not yet detailed on this wiki.

General File Information

Program Files

These are program files and static data files that are not part of the saved game files.

FileDescription
GEODATAGeoscape data. Includes localization strings, OBDATA.DAT for objects like weapons, WORLD.DAT for globe terrain.
GEOGRAPHGraphics for UFOpaedia and research screen backgrounds.
MAPSPre-generated Battlescape terrain blocks (.MAP). These are filled in with terrain tiles. A few dozen blocks make up a battlescape.
MISSDATHolds the data from the previous mission. (Can be exploited).
ROUTESAlien route maps (.RMP) for moving around the pre-generated Battlescape terrain blocks.
SOUND1990-era sound drivers, or MIDI files for Windows version.
TERRAINBattlescape graphic tiles for buildings, ships, and terrain (.MCD, .PCK, and .TAB).
UFO2EXE\TACTICAL.EXEThe "Battlescape" program in DOS-release of UFO.
UFOEXE\GEOSCAPE.EXEThe "Geoscape" program that handles base management and aircraft.
UFOEXE\BLACK.EXEThe black screen UFO.BAT puts up when swapping between the above two programs.
UFOGRAPHMisc graphics (.PCK) for soldier equipment screens, smoke, motion detector blobs.
UFOINTROHolds the introduction movie (.FLI) and the endgame pictures (.LBM).
UNITSBattlescape graphics for soldiers, aliens, and the pixelated guns they hold. (.PCK and .TAB).

Geoscape Files

These are savegame files used by the Geoscape portion of the game. This can be considered a 'standard' save.

FileDescription
ACTS.DATContains information which acts with which priority in respective zones aliens are going to try.
AKNOW.DAT
ALIEN.DATContains Alien activity in Countries and areas, for graphs.
ASTORE.DATHas the info on aliens in Alien Containment.
BASE.DAT (TFTD)Has all of the base layout and contents information, radar scanning abilities and other base information.
BPROD.DAT (TFTD)List of equipment being produced.
CRAFT.DAT (TFTD)Has all the craft info, weapons, fuel, damage and items onboard. Also stores UFO information, although information is handled differently from friendly aircraft.
DIPLOM.DATDiplomacy info, and current and historical Country Funding.
DUM.BINDummy file for keeping directory structure. Not used.
FACIL.DATInfo on Base Facilities you can build.
IGLOB.DATDate and time.
INTER.DATInfo on interception windows
LEASE.DAT
LIGLOB.DATMoney! Also financial graph information.
LOC.DATLocation of bases on the planet as well as other things like ships, waypoints and missions. Basically anything that is an icon on the Geoscape world view.
MISSIONS.DATContains counters and race info on the ongoing alien acts.
PRODUCT.DAT (TFTD)Info on things you can produce.
PROJECT.DAT (TFTD)These are things you are researching.
PURCHASE.DAT (TFTD)Info on stuff you can buy.
RESEARCH.DAT (TFTD)Completed research.
SAVEINFO.DATName of the saved game.
SITE.DATList of recent Terror Sites. (May be TFTD-only.)
SOLDIER.DAT (TFTD)Data about the soldiers.
TRANSFER.DATPersonnel and equipment being transferred.
UIGLOB.DATHolds the next numbers for UFOs, Terror Sites, Interceptors, etc. Also contains monthly scores for research.
UP.DATUFOpaedia info.
XBASES.DATSchedules attacks on X-COM bases.
XCOM.DATContains X-Com activity in Countries and areas, for graphs.
ZONAL.DATInformation on which zones and with what priority aliens are going to attack.

(28 files. Note that if you find a geoscape save with additional files, this simply means a battlescape save was made in that slot at some prior point. UFO does not remove unused save files).

Battlescape Files

These are savegame files created and used by the tactical portion of the game. They are only created if the game is saved while in the battlescape. Battlescape saves also contain all the files used in a standard save.

FileDescription
BGLOB.DATDescribes ambient light on map.
GEODATA.DATDetails the map type and overall map structure.
MAP.DATStores tile information for the whole map. Basically all static structures, such as trees, walls, floors and furniture.
MISDATA.DATContains information on craft in use and which alien artefacts are available for use in combat.
OBPOS.DATStores all the objects that your soldiers can pick up (guns, corpses, etc).
ROUTES.DATStores nodes for soldier and alien spawn points, also acts as waypoints for AI pathfinding.
SEEMAP.DATFog of war overlay.
SMOKBIT.DATSmoke particles and fire patches on the map.
SMOKREF.DATSmoke particles and fire patches on the map.
SOURCEMP.DATLight source overlays for mobile light sources (i.e. your soldiers).
TERMP.DATLight source overlays for ambient (or fixed) lighting.
UNITPOS.DATControls ownership, visibility, whether the unit is under temporary mind control, etc. Works hand in hand with UNITREF.DAT.
UNITREF.DATContains the primary stats for all units in combat. X-Com owned soldiers in this file are virtual copies of the soldiers in soldier.dat. Works very closely with unitpos.dat.
WGLOB.DATBattlescape map global information such as map dimensions and the number of turns that have elapsed.

(14 unique files, plus all 28 standard save files, totaling 42).

Missdat Files

These temporary files are used at run time, when a battlescape game is in progress. The missdat folder also contains all the files needed to create a standard Geoscape save for the game in progress.

When the tactical game engine starts, it first checks SAVEINFO.DAT to see if this is a new battle, or if you're loading a battlescape save game. In the case of the former, it generates a new map, based off these files:

If you load a game, the tactical engine loads from the save slot directly, as according to DIRECT.DAT (which details the path to the slot in concern).

When combat ends, these files are created:

(12 unique files, plus 27 standard save files (does not use dum.bin), totaling 39).


File Format information

Graphics

A list of specific image formats used by EU/TFTD.

ExtensionDescription
PCKA run-length-encoded image format for storing one or more images with a dimension of 32x40 pixels. Used for sprites, tiles and inventory images. Usually accompanied by a TAB file, serving as an index to the image archive.
SCR & DATStores uncompressed image data for the full screen backgrounds and the inventory screen icons.
SPKPaper doll and UFOpedia images, among other full screen pictures.
BDYOften used by TFTD in place of SPK.

Did You Know?

  • If your game crashes and you are returned to previous mission, the game is actually referring to the battlescape information in the MISSDAT directory. Also, if a tactical mission is abnormally aborted, the results are obtained from the MISSDAT folder as well. Because the game was not able to update the files that hold the results of the last mission, your current game will be updated with information from the previous mission that was able to end normally. Abnormal program termination simply means that the tactical game engine crashed or was forced to crash by the user. This can be abused.
  • Other exploits with gamefiles can be found here.

See Also

Game editors