<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://temp.ufopaedia.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pi+Masta</id>
	<title>UFOpaedia - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://temp.ufopaedia.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pi+Masta"/>
	<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/Special:Contributions/Pi_Masta"/>
	<updated>2026-05-01T03:23:22Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=GEOSCAPE.EXE&amp;diff=12089</id>
		<title>GEOSCAPE.EXE</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=GEOSCAPE.EXE&amp;diff=12089"/>
		<updated>2007-07-16T22:16:23Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: /* File Templates */  more file templates found&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &amp;quot;Geoscape&amp;quot; program that handles base management and aircraft, a.k.a. XCOM outside of tactical combat. [[TACTICAL.EXE]] handles combat. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; In the WinCE version, GEOSCAPE and TACTICAL are one executable, &amp;quot;UFO Defense.exe&amp;quot;. Due to this confusion (what wiki pages place things on, when they&#039;re practically identical), currently GEOSCAPE, TACTICAL, and UFO Defense information appear here. (Unless and until someone wants to break everything up... then again, having highly related stuff in one place is a good thing.)&lt;br /&gt;
&lt;br /&gt;
Also see [[Versions]].&lt;br /&gt;
&lt;br /&gt;
= XCOM: UFO Defense (U.S. DOS) version 1.4 =&lt;br /&gt;
*Is 382,957 bytes long for the virgin 1.4 executable&lt;br /&gt;
*Has [[Alien_Stats|alien statistics]] starting at (non-offset) byte 379,729. There are 33 records of 39 bytes each. No alien names, though.&lt;br /&gt;
*If you have installed [[XcomUtil]], it may alter the length of GEOSCAPE. &#039;&#039;Does anybody have a modified version, so we can put the length here? --[[User:MikeTheRed|MikeTheRed]]&#039;&#039;&lt;br /&gt;
** My XCOM Util GEOSCAPE size is 415,271 --[[User:Pi Masta|Pi Masta]]&lt;br /&gt;
&lt;br /&gt;
= XCOM Windows Collector&#039;s Edition =&lt;br /&gt;
*Variously called the Win CE or Gold version on the wiki&lt;br /&gt;
*Is 495,616 bytes long &lt;br /&gt;
*Starting at byte 648, reads:&lt;br /&gt;
 XCOM: UFO Defense Gold Edition&lt;br /&gt;
 This awesome game was compiled on Sep  8 1999 at 08:57:11&lt;br /&gt;
 Copyright - 1999 Hasbro Interactive/MicroProse Software&lt;br /&gt;
 Party on dude.&lt;br /&gt;
*If you install XcomUtil, it separates your &#039;&#039;UFO Defense.exe&#039;&#039; into GEOSCAPE and TACTICAL executables. They are almost identical copies of &#039;&#039;UFO Defense.exe&#039;&#039;, however they start at the right place when run. This allows the game to closely mimick the Dos version by having its main loop run in a batch file. &lt;br /&gt;
*Has [[Alien_Stats|alien statistics]] starting at (non-offset) byte 480,145. There are 33 records of 39 bytes each. No alien names, though.&lt;br /&gt;
*Has tank &amp;amp; inbuilt alien weapon stats at byte 447,868 (see below)&lt;br /&gt;
&lt;br /&gt;
= Alien Stats =&lt;br /&gt;
&lt;br /&gt;
This section is for the structure of the alien stats, as found in GEOSCAPE. For actual data and additional information, see the [[Alien_Stats|alien statistics]] page. Also see Zombie&#039;s excellent alien stats page at [http://www.strategycore.co.uk/xcom/pg/ufoalienstats StrategyCore]. &#039;&#039;(Have YOU made your StratCore and [http://www.xcomufo.com XCOMUFO] accounts yet?)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alien stats are found as 33 records of 39 bytes each, in all versions of X-COM. They are identical in all versions. This data actually represents the &amp;quot;core&amp;quot; alien stats; modifiers are used to determine the final stats relative to game difficulty level. (In most, but not all, cases, the core stats are the same as the Beginner level stats.)&lt;br /&gt;
&lt;br /&gt;
Alien stats start in each version of X-COM at the following location. This is a byte &#039;&#039;count&#039;&#039;, not an offset; with counts, the first byte in the file is byte 1:&lt;br /&gt;
 &amp;lt;u&amp;gt;Version&amp;lt;/u&amp;gt;        &amp;lt;u&amp;gt;Location&amp;lt;/u&amp;gt;&lt;br /&gt;
 DOS 1.4         379,729  (GEOSCAPE.EXE)  &lt;br /&gt;
 WinCE Gold      480,145  (UFO Defense.exe)&lt;br /&gt;
 Playstation     501,212&lt;br /&gt;
 TFTD            486,930&lt;br /&gt;
&lt;br /&gt;
Alien names are not actually found in Geoscape; it just has 33 strings of data... the alien each string applies to has been inferred by matching against aliens in the game.&lt;br /&gt;
&lt;br /&gt;
The 39 bytes correspond to the following values. For the below, statements also apply to TFTD, since it&#039;s relevant to understanding the bytes:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0:&#039;&#039;&#039;   Race - Corresponds to Unitref[000]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1:&#039;&#039;&#039;   Rank - Corresponds to Unitref[042]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2:&#039;&#039;&#039;   &#039;&#039;Unknown - Always 0&#039;&#039; - Corresponds to Unitref[011]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3:&#039;&#039;&#039;   Can Fly - No Corresponding Unitref offset&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4:&#039;&#039;&#039;   TUs - Corresponds to Unitref[025]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5:&#039;&#039;&#039;   Health - Corresponds to Unitref[026]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;6:&#039;&#039;&#039;   Energy - Corresponds to Unitref[027]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;7:&#039;&#039;&#039;   Reactions - Corresponds to Unitref[028]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;8:&#039;&#039;&#039;   Strength - Corresponds to Unitref[017]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;9:&#039;&#039;&#039;   Firing Accuracy - Corresponds to Unitref[023]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:&#039;&#039;&#039;   Throwing Accuracy - Corresponds to Unitref[024]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;11:&#039;&#039;&#039;   Melee Accuracy - Corresponds to Unitref[056]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;12:&#039;&#039;&#039;   Front Armor - Corresponds to Unitref[029]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;13:&#039;&#039;&#039;   Left Armor - Corresponds to Unitref[030]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:&#039;&#039;&#039;   Right Armor - Corresponds to Unitref[031]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;15:&#039;&#039;&#039;   Rear Armor - Corresponds to Unitref[032]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;16:&#039;&#039;&#039;   Under Armor - Corresponds to Unitref[033]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;17:&#039;&#039;&#039;   &#039;&#039;Unknown - Always 0&#039;&#039; - Corresponds to Unitref[034]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;18:&#039;&#039;&#039;   Energy Recharge - Corresponds to Unitref[035]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;19:&#039;&#039;&#039;   &#039;&#039;Unknown - Always 0&#039;&#039; - Corresponds to Unitref[036]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;20:&#039;&#039;&#039;   &#039;&#039;Unknown - Always 1&#039;&#039;  No Corresponding Unitref offset&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;21:&#039;&#039;&#039;   &#039;&#039;Unknown - Always 0&#039;&#039; - Corresponds to Unitref[046]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;22:&#039;&#039;&#039;   &#039;&#039;Unknown&#039;&#039; - Corresponds to Unitref[048] (see below)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;23:&#039;&#039;&#039;   &#039;&#039;Unknown&#039;&#039; - Corresponds to Unitref[052] (see below)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NOTE: For additional important info on these two bytes, see [[Talk:UNITREF.DAT]]. My notes below do not take that info into account. For the moment though I&#039;m leaving it as is. I sure wish we could figure the bytes out, and get rid of all the conjecture! - [[User:MikeTheRed|MikeTheRed]] 08:05, 6 November 2006 (PST)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
These Unitref bytes ([48] and [52]) and now Geoscape Core values have long stumped us hardcore X-Commies. The two bytes &amp;lt;b&amp;gt;always&amp;lt;/b&amp;gt; equal the same value for a given alien, including all aliens of the same race (the N&#039;s below). And, they&#039;re the same between Geoscape and Unitref. Clearly it must be important (or a goof!), but exactly what it is, who knows. Although this page is for X-COM, I&#039;ve included TFTD in the hopes it helps folks - but it&#039;s been so long since I&#039;ve played TFTD, I can&#039;t remember those units at all.&lt;br /&gt;
&lt;br /&gt;
How&#039;s this for a thought?... &lt;br /&gt;
 &amp;lt;u&amp;gt;Dimension&amp;lt;/u&amp;gt;   &amp;lt;u&amp;gt;Byte(s)&amp;lt;/u&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
        X     22&lt;br /&gt;
 &lt;br /&gt;
        Y     23&lt;br /&gt;
 &lt;br /&gt;
        Z     24  (top when standing)&lt;br /&gt;
              25  (top when kneeling)&lt;br /&gt;
              26  (bottom)&lt;br /&gt;
&lt;br /&gt;
Maybe they represent the &amp;quot;size in profile&amp;quot; (&amp;quot;width&amp;quot;), affecting likelihood to hit. A game could be tried with a target 20 squares away, set 22 and 23 alternately to 5 or 2 (or 1 or 0?), and see if it affects the successful shots percentage. 0 or even 1 might break the game, though.&lt;br /&gt;
&lt;br /&gt;
Also, how do these values (2 to 5) correlate with the &amp;quot;pixel drawings&amp;quot; of units? I can&#039;t seem to find that info at the moment... aren&#039;t units and tiles defined as something like 16x16x[[Height|28]]? If so, then perhaps the values (2 to 5) are multiplied by 3 or something to get their final &amp;quot;width&amp;quot; for bullet interception??  --[[User:MikeTheRed|MikeTheRed]] 05:20, 17 September 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
:I finally got the OSG (w00t!), and noticed the following: The section on weapon accuracy says (p. 221) that target size affects the chance to hit, and &amp;quot;the &#039;size&#039; of each alien is listed along with all other alien statistics in Chapter 9&amp;quot;. But the alien stats tables (p. 250 ff.) only lists Height as a possible &#039;size&#039; stat, and the text write-ups don&#039;t otherwise address &amp;quot;target size&amp;quot; with any precision. This discrepancy - that Chapter 8 talks about &#039;&#039;&#039;size&#039;&#039;&#039;, but Chapter 9 only has &#039;&#039;&#039;height&#039;&#039;&#039; - might (might!) mean there are more variables that determine target area size, but somehow they didn&#039;t make it to the alien stats tables.&lt;br /&gt;
&lt;br /&gt;
:The description for Height (p. 249) does say, &amp;quot;Taller creatures are easier to hit than short ones are. An alien with a height of 40, for example, is twice as easy to hit as an alien with a height of 20.&amp;quot; (Note: The tallest [[Height]] is actually 23. And also notice, Float is never mentioned.) This &#039;&#039;might&#039;&#039; mean only height affects this, or it could be read in a general way; other dimensions (X and Y in addition to Z) might also affect it.&lt;br /&gt;
&lt;br /&gt;
:Somebody should do some firing accuracy tests while hacking these potential X &amp;amp; Y bytes! But I still don&#039;t know how the values for [22] &amp;amp; [23] compare to what X-COM considers tile width... we know the Height byte accurately reflects the full range of possible values (0 to 23), but I doubt 5 is the full (pixel?) width of a tile. This might mean it&#039;s not width, then (or maybe [22] &amp;amp; [23] are added, or they are individually multiplied by 3 or something??) If anyone who knows about tile width could say something, I&#039;d appreciate it. --[[User:MikeTheRed|MikeTheRed]] 11:24, 1 October 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
In any event, here&#039;s a summary of bytes [22] and [23], in the hopes we can figure it out. They&#039;re always identical for a given race, and [22] always equals [23].&lt;br /&gt;
&lt;br /&gt;
                  &#039;&#039;&#039;X-COM                            TFTD&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
          &amp;lt;U&amp;gt;Value&amp;lt;/U&amp;gt;   &amp;lt;U&amp;gt;Alien&amp;lt;/U&amp;gt;           &amp;lt;U&amp;gt;N&amp;lt;/U&amp;gt;        &amp;lt;U&amp;gt;Value&amp;lt;/U&amp;gt;   &amp;lt;U&amp;gt;Alien&amp;lt;/U&amp;gt;           &amp;lt;U&amp;gt;N&amp;lt;/U&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
            2     Sectoid         6          2     Aquatoid        6   &lt;br /&gt;
                                                   Bio-Drone       1 &lt;br /&gt;
            3     Celatid         1                Tentaculat      1   &lt;br /&gt;
                  Chryssalid      1&lt;br /&gt;
                  Civilian        2          3     Calcinite       1   &lt;br /&gt;
                  Ethereal        3                Civilian        2   &lt;br /&gt;
                  Floater         6                Deep_One        1   &lt;br /&gt;
                  Muton           3                Gill_Man        4   &lt;br /&gt;
                  Snakeman        5                Tasoth          2   &lt;br /&gt;
 &lt;br /&gt;
            4     Cyberdisc       1          4     Coelacant       1   &lt;br /&gt;
                  Hovertank       1                Displacer       1   &lt;br /&gt;
                  Reaper          1                Hallucinoid     1   &lt;br /&gt;
                  Sectopod        1                Lobster_Man     5   &lt;br /&gt;
                  Tank            1                Triscene        1   &lt;br /&gt;
                                                   Xarquid         1 &lt;br /&gt;
            5     Silacoid        1  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;24:&#039;&#039;&#039;   Standing Height - Corresponds to Unitref[049]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;25:&#039;&#039;&#039;   Kneeling Height - Corresponds to Unitref[050]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;26:&#039;&#039;&#039;   Floating Height - Corresponds to Unitref[051]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;27:&#039;&#039;&#039;   [[Damage#Susceptible_to...|Damage Modifier]] Category - Corresponds to Unitref[055]&lt;br /&gt;
&lt;br /&gt;
This field is simply a look-up table, or more directly, a way to categorize the units into similar groups. The actual modifiers are listed elsewhere in the executable. A value of 1 indicates the second DM category, a value of 4 indicates the 5th, etc. The values of 2 and 3 are not seen in the alien stats as they refer to X-COM soldier armor info. I&#039;m not sure about 13 as the Zombie&#039;s stats haven&#039;t been found yet, but there is a category in the DM&#039;s for it.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Category&#039;&#039;&#039;    &#039;&#039;&#039;Unit Type(s)&#039;&#039;&#039;&lt;br /&gt;
     &#039;&#039;&#039;0&#039;&#039;&#039;      Not for units, but is used for Terrain and Items&lt;br /&gt;
     &#039;&#039;&#039;1&#039;&#039;&#039;      Civilian, Sectoid, Celatid, Floater&lt;br /&gt;
     &#039;&#039;&#039;2&#039;&#039;&#039;      Personal Armor&lt;br /&gt;
     &#039;&#039;&#039;3&#039;&#039;&#039;      Power Suit, Flying Suit&lt;br /&gt;
     &#039;&#039;&#039;4&#039;&#039;&#039;      Tanks, Hovertanks&lt;br /&gt;
     &#039;&#039;&#039;5&#039;&#039;&#039;      Snakemen&lt;br /&gt;
     &#039;&#039;&#039;6&#039;&#039;&#039;      Ethereal&lt;br /&gt;
     &#039;&#039;&#039;7&#039;&#039;&#039;      Muton&lt;br /&gt;
     &#039;&#039;&#039;8&#039;&#039;&#039;      Silacoid&lt;br /&gt;
     &#039;&#039;&#039;9&#039;&#039;&#039;      Chryssalid&lt;br /&gt;
    &#039;&#039;&#039;10&#039;&#039;&#039;      Reaper&lt;br /&gt;
    &#039;&#039;&#039;11&#039;&#039;&#039;      Sectopod&lt;br /&gt;
    &#039;&#039;&#039;12&#039;&#039;&#039;      Cyberdisc&lt;br /&gt;
    &#039;&#039;&#039;13&#039;&#039;&#039;      Zombie&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;28:&#039;&#039;&#039;   Psi Skill - Corresponds to Unitref[037]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;29:&#039;&#039;&#039;   Psi Strength - Corresponds to Unitref[057]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;30:&#039;&#039;&#039;   Bravery (encoded) - Corresponds to Unitref[059]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;31:&#039;&#039;&#039;   Motion scanner size - Corresponds to Unitref[061]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;32:&#039;&#039;&#039;   &#039;&#039;1 for Cyberdisc, 0 for all others including TFTD... isn&#039;t &amp;quot;Explodes&amp;quot;; the TFTD Bio-Drone also explodes...&#039;&#039; - Corresponds to Unitref[071]&lt;br /&gt;
&lt;br /&gt;
I edited the Cyberdisc&#039;s field to 0 and checked to see if it exploded. It still did. Obviously this field is for something else. I&#039;ll work on this some more. --[[User:Zombie|Zombie]] 20:15, 15 September 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;33:&#039;&#039;&#039;   &#039;&#039;Unknown - Always 0&#039;&#039;  No Corresponding Unitref offset&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;34:&#039;&#039;&#039;   Corpse type - Corresponds to Unitref[038]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;35:&#039;&#039;&#039;   Big unit (2x2)  No Corresponding Unitref offset&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;36:&#039;&#039;&#039;   Victory point score - Corresponds to Unitref[039]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;37:&#039;&#039;&#039;   Aggression - Corresponds to Unitref[044]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;38:&#039;&#039;&#039;   Intelligence - Corresponds to Unitref[073]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This data was just put together working heavily with Zombie and his great SC [http://www.strategycore.co.uk/xcom/pg/ufoalienstats alien stats] page.&lt;br /&gt;
&lt;br /&gt;
= Country Labels =&lt;br /&gt;
Starting at offset 396480 (hex: 0x60CC0) are the records that contain the location of the labels for the country names on the world. In order they are X, Y, and English.dat index all signed short integers (6 bytes for each record). X should never be negative but between 0 and 2880, Y should be between -720 and 720 (See [[WORLD.DAT]]). The English.dat file, despite all other array indexes appears to start at 1 and not 0, thus a value of 611 in here represents index 610 in a zero based English.dat array. (It stands to reason that these work for the other language files as well)&lt;br /&gt;
&lt;br /&gt;
= File Templates =&lt;br /&gt;
There appears to be &#039;templates&#039; of some of the [[Saved Game Files|game files]] stored within this executable. Makes sense as initially no saved game files are present when installed. Here is a list of known positions and the corresponding file. Offsets are from DOS Version of the game patched with XComUtil&lt;br /&gt;
{| {{StdDescTable}}&lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
! Offset (Hex) !! Offset (Dec) !! Length (Bytes) !! File&lt;br /&gt;
|-&lt;br /&gt;
| 5AB28 || 371496 || 2112|| [[RESEARCH.DAT]]&lt;br /&gt;
|-&lt;br /&gt;
| 5B5E0 || 374240 ||  272|| [[FACIL.DAT]]&lt;br /&gt;
|-&lt;br /&gt;
| 5B6F0 || 374512 || 1820|| [[PURCHASE.DAT]] &lt;br /&gt;
|-&lt;br /&gt;
| 5D894 || 383124 || 576 || [[DIPLOM.DAT]]&lt;br /&gt;
|-&lt;br /&gt;
| 5E48C || 386188 || 1392|| [[UP.DAT]]&lt;br /&gt;
|-&lt;br /&gt;
| 5EB90 || 387984 ||   84|| [[ACTS.DAT]]&lt;br /&gt;
|-&lt;br /&gt;
| 5FAC0 || 391872 || 2336|| [[BASE.DAT]] &lt;br /&gt;
|-&lt;br /&gt;
| 5FBB8 || 392120 || 5200|| [[CRAFT.DAT]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
* [[TACTICAL.EXE]] - Sister executable used for Turn based strategy (merged with geoscape.exe in WinCE edition)&lt;br /&gt;
* [[UNITREF.DAT]] - Stats on current units (both XCOM and Alien) in play&lt;br /&gt;
* [[Saved Game Files]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Files]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=PURCHASE.DAT&amp;diff=12088</id>
		<title>PURCHASE.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=PURCHASE.DAT&amp;diff=12088"/>
		<updated>2007-07-16T22:07:54Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: /* Structure */  offset 16&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== General Notes ==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
There are 91 entries, each of which is 20 bytes long, for a total of 1,820 bytes long.  &lt;br /&gt;
&lt;br /&gt;
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&#039;t seem to use (UFO Construction, Alien Reproduction, and Alien Habitat.)&lt;br /&gt;
&lt;br /&gt;
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-&amp;gt;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. &lt;br /&gt;
&lt;br /&gt;
Values are presented according to offset (0 to 19) in &amp;lt;b&amp;gt;bold&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0 (1 Byte):&#039;&#039;&#039; Item Category:&lt;br /&gt;
   0 General Item...basically, anything not Personnel or Crafts&lt;br /&gt;
   1 X-Com Craft&lt;br /&gt;
   2 Soldier&lt;br /&gt;
   3 Scientist&lt;br /&gt;
   4 Engineer&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1 (1 Byte):&#039;&#039;&#039; Sort Order (or Index, [[#Notes on Sorting|see below]]): for General Items(Item Category=0), this value seems to control sort order on the Base Information-&amp;gt;Stores screen (only General Items appear there.)&lt;br /&gt;
   00-42 &#039;Human&#039; Items...all purchaseable equipment, all Craft weapons/ammo, all HWPs, Lasers,&lt;br /&gt;
         Motion Scanner, Medikit, and PsiAmp&lt;br /&gt;
   43-48 Not Used&lt;br /&gt;
   49-59 Alien Weapons/Ammo...Heavy Plasma through Alien Grenade&lt;br /&gt;
   60-61 E-115 &amp;amp; Mind Probe...Alien Non-Weapon items that can be picked up in Battlescape?&lt;br /&gt;
   62-64 Not Used&lt;br /&gt;
   65-75 Alien Corpses&lt;br /&gt;
   76-79 Not Used&lt;br /&gt;
   80-89 Alien Items...UFO Power Source through Alien Habitat&lt;br /&gt;
   90-92 Armor...Personal Armor, Power Suit, Flying Suit&lt;br /&gt;
   93-95 HWP Ammo...HWP Cannon Shells, HWP Rockets, HWP Fusion Bomb&lt;br /&gt;
For Personnel, this value is &#039;0&#039;, while for Crafts, it indicates Craft Type:&lt;br /&gt;
   0 Skyranger&lt;br /&gt;
   1 Lightning&lt;br /&gt;
   2 Avenger&lt;br /&gt;
   3 Interceptor&lt;br /&gt;
   4 Firestorm&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2-5 (4 Bytes):&#039;&#039;&#039; These four bytes are set to [E8 03 00 00] (=1000) for all entries except manufactured Crafts (Firestorm, Lightning, Avenger)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;6-9 (4 Bytes):&#039;&#039;&#039; Item Cost (buy price) if Purchaseable. Curiously, starting with entry 56 (Heavy Plasma Clip), set to [E8 03 00] (=1000) for the remainder of entries (none of which is normally purchaseable.) Not sure why, or why it didn&#039;t start with entry 55 (Heavy Plasma), the first &#039;pure&#039; alien item in the file. Needs more research...&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10-13 (4 Bytes):&#039;&#039;&#039; Item Selling Price.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14 (1 Byte):&#039;&#039;&#039; Transfer time for new purchases, in hours. All items have this value, even manufacture-only and alien items, and it is usually a multiple of 24 (=1 day):&lt;br /&gt;
   96 for most Crafts, HWPs, and Craft Cannon Rounds&lt;br /&gt;
   72 for Skyranger and Personnel hires&lt;br /&gt;
   48 for Craft Weapons and Ammo (ex. Cannon Rounds), HWP Ammo, and non-Battlescape Alien Items&lt;br /&gt;
   32 for Alien Corpses and X-Com Armor&lt;br /&gt;
   24 for everything else&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;15:&#039;&#039;&#039; Set to 00 (0) for all entries. It&#039;s possible that it is the high bit for transfer time, but editing this doesn&#039;t change anything...&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;16:&#039;&#039;&#039; Usually set to 0, but seems to hold the quantity purchased last time (i.e. will be set to 5 on grenades if you just bought 5 of them). Unsure when this gets cleared, and unsure why it is saved. Probably because they just used the same structure as in the Purchase screen in saving this file. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;17:&#039;&#039;&#039; Appears to always be set to 00, high bit for offset 16? Can you buy more than 255 items at a time? (My guess is yes as you can transfer more than 255 elerium at a time...)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;18 (1 Byte):&#039;&#039;&#039; Purchase-ability flag: 1 for everything that you can buy on the Purchase/Recruit screen, 0 for everything else&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;19 (1 Byte):&#039;&#039;&#039; Set to [00] (0) for all entries&lt;br /&gt;
&lt;br /&gt;
Only the Purchaseability and &#039;Manufactured&#039; craft flags the only thing worth looking into more. --&#039;&#039;[[User:Pi Masta|Pi Masta]] 15:14, 8 February 2007 (PST)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Entry Index ==&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
{| {{StdDescTable}} &lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
! # !! Item&lt;br /&gt;
|- &lt;br /&gt;
|  0||Soldier             &lt;br /&gt;
|-&lt;br /&gt;
|  1||Scientist           &lt;br /&gt;
|-&lt;br /&gt;
|  2||Engineer            &lt;br /&gt;
|-&lt;br /&gt;
|  3||Skyranger           &lt;br /&gt;
|-&lt;br /&gt;
|  4||Lightning           &lt;br /&gt;
|-&lt;br /&gt;
|  5||Avenger             &lt;br /&gt;
|-&lt;br /&gt;
|  6||Interceptor         &lt;br /&gt;
|-&lt;br /&gt;
|  7||Firestorm           &lt;br /&gt;
|-&lt;br /&gt;
|  8||Stingray Launcher   &lt;br /&gt;
|-&lt;br /&gt;
|  9||Avalanche Launcher  &lt;br /&gt;
|-&lt;br /&gt;
| 10||Cannon              &lt;br /&gt;
|-&lt;br /&gt;
| 11||Fusion Ball Launcher&lt;br /&gt;
|-&lt;br /&gt;
| 12||Laser Cannon        &lt;br /&gt;
|-&lt;br /&gt;
| 13||Plasma Beam         &lt;br /&gt;
|-&lt;br /&gt;
| 14||Stingray Missile    &lt;br /&gt;
|-&lt;br /&gt;
| 15||Avalanche Missile   &lt;br /&gt;
|-&lt;br /&gt;
| 16||Cannon Rounds[x50]  &lt;br /&gt;
|-&lt;br /&gt;
| 17||Fusion Ball         &lt;br /&gt;
|-&lt;br /&gt;
| 18||Tank/Cannon         &lt;br /&gt;
|-&lt;br /&gt;
| 19||HWP Cannon Shells   &lt;br /&gt;
|-&lt;br /&gt;
| 20||Tank/Rocket         &lt;br /&gt;
|-&lt;br /&gt;
| 21||HWP Rockets         &lt;br /&gt;
|-&lt;br /&gt;
| 22||Tank/Laser Cannon   &lt;br /&gt;
|-&lt;br /&gt;
| 23||Hovertank/Plasma    &lt;br /&gt;
|-&lt;br /&gt;
| 24||Hovertank/Launcher  &lt;br /&gt;
|-&lt;br /&gt;
| 25||HWP Fusion Bomb     &lt;br /&gt;
|-&lt;br /&gt;
| 26||Pistol              &lt;br /&gt;
|-&lt;br /&gt;
| 27||Pistol Clip         &lt;br /&gt;
|-&lt;br /&gt;
| 28||Rifle               &lt;br /&gt;
|-&lt;br /&gt;
| 29||Rifle Clip          &lt;br /&gt;
|}&lt;br /&gt;
|&lt;br /&gt;
{| {{StdDescTable}} &lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
! # !! Item&lt;br /&gt;
|-&lt;br /&gt;
| 30||Heavy Cannon        &lt;br /&gt;
|-&lt;br /&gt;
| 31||HC-AP Ammo          &lt;br /&gt;
|-&lt;br /&gt;
| 32||HC-HE Ammo          &lt;br /&gt;
|-&lt;br /&gt;
| 33||HC-I Ammo           &lt;br /&gt;
|-&lt;br /&gt;
| 34||Auto-Cannon         &lt;br /&gt;
|-&lt;br /&gt;
| 35||AC-AP Ammo          &lt;br /&gt;
|-&lt;br /&gt;
| 36||AC-HE Ammo          &lt;br /&gt;
|-&lt;br /&gt;
| 37||AC-I Ammo           &lt;br /&gt;
|-&lt;br /&gt;
| 38||Rocket Launcher     &lt;br /&gt;
|-&lt;br /&gt;
| 39||Small Rocket        &lt;br /&gt;
|-&lt;br /&gt;
| 40||Large Rocket        &lt;br /&gt;
|-&lt;br /&gt;
| 41||Incindiary Rocket   &lt;br /&gt;
|-&lt;br /&gt;
| 42||Laser Pistol        &lt;br /&gt;
|-&lt;br /&gt;
| 43||Laser Rifle         &lt;br /&gt;
|-&lt;br /&gt;
| 44||Heavy Laser         &lt;br /&gt;
|-&lt;br /&gt;
| 45||Grenade             &lt;br /&gt;
|-&lt;br /&gt;
| 46||Smoke Grenade       &lt;br /&gt;
|-&lt;br /&gt;
| 47||Proximity Grenade   &lt;br /&gt;
|-&lt;br /&gt;
| 48||High Explosive      &lt;br /&gt;
|-&lt;br /&gt;
| 49||Motion Scanner      &lt;br /&gt;
|-&lt;br /&gt;
| 50||Medi-Kit            &lt;br /&gt;
|-&lt;br /&gt;
| 51||Psi-Amp             &lt;br /&gt;
|-&lt;br /&gt;
| 52||Stun Rod            &lt;br /&gt;
|-&lt;br /&gt;
| 53||Electro-flare       &lt;br /&gt;
|-&lt;br /&gt;
| 54||Elerium-115         &lt;br /&gt;
|-&lt;br /&gt;
| 55||Heavy Plasma        &lt;br /&gt;
|-&lt;br /&gt;
| 56||Heavy Plasma Clip   &lt;br /&gt;
|-&lt;br /&gt;
| 57||Plasma Rifle        &lt;br /&gt;
|-&lt;br /&gt;
| 58||Plasma Rifle Clip   &lt;br /&gt;
|-&lt;br /&gt;
| 59||Plasma Pistol       &lt;br /&gt;
|}&lt;br /&gt;
|&lt;br /&gt;
{| {{StdDescTable}} &lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
! # !! Item&lt;br /&gt;
|-&lt;br /&gt;
| 60||Plasma Pistol Clip&lt;br /&gt;
|-&lt;br /&gt;
| 61||Blaster Launcher&lt;br /&gt;
|-&lt;br /&gt;
| 62||Blaster Bomb&lt;br /&gt;
|-&lt;br /&gt;
| 63||Small Launcher&lt;br /&gt;
|-&lt;br /&gt;
| 64||Stun Bomb&lt;br /&gt;
|-&lt;br /&gt;
| 65||Alien Grenade&lt;br /&gt;
|-&lt;br /&gt;
| 66||Mind Probe&lt;br /&gt;
|-&lt;br /&gt;
| 67||Sectoid Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 68||Snakeman Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 69||Ethereal Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 70||Muton Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 71||Floater Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 72||Celatid Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 73||Silacoid Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 74||Chryssalid Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 75||Reaper Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 76||Sectopod Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 77||Cyberdisk Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 78||UFO Power Source&lt;br /&gt;
|-&lt;br /&gt;
| 79||UFO Navigation&lt;br /&gt;
|-&lt;br /&gt;
| 80||UFO Construction&lt;br /&gt;
|-&lt;br /&gt;
| 81||Alien Food&lt;br /&gt;
|-&lt;br /&gt;
| 82||Alien Reproduction&lt;br /&gt;
|-&lt;br /&gt;
| 83||Alien Entertainment&lt;br /&gt;
|-&lt;br /&gt;
| 84||Alien Surgery&lt;br /&gt;
|-&lt;br /&gt;
| 85||Examination Room&lt;br /&gt;
|-&lt;br /&gt;
| 86||Alien Alloys&lt;br /&gt;
|-&lt;br /&gt;
| 87||Alien Habitat&lt;br /&gt;
|-&lt;br /&gt;
| 88||Personal Armour&lt;br /&gt;
|-&lt;br /&gt;
| 89||Power Suit&lt;br /&gt;
|}&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
{| {{StdDescTable}} &lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
! # !! Item&lt;br /&gt;
|-&lt;br /&gt;
| 90||Flying Suit&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes on Sorting ==&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; Based on some hacking of [[GEOSCAPE.EXE]], the &#039;sort&#039; value appears to be an index to arrays. See [[User:Pi Masta#Base Items store space|User:Pi Masta]] for more details.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1)&#039;&#039;&#039; 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 &#039;Sort Order&#039; (offset 1) value as well, but are displayed as Fusion Ball Launcher, Laser Cannon, Plasma Beam on the screens)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2)&#039;&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3)&#039;&#039;&#039; 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)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4)&#039;&#039;&#039; Finally, on the Base Information-&amp;gt;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.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
* [[BASE.DAT]] - Items bases have in stores&lt;br /&gt;
* [[OBDATA.DAT]] - Stats on most of the items listed here&lt;br /&gt;
* [[TRANSFER.DAT]] - Items being transfered to bases including purchased items&lt;br /&gt;
* [[Saved Game Files]]&lt;br /&gt;
[[Category:Game Files]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:XcomUtil&amp;diff=12087</id>
		<title>Talk:XcomUtil</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:XcomUtil&amp;diff=12087"/>
		<updated>2007-07-16T19:09:12Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: /* New development */  reply&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Misc ==&lt;br /&gt;
There&#039;s still a lot more stuff that could be added here. Also, I&#039;ve never used some of the flags mentioned, especially those concerning Geoscape/Game executable. More info from those who have used them would be nice. &lt;br /&gt;
&lt;br /&gt;
[[User:Hobbes|Hobbes]] 07:56, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
== Difficulty Bug ==&lt;br /&gt;
&lt;br /&gt;
are there any standalone patches the fix the difficulty bug, or does one just copy over the geoscape.exe file to a new Xcom folder once its patched by using XcomUtil 9becuase of no other alternatives... as you can see, I&#039;m not a fan of it).&lt;br /&gt;
&lt;br /&gt;
I don&#039;t know about any patches that fix the difficulty bug. BladefireLight has made a patch that changes the craft back to their original configuration. It can be found [http://www.xcomufo.com/forums/index.php?showtopic=8656 here at the XcomUtil forums]&lt;br /&gt;
&lt;br /&gt;
[[User:Hobbes|Hobbes]] 18:59, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
The difficulty bug is only found in XCOM 1.0, and is fixed with the XCOM 1.4 patch, isn&#039;t it?&lt;br /&gt;
&lt;br /&gt;
---[[User:MikeTheRed|MikeTheRed]] 20:16, 9 Nov 2005 (PST)&lt;br /&gt;
&lt;br /&gt;
Unfortunately, no. For the PC, the difficutly bug is only officially fixed in the Windows port - or as I like to call it, 1.4ce. &lt;br /&gt;
&lt;br /&gt;
P. S, it also pays to look at the header whenever posting anything onto the wiki to see if your cookies have let you down and your automatic login setting has been unchecked. This avoids your handle from turning into a mere user IP. &lt;br /&gt;
&lt;br /&gt;
- [[User:NKF|NKF]]&lt;br /&gt;
&lt;br /&gt;
== Backups of .rmp files ==&lt;br /&gt;
Hey, I wrote up a thingo about the patched geoscape.exe. I&#039;m not sure about the edited Xcom base tiles though, i guess the backups would be called XBASE##.XCU, and the edited, corrected tiles would be XBASE##.MAP. I&#039;m not sure on this because there are *.RMP files within the MAPS folder. Has anyone played around with cutting and pasting things and found out which ones to move to a new fresh install of the game? Thx [[User:EsTeR|EsTeR]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
The RMP files are the files used by the AI and I don&#039;t think XcomUtil changes those, so the backup .xcu files are the older .map files. &lt;br /&gt;
&lt;br /&gt;
[[User:Hobbes|Hobbes]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:EsTeR|EsTeR]]: Ok, i&#039;ll look into it. Just always thought that RMP go in the routes folder, and maps in maps folder. Yet, there seems to be both types in the maps folder. I guess i&#039;ll have a play when i swap puters to fire up Xcom1.&lt;br /&gt;
&lt;br /&gt;
== Is there an X-COM mod editor? ==&lt;br /&gt;
&lt;br /&gt;
Is there something out there that lets people do their own mods to the game, such as changing/adding/removing weapons, technology trees, graphics, etc?&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
There&#039;s at least one editor that allow to change the weapons: http://www.jennana.com/projects/xcomed.php. &lt;br /&gt;
As for the graphics/maps the only way to do it is manually. &lt;br /&gt;
&lt;br /&gt;
[[User:Hobbes|Hobbes]] 18:18, 13 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== RMP files ==&lt;br /&gt;
&lt;br /&gt;
Xcomutil does modify the rmp files when generating ship layouts. it just backs up all of them by default.&lt;br /&gt;
&lt;br /&gt;
--[[User:BladeFireLight|BladeFireLight]] 21:50, 15 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== end of development ==&lt;br /&gt;
&lt;br /&gt;
Should we note that Scott has oficialy stated he will no longer be deloping xcomutil?&lt;br /&gt;
&lt;br /&gt;
--[[User:BladeFireLight|BladeFireLight]] 21:53, 15 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
Done. &lt;br /&gt;
&lt;br /&gt;
[[User:Hobbes|Hobbes]] 07:28, 16 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== New development ==&lt;br /&gt;
Where do we write to discuss new development? In particular, I just found out that the EQL flag to generate an equipment list can only be done on turn 1 -- and it took me a couple of turns moving equipment around inside the craft before I had everyone at the right cargo level (no one overloaded).&lt;br /&gt;
--[[User:Keybounce|Keybounce]] 00:31, 12 July 2007 (PDT)&lt;br /&gt;
:: You can try here at these forums [http://www.xcomufo.com/forums/index.php?showforum=79| XCOMUFO], most of us have accounts there as well. [[User:Pi Masta|Pi Masta]] 12:09, 16 July 2007 (PDT)&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=User:Pi_Masta&amp;diff=12081</id>
		<title>User:Pi Masta</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=User:Pi_Masta&amp;diff=12081"/>
		<updated>2007-07-10T00:09:02Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: /* Files to be Decoded */  xbases.dat and retaliations..?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Alright I finally created this page. Tired of seeing so much red on the Recent Changes page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Um, I like computers and math (hence Pi) and of course XCOM or I wouldn&#039;t be here. Just something about the gameplay and concept of the game intrigues me.&lt;br /&gt;
&lt;br /&gt;
==PyXcom==&lt;br /&gt;
I&#039;m hoping to get a possible &#039;free-for-all&#039; editor going in python. I had success getting an old version of Python to work in DOSBox, though it&#039;s not very stable. I&#039;m working on a &#039;back-end&#039; (currently dubbed PyXcom) for all the saved game files so applications would just have to worry about what values to put in and not formatting the file correctly, giving it a more &#039;pythonic&#039; interface. Could still use work, but I have a simple class that can read and write .DAT files (really any fixed-length files), and is somewhat simple to add new fields as values in files are discovered.&lt;br /&gt;
&lt;br /&gt;
From this I could make a Tk/Tcl version that would require a much later version of Python to do editing on modern machines (including *nix, and probably Mac). This would probably do more in depth editing, of say the bases, stats of objects or soldiers, etc. &lt;br /&gt;
&lt;br /&gt;
Before that I think I&#039;ll make a DOS friendly version (aka command prompt, maybe keyboard selection) that could implement changes (I&#039;m thinking of making a better soldier equip screen that runs before going into tactical, downside is I don&#039;t it will be easy to display images). &lt;br /&gt;
&lt;br /&gt;
Another idea I have is to make a Monitoring program (PyXMon?) that can watch the save game and MISSDAT directories and apply patches to them automattically. The main use this would have is renaming soldiers since it is impossible to have an App, like XcomUtil,rename them after combat (GEOSCAPE updates the stats then), instead you could save your game, possibly wait a second or 2 and then reload it. The monitoring program will catch the new save game and apply the fix. This would also go with the &#039;Finished&#039; Dirt Modules bug, though handling that between battles would probably be enough. Another application would be for Data Miners to have the scripts automattically output data from files (in a more readable format) on saves, for instance Zombie&#039;s initial Funds data could have had a script written in python to automatically append a file with the data about the countries.&lt;br /&gt;
&lt;br /&gt;
I have too many ideas, and most likely I won&#039;t complete these projects, but I hope to get close. I&#039;m updating this Wiki for the most part on the files, and trying to crack some of the others.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
I have almost all decoded files supported (with the exception of graphic files which I don&#039;t intend to directly load) and I&#039;ve started on making a layer on top of it. Namely BaseInfo, SoldierInfo, LocInfo, and CraftInfo that can all be connected together and I have made a &#039;master&#039; module to do this given a directory for it to load from. Let me give some examples:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; t = Geoscape(&#039;missdat&#039;)&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; t.base[0].name&lt;br /&gt;
 &#039;Main&#039;&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for x in t.base[0].soldiers:&lt;br /&gt;
         print x&lt;br /&gt;
 D Likhachev (r)aBRst (Rookie)&lt;br /&gt;
 F Robinson (r)aRbr (Rookie)&lt;br /&gt;
 Evans TU (C)C-AC*ST* (Captain)&lt;br /&gt;
 .......&lt;br /&gt;
 Sarah Watson (r)arbrst (Rookie)&lt;br /&gt;
 Ed Kemp SACK (Rookie)&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for x in t.loc.used:&lt;br /&gt;
         print x, &#039;:&#039;,  x.data	&lt;br /&gt;
 Loc[0] - XCOM Base : Base 0: Main&lt;br /&gt;
 Loc[1] - XCOM Ship : Skyranger-1&lt;br /&gt;
 Loc[2] - XCOM Ship : Interceptor-1&lt;br /&gt;
 Loc[3] - XCOM Ship : Interceptor-4&lt;br /&gt;
 Loc[4] - XCOM Base : Base 1: Asia&lt;br /&gt;
 Loc[5] - Crash Site : Large Scout-51&lt;br /&gt;
 Loc[6] - XCOM Base : Base 2: America&lt;br /&gt;
 Loc[7] - XCOM Ship : Interceptor-5&lt;br /&gt;
 ... &lt;br /&gt;
 Loc[15] - Alien Base : None&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; t.loc[5].data.damage #The crashed large scout&lt;br /&gt;
 150&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for x in t.loc[1].data.soldiers: #Skyranger 1&#039;s soldiers&lt;br /&gt;
         print x, &#039;;&#039;,	&lt;br /&gt;
 D Likhachev (r)aBRst (Rookie) ; F Robinson (r)aRbr (Rookie) ; Evans TU (C)C-AC*ST* (Captain) ; Robinson TU (Co)ACrbr*ST* (Colonel);&lt;br /&gt;
 C Dodge (S)*AC*Rbrst (Seargent) ; Yuzo Kojima SACK (Rookie) ; K Okamoto (r)W-ACr (Rookie) ; Yataka Shoji (r)C-st (Rookie) ; &lt;br /&gt;
 Austin King SACK (Rookie) ; Y Matsumara (r)C-W-ACR (Rookie) ;&lt;br /&gt;
&lt;br /&gt;
And now to show that you can chain these together. This one get&#039;s the second LOC.DAT entry (which is skyranger-1), grabs its data (the skyranger craft itself), gets the craft&#039;s second soldier (remember is all 0-based), then his/her base, that base&#039;s location, that location&#039;s data (which just goes back to the base), that base&#039;s last soldier, and then that soldier&#039;s name.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; t.loc[1].data.soldiers[1].base.loc.data.crafts[0].soldiers[-1].name&lt;br /&gt;
 &#039;Y Matsumara (r)C-W-ACR&#039;&lt;br /&gt;
&lt;br /&gt;
This is all just the tip of the iceberg!&lt;br /&gt;
&lt;br /&gt;
Right now I just have mostly Geoscape stuff made for use. The Tactical saves can be manipulated but there&#039;s no referencing other files or what not. So far there is no GUI. This is intentional as it is mean to run at the command prompt with XCOM if possible. I might whip up a generated GUI using tkinter, one that just makes fields based on the information from these class objects (read: not going to look pretty). But right now I think I&#039;m going to get on to the Tactical files (the main ones, OBREF, UNITREF, etc).&lt;br /&gt;
&lt;br /&gt;
Oh and I do have a stat string generator that is very customizeable, although probably not as simplistic.&lt;br /&gt;
&lt;br /&gt;
I also now have a simple graphical soldier equipment utility to possibly replace the ingame initial equipment screen.&lt;br /&gt;
&lt;br /&gt;
===As a tool===&lt;br /&gt;
I&#039;ve whipped up a handy file monitoring script that will run a function when a file is modified. With this I can have it automatically apply patches or fix issues whenever a game is saved. Also it could be possible with modification of the batch file that switches between Tactical and Geoscape to have it add or even replace parts of the game. (I&#039;m trying to get a soldier editor, but there&#039;s a few issues I have to work out)&lt;br /&gt;
&lt;br /&gt;
Mainly though, I can use this monitoring process to help figure out what certain bytes mean. For example when I was looking for what offset 12 does for [[OBPOS.DAT]], I simply monitored one of my save folder&#039;s obpos.dat file. Whenever it changed my script would parse the information and compare it to the last known information (rather quickly too might I add), it then printed to a seperate console the results as well as appending it to a log file. I even added more functionality by having it read the [[SAVEINFO.DAT]] file to get the save name, thus I could put some comments on what I did while I saved. Put this all together and I could see what happened to the files (or what parts I want to know about) as often as I saved, no need to alt-tab out and run a script.&lt;br /&gt;
&lt;br /&gt;
==[[LEASE.DAT]]==&lt;br /&gt;
some working notes on lease.dat&lt;br /&gt;
&lt;br /&gt;
fixed length of 180 bytes, prime factorization of 180:&lt;br /&gt;
 2^2 * 3^2 * 5, &lt;br /&gt;
&lt;br /&gt;
factors of 180: (probable line widths)&lt;br /&gt;
 2, 3, 4, 5, 6, 9, 10, 12, 15, 18, 20, 30, 36, 45, 60, 90, 180&lt;br /&gt;
&lt;br /&gt;
only offsets that seem to change (out of about 14 files) (&#039;&#039;compared from 1st to 14 others, but not 2nd or 3rd etc with the other 14 so could be more&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
 0-1,  5-17,  20-23,  26-28,  32-35,  38-41,  44-47,  50-53,  56-59,  62-65,  68-71,  74-77,  80-83,  86-89,  &lt;br /&gt;
 92-95,  98-101,  104-107,  110-113,  116-119,  122-125,  128-131,  134-137,  140-142,  146-149,  152-155,  &lt;br /&gt;
 158-161,  164-167,  170-173,&lt;br /&gt;
&lt;br /&gt;
There is a lot of symmetry in this format, lots of double 0&#039;s will line up at the line widths of the factors, with the exception of the very first byte, almost as if the first record is somehow different...&lt;br /&gt;
&lt;br /&gt;
* 13 Seems to be 0 for saves, 1 after combat and in missdat, 2 only for before combat, but I&#039;ve seen this number change in Geoscape saves, particularly when intercepting craft&lt;br /&gt;
&lt;br /&gt;
===Speculation===&lt;br /&gt;
LEASE as the name of this file makes me think of it pertaining to either:&lt;br /&gt;
* Purchased craft monthly (shouldn&#039;t need this much data)&lt;br /&gt;
* Base monthly costs&lt;br /&gt;
The &#039;orange&#039; set of values seems to be the most popular and &#039;simple&#039;.&lt;br /&gt;
&lt;br /&gt;
From tests using PyXCOM of over 70 saves, this file seems to change most often when a UFO is detected or an interceptor is launched at it. &lt;br /&gt;
&lt;br /&gt;
==Base Items store space==&lt;br /&gt;
I dug into GEOSCAPE.EXE and found the pattern of sizes like that listed on the stores page (offset 0x5DB34). However it different some areas, namely the HWP ammo was not with the actual HWPs. Also interesting was that there were gaps of 0&#039;s between some items, usually from the different groups like craft weapons, to agent weapons, to alien weapons, etc.&lt;br /&gt;
&lt;br /&gt;
I got to looking at [[PURCHASE.DAT]] as this seemed to be the only logical place for size information to be. Of particular interest was the so called &#039;sort&#039; order offset. I really doubted the programmers devoted a byte to help &#039;sort&#039; the information for display, but given what could be gleaned from that file alone it was a good guess. I&#039;m pretty sure it&#039;s an index (which technically does sort it) to at least one array (I surmise others below). I used some python scripts to read in a Purchase.dat file and a hex editor to find the pattern in geoscape.exe. &lt;br /&gt;
&lt;br /&gt;
Simply by placing the values in an array and having each item in purchase.dat use it&#039;s &#039;sort&#039; value to fetch the record in the array, everything matched up, well almost. The plasma beam and Fusion Ball Launcher were backwards (plasma had 20 space while fusion had 12). I almost gave up but then I thought what if the order is wrong? There isn&#039;t much info linking to what item a record is in that file, but I looked at the sell price. Turns out I was right, the sell price of the Fusion Ball Launcher is well known as it&#039;s the second runner up for [[Manufacturing Profitability]].&lt;br /&gt;
&lt;br /&gt;
===Other Possibilities===&lt;br /&gt;
These items have to index to English.dat somewhere (probably in the executable). My guess is that it is near the array that I found. There is probably other information such as the craft weapon statistics. The gaps between these indexes might make it possible to add new items to the game as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[INTER.DAT]]==&lt;br /&gt;
Took a stab at this file. I believe it deals with interceptions based on the name and that it changed whenever I attacked a UFO with an interceptor. However it is 568 bytes with a factorization of:&lt;br /&gt;
 2 * 2 * 2 * 71&lt;br /&gt;
Which baffles me because 71, 142, or 248 seem like weird lengths. I don&#039;t know of anything relating to these numbers in X-COM.&lt;br /&gt;
&lt;br /&gt;
I observed one set of changes that is interesting:&lt;br /&gt;
 0246: 000 ( 0) -&amp;gt; 008 ( 8)&lt;br /&gt;
 0248: 000 ( 0) -&amp;gt; 090 (5A)&lt;br /&gt;
 0388: 000 ( 0) -&amp;gt; 008 ( 8)&lt;br /&gt;
 0390: 000 ( 0) -&amp;gt; 090 (5A)&lt;br /&gt;
 0530: 000 ( 0) -&amp;gt; 008 ( 8)&lt;br /&gt;
 0532: 000 ( 0) -&amp;gt; 090 (5A)&lt;br /&gt;
&lt;br /&gt;
This appeared right after I downed a UFO in Brazil (Snakeman Large Scout on Retaliation) along with some other changes, but this set caught my eye because of the repetition, but more when I found that 388 - 246 = 142, and 530 - 388 = 142, with the significance of 142 being one of the factors of file size (2*71 = 142 -&amp;gt; 142 * 4 = 568)&lt;br /&gt;
&lt;br /&gt;
Also observed offsets 32 and 33 jump from 0&#039;s to 254 and 255 respectively and back. 30 and 31 changed somewhat but appears unrelated with the value of 32 and 33. So my guess is 4 sets of 142 bytes, with 71 2-byte values inside of each set. &lt;br /&gt;
&lt;br /&gt;
Perhaps this file is suppose to save the state of interceptions as they happen so they could be restored upon loading (which we all know crashes the game). Perhaps an adjustment could be made to this file to allow it to work, just like with the Difficulty bug and &lt;br /&gt;
&lt;br /&gt;
I might have to check this, but I think the maximum number of interceptions you can have minimized is 4, so possibly this file keeps track of each one.&lt;br /&gt;
[[IGLOB.DAT]].&lt;br /&gt;
&lt;br /&gt;
== Files to be Decoded ==&lt;br /&gt;
Here I&#039;m going to list some files that need values to be decoded. Some of them it might not be possible as a lot of the values are set to 0. Namely the MISDATA, MISSION, MISSION2 as they all use the same format but are used at different stages of the game.&lt;br /&gt;
&lt;br /&gt;
* [[MISDATA.DAT]] (and [[MISSION.DAT]], [[MISSION2.DAT]]) - probably should combine into 1 page with sections detailing what is and is not in each name&lt;br /&gt;
* [[GEODATA.DAT]] - 92 Bytes, but we only have about 10 of them decoded. I think this is what is used to generate new battlescapes, but I think it&#039;s GEOSCAPE that actually generates the [[MAP.DAT]] file - &amp;lt;i&amp;gt;Interestingly, the map only gets saved to disk if you manually save the game. Hence the GeoScape engine never touches it, though it &amp;lt;b&amp;gt;does&amp;lt;/b&amp;gt; dictate where your craft ends up. - [[User:Bomb Bloke|Bomb Bloke]] 21:22, 9 June 2007 (PDT)&amp;lt;/i&amp;gt;&lt;br /&gt;
* [[LOC.DAT]] - Some unknown values&lt;br /&gt;
* &#039;&#039;&#039;Little to nothing known&#039;&#039;&#039;&lt;br /&gt;
** [[XBASES.DAT]] - XCOM Base(s) targeted for retaliation possibly. On saves just before a base defense mission a single byte was set to 1, all other saves have nothing but 0&#039;s in them.&lt;br /&gt;
:::: Each entry is 4 bytes long, and consists of 2 seperate 2 byte values. What do they do, no idea. --[[User:Darkfred|Darkfred]] 08:23, 11 June 2007 (PDT)&lt;br /&gt;
** [[INTER.DAT]] - Stores info on interceptions? - Pretty sure on this&lt;br /&gt;
:::: 4 entries each 142 bytes. I think byte 0 of each is a boolean that closes the intercept window, need to test. --[[User:Darkfred|Darkfred]] 08:23, 11 June 2007 (PDT)&lt;br /&gt;
** [[AKNOW.DAT]] - Perhaps what the Aliens Know, as in which bases for retals&lt;br /&gt;
** [[LEASE.DAT]]&lt;br /&gt;
:::: My Guess, current position and zoom of the geoscape map ball. I remember testing this a while back and bytes 12-13 seemed to control zoom, but only if set to specific values. 120, 720 etc. --[[User:Darkfred|Darkfred]] 08:23, 11 June 2007 (PDT)&lt;br /&gt;
::::: Well that explains why the file seemed to change when a UFO was detected as I always centered on it and usually moved the globe to track it while it was flying around, lol. Still leaves many bytes unknown though... Thanks a lot for your help Darkfred! [[User:Pi Masta|Pi Masta]] 11:54, 9 July 2007 (PDT)&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=UFO_Flight_Patterns&amp;diff=12080</id>
		<title>UFO Flight Patterns</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=UFO_Flight_Patterns&amp;diff=12080"/>
		<updated>2007-07-10T00:04:52Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: comments and possible use of xbases.dat&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(&amp;lt;i&amp;gt;Zaimoni&amp;lt;/i&amp;gt;: Some working notes.  This plausibly should be moved to mainline when sufficiently detailed.  While I do use MISSIONS.DAT notation to index the UFOs, this does not belong there.)&lt;br /&gt;
&lt;br /&gt;
Common observations:&lt;br /&gt;
* In spite of the game having precomputed trig functions at 1/8 &amp;amp;deg; resolution, the &amp;quot;turning points&amp;quot; are not nearly so densely packed.  (I suspect a sparse latitude-longitude grid, or an explicit valid list somewhere.)  It should be possible to identify the precise intermediate destination in-game, at least when it&#039;s near the equator and not at the same latitude.  UFOs are notably slower at turning points.&lt;br /&gt;
* The current waypoint appears consistent between saves.  Later ones in the sequence aren&#039;t (some question about Retaliation missions)&lt;br /&gt;
* When a UFO leaves its target region, it&#039;s leaving for good.&lt;br /&gt;
* The next &amp;quot;turning point&amp;quot; (or landing site, as the case may be) is only generated when the current one is reached.&lt;br /&gt;
* I have not been able to get a Retaliation mission scheduled when a UFO is shot down at the second or later &amp;quot;turning points&amp;quot;.  Scheduling is very unreliable even then, and is not a strict matter of either speed or accuracy.&lt;br /&gt;
&lt;br /&gt;
Retaliation searching UFOs&lt;br /&gt;
* Searching Retaliation UFOs (before BattleShip) fly &amp;lt;b&amp;gt;slow&amp;lt;/b&amp;gt;.  With XComUtil craft, it may be possible to shoot them down with a Skyranger.&lt;br /&gt;
* Searching Retalation Battleships merely fly &amp;quot;normally&amp;quot;.&lt;br /&gt;
* needless to say, the sequence will abort if the UFO finds your base.&lt;br /&gt;
&lt;br /&gt;
I am tentatively assuming that the number of turning points is fixed, but that they may not necessarily be visible to the naked eye because of practical colinearity.&lt;br /&gt;
&lt;br /&gt;
Research 0/0&lt;br /&gt;
* These do not land.&lt;br /&gt;
* Four turning points, leave.&lt;br /&gt;
&lt;br /&gt;
Research 1/0&lt;br /&gt;
* Four turning points, land, leave.&lt;br /&gt;
&lt;br /&gt;
Research 2/*&lt;br /&gt;
* Four turning points, land, two turning points, land, leave (&amp;lt;i&amp;gt;May test 2/1 a bit more to confirm leave, but rest of sequence is directly observed&amp;lt;/i&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
Terror 0/0&lt;br /&gt;
* three turning points, land, three turning points, land, leave&lt;br /&gt;
&lt;br /&gt;
Terror 1/0&lt;br /&gt;
* two turning points, land, leave&lt;br /&gt;
&lt;br /&gt;
Terror 2/0 &lt;br /&gt;
* These do not land (&amp;lt;i&amp;gt;??? need more samples to document variability between instances ???&amp;lt;/i&amp;gt;)&lt;br /&gt;
* two turning points, leave&lt;br /&gt;
&lt;br /&gt;
Terror 3/0 &lt;br /&gt;
* two turning points, land.&lt;br /&gt;
&lt;br /&gt;
Retaliation 0/0&lt;br /&gt;
* These do not land.&lt;br /&gt;
* five turning points, leave.  (Didn&#039;t get a clear sample)&lt;br /&gt;
&lt;br /&gt;
Retaliation 1/*&lt;br /&gt;
* These do not land.&lt;br /&gt;
* seven turning points, leave.  The 1/0 I observed to count this did a &amp;lt;b&amp;gt;very&amp;lt;/b&amp;gt; tight zigzag pattern...it would have touched any base in about 2/3rds of the nation of South Africa, and just about any base in Madagascar.  This may be fluky, though.  1/1 is the same format, but the one I observed was not a tight-weave.&lt;br /&gt;
&lt;br /&gt;
Retaliation 2/0&lt;br /&gt;
* These do not land.&lt;br /&gt;
* eight turning points, leave.&lt;br /&gt;
&lt;br /&gt;
Retaliation 2/1&lt;br /&gt;
* These do not land.&lt;br /&gt;
* I had some problems measuring the number of turning points here.  I&#039;m inclined to think there are ten turning points, but eight is the most consistent; if I was forced to jump to conclusions, I&#039;d say eight.&lt;br /&gt;
* I thought I saw a six-turning point instance, but suspected that was spoiled because it had found Base Nigeria.  However, the expected base attack did not happen on Retaliation 3/0, and (conjecturing that the actual base attack is coordinated in BASE.DAT) there was no odd change in BASE.DAT that would have flagged a base attack.&lt;br /&gt;
** AFAIK BASE.DAT doesn&#039;t contain any information pertaining to a retaliation. It stores the layout of your bases and what items are stored in them, there are some unknowns at the end however. I&#039;m fairly certain it isn&#039;t in there... --[[User:Pi Masta|Pi Masta]] 17:04, 9 July 2007 (PDT)&lt;br /&gt;
* Another possibility is that base attack Battleships are handled in MISSION.DAT, using some oddball sub-UFO index that clearly is out-of-sequence.&lt;br /&gt;
* Also: what does AKNOW.DAT do...it certainly is suggestively named.&lt;br /&gt;
** I would like to know as well. So far I have only seen it contain 0s, possibly an abandoned file...? --[[User:Pi Masta|Pi Masta]] 17:04, 9 July 2007 (PDT)&lt;br /&gt;
* I&#039;m thinking that the file XBASES.DAT handles what base the aliens will attack. It&#039;s 48 bytes long which divides into 8 nicely. Normally the file has all zero&#039;s in it but on my saves just before a Base attack there&#039;s one byte set to 1 --[[User:Pi Masta|Pi Masta]] 17:04, 9 July 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
Retaliation 3/0,1 (base not found)&lt;br /&gt;
* These do not land.&lt;br /&gt;
* eight turning points, leave.&lt;br /&gt;
&lt;br /&gt;
------&lt;br /&gt;
One thing i&#039;ve noticed that might help: searching Battleships on retaliation missions tend to overfly the base that they are looking for. This could be just coincidence but i&#039;ve seen it happen a few times. Could the turning points be related to the location of the base? &lt;br /&gt;
&lt;br /&gt;
[[User:Hobbes|Hobbes]] 16:12, 6 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
: The Retaliation 1/0 I observed was zigzagging across where I had done two shootdowns, so that&#039;s entirely possible.  The 1/1 was more generalized.&lt;br /&gt;
&lt;br /&gt;
: [[User:Zaimoni|Zaimoni]] 6:48, 7 Jan 2007 (CST)&lt;br /&gt;
&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
Zaimoni, anything you can do to predict where and when something might land, given your insights, would help. Are there specific speeds and/or distances associated with each leg? I guess it&#039;s less relevant with Terror (aimed at a city) and Retaliation searches, and Supply is often (always?) aimed at an existing base. But with Research it could be useful. Players sometimes want to catch a UFO just as it lands, to save flytime/fuel and/or daylight. In my experience though it&#039;s pretty random and basically hard to predict, even with reloading, as you say.&lt;br /&gt;
&lt;br /&gt;
Could you benefit from a logger program that collects data overnight, or does it seem so highly variable that it&#039;s anybody&#039;s guess when a Research might land? - [[User:MikeTheRed|MikeTheRed]] 17:09, 10 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
: Sorry for the delay...I must have had a work schedule spike that lasted a few weeks.  (I don&#039;t have email notification turned on, just a URL checklist that includes this site.)  I just started actually playing again, so had new early-game data.&lt;br /&gt;
&lt;br /&gt;
: There is no consistent distance, just the sparse grid of valid points.  Landing times will not be predictable from a savegame until the landing site is the next waypoint.  Retaliation missions may not be consistently random in the choice of these points.  Speeds are consistent within UFO type: there is an &amp;quot;incoming&amp;quot; speed, a &amp;quot;near waypoint&amp;quot; speed, and a &amp;quot;between waypoint&amp;quot; speed.  The current waypoint is consistent between saves.&lt;br /&gt;
&lt;br /&gt;
: Not sure about logger yet (have AutoHotKey installer on my system, but my AV is very unpredictable in when it runs).  Some sort of &amp;quot;slice&amp;quot; logger would be of limited use here.  I&#039;m also considering a range test run to pin down the exact duration ranges on [[MISSIONS.DAT]]&lt;br /&gt;
&lt;br /&gt;
: [[User:Zaimoni|Zaimoni]] 6:48, 7 Jan 2007 (CST)&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=User:Pi_Masta&amp;diff=12079</id>
		<title>User:Pi Masta</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=User:Pi_Masta&amp;diff=12079"/>
		<updated>2007-07-09T18:54:19Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: /* Files to be Decoded */  responses&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Alright I finally created this page. Tired of seeing so much red on the Recent Changes page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Um, I like computers and math (hence Pi) and of course XCOM or I wouldn&#039;t be here. Just something about the gameplay and concept of the game intrigues me.&lt;br /&gt;
&lt;br /&gt;
==PyXcom==&lt;br /&gt;
I&#039;m hoping to get a possible &#039;free-for-all&#039; editor going in python. I had success getting an old version of Python to work in DOSBox, though it&#039;s not very stable. I&#039;m working on a &#039;back-end&#039; (currently dubbed PyXcom) for all the saved game files so applications would just have to worry about what values to put in and not formatting the file correctly, giving it a more &#039;pythonic&#039; interface. Could still use work, but I have a simple class that can read and write .DAT files (really any fixed-length files), and is somewhat simple to add new fields as values in files are discovered.&lt;br /&gt;
&lt;br /&gt;
From this I could make a Tk/Tcl version that would require a much later version of Python to do editing on modern machines (including *nix, and probably Mac). This would probably do more in depth editing, of say the bases, stats of objects or soldiers, etc. &lt;br /&gt;
&lt;br /&gt;
Before that I think I&#039;ll make a DOS friendly version (aka command prompt, maybe keyboard selection) that could implement changes (I&#039;m thinking of making a better soldier equip screen that runs before going into tactical, downside is I don&#039;t it will be easy to display images). &lt;br /&gt;
&lt;br /&gt;
Another idea I have is to make a Monitoring program (PyXMon?) that can watch the save game and MISSDAT directories and apply patches to them automattically. The main use this would have is renaming soldiers since it is impossible to have an App, like XcomUtil,rename them after combat (GEOSCAPE updates the stats then), instead you could save your game, possibly wait a second or 2 and then reload it. The monitoring program will catch the new save game and apply the fix. This would also go with the &#039;Finished&#039; Dirt Modules bug, though handling that between battles would probably be enough. Another application would be for Data Miners to have the scripts automattically output data from files (in a more readable format) on saves, for instance Zombie&#039;s initial Funds data could have had a script written in python to automatically append a file with the data about the countries.&lt;br /&gt;
&lt;br /&gt;
I have too many ideas, and most likely I won&#039;t complete these projects, but I hope to get close. I&#039;m updating this Wiki for the most part on the files, and trying to crack some of the others.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
I have almost all decoded files supported (with the exception of graphic files which I don&#039;t intend to directly load) and I&#039;ve started on making a layer on top of it. Namely BaseInfo, SoldierInfo, LocInfo, and CraftInfo that can all be connected together and I have made a &#039;master&#039; module to do this given a directory for it to load from. Let me give some examples:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; t = Geoscape(&#039;missdat&#039;)&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; t.base[0].name&lt;br /&gt;
 &#039;Main&#039;&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for x in t.base[0].soldiers:&lt;br /&gt;
         print x&lt;br /&gt;
 D Likhachev (r)aBRst (Rookie)&lt;br /&gt;
 F Robinson (r)aRbr (Rookie)&lt;br /&gt;
 Evans TU (C)C-AC*ST* (Captain)&lt;br /&gt;
 .......&lt;br /&gt;
 Sarah Watson (r)arbrst (Rookie)&lt;br /&gt;
 Ed Kemp SACK (Rookie)&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for x in t.loc.used:&lt;br /&gt;
         print x, &#039;:&#039;,  x.data	&lt;br /&gt;
 Loc[0] - XCOM Base : Base 0: Main&lt;br /&gt;
 Loc[1] - XCOM Ship : Skyranger-1&lt;br /&gt;
 Loc[2] - XCOM Ship : Interceptor-1&lt;br /&gt;
 Loc[3] - XCOM Ship : Interceptor-4&lt;br /&gt;
 Loc[4] - XCOM Base : Base 1: Asia&lt;br /&gt;
 Loc[5] - Crash Site : Large Scout-51&lt;br /&gt;
 Loc[6] - XCOM Base : Base 2: America&lt;br /&gt;
 Loc[7] - XCOM Ship : Interceptor-5&lt;br /&gt;
 ... &lt;br /&gt;
 Loc[15] - Alien Base : None&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; t.loc[5].data.damage #The crashed large scout&lt;br /&gt;
 150&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for x in t.loc[1].data.soldiers: #Skyranger 1&#039;s soldiers&lt;br /&gt;
         print x, &#039;;&#039;,	&lt;br /&gt;
 D Likhachev (r)aBRst (Rookie) ; F Robinson (r)aRbr (Rookie) ; Evans TU (C)C-AC*ST* (Captain) ; Robinson TU (Co)ACrbr*ST* (Colonel);&lt;br /&gt;
 C Dodge (S)*AC*Rbrst (Seargent) ; Yuzo Kojima SACK (Rookie) ; K Okamoto (r)W-ACr (Rookie) ; Yataka Shoji (r)C-st (Rookie) ; &lt;br /&gt;
 Austin King SACK (Rookie) ; Y Matsumara (r)C-W-ACR (Rookie) ;&lt;br /&gt;
&lt;br /&gt;
And now to show that you can chain these together. This one get&#039;s the second LOC.DAT entry (which is skyranger-1), grabs its data (the skyranger craft itself), gets the craft&#039;s second soldier (remember is all 0-based), then his/her base, that base&#039;s location, that location&#039;s data (which just goes back to the base), that base&#039;s last soldier, and then that soldier&#039;s name.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; t.loc[1].data.soldiers[1].base.loc.data.crafts[0].soldiers[-1].name&lt;br /&gt;
 &#039;Y Matsumara (r)C-W-ACR&#039;&lt;br /&gt;
&lt;br /&gt;
This is all just the tip of the iceberg!&lt;br /&gt;
&lt;br /&gt;
Right now I just have mostly Geoscape stuff made for use. The Tactical saves can be manipulated but there&#039;s no referencing other files or what not. So far there is no GUI. This is intentional as it is mean to run at the command prompt with XCOM if possible. I might whip up a generated GUI using tkinter, one that just makes fields based on the information from these class objects (read: not going to look pretty). But right now I think I&#039;m going to get on to the Tactical files (the main ones, OBREF, UNITREF, etc).&lt;br /&gt;
&lt;br /&gt;
Oh and I do have a stat string generator that is very customizeable, although probably not as simplistic.&lt;br /&gt;
&lt;br /&gt;
I also now have a simple graphical soldier equipment utility to possibly replace the ingame initial equipment screen.&lt;br /&gt;
&lt;br /&gt;
===As a tool===&lt;br /&gt;
I&#039;ve whipped up a handy file monitoring script that will run a function when a file is modified. With this I can have it automatically apply patches or fix issues whenever a game is saved. Also it could be possible with modification of the batch file that switches between Tactical and Geoscape to have it add or even replace parts of the game. (I&#039;m trying to get a soldier editor, but there&#039;s a few issues I have to work out)&lt;br /&gt;
&lt;br /&gt;
Mainly though, I can use this monitoring process to help figure out what certain bytes mean. For example when I was looking for what offset 12 does for [[OBPOS.DAT]], I simply monitored one of my save folder&#039;s obpos.dat file. Whenever it changed my script would parse the information and compare it to the last known information (rather quickly too might I add), it then printed to a seperate console the results as well as appending it to a log file. I even added more functionality by having it read the [[SAVEINFO.DAT]] file to get the save name, thus I could put some comments on what I did while I saved. Put this all together and I could see what happened to the files (or what parts I want to know about) as often as I saved, no need to alt-tab out and run a script.&lt;br /&gt;
&lt;br /&gt;
==[[LEASE.DAT]]==&lt;br /&gt;
some working notes on lease.dat&lt;br /&gt;
&lt;br /&gt;
fixed length of 180 bytes, prime factorization of 180:&lt;br /&gt;
 2^2 * 3^2 * 5, &lt;br /&gt;
&lt;br /&gt;
factors of 180: (probable line widths)&lt;br /&gt;
 2, 3, 4, 5, 6, 9, 10, 12, 15, 18, 20, 30, 36, 45, 60, 90, 180&lt;br /&gt;
&lt;br /&gt;
only offsets that seem to change (out of about 14 files) (&#039;&#039;compared from 1st to 14 others, but not 2nd or 3rd etc with the other 14 so could be more&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
 0-1,  5-17,  20-23,  26-28,  32-35,  38-41,  44-47,  50-53,  56-59,  62-65,  68-71,  74-77,  80-83,  86-89,  &lt;br /&gt;
 92-95,  98-101,  104-107,  110-113,  116-119,  122-125,  128-131,  134-137,  140-142,  146-149,  152-155,  &lt;br /&gt;
 158-161,  164-167,  170-173,&lt;br /&gt;
&lt;br /&gt;
There is a lot of symmetry in this format, lots of double 0&#039;s will line up at the line widths of the factors, with the exception of the very first byte, almost as if the first record is somehow different...&lt;br /&gt;
&lt;br /&gt;
* 13 Seems to be 0 for saves, 1 after combat and in missdat, 2 only for before combat, but I&#039;ve seen this number change in Geoscape saves, particularly when intercepting craft&lt;br /&gt;
&lt;br /&gt;
===Speculation===&lt;br /&gt;
LEASE as the name of this file makes me think of it pertaining to either:&lt;br /&gt;
* Purchased craft monthly (shouldn&#039;t need this much data)&lt;br /&gt;
* Base monthly costs&lt;br /&gt;
The &#039;orange&#039; set of values seems to be the most popular and &#039;simple&#039;.&lt;br /&gt;
&lt;br /&gt;
From tests using PyXCOM of over 70 saves, this file seems to change most often when a UFO is detected or an interceptor is launched at it. &lt;br /&gt;
&lt;br /&gt;
==Base Items store space==&lt;br /&gt;
I dug into GEOSCAPE.EXE and found the pattern of sizes like that listed on the stores page (offset 0x5DB34). However it different some areas, namely the HWP ammo was not with the actual HWPs. Also interesting was that there were gaps of 0&#039;s between some items, usually from the different groups like craft weapons, to agent weapons, to alien weapons, etc.&lt;br /&gt;
&lt;br /&gt;
I got to looking at [[PURCHASE.DAT]] as this seemed to be the only logical place for size information to be. Of particular interest was the so called &#039;sort&#039; order offset. I really doubted the programmers devoted a byte to help &#039;sort&#039; the information for display, but given what could be gleaned from that file alone it was a good guess. I&#039;m pretty sure it&#039;s an index (which technically does sort it) to at least one array (I surmise others below). I used some python scripts to read in a Purchase.dat file and a hex editor to find the pattern in geoscape.exe. &lt;br /&gt;
&lt;br /&gt;
Simply by placing the values in an array and having each item in purchase.dat use it&#039;s &#039;sort&#039; value to fetch the record in the array, everything matched up, well almost. The plasma beam and Fusion Ball Launcher were backwards (plasma had 20 space while fusion had 12). I almost gave up but then I thought what if the order is wrong? There isn&#039;t much info linking to what item a record is in that file, but I looked at the sell price. Turns out I was right, the sell price of the Fusion Ball Launcher is well known as it&#039;s the second runner up for [[Manufacturing Profitability]].&lt;br /&gt;
&lt;br /&gt;
===Other Possibilities===&lt;br /&gt;
These items have to index to English.dat somewhere (probably in the executable). My guess is that it is near the array that I found. There is probably other information such as the craft weapon statistics. The gaps between these indexes might make it possible to add new items to the game as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[INTER.DAT]]==&lt;br /&gt;
Took a stab at this file. I believe it deals with interceptions based on the name and that it changed whenever I attacked a UFO with an interceptor. However it is 568 bytes with a factorization of:&lt;br /&gt;
 2 * 2 * 2 * 71&lt;br /&gt;
Which baffles me because 71, 142, or 248 seem like weird lengths. I don&#039;t know of anything relating to these numbers in X-COM.&lt;br /&gt;
&lt;br /&gt;
I observed one set of changes that is interesting:&lt;br /&gt;
 0246: 000 ( 0) -&amp;gt; 008 ( 8)&lt;br /&gt;
 0248: 000 ( 0) -&amp;gt; 090 (5A)&lt;br /&gt;
 0388: 000 ( 0) -&amp;gt; 008 ( 8)&lt;br /&gt;
 0390: 000 ( 0) -&amp;gt; 090 (5A)&lt;br /&gt;
 0530: 000 ( 0) -&amp;gt; 008 ( 8)&lt;br /&gt;
 0532: 000 ( 0) -&amp;gt; 090 (5A)&lt;br /&gt;
&lt;br /&gt;
This appeared right after I downed a UFO in Brazil (Snakeman Large Scout on Retaliation) along with some other changes, but this set caught my eye because of the repetition, but more when I found that 388 - 246 = 142, and 530 - 388 = 142, with the significance of 142 being one of the factors of file size (2*71 = 142 -&amp;gt; 142 * 4 = 568)&lt;br /&gt;
&lt;br /&gt;
Also observed offsets 32 and 33 jump from 0&#039;s to 254 and 255 respectively and back. 30 and 31 changed somewhat but appears unrelated with the value of 32 and 33. So my guess is 4 sets of 142 bytes, with 71 2-byte values inside of each set. &lt;br /&gt;
&lt;br /&gt;
Perhaps this file is suppose to save the state of interceptions as they happen so they could be restored upon loading (which we all know crashes the game). Perhaps an adjustment could be made to this file to allow it to work, just like with the Difficulty bug and &lt;br /&gt;
&lt;br /&gt;
I might have to check this, but I think the maximum number of interceptions you can have minimized is 4, so possibly this file keeps track of each one.&lt;br /&gt;
[[IGLOB.DAT]].&lt;br /&gt;
&lt;br /&gt;
== Files to be Decoded ==&lt;br /&gt;
Here I&#039;m going to list some files that need values to be decoded. Some of them it might not be possible as a lot of the values are set to 0. Namely the MISDATA, MISSION, MISSION2 as they all use the same format but are used at different stages of the game.&lt;br /&gt;
&lt;br /&gt;
* [[MISDATA.DAT]] (and [[MISSION.DAT]], [[MISSION2.DAT]]) - probably should combine into 1 page with sections detailing what is and is not in each name&lt;br /&gt;
* [[GEODATA.DAT]] - 92 Bytes, but we only have about 10 of them decoded. I think this is what is used to generate new battlescapes, but I think it&#039;s GEOSCAPE that actually generates the [[MAP.DAT]] file - &amp;lt;i&amp;gt;Interestingly, the map only gets saved to disk if you manually save the game. Hence the GeoScape engine never touches it, though it &amp;lt;b&amp;gt;does&amp;lt;/b&amp;gt; dictate where your craft ends up. - [[User:Bomb Bloke|Bomb Bloke]] 21:22, 9 June 2007 (PDT)&amp;lt;/i&amp;gt;&lt;br /&gt;
* [[LOC.DAT]] - Some unknown values&lt;br /&gt;
* &#039;&#039;&#039;Little to nothing known&#039;&#039;&#039;&lt;br /&gt;
** [[XBASES.DAT]] - Alien Base Info? - Initial tests suggest not, maybe a constant file? Never changed upon a new Alien base being made.&lt;br /&gt;
:::: Each entry is 4 bytes long, and consists of 2 seperate 2 byte values. What do they do, no idea. --[[User:Darkfred|Darkfred]] 08:23, 11 June 2007 (PDT)&lt;br /&gt;
** [[INTER.DAT]] - Stores info on interceptions? - Pretty sure on this&lt;br /&gt;
:::: 4 entries each 142 bytes. I think byte 0 of each is a boolean that closes the intercept window, need to test. --[[User:Darkfred|Darkfred]] 08:23, 11 June 2007 (PDT)&lt;br /&gt;
** [[AKNOW.DAT]] - Perhaps what the Aliens Know, as in which bases for retals&lt;br /&gt;
** [[LEASE.DAT]]&lt;br /&gt;
:::: My Guess, current position and zoom of the geoscape map ball. I remember testing this a while back and bytes 12-13 seemed to control zoom, but only if set to specific values. 120, 720 etc. --[[User:Darkfred|Darkfred]] 08:23, 11 June 2007 (PDT)&lt;br /&gt;
::::: Well that explains why the file seemed to change when a UFO was detected as I always centered on it and usually moved the globe to track it while it was flying around, lol. Still leaves many bytes unknown though... Thanks a lot for your help Darkfred! [[User:Pi Masta|Pi Masta]] 11:54, 9 July 2007 (PDT)&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:ENGLISH.DAT&amp;diff=12078</id>
		<title>Talk:ENGLISH.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:ENGLISH.DAT&amp;diff=12078"/>
		<updated>2007-07-09T18:37:05Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I&#039;m really not sure how accurate the table is at this point...&lt;br /&gt;
&lt;br /&gt;
With the exception of the header and footer, the majority was written by a short program I wrote. On records 177, 178, and 179 it stuffed up (for all languages).&lt;br /&gt;
&lt;br /&gt;
Now, the formatting of the table has been fixed, but for all I know those three records are really supposed to be one. Which would mean that all the other records from that point on are incorrectly numbered... Hence why I didn&#039;t bother to fix a seemingly costmetic error in favor of just flagging the problem.&lt;br /&gt;
&lt;br /&gt;
At some stage or other I&#039;ll check the files in concern (to make sure those three records really are seperate), and if there&#039;s a problem I&#039;ll re-write the program to generate the table. Unless of course someone can already verify the record count.&lt;br /&gt;
&lt;br /&gt;
- [[User:Bomb Bloke|Bomb Bloke]] 10:29, 4 July 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
:Count looks good. Entries 177-179 are suppose to be that way for when it displays the message box, eg. &amp;quot;Production of Plasma Cannon at Base 1 is complete&amp;quot; --Greetings [[User:Pi Masta|Pi Masta]] 11:37, 9 July 2007 (PDT)&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=User_talk:Fullauto&amp;diff=11601</id>
		<title>User talk:Fullauto</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=User_talk:Fullauto&amp;diff=11601"/>
		<updated>2007-04-15T19:29:18Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: Armour vs. Armor discussion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Full Auto: your original account here still exists. [[User:FullAuto|FullAuto]]. You can always recover a lost password at the login page. --[[User:Zombie|Zombie]] 19:48, 14 April 2007 (PDT)&lt;br /&gt;
:I didn&#039;t know I even had an account!  :-)  [[User:Fullauto|Fullauto]] 19:49, 14 April 2007 (PDT)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just an FYI: we tend to stick with the British spelling of armor (armour) at least for the original XCOM, simply because it is how it&#039;s spelled in the game. See [[Talk:Main_Page#British_vs._American_spelling| here]] for a discussion. For the most part it doesn&#039;t matter, but I just wanted to inform you of this and the reasons for it. Otherwise thanks for the spelling and grammar corrections you&#039;ve made, they have probably been overlooked for quite a while. :-D --[[User:Pi Masta|Pi Masta]] 12:29, 15 April 2007 (PDT)&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=User:Pi_Masta&amp;diff=11552</id>
		<title>User:Pi Masta</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=User:Pi_Masta&amp;diff=11552"/>
		<updated>2007-04-11T20:29:53Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: /* Files to be Decoded */  XBASES doesn&amp;#039;t seem to contain alien base info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Alright I finally created this page. Tired of seeing so much red on the Recent Changes page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Um, I like computers and math (hence Pi) and of course XCOM or I wouldn&#039;t be here. Just something about the gameplay and concept of the game intrigues me.&lt;br /&gt;
&lt;br /&gt;
==PyXcom==&lt;br /&gt;
I&#039;m hoping to get a possible &#039;free-for-all&#039; editor going in python. I had success getting an old version of Python to work in DOSBox, though it&#039;s not very stable. I&#039;m working on a &#039;back-end&#039; (currently dubbed PyXcom) for all the saved game files so applications would just have to worry about what values to put in and not formatting the file correctly, giving it a more &#039;pythonic&#039; interface. Could still use work, but I have a simple class that can read and write .DAT files (really any fixed-length files), and is somewhat simple to add new fields as values in files are discovered.&lt;br /&gt;
&lt;br /&gt;
From this I could make a Tk/Tcl version that would require a much later version of Python to do editing on modern machines (including *nix, and probably Mac). This would probably do more in depth editing, of say the bases, stats of objects or soldiers, etc. &lt;br /&gt;
&lt;br /&gt;
Before that I think I&#039;ll make a DOS friendly version (aka command prompt, maybe keyboard selection) that could implement changes (I&#039;m thinking of making a better soldier equip screen that runs before going into tactical, downside is I don&#039;t it will be easy to display images). &lt;br /&gt;
&lt;br /&gt;
Another idea I have is to make a Monitoring program (PyXMon?) that can watch the save game and MISSDAT directories and apply patches to them automattically. The main use this would have is renaming soldiers since it is impossible to have an App, like XcomUtil,rename them after combat (GEOSCAPE updates the stats then), instead you could save your game, possibly wait a second or 2 and then reload it. The monitoring program will catch the new save game and apply the fix. This would also go with the &#039;Finished&#039; Dirt Modules bug, though handling that between battles would probably be enough. Another application would be for Data Miners to have the scripts automattically output data from files (in a more readable format) on saves, for instance Zombie&#039;s initial Funds data could have had a script written in python to automatically append a file with the data about the countries.&lt;br /&gt;
&lt;br /&gt;
I have too many ideas, and most likely I won&#039;t complete these projects, but I hope to get close. I&#039;m updating this Wiki for the most part on the files, and trying to crack some of the others.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
I have almost all decoded files supported (with the exception of graphic files which I don&#039;t intend to directly load) and I&#039;ve started on making a layer on top of it. Namely BaseInfo, SoldierInfo, LocInfo, and CraftInfo that can all be connected together and I have made a &#039;master&#039; module to do this given a directory for it to load from. Let me give some examples:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; t = Geoscape(&#039;missdat&#039;)&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; t.base[0].name&lt;br /&gt;
 &#039;Main&#039;&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for x in t.base[0].soldiers:&lt;br /&gt;
         print x&lt;br /&gt;
 D Likhachev (r)aBRst (Rookie)&lt;br /&gt;
 F Robinson (r)aRbr (Rookie)&lt;br /&gt;
 Evans TU (C)C-AC*ST* (Captain)&lt;br /&gt;
 .......&lt;br /&gt;
 Sarah Watson (r)arbrst (Rookie)&lt;br /&gt;
 Ed Kemp SACK (Rookie)&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for x in t.loc.used:&lt;br /&gt;
         print x, &#039;:&#039;,  x.data	&lt;br /&gt;
 Loc[0] - XCOM Base : Base 0: Main&lt;br /&gt;
 Loc[1] - XCOM Ship : Skyranger-1&lt;br /&gt;
 Loc[2] - XCOM Ship : Interceptor-1&lt;br /&gt;
 Loc[3] - XCOM Ship : Interceptor-4&lt;br /&gt;
 Loc[4] - XCOM Base : Base 1: Asia&lt;br /&gt;
 Loc[5] - Crash Site : Large Scout-51&lt;br /&gt;
 Loc[6] - XCOM Base : Base 2: America&lt;br /&gt;
 Loc[7] - XCOM Ship : Interceptor-5&lt;br /&gt;
 ... &lt;br /&gt;
 Loc[15] - Alien Base : None&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; t.loc[5].data.damage #The crashed large scout&lt;br /&gt;
 150&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for x in t.loc[1].data.soldiers: #Skyranger 1&#039;s soldiers&lt;br /&gt;
         print x, &#039;;&#039;,	&lt;br /&gt;
 D Likhachev (r)aBRst (Rookie) ; F Robinson (r)aRbr (Rookie) ; Evans TU (C)C-AC*ST* (Captain) ; Robinson TU (Co)ACrbr*ST* (Colonel);&lt;br /&gt;
 C Dodge (S)*AC*Rbrst (Seargent) ; Yuzo Kojima SACK (Rookie) ; K Okamoto (r)W-ACr (Rookie) ; Yataka Shoji (r)C-st (Rookie) ; &lt;br /&gt;
 Austin King SACK (Rookie) ; Y Matsumara (r)C-W-ACR (Rookie) ;&lt;br /&gt;
&lt;br /&gt;
And now to show that you can chain these together. This one get&#039;s the second LOC.DAT entry (which is skyranger-1), grabs its data (the skyranger craft itself), gets the craft&#039;s second soldier (remember is all 0-based), then his/her base, that base&#039;s location, that location&#039;s data (which just goes back to the base), that base&#039;s last soldier, and then that soldier&#039;s name.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; t.loc[1].data.soldiers[1].base.loc.data.crafts[0].soldiers[-1].name&lt;br /&gt;
 &#039;Y Matsumara (r)C-W-ACR&#039;&lt;br /&gt;
&lt;br /&gt;
This is all just the tip of the iceberg!&lt;br /&gt;
&lt;br /&gt;
Right now I just have mostly Geoscape stuff made for use. The Tactical saves can be manipulated but there&#039;s no referencing other files or what not. So far there is no GUI. This is intentional as it is mean to run at the command prompt with XCOM if possible. I might whip up a generated GUI using tkinter, one that just makes fields based on the information from these class objects (read: not going to look pretty). But right now I think I&#039;m going to get on to the Tactical files (the main ones, OBREF, UNITREF, etc).&lt;br /&gt;
&lt;br /&gt;
Oh and I do have a stat string generator that is very customizeable, although probably not as simplistic.&lt;br /&gt;
&lt;br /&gt;
I also now have a simple graphical soldier equipment utility to possibly replace the ingame initial equipment screen.&lt;br /&gt;
&lt;br /&gt;
===As a tool===&lt;br /&gt;
I&#039;ve whipped up a handy file monitoring script that will run a function when a file is modified. With this I can have it automatically apply patches or fix issues whenever a game is saved. Also it could be possible with modification of the batch file that switches between Tactical and Geoscape to have it add or even replace parts of the game. (I&#039;m trying to get a soldier editor, but there&#039;s a few issues I have to work out)&lt;br /&gt;
&lt;br /&gt;
Mainly though, I can use this monitoring process to help figure out what certain bytes mean. For example when I was looking for what offset 12 does for [[OBPOS.DAT]], I simply monitored one of my save folder&#039;s obpos.dat file. Whenever it changed my script would parse the information and compare it to the last known information (rather quickly too might I add), it then printed to a seperate console the results as well as appending it to a log file. I even added more functionality by having it read the [[SAVEINFO.DAT]] file to get the save name, thus I could put some comments on what I did while I saved. Put this all together and I could see what happened to the files (or what parts I want to know about) as often as I saved, no need to alt-tab out and run a script.&lt;br /&gt;
&lt;br /&gt;
==[[LEASE.DAT]]==&lt;br /&gt;
some working notes on lease.dat&lt;br /&gt;
&lt;br /&gt;
fixed length of 180 bytes, prime factorization of 180:&lt;br /&gt;
 2^2 * 3^2 * 5, &lt;br /&gt;
&lt;br /&gt;
factors of 180: (probable line widths)&lt;br /&gt;
 2, 3, 4, 5, 6, 9, 10, 12, 15, 18, 20, 30, 36, 45, 60, 90, 180&lt;br /&gt;
&lt;br /&gt;
only offsets that seem to change (out of about 14 files) (&#039;&#039;compared from 1st to 14 others, but not 2nd or 3rd etc with the other 14 so could be more&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
 0-1,  5-17,  20-23,  26-28,  32-35,  38-41,  44-47,  50-53,  56-59,  62-65,  68-71,  74-77,  80-83,  86-89,  &lt;br /&gt;
 92-95,  98-101,  104-107,  110-113,  116-119,  122-125,  128-131,  134-137,  140-142,  146-149,  152-155,  &lt;br /&gt;
 158-161,  164-167,  170-173,&lt;br /&gt;
&lt;br /&gt;
There is a lot of symmetry in this format, lots of double 0&#039;s will line up at the line widths of the factors, with the exception of the very first byte, almost as if the first record is somehow different...&lt;br /&gt;
&lt;br /&gt;
* 13 Seems to be 0 for saves, 1 after combat and in missdat, 2 only for before combat, but I&#039;ve seen this number change in Geoscape saves, particularly when intercepting craft&lt;br /&gt;
&lt;br /&gt;
===Speculation===&lt;br /&gt;
LEASE as the name of this file makes me think of it pertaining to either:&lt;br /&gt;
* Purchased craft monthly (shouldn&#039;t need this much data)&lt;br /&gt;
* Base monthly costs&lt;br /&gt;
The &#039;orange&#039; set of values seems to be the most popular and &#039;simple&#039;.&lt;br /&gt;
&lt;br /&gt;
From tests using PyXCOM of over 70 saves, this file seems to change most often when a UFO is detected or an interceptor is launched at it. &lt;br /&gt;
&lt;br /&gt;
==Base Items store space==&lt;br /&gt;
I dug into GEOSCAPE.EXE and found the pattern of sizes like that listed on the stores page (offset 0x5DB34). However it different some areas, namely the HWP ammo was not with the actual HWPs. Also interesting was that there were gaps of 0&#039;s between some items, usually from the different groups like craft weapons, to agent weapons, to alien weapons, etc.&lt;br /&gt;
&lt;br /&gt;
I got to looking at [[PURCHASE.DAT]] as this seemed to be the only logical place for size information to be. Of particular interest was the so called &#039;sort&#039; order offset. I really doubted the programmers devoted a byte to help &#039;sort&#039; the information for display, but given what could be gleaned from that file alone it was a good guess. I&#039;m pretty sure it&#039;s an index (which technically does sort it) to at least one array (I surmise others below). I used some python scripts to read in a Purchase.dat file and a hex editor to find the pattern in geoscape.exe. &lt;br /&gt;
&lt;br /&gt;
Simply by placing the values in an array and having each item in purchase.dat use it&#039;s &#039;sort&#039; value to fetch the record in the array, everything matched up, well almost. The plasma beam and Fusion Ball Launcher were backwards (plasma had 20 space while fusion had 12). I almost gave up but then I thought what if the order is wrong? There isn&#039;t much info linking to what item a record is in that file, but I looked at the sell price. Turns out I was right, the sell price of the Fusion Ball Launcher is well known as it&#039;s the second runner up for [[Manufacturing Profitability]].&lt;br /&gt;
&lt;br /&gt;
===Other Possibilities===&lt;br /&gt;
These items have to index to English.dat somewhere (probably in the executable). My guess is that it is near the array that I found. There is probably other information such as the craft weapon statistics. The gaps between these indexes might make it possible to add new items to the game as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[INTER.DAT]]==&lt;br /&gt;
Took a stab at this file. I believe it deals with interceptions based on the name and that it changed whenever I attacked a UFO with an interceptor. However it is 568 bytes with a factorization of:&lt;br /&gt;
 2 * 2 * 2 * 71&lt;br /&gt;
Which baffles me because 71, 142, or 248 seem like weird lengths. I don&#039;t know of anything relating to these numbers in X-COM.&lt;br /&gt;
&lt;br /&gt;
I observed one set of changes that is interesting:&lt;br /&gt;
 0246: 000 ( 0) -&amp;gt; 008 ( 8)&lt;br /&gt;
 0248: 000 ( 0) -&amp;gt; 090 (5A)&lt;br /&gt;
 0388: 000 ( 0) -&amp;gt; 008 ( 8)&lt;br /&gt;
 0390: 000 ( 0) -&amp;gt; 090 (5A)&lt;br /&gt;
 0530: 000 ( 0) -&amp;gt; 008 ( 8)&lt;br /&gt;
 0532: 000 ( 0) -&amp;gt; 090 (5A)&lt;br /&gt;
&lt;br /&gt;
This appeared right after I downed a UFO in Brazil (Snakeman Large Scout on Retaliation) along with some other changes, but this set caught my eye because of the repetition, but more when I found that 388 - 246 = 142, and 530 - 388 = 142, with the significance of 142 being one of the factors of file size (2*71 = 142 -&amp;gt; 142 * 4 = 568)&lt;br /&gt;
&lt;br /&gt;
Also observed offsets 32 and 33 jump from 0&#039;s to 254 and 255 respectively and back. 30 and 31 changed somewhat but appears unrelated with the value of 32 and 33. So my guess is 4 sets of 142 bytes, with 71 2-byte values inside of each set. &lt;br /&gt;
&lt;br /&gt;
Perhaps this file is suppose to save the state of interceptions as they happen so they could be restored upon loading (which we all know crashes the game). Perhaps an adjustment could be made to this file to allow it to work, just like with the Difficulty bug and &lt;br /&gt;
&lt;br /&gt;
I might have to check this, but I think the maximum number of interceptions you can have minimized is 4, so possibly this file keeps track of each one.&lt;br /&gt;
[[IGLOB.DAT]].&lt;br /&gt;
&lt;br /&gt;
== Files to be Decoded ==&lt;br /&gt;
Here I&#039;m going to list some files that need values to be decoded. Some of them it might not be possible as a lot of the values are set to 0. Namely the MISDATA, MISSION, MISSION2 as they all use the same format but are used at different stages of the game.&lt;br /&gt;
&lt;br /&gt;
* [[MISDATA.DAT]] (and [[MISSION.DAT]], [[MISSION2.DAT]]) - probably should combine into 1 page with sections detailing what is and is not in each name&lt;br /&gt;
* [[GEODATA.DAT]] - 92 Bytes, but we only have about 10 of them decoded. I think this is what is used to generate new battlescapes, but I think it&#039;s GEOSCAPE that actually generates the [[MAP.DAT]] file&lt;br /&gt;
* [[LOC.DAT]] - Some unknown values&lt;br /&gt;
* &#039;&#039;&#039;Little to nothing known&#039;&#039;&#039;&lt;br /&gt;
** [[XBASES.DAT]] - Alien Base Info? - Initial tests suggest not, maybe a constant file? Never changed upon a new Alien base being made&lt;br /&gt;
** [[INTER.DAT]] - Stores info on interceptions? - Pretty sure on this&lt;br /&gt;
** [[AKNOW.DAT]] - Perhaps what the Aliens Know, as in which bases for retals&lt;br /&gt;
** [[LEASE.DAT]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=User:Pi_Masta&amp;diff=11551</id>
		<title>User:Pi Masta</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=User:Pi_Masta&amp;diff=11551"/>
		<updated>2007-04-11T02:44:37Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: Files to be Decoded&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Alright I finally created this page. Tired of seeing so much red on the Recent Changes page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Um, I like computers and math (hence Pi) and of course XCOM or I wouldn&#039;t be here. Just something about the gameplay and concept of the game intrigues me.&lt;br /&gt;
&lt;br /&gt;
==PyXcom==&lt;br /&gt;
I&#039;m hoping to get a possible &#039;free-for-all&#039; editor going in python. I had success getting an old version of Python to work in DOSBox, though it&#039;s not very stable. I&#039;m working on a &#039;back-end&#039; (currently dubbed PyXcom) for all the saved game files so applications would just have to worry about what values to put in and not formatting the file correctly, giving it a more &#039;pythonic&#039; interface. Could still use work, but I have a simple class that can read and write .DAT files (really any fixed-length files), and is somewhat simple to add new fields as values in files are discovered.&lt;br /&gt;
&lt;br /&gt;
From this I could make a Tk/Tcl version that would require a much later version of Python to do editing on modern machines (including *nix, and probably Mac). This would probably do more in depth editing, of say the bases, stats of objects or soldiers, etc. &lt;br /&gt;
&lt;br /&gt;
Before that I think I&#039;ll make a DOS friendly version (aka command prompt, maybe keyboard selection) that could implement changes (I&#039;m thinking of making a better soldier equip screen that runs before going into tactical, downside is I don&#039;t it will be easy to display images). &lt;br /&gt;
&lt;br /&gt;
Another idea I have is to make a Monitoring program (PyXMon?) that can watch the save game and MISSDAT directories and apply patches to them automattically. The main use this would have is renaming soldiers since it is impossible to have an App, like XcomUtil,rename them after combat (GEOSCAPE updates the stats then), instead you could save your game, possibly wait a second or 2 and then reload it. The monitoring program will catch the new save game and apply the fix. This would also go with the &#039;Finished&#039; Dirt Modules bug, though handling that between battles would probably be enough. Another application would be for Data Miners to have the scripts automattically output data from files (in a more readable format) on saves, for instance Zombie&#039;s initial Funds data could have had a script written in python to automatically append a file with the data about the countries.&lt;br /&gt;
&lt;br /&gt;
I have too many ideas, and most likely I won&#039;t complete these projects, but I hope to get close. I&#039;m updating this Wiki for the most part on the files, and trying to crack some of the others.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
I have almost all decoded files supported (with the exception of graphic files which I don&#039;t intend to directly load) and I&#039;ve started on making a layer on top of it. Namely BaseInfo, SoldierInfo, LocInfo, and CraftInfo that can all be connected together and I have made a &#039;master&#039; module to do this given a directory for it to load from. Let me give some examples:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; t = Geoscape(&#039;missdat&#039;)&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; t.base[0].name&lt;br /&gt;
 &#039;Main&#039;&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for x in t.base[0].soldiers:&lt;br /&gt;
         print x&lt;br /&gt;
 D Likhachev (r)aBRst (Rookie)&lt;br /&gt;
 F Robinson (r)aRbr (Rookie)&lt;br /&gt;
 Evans TU (C)C-AC*ST* (Captain)&lt;br /&gt;
 .......&lt;br /&gt;
 Sarah Watson (r)arbrst (Rookie)&lt;br /&gt;
 Ed Kemp SACK (Rookie)&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for x in t.loc.used:&lt;br /&gt;
         print x, &#039;:&#039;,  x.data	&lt;br /&gt;
 Loc[0] - XCOM Base : Base 0: Main&lt;br /&gt;
 Loc[1] - XCOM Ship : Skyranger-1&lt;br /&gt;
 Loc[2] - XCOM Ship : Interceptor-1&lt;br /&gt;
 Loc[3] - XCOM Ship : Interceptor-4&lt;br /&gt;
 Loc[4] - XCOM Base : Base 1: Asia&lt;br /&gt;
 Loc[5] - Crash Site : Large Scout-51&lt;br /&gt;
 Loc[6] - XCOM Base : Base 2: America&lt;br /&gt;
 Loc[7] - XCOM Ship : Interceptor-5&lt;br /&gt;
 ... &lt;br /&gt;
 Loc[15] - Alien Base : None&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; t.loc[5].data.damage #The crashed large scout&lt;br /&gt;
 150&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for x in t.loc[1].data.soldiers: #Skyranger 1&#039;s soldiers&lt;br /&gt;
         print x, &#039;;&#039;,	&lt;br /&gt;
 D Likhachev (r)aBRst (Rookie) ; F Robinson (r)aRbr (Rookie) ; Evans TU (C)C-AC*ST* (Captain) ; Robinson TU (Co)ACrbr*ST* (Colonel);&lt;br /&gt;
 C Dodge (S)*AC*Rbrst (Seargent) ; Yuzo Kojima SACK (Rookie) ; K Okamoto (r)W-ACr (Rookie) ; Yataka Shoji (r)C-st (Rookie) ; &lt;br /&gt;
 Austin King SACK (Rookie) ; Y Matsumara (r)C-W-ACR (Rookie) ;&lt;br /&gt;
&lt;br /&gt;
And now to show that you can chain these together. This one get&#039;s the second LOC.DAT entry (which is skyranger-1), grabs its data (the skyranger craft itself), gets the craft&#039;s second soldier (remember is all 0-based), then his/her base, that base&#039;s location, that location&#039;s data (which just goes back to the base), that base&#039;s last soldier, and then that soldier&#039;s name.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; t.loc[1].data.soldiers[1].base.loc.data.crafts[0].soldiers[-1].name&lt;br /&gt;
 &#039;Y Matsumara (r)C-W-ACR&#039;&lt;br /&gt;
&lt;br /&gt;
This is all just the tip of the iceberg!&lt;br /&gt;
&lt;br /&gt;
Right now I just have mostly Geoscape stuff made for use. The Tactical saves can be manipulated but there&#039;s no referencing other files or what not. So far there is no GUI. This is intentional as it is mean to run at the command prompt with XCOM if possible. I might whip up a generated GUI using tkinter, one that just makes fields based on the information from these class objects (read: not going to look pretty). But right now I think I&#039;m going to get on to the Tactical files (the main ones, OBREF, UNITREF, etc).&lt;br /&gt;
&lt;br /&gt;
Oh and I do have a stat string generator that is very customizeable, although probably not as simplistic.&lt;br /&gt;
&lt;br /&gt;
I also now have a simple graphical soldier equipment utility to possibly replace the ingame initial equipment screen.&lt;br /&gt;
&lt;br /&gt;
===As a tool===&lt;br /&gt;
I&#039;ve whipped up a handy file monitoring script that will run a function when a file is modified. With this I can have it automatically apply patches or fix issues whenever a game is saved. Also it could be possible with modification of the batch file that switches between Tactical and Geoscape to have it add or even replace parts of the game. (I&#039;m trying to get a soldier editor, but there&#039;s a few issues I have to work out)&lt;br /&gt;
&lt;br /&gt;
Mainly though, I can use this monitoring process to help figure out what certain bytes mean. For example when I was looking for what offset 12 does for [[OBPOS.DAT]], I simply monitored one of my save folder&#039;s obpos.dat file. Whenever it changed my script would parse the information and compare it to the last known information (rather quickly too might I add), it then printed to a seperate console the results as well as appending it to a log file. I even added more functionality by having it read the [[SAVEINFO.DAT]] file to get the save name, thus I could put some comments on what I did while I saved. Put this all together and I could see what happened to the files (or what parts I want to know about) as often as I saved, no need to alt-tab out and run a script.&lt;br /&gt;
&lt;br /&gt;
==[[LEASE.DAT]]==&lt;br /&gt;
some working notes on lease.dat&lt;br /&gt;
&lt;br /&gt;
fixed length of 180 bytes, prime factorization of 180:&lt;br /&gt;
 2^2 * 3^2 * 5, &lt;br /&gt;
&lt;br /&gt;
factors of 180: (probable line widths)&lt;br /&gt;
 2, 3, 4, 5, 6, 9, 10, 12, 15, 18, 20, 30, 36, 45, 60, 90, 180&lt;br /&gt;
&lt;br /&gt;
only offsets that seem to change (out of about 14 files) (&#039;&#039;compared from 1st to 14 others, but not 2nd or 3rd etc with the other 14 so could be more&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
 0-1,  5-17,  20-23,  26-28,  32-35,  38-41,  44-47,  50-53,  56-59,  62-65,  68-71,  74-77,  80-83,  86-89,  &lt;br /&gt;
 92-95,  98-101,  104-107,  110-113,  116-119,  122-125,  128-131,  134-137,  140-142,  146-149,  152-155,  &lt;br /&gt;
 158-161,  164-167,  170-173,&lt;br /&gt;
&lt;br /&gt;
There is a lot of symmetry in this format, lots of double 0&#039;s will line up at the line widths of the factors, with the exception of the very first byte, almost as if the first record is somehow different...&lt;br /&gt;
&lt;br /&gt;
* 13 Seems to be 0 for saves, 1 after combat and in missdat, 2 only for before combat, but I&#039;ve seen this number change in Geoscape saves, particularly when intercepting craft&lt;br /&gt;
&lt;br /&gt;
===Speculation===&lt;br /&gt;
LEASE as the name of this file makes me think of it pertaining to either:&lt;br /&gt;
* Purchased craft monthly (shouldn&#039;t need this much data)&lt;br /&gt;
* Base monthly costs&lt;br /&gt;
The &#039;orange&#039; set of values seems to be the most popular and &#039;simple&#039;.&lt;br /&gt;
&lt;br /&gt;
From tests using PyXCOM of over 70 saves, this file seems to change most often when a UFO is detected or an interceptor is launched at it. &lt;br /&gt;
&lt;br /&gt;
==Base Items store space==&lt;br /&gt;
I dug into GEOSCAPE.EXE and found the pattern of sizes like that listed on the stores page (offset 0x5DB34). However it different some areas, namely the HWP ammo was not with the actual HWPs. Also interesting was that there were gaps of 0&#039;s between some items, usually from the different groups like craft weapons, to agent weapons, to alien weapons, etc.&lt;br /&gt;
&lt;br /&gt;
I got to looking at [[PURCHASE.DAT]] as this seemed to be the only logical place for size information to be. Of particular interest was the so called &#039;sort&#039; order offset. I really doubted the programmers devoted a byte to help &#039;sort&#039; the information for display, but given what could be gleaned from that file alone it was a good guess. I&#039;m pretty sure it&#039;s an index (which technically does sort it) to at least one array (I surmise others below). I used some python scripts to read in a Purchase.dat file and a hex editor to find the pattern in geoscape.exe. &lt;br /&gt;
&lt;br /&gt;
Simply by placing the values in an array and having each item in purchase.dat use it&#039;s &#039;sort&#039; value to fetch the record in the array, everything matched up, well almost. The plasma beam and Fusion Ball Launcher were backwards (plasma had 20 space while fusion had 12). I almost gave up but then I thought what if the order is wrong? There isn&#039;t much info linking to what item a record is in that file, but I looked at the sell price. Turns out I was right, the sell price of the Fusion Ball Launcher is well known as it&#039;s the second runner up for [[Manufacturing Profitability]].&lt;br /&gt;
&lt;br /&gt;
===Other Possibilities===&lt;br /&gt;
These items have to index to English.dat somewhere (probably in the executable). My guess is that it is near the array that I found. There is probably other information such as the craft weapon statistics. The gaps between these indexes might make it possible to add new items to the game as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[INTER.DAT]]==&lt;br /&gt;
Took a stab at this file. I believe it deals with interceptions based on the name and that it changed whenever I attacked a UFO with an interceptor. However it is 568 bytes with a factorization of:&lt;br /&gt;
 2 * 2 * 2 * 71&lt;br /&gt;
Which baffles me because 71, 142, or 248 seem like weird lengths. I don&#039;t know of anything relating to these numbers in X-COM.&lt;br /&gt;
&lt;br /&gt;
I observed one set of changes that is interesting:&lt;br /&gt;
 0246: 000 ( 0) -&amp;gt; 008 ( 8)&lt;br /&gt;
 0248: 000 ( 0) -&amp;gt; 090 (5A)&lt;br /&gt;
 0388: 000 ( 0) -&amp;gt; 008 ( 8)&lt;br /&gt;
 0390: 000 ( 0) -&amp;gt; 090 (5A)&lt;br /&gt;
 0530: 000 ( 0) -&amp;gt; 008 ( 8)&lt;br /&gt;
 0532: 000 ( 0) -&amp;gt; 090 (5A)&lt;br /&gt;
&lt;br /&gt;
This appeared right after I downed a UFO in Brazil (Snakeman Large Scout on Retaliation) along with some other changes, but this set caught my eye because of the repetition, but more when I found that 388 - 246 = 142, and 530 - 388 = 142, with the significance of 142 being one of the factors of file size (2*71 = 142 -&amp;gt; 142 * 4 = 568)&lt;br /&gt;
&lt;br /&gt;
Also observed offsets 32 and 33 jump from 0&#039;s to 254 and 255 respectively and back. 30 and 31 changed somewhat but appears unrelated with the value of 32 and 33. So my guess is 4 sets of 142 bytes, with 71 2-byte values inside of each set. &lt;br /&gt;
&lt;br /&gt;
Perhaps this file is suppose to save the state of interceptions as they happen so they could be restored upon loading (which we all know crashes the game). Perhaps an adjustment could be made to this file to allow it to work, just like with the Difficulty bug and &lt;br /&gt;
&lt;br /&gt;
I might have to check this, but I think the maximum number of interceptions you can have minimized is 4, so possibly this file keeps track of each one.&lt;br /&gt;
[[IGLOB.DAT]].&lt;br /&gt;
&lt;br /&gt;
== Files to be Decoded ==&lt;br /&gt;
Here I&#039;m going to list some files that need values to be decoded. Some of them it might not be possible as a lot of the values are set to 0. Namely the MISDATA, MISSION, MISSION2 as they all use the same format but are used at different stages of the game.&lt;br /&gt;
&lt;br /&gt;
* [[MISDATA.DAT]] (and [[MISSION.DAT]], [[MISSION2.DAT]]) - probably should combine into 1 page with sections detailing what is and is not in each name&lt;br /&gt;
* [[GEODATA.DAT]] - 92 Bytes, but we only have about 10 of them decoded. I think this is what is used to generate new battlescapes, but I think it&#039;s GEOSCAPE that actually generates the [[MAP.DAT]] file&lt;br /&gt;
* [[LOC.DAT]] - Some unknown values&lt;br /&gt;
* &#039;&#039;&#039;Little to nothing known&#039;&#039;&#039;&lt;br /&gt;
** [[XBASES.DAT]] - Alien Base Info?&lt;br /&gt;
** [[INTER.DAT]] - Stores info on interceptions?&lt;br /&gt;
** [[AKNOW.DAT]] - Perhaps what the Aliens Know, as in which bases for retals&lt;br /&gt;
** [[LEASE.DAT]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=PROJECT.DAT&amp;diff=11550</id>
		<title>PROJECT.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=PROJECT.DAT&amp;diff=11550"/>
		<updated>2007-04-11T02:41:55Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: added link to ENGLISH.DAT&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(&amp;lt;i&amp;gt;Zaimoni&amp;lt;/i&amp;gt;: This records some working notes.)&lt;br /&gt;
&lt;br /&gt;
Presumed: common C enumeration of projects with [[RESEARCH.DAT]] (96 projects).&lt;br /&gt;
* Each research project&#039;s scientist-days remaining is stored in a little-endian word (low-order byte first).  For realistic cases, the difference between signed word and unsigned word is irrelevant.  96 words i.e. 192 bytes.&lt;br /&gt;
* Then each research project&#039;s scientists allocated is stored as a byte.  96 bytes.&lt;br /&gt;
* Each base thus uses 288 bytes to represent the current research project state.&lt;br /&gt;
&lt;br /&gt;
A zero for scientist-days merely means that the project is not actively being researched.  It may have been not started, or have been completed.&lt;br /&gt;
&lt;br /&gt;
Project names are elsewhere in [[ENGLISH.DAT]].  Offsets are solely in hexadecimal for this iteration.  The first offset is for scientist-days (2 Bytes), the second is for number of scientists allocated.&lt;br /&gt;
&lt;br /&gt;
From an &amp;quot;ask the machine&amp;quot; savegame, in order, for the first base:&lt;br /&gt;
==Structure==&lt;br /&gt;
{| {{StdDescTable}} width=&amp;quot;95%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+ Offsets for Project Items&lt;br /&gt;
| {{StdDescTable Heading}} | Topic Name&lt;br /&gt;
| {{StdDescTable Heading}} | Scientist Days&lt;br /&gt;
| {{StdDescTable Heading}} | Scientists &lt;br /&gt;
| {{StdDescTable Heading}} | Topic Name&lt;br /&gt;
| {{StdDescTable Heading}} | Scientist Days&lt;br /&gt;
| {{StdDescTable Heading}} | Scientists &lt;br /&gt;
|-&lt;br /&gt;
|  Laser weapons || 0 &#039;&#039;(0x00)&#039;&#039; || 192 &#039;&#039;(0xC0)&#039;&#039;&lt;br /&gt;
|  Muton Corpse || 96 &#039;&#039;(0x60)&#039;&#039; || 240 &#039;&#039;(0xF0)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Motion Detector || 2 &#039;&#039;(0x02)&#039;&#039; || 193 &#039;&#039;(0xC1)&#039;&#039;&lt;br /&gt;
|  Floater Corpse || 98 &#039;&#039;(0x62)&#039;&#039; || 241 &#039;&#039;(0xF1)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Medikit || 4 &#039;&#039;(0x04)&#039;&#039; || 194 &#039;&#039;(0xC2)&#039;&#039;&lt;br /&gt;
|  Celatid Corpse || 100 &#039;&#039;(0x64)&#039;&#039; || 242 &#039;&#039;(0xF2)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Psi-Amp || 6 &#039;&#039;(0x06)&#039;&#039; || 195 &#039;&#039;(0xC3)&#039;&#039;&lt;br /&gt;
|  Silacoid Corpse || 102 &#039;&#039;(0x66)&#039;&#039; || 243 &#039;&#039;(0xF3)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Heavy Plasma || 8 &#039;&#039;(0x08)&#039;&#039; || 196 &#039;&#039;(0xC4)&#039;&#039;&lt;br /&gt;
|  Chryssalid Corpse || 104 &#039;&#039;(0x68)&#039;&#039; || 244 &#039;&#039;(0xF4)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Heavy Plasma Clip || 10 &#039;&#039;(0x0A)&#039;&#039; || 197 &#039;&#039;(0xC5)&#039;&#039;&lt;br /&gt;
|  Reaper Corpse || 106 &#039;&#039;(0x6A)&#039;&#039; || 245 &#039;&#039;(0xF5)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Plasma Rifle || 12 &#039;&#039;(0x0C)&#039;&#039; || 198 &#039;&#039;(0xC6)&#039;&#039;&lt;br /&gt;
|  Sectopod Corpse || 108 &#039;&#039;(0x6C)&#039;&#039; || 246 &#039;&#039;(0xF6)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Plasma Rifle Clip || 14 &#039;&#039;(0x0E)&#039;&#039; || 199 &#039;&#039;(0xC7)&#039;&#039;&lt;br /&gt;
|  Cyberdisc Corpse || 110 &#039;&#039;(0x6E)&#039;&#039; || 247 &#039;&#039;(0xF7)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Plasma Pistol || 16 &#039;&#039;(0x10)&#039;&#039; || 200 &#039;&#039;(0xC8)&#039;&#039;&lt;br /&gt;
|  Alien Origins || 112 &#039;&#039;(0x70)&#039;&#039; || 248 &#039;&#039;(0xF8)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Plasma Pistol Clip || 18 &#039;&#039;(0x12)&#039;&#039; || 201 &#039;&#039;(0xC9)&#039;&#039;&lt;br /&gt;
|  The Martian Solution || 114 &#039;&#039;(0x72)&#039;&#039; || 249 &#039;&#039;(0xF9)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Blaster Launcher || 20 &#039;&#039;(0x14)&#039;&#039; || 202 &#039;&#039;(0xCA)&#039;&#039;&lt;br /&gt;
|  Cydonia or Bust || 116 &#039;&#039;(0x74)&#039;&#039; || 250 &#039;&#039;(0xFA)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Blaster Bomb || 22 &#039;&#039;(0x16)&#039;&#039; || 203 &#039;&#039;(0xCB)&#039;&#039;&lt;br /&gt;
|  Personal Armor || 118 &#039;&#039;(0x76)&#039;&#039; || 251 &#039;&#039;(0xFB)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Stun Launcher || 24 &#039;&#039;(0x18)&#039;&#039; || 204 &#039;&#039;(0xCC)&#039;&#039;&lt;br /&gt;
|  Power Suit || 120 &#039;&#039;(0x78)&#039;&#039; || 252 &#039;&#039;(0xFC)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Stun Bomb || 26 &#039;&#039;(0x1A)&#039;&#039; || 205 &#039;&#039;(0xCD)&#039;&#039;&lt;br /&gt;
|  Flying Suit || 122 &#039;&#039;(0x7A)&#039;&#039; || 253 &#039;&#039;(0xFD)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Alien Grenade || 28 &#039;&#039;(0x1C)&#039;&#039; || 206 &#039;&#039;(0xCE)&#039;&#039;&lt;br /&gt;
|  Sectoid Commander || 124 &#039;&#039;(0x7C)&#039;&#039; || 254 &#039;&#039;(0xFE)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Elerium-115 || 30 &#039;&#039;(0x1E)&#039;&#039; || 207 &#039;&#039;(0xCF)&#039;&#039;&lt;br /&gt;
|  Sectoid Leader || 126 &#039;&#039;(0x7E)&#039;&#039; || 255 &#039;&#039;(0xFF)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Mind Probe || 32 &#039;&#039;(0x20)&#039;&#039; || 208 &#039;&#039;(0xD0)&#039;&#039;&lt;br /&gt;
|  Sectoid Engineer || 128 &#039;&#039;(0x80)&#039;&#039; || 256 &#039;&#039;(0x100)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  UFO Power Source || 34 &#039;&#039;(0x22)&#039;&#039; || 209 &#039;&#039;(0xD1)&#039;&#039;&lt;br /&gt;
|  Sectoid Medic || 130 &#039;&#039;(0x82)&#039;&#039; || 257 &#039;&#039;(0x101)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  UFO Navigation || 36 &#039;&#039;(0x24)&#039;&#039; || 210 &#039;&#039;(0xD2)&#039;&#039;&lt;br /&gt;
|  Sectoid Navigator || 132 &#039;&#039;(0x84)&#039;&#039; || 258 &#039;&#039;(0x102)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  UFO Construction || 38 &#039;&#039;(0x26)&#039;&#039; || 211 &#039;&#039;(0xD3)&#039;&#039;&lt;br /&gt;
|  Sectoid Soldier || 134 &#039;&#039;(0x86)&#039;&#039; || 259 &#039;&#039;(0x103)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Alien Food || 40 &#039;&#039;(0x28)&#039;&#039; || 212 &#039;&#039;(0xD4)&#039;&#039;&lt;br /&gt;
|  Snakeman Commander || 136 &#039;&#039;(0x88)&#039;&#039; || 260 &#039;&#039;(0x104)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Alien Reproduction || 42 &#039;&#039;(0x2A)&#039;&#039; || 213 &#039;&#039;(0xD5)&#039;&#039;&lt;br /&gt;
|  Snakeman Leader || 138 &#039;&#039;(0x8A)&#039;&#039; || 261 &#039;&#039;(0x105)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Alien Entertainment || 44 &#039;&#039;(0x2C)&#039;&#039; || 214 &#039;&#039;(0xD6)&#039;&#039;&lt;br /&gt;
|  Snakeman Engineer || 140 &#039;&#039;(0x8C)&#039;&#039; || 262 &#039;&#039;(0x106)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Alien Surgery || 46 &#039;&#039;(0x2E)&#039;&#039; || 215 &#039;&#039;(0xD7)&#039;&#039;&lt;br /&gt;
|  Snakeman Medic (unreachable [[Snakeman]]) || 142 &#039;&#039;(0x8E)&#039;&#039; || 263 &#039;&#039;(0x107)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Examination Room || 48 &#039;&#039;(0x30)&#039;&#039; || 216 &#039;&#039;(0xD8)&#039;&#039;&lt;br /&gt;
|  Snakeman Navigator || 144 &#039;&#039;(0x90)&#039;&#039; || 264 &#039;&#039;(0x108)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Alien Alloys || 50 &#039;&#039;(0x32)&#039;&#039; || 217 &#039;&#039;(0xD9)&#039;&#039;&lt;br /&gt;
|  Snakeman Soldier || 146 &#039;&#039;(0x92)&#039;&#039; || 265 &#039;&#039;(0x109)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  New Fighter || 52 &#039;&#039;(0x34)&#039;&#039; || 218 &#039;&#039;(0xDA)&#039;&#039;&lt;br /&gt;
|  Ethereal Commander || 148 &#039;&#039;(0x94)&#039;&#039; || 266 &#039;&#039;(0x10A)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  New Fighter-Transporter || 54 &#039;&#039;(0x36)&#039;&#039; || 219 &#039;&#039;(0xDB)&#039;&#039;&lt;br /&gt;
|  Ethereal Leader || 150 &#039;&#039;(0x96)&#039;&#039; || 267 &#039;&#039;(0x10B)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Ultimate Craft || 56 &#039;&#039;(0x38)&#039;&#039; || 220 &#039;&#039;(0xDC)&#039;&#039;&lt;br /&gt;
|  Ethereal Engineer (unreachable [[Ethereal]]) || 152 &#039;&#039;(0x98)&#039;&#039; || 268 &#039;&#039;(0x10C)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Laser Pistol || 58 &#039;&#039;(0x3A)&#039;&#039; || 221 &#039;&#039;(0xDD)&#039;&#039;&lt;br /&gt;
|  Ethereal Medic (unreachable) || 154 &#039;&#039;(0x9A)&#039;&#039; || 269 &#039;&#039;(0x10D)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Laser Rifle || 60 &#039;&#039;(0x3C)&#039;&#039; || 222 &#039;&#039;(0xDE)&#039;&#039;&lt;br /&gt;
|  Ethereal Navigator (unreachable) || 156 &#039;&#039;(0x9C)&#039;&#039; || 270 &#039;&#039;(0x10E)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Heavy Laser || 62 &#039;&#039;(0x3E)&#039;&#039; || 223 &#039;&#039;(0xDF)&#039;&#039;&lt;br /&gt;
|  Ethereal Soldier || 158 &#039;&#039;(0x9E)&#039;&#039; || 271 &#039;&#039;(0x10F)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Laser Cannon || 64 &#039;&#039;(0x40)&#039;&#039; || 224 &#039;&#039;(0xE0)&#039;&#039;&lt;br /&gt;
|  Muton Commander (unreachable [[Muton]]) || 160 &#039;&#039;(0xA0)&#039;&#039; || 272 &#039;&#039;(0x110)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Plasma Cannon || 66 &#039;&#039;(0x42)&#039;&#039; || 225 &#039;&#039;(0xE1)&#039;&#039;&lt;br /&gt;
|  Muton Leader (unreachable) || 162 &#039;&#039;(0xA2)&#039;&#039; || 273 &#039;&#039;(0x111)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Fusion Missile (Fusion Ball Launcher) || 68 &#039;&#039;(0x44)&#039;&#039; || 226 &#039;&#039;(0xE2)&#039;&#039;&lt;br /&gt;
|  Muton Engineer || 164 &#039;&#039;(0xA4)&#039;&#039; || 274 &#039;&#039;(0x112)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Laser Defense || 70 &#039;&#039;(0x46)&#039;&#039; || 227 &#039;&#039;(0xE3)&#039;&#039;&lt;br /&gt;
|  Muton Medic (unreachable) || 166 &#039;&#039;(0xA6)&#039;&#039; || 275 &#039;&#039;(0x113)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Plasma Defense || 72 &#039;&#039;(0x48)&#039;&#039; || 228 &#039;&#039;(0xE4)&#039;&#039;&lt;br /&gt;
|  Muton Navigator || 168 &#039;&#039;(0xA8)&#039;&#039; || 276 &#039;&#039;(0x114)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Fusion Defense || 74 &#039;&#039;(0x4A)&#039;&#039; || 229 &#039;&#039;(0xE5)&#039;&#039;&lt;br /&gt;
|  Muton Soldier || 170 &#039;&#039;(0xAA)&#039;&#039; || 277 &#039;&#039;(0x115)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Grav Shield || 76 &#039;&#039;(0x4C)&#039;&#039; || 230 &#039;&#039;(0xE6)&#039;&#039;&lt;br /&gt;
|  Floater Commander || 172 &#039;&#039;(0xAC)&#039;&#039; || 278 &#039;&#039;(0x116)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Mind Shield || 78 &#039;&#039;(0x4E)&#039;&#039; || 231 &#039;&#039;(0xE7)&#039;&#039;&lt;br /&gt;
|  Floater Leader || 174 &#039;&#039;(0xAE)&#039;&#039; || 279 &#039;&#039;(0x117)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Psionic Laboratory || 80 &#039;&#039;(0x50)&#039;&#039; || 232 &#039;&#039;(0xE8)&#039;&#039;&lt;br /&gt;
|  Floater Engineer || 176 &#039;&#039;(0xB0)&#039;&#039; || 280 &#039;&#039;(0x118)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Hyper-Wave Decoder || 82 &#039;&#039;(0x52)&#039;&#039; || 233 &#039;&#039;(0xE9)&#039;&#039;&lt;br /&gt;
|  Floater Medic || 178 &#039;&#039;(0xB2)&#039;&#039; || 281 &#039;&#039;(0x119)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  NOT USED (Tank/Laser Cannon?) || 84 &#039;&#039;(0x54)&#039;&#039; || 234 &#039;&#039;(0xEA)&#039;&#039;&lt;br /&gt;
|  Floater Navigator || 180 &#039;&#039;(0xB4)&#039;&#039; || 282 &#039;&#039;(0x11A)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  NOT USED (Plasma Hovertank?) || 86 &#039;&#039;(0x56)&#039;&#039; || 235 &#039;&#039;(0xEB)&#039;&#039;&lt;br /&gt;
|  Floater Soldier || 182 &#039;&#039;(0xB6)&#039;&#039; || 283 &#039;&#039;(0x11B)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  NOT USED (Launcher Hovertank?) || 88 &#039;&#039;(0x58)&#039;&#039; || 236 &#039;&#039;(0xEC)&#039;&#039;&lt;br /&gt;
|  Celatid Terrorist || 184 &#039;&#039;(0xB8)&#039;&#039; || 284 &#039;&#039;(0x11C)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Sectoid Corpse || 90 &#039;&#039;(0x5A)&#039;&#039; || 237 &#039;&#039;(0xED)&#039;&#039;&lt;br /&gt;
|  Silicoid Terrorist || 186 &#039;&#039;(0xBA)&#039;&#039; || 285 &#039;&#039;(0x11D)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Snakeman Corpse || 92 &#039;&#039;(0x5C)&#039;&#039; || 238 &#039;&#039;(0xEE)&#039;&#039;&lt;br /&gt;
|  Chryssalid Terrorist || 188 &#039;&#039;(0xBC)&#039;&#039; || 286 &#039;&#039;(0x11E)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  Ethereal Corpse || 94 &#039;&#039;(0x5E)&#039;&#039; || 239 &#039;&#039;(0xEF)&#039;&#039;&lt;br /&gt;
|  Reaper Terrorist || 190 &#039;&#039;(0xBE)&#039;&#039; || 287 &#039;&#039;(0x11F)&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
==See Also==&lt;br /&gt;
* [[ASTORE.DAT]] - Aliens in [[Alien Containment|Containment]]&lt;br /&gt;
* [[BASE.DAT]] - Base Information, including scientists&lt;br /&gt;
* [[MISDATA.DAT]] - Items that can be used in missions (updated on completion of research)&lt;br /&gt;
* [[OBDATA.DAT]] - [[Equipment]] Stats&lt;br /&gt;
* [[PRODUCT.DAT]] - What can be [[Manufacturing|produced]] (updated on completion of research)&lt;br /&gt;
* [[RESEARCH.DAT]] - Scores for completing [[Research]]&lt;br /&gt;
* [[UP.DAT]] - [[UFOpaedia]] entries (updated on completion of research)&lt;br /&gt;
* [[Saved Game Files]]&lt;br /&gt;
[[Category:Game Files]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=LOC.DAT&amp;diff=11549</id>
		<title>LOC.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=LOC.DAT&amp;diff=11549"/>
		<updated>2007-04-11T02:38:43Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: made notes stand out more, added probable bounds on coordinates, and more&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Ripped from [http://www.stonepool.com/xcom/hacking/index.html Hatfarm / Chris Voss&#039;s great pages]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LOC.DAT:&#039;&#039;&#039; Each entry is 20 bytes long (most of this info is from NKF, thanks a lot)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;00:&#039;&#039;&#039; Object type:&lt;br /&gt;
    00 - Unused entry&lt;br /&gt;
    01 - Alien Ship&lt;br /&gt;
    02 - X-Com Ship&lt;br /&gt;
    03 - X-Com Base&lt;br /&gt;
    04 - Alien Base&lt;br /&gt;
    05 - Crash Site&lt;br /&gt;
    06 - Landed UFO&lt;br /&gt;
    07 - Waypoint&lt;br /&gt;
    08 - Terror Site&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;01:&#039;&#039;&#039; Object table reference - Possible values - 00 to FF - Just a reference. This just shows how many there are of this type on the geoscape. (UFOs and X-COM craft are both type ship and will both increment this number.) This is used for determining base number, for use in other files.&lt;br /&gt;
:&#039;&#039;What&#039;s the last sentence suppose to mean? The next base number for Alien Bases? I thought that was in [[UIGLOB.DAT]] --[[User:Pi Masta|Pi Masta]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;02-03:&#039;&#039;&#039; Horizontal starting coordinates (low bit then high bit respectively). 0 - 2880&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;04-05:&#039;&#039;&#039; Vertical starting coordinates (low bit then high bit respectively). -720 - 720&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;NOTE&#039;&#039;&#039;: Ships don&#039;t land on the exact place that the alien ship is, that&#039;s why there will be discrepancies between the alien and x-com ship destination info.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;06-07:&#039;&#039;&#039; Horizontal destination coordinates (low bit then high bit respectively). 0 - 2880&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;08-09:&#039;&#039;&#039; Vertical destination coordinates (low bit then high bit respectively). -720 - 720&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;NOTE&#039;&#039;&#039;: The maximum and minimum values for the coordinates is assumed to be the same as [[WORLD.DAT]] (which makes sense). They haven&#039;t actually been tested. (&#039;&#039;I&#039;m too lazy for that --[[User:Pi Masta|Pi Masta]]&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0A-0B:&#039;&#039;&#039; Appears to be the &#039;count suffix&#039; of the item, eg: Skyranger-&#039;&#039;&#039;1&#039;&#039;&#039; or Crash Site-&#039;&#039;&#039;47&#039;&#039;&#039;. It appears to have no meaning for XCOM Bases, but for other types where it is set, the next byte (0B) always seems to be 0, and is probably the high byte but I&#039;ve never gotten over 255 UFO&#039;s or crafts to test this. &#039;&#039;--[[User:Pi Masta|Pi Masta]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0C-0F:&#039;&#039;&#039; NEED HELP&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:&#039;&#039;&#039; Something to do with visibility, not really sure however.&lt;br /&gt;
 Possible bit field? --[[User:Pi Masta|Pi Masta]] 16:55, 13 March 2007 (PDT)&lt;br /&gt;
 bit&lt;br /&gt;
 2 (value 4) seen this change on alien crafts when I targeted it for the first time&lt;br /&gt;
 1 (value 2) Alien craft always have this flagged, for Xcom craft 0 - At base or patrolling, 1 - Moving (moving bit field?)&lt;br /&gt;
 0 (value 1) not visible/detected field, 0 - visible, 1 - not visible&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;11-13:&#039;&#039;&#039; NEED HELP&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&#039;NOTE&#039;&#039;&#039;: Other files (e.g., [[CRAFT.DAT]]) reference the entry number for the base. For example, if the value is 0A then that base is in entry 10 of this file.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
* [[BASE.DAT]] - Contains information about Xcom bases&lt;br /&gt;
* [[CRAFT.DAT]] - Contains information on the crafts&lt;br /&gt;
* [[GEODATA.DAT]] - Contains information about what crafts and terrain a battle should use&lt;br /&gt;
* [[WORLD.DAT]] - Defines the zones and terrain on the globe&lt;br /&gt;
* [[Saved Game Files]]&lt;br /&gt;
[[Category:Game Files]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=TEXTURE.DAT&amp;diff=11548</id>
		<title>TEXTURE.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=TEXTURE.DAT&amp;diff=11548"/>
		<updated>2007-04-10T23:08:34Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: updated info and linked to WORLD.DAT&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==General Information==&lt;br /&gt;
Graphics file containing the textures for the Geoscape map&lt;br /&gt;
&lt;br /&gt;
There are 3 sets of 13 images (ignore the last 6 blank images). These correspond to values of 0 - 12 for the last value stored in [[WORLD.DAT]]. The different sets are used based upon the zoom level the user is currently at.&lt;br /&gt;
&lt;br /&gt;
==Image==&lt;br /&gt;
[[Image:TEXTUREDAT.JPG]]&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
* [[GEOGRAPH]]&lt;br /&gt;
[[Category:Game Files]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=WORLD.DAT&amp;diff=11547</id>
		<title>WORLD.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=WORLD.DAT&amp;diff=11547"/>
		<updated>2007-04-10T23:06:31Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: Last value is the Terrain Texture&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The original XCOM file is 13320 bytes long, while TFTD is 14660 bytes long. However, each uses the same 20-byte record length giving the original 666 entries and TFTD 733 entries. This file describes the terrain on the geoscape screen using quadrilateral polygons and  triangles.&lt;br /&gt;
&lt;br /&gt;
The first 16 bytes of file contain the points for the quad/triangle. 4 sets of 2 short (2-byte) integers, designating the &#039;X&#039; and &#039;Y&#039; coordinate (or latitude and longitude if you prefer). If the last set has an x value of -1 then it is to be rendered as a triangle, otherwise it is a quad.&lt;br /&gt;
&lt;br /&gt;
The last 4 bytes in the record contain the terrain type. This could be a long integer or 2 short integers as the last 2 bytes in each record are 0.&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
{| {{StdDescTable}}&lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
! Offsets !! Meaning !! Values&lt;br /&gt;
|-&lt;br /&gt;
| 0-1   || First X coordinate || 0 - 2880&lt;br /&gt;
|-&lt;br /&gt;
| 2-3   || First Y coordinate || -720 - 720&lt;br /&gt;
|-&lt;br /&gt;
| 4-5   || Second X coordinate || 0 - 2880&lt;br /&gt;
|-&lt;br /&gt;
| 6-7   || Second Y coordinate || -720 - 720&lt;br /&gt;
|-&lt;br /&gt;
| 8-9   || Third X coordinate || 0 - 2880&lt;br /&gt;
|-&lt;br /&gt;
| 10-11 || Third Y coordinate || -720 - 720&lt;br /&gt;
|-&lt;br /&gt;
| 12-13 || Fourth* X coordinate || 0 - 2880&lt;br /&gt;
|-&lt;br /&gt;
| 14-15 || Fourth* Y coordinate || -720 - 720&lt;br /&gt;
|-&lt;br /&gt;
| 16-19 || Terrain Texture [[#The last value|See Below]] || 0-10 and 12&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;small&amp;gt;&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; As mentioned above, the fourth coordinate could be (-1, 0) denoting a triangle&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The values were obtained only on the original XCOM. Presumably the same restrictions apply for TFTD except for maybe the terrain types. Also the X ranges are assumed to max at 2880 as this is a multiple of 360, the max observed in the file is actually 2877&lt;br /&gt;
&lt;br /&gt;
=== The last value ===&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| [[Image:xcom_render2.gif|360px]]&lt;br /&gt;
| &lt;br /&gt;
Rendering of the data in WORLD.DAT for the original XCOM. The colors are obtained by using offset 16-19 for each record. Click on the image to see the exact color key, generally speaking though it goes bright green to dark green for 0-5, and dark yellow to white for 6 - 12. Value 11 however is not used.&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:tftd_render.gif|360px]]&lt;br /&gt;
|&lt;br /&gt;
Rendering of the data in WORLD.DAT for TFTD. Colors again are obtained by using the same offset as before. The colors simply go from  blue to white for 0 to 13. It looks like it designates the depth of the water in the areas. Judging by the Great Barrier Reef as one of the shallowest places in the ocean, the lower the number the shallower the water. Thus blue is shallow and white is deep. (A bit counter-intuitive, I apologize [[User:Pi Masta|Pi Masta]])&lt;br /&gt;
|}&lt;br /&gt;
Originally I thought the last value was the terrain type but I think that it cannot be since there are only 6 real terrain types on the map (10 in all, but xcom base, alien base, city, and mars aren&#039;t on the world map). For TFTD it seems obvious it is designating depths, but for XCOM I don&#039;t know what 12 different values would mean for terrain since there should only be 6.&lt;br /&gt;
&lt;br /&gt;
Also TFTD seemed to have overlapping polygons at places whereas XCOM didn&#039;t (exception to the poles, which is probably because these polygon&#039;s are rendered to a sphere not a flat surface).&lt;br /&gt;
&lt;br /&gt;
--[[User:Pi Masta|Pi Masta]] 15:24, 10 April 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;UPDATE:&#039;&#039;&#039;&lt;br /&gt;
Ok, I believe these last values map to [[TEXTURE.DAT]]. There seems to be 3 sets of 13 textures, with the 13th one always looking like ice chunks (white on my rendering). As to which set of 13 textures it will use where I think it depends on the zoom level. It seems though that multiple textures map to the same terrain type for generating a map. If you zoom in enough you will notice different textures for grassy and forested areas. As to what number maps to what generated terrain and where that&#039;s stored is most likely in the executable.&lt;br /&gt;
&lt;br /&gt;
Also, each polygon has it&#039;s light calculated individually, This gives rise to the effect of a large area of the same texture having different colors.&lt;br /&gt;
&lt;br /&gt;
The country and regional borders must be stored in the executable somewhere. I&#039;ve tried hard looking for the position of cities in there hoping the position would be near it&#039;s [[ENGLISH.DAT]] index, but I haven&#039;t had much luck. --[[User:Pi Masta|Pi Masta]] 16:06, 10 April 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[Saved Game Files]]&lt;br /&gt;
&lt;br /&gt;
[[COS.DAT]]&lt;br /&gt;
[[Category:Game Files]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:WORLD.DAT&amp;diff=11546</id>
		<title>Talk:WORLD.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:WORLD.DAT&amp;diff=11546"/>
		<updated>2007-04-10T22:34:42Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;   // World.Dat = World Map Terrain&lt;br /&gt;
   &lt;br /&gt;
   typedef struct worlddat&lt;br /&gt;
   {&lt;br /&gt;
      short         QuadData[4][2]; // Coordinates of quadrilateral&lt;br /&gt;
      unsigned long texture;        // Terrain texture of quad&lt;br /&gt;
   } WorldDat;&lt;br /&gt;
   &lt;br /&gt;
   #define MaxQuads 768      // Observed values, XCOM = 666, TFTD = 733&lt;br /&gt;
&lt;br /&gt;
QuadData/8 = realworld latitude and longitude numbers.&lt;br /&gt;
&lt;br /&gt;
if QuadData[3][1] = -1 then the shape is a triangle and that entery is not used. (for you non programers QuadData[0] is the first so [3] is the forth.)&lt;br /&gt;
&lt;br /&gt;
This may not be usefull for the wiki but I once wrote a program to detect what world.dat entry a givin ship was located in and therefor what texture/terrain file used to create the battlescape map. I have the function if anyone is interested in the math.&lt;br /&gt;
&lt;br /&gt;
--[[User:BladeFireLight|BladeFireLight]] 21:24, 20 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
:Gah, I just spent the last 20 minutes or so figuring this file out, wish I would have seen this before. &lt;br /&gt;
&lt;br /&gt;
:Wonder how it defines the countries since this file only seems to designate terrain types. Maybe indexed all the polygons in this file? Be tough to find it then...&lt;br /&gt;
&lt;br /&gt;
Oh, and one thing. When QuadData[3][&#039;&#039;&#039;0&#039;&#039;&#039;] is -1 when it designates a triangle (and actually QuadData[3][1] is 0 as well).&lt;br /&gt;
&lt;br /&gt;
I&#039;ll probably put this info on the page article here soon though. --[[User:Pi Masta|Pi Masta]] 19:42, 5 April 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Pi Masta, can you post an overlay of the TFTD world map? My first thought was that it was a representation of the quad&#039;s depth, but that doesn&#039;t seem entirely right either. Or perhaps it&#039;s a combination of terrain and height in the single byte? - [[User:NKF|NKF]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Yeah it definitely holds terrain data. the TFTD map took a bit to recognize (aka make sure I was rendering it correctly) as it defines the oceans and not the land. I don&#039;t remember the depths that TFTD had, but didn&#039;t it also have missions on land as well? With differing land types? I never got into TFTD so my knowledge is limited.&lt;br /&gt;
&lt;br /&gt;
I probably should upload a wire-frame version of the TFTD map, where you can see some of the overlaps. Well, I assume they are overlaps, otherwise they are really really small triangles.&lt;br /&gt;
&lt;br /&gt;
This file is a bit of a pain to render as the points will cross the prime meridian thus X values will go from say 6 to 2700 to 2750 to 200, etc. in the same polygon line. I broke them up and split polygons when the difference was large and for TFTD it worked great. It was XCOM that was a problem and eventually I just excluded the troublesome polygons from being split (still rendered).&lt;br /&gt;
&lt;br /&gt;
--[[User:Pi Masta|Pi Masta]] 15:34, 10 April 2007 (PDT)&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=WORLD.DAT&amp;diff=11545</id>
		<title>WORLD.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=WORLD.DAT&amp;diff=11545"/>
		<updated>2007-04-10T22:24:05Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: Updated, added XCOM and TFTD map with sensible color schemes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The original XCOM file is 13320 bytes long, while TFTD is 14660 bytes long. However, each uses the same 20-byte record length giving the original 666 entries and TFTD 733 entries. This file describes the terrain on the geoscape screen using quadrilateral polygons and  triangles.&lt;br /&gt;
&lt;br /&gt;
The first 16 bytes of file contain the points for the quad/triangle. 4 sets of 2 short (2-byte) integers, designating the &#039;X&#039; and &#039;Y&#039; coordinate (or latitude and longitude if you prefer). If the last set has an x value of -1 then it is to be rendered as a triangle, otherwise it is a quad.&lt;br /&gt;
&lt;br /&gt;
The last 4 bytes in the record contain the terrain type. This could be a long integer or 2 short integers as the last 2 bytes in each record are 0.&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
{| {{StdDescTable}}&lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
! Offsets !! Meaning !! Values&lt;br /&gt;
|-&lt;br /&gt;
| 0-1   || First X coordinate || 0 - 2880&lt;br /&gt;
|-&lt;br /&gt;
| 2-3   || First Y coordinate || -720 - 720&lt;br /&gt;
|-&lt;br /&gt;
| 4-5   || Second X coordinate || 0 - 2880&lt;br /&gt;
|-&lt;br /&gt;
| 6-7   || Second Y coordinate || -720 - 720&lt;br /&gt;
|-&lt;br /&gt;
| 8-9   || Third X coordinate || 0 - 2880&lt;br /&gt;
|-&lt;br /&gt;
| 10-11 || Third Y coordinate || -720 - 720&lt;br /&gt;
|-&lt;br /&gt;
| 12-13 || Fourth* X coordinate || 0 - 2880&lt;br /&gt;
|-&lt;br /&gt;
| 14-15 || Fourth* Y coordinate || -720 - 720&lt;br /&gt;
|-&lt;br /&gt;
| 16-19 || &amp;lt;s&amp;gt;Terrain Type&amp;lt;/s&amp;gt; [[#The last value|See Below]] || 0-10 and 12&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;small&amp;gt;&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; As mentioned above, the fourth coordinate could be (-1, 0) denoting a triangle&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The values were obtained only on the original XCOM. Presumably the same restrictions apply for TFTD except for maybe the terrain types. Also the X ranges are assumed to max at 2880 as this is a multiple of 360, the max observed in the file is actually 2877&lt;br /&gt;
&lt;br /&gt;
=== The last value ===&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| [[Image:xcom_render2.gif|360px]]&lt;br /&gt;
| &lt;br /&gt;
Rendering of the data in WORLD.DAT for the original XCOM. The colors are obtained by using offset 16-19 for each record. Click on the image to see the exact color key, generally speaking though it goes bright green to dark green for 0-5, and dark yellow to white for 6 - 12. Value 11 however is not used.&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:tftd_render.gif|360px]]&lt;br /&gt;
|&lt;br /&gt;
Rendering of the data in WORLD.DAT for TFTD. Colors again are obtained by using the same offset as before. The colors simply go from  blue to white for 0 to 13. It looks like it designates the depth of the water in the areas. Judging by the Great Barrier Reef as one of the shallowest places in the ocean, the lower the number the shallower the water. Thus blue is shallow and white is deep. (A bit counter-intuitive, I apologize [[User:Pi Masta|Pi Masta]])&lt;br /&gt;
|}&lt;br /&gt;
Originally I thought the last value was the terrain type but I think that it cannot be since there are only 6 real terrain types on the map (10 in all, but xcom base, alien base, city, and mars aren&#039;t on the world map). For TFTD it seems obvious it is designating depths, but for XCOM I don&#039;t know what 12 different values would mean for terrain since there should only be 6.&lt;br /&gt;
&lt;br /&gt;
Also TFTD seemed to have overlapping polygons at places whereas XCOM didn&#039;t (exception to the poles, which is probably because these polygon&#039;s are rendered to a sphere not a flat surface).&lt;br /&gt;
&lt;br /&gt;
--[[User:Pi Masta|Pi Masta]] 15:24, 10 April 2007 (PDT)&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[Saved Game Files]]&lt;br /&gt;
&lt;br /&gt;
[[COS.DAT]]&lt;br /&gt;
[[Category:Game Files]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=File:Tftd_render.gif&amp;diff=11544</id>
		<title>File:Tftd render.gif</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=File:Tftd_render.gif&amp;diff=11544"/>
		<updated>2007-04-10T22:04:31Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: added color key table, sorry about last file&amp;#039;s summary&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Rendering of [[WORLD.DAT]] for TFTD&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Color Key:&#039;&#039;&#039;&lt;br /&gt;
{| {{stdDescTable}}&lt;br /&gt;
|- {{stdDescTable_Header}}&lt;br /&gt;
! # !! HTML !! Sample&lt;br /&gt;
|-&lt;br /&gt;
| 0 || #1313FF ||style=&amp;quot;background: #1313FF;&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 1 || #2626FF ||style=&amp;quot;background: #2626FF;&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 2 || #3939FF ||style=&amp;quot;background: #3939FF;&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 3 || #4C4CFF ||style=&amp;quot;background: #4C4CFF;&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 4 || #5F5FFF ||style=&amp;quot;background: #5F5FFF;&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 5 || #7272FF ||style=&amp;quot;background: #7272FF;&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 6 || #8585FF ||style=&amp;quot;background: #8585FF;&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 7 || #9898FF ||style=&amp;quot;background: #9898FF;&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 8 || #ABABFF ||style=&amp;quot;background: #ABABFF;&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 9 || #BEBEFF ||style=&amp;quot;background: #BEBEFF;&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 10 || #D1D1FF ||style=&amp;quot;background: #D1D1FF;&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 11 || #E4E4FF ||style=&amp;quot;background: #E4E4FF;&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 12 || #F7F7FF ||style=&amp;quot;background: #F7F7FF;&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=File:Tftd_render.gif&amp;diff=11543</id>
		<title>File:Tftd render.gif</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=File:Tftd_render.gif&amp;diff=11543"/>
		<updated>2007-04-10T22:02:18Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: Rendering of WORLD.DAT for TFTD&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Rendering of [[WORLD.DAT]] for TFTD&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=File:Xcom_render2.gif&amp;diff=11542</id>
		<title>File:Xcom render2.gif</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=File:Xcom_render2.gif&amp;diff=11542"/>
		<updated>2007-04-10T22:00:50Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: got the Table to display colors right now...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Rendering of [[WORLD.DAT]] for the original XCOM.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Color key:&#039;&#039;&#039;&lt;br /&gt;
{| {{stdDescTable}}&lt;br /&gt;
|- {{stdDescTable_Heading}}&lt;br /&gt;
! # !! HTML !! Sample&lt;br /&gt;
|-&lt;br /&gt;
| 0 || #7FFE11 ||style=&amp;quot;background: #7FFE11;&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 1 || #6CD911 ||style=&amp;quot;background: #6CD911;&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 2 || #5AB411 ||style=&amp;quot;background: #5AB411;&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 3 || #478F11 ||style=&amp;quot;background: #478F11;&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 4 || #356A11 ||style=&amp;quot;background: #356A11;&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 5 || #224511 ||style=&amp;quot;background: #224511;&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 6 || #464645 ||style=&amp;quot;background: #464645;&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 7 || #6B6B45 ||style=&amp;quot;background: #6B6B45;&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 8 || #909045 ||style=&amp;quot;background: #909045;&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 9 || #B5B545 ||style=&amp;quot;background: #B5B545;&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 10 || #DADA45 ||style=&amp;quot;background: #DADA45;&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 11 || #FFFF45 ||style=&amp;quot;background: #FFFF45;&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 12 || #FFFFFF ||style=&amp;quot;background: #FFFFFF;&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039; Value 11 is not used in this file for the Original XCOM&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=File:Xcom_render2.gif&amp;diff=11541</id>
		<title>File:Xcom render2.gif</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=File:Xcom_render2.gif&amp;diff=11541"/>
		<updated>2007-04-10T21:45:07Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: Rendering of WORLD.DAT for the original XCOM.
&amp;#039;&amp;#039;&amp;#039;Color key:&amp;#039;&amp;#039;&amp;#039;
{|
! # !! HTML !! Sample
|-
| 0 || #7FFE11 ||backcolor=&amp;quot;#7FFE11&amp;quot;| 
|-
| 1 || #6CD911 ||backcolor=&amp;quot;#6CD911&amp;quot;| 
|-
| 2 || #5AB411 ||backcolor=&amp;quot;#5AB411&amp;quot;| 
|-
| 3 || #478F11 ||backcolor=&amp;quot;#478F1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Rendering of [[WORLD.DAT]] for the original XCOM.&lt;br /&gt;
&#039;&#039;&#039;Color key:&#039;&#039;&#039;&lt;br /&gt;
{|&lt;br /&gt;
! # !! HTML !! Sample&lt;br /&gt;
|-&lt;br /&gt;
| 0 || #7FFE11 ||backcolor=&amp;quot;#7FFE11&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 1 || #6CD911 ||backcolor=&amp;quot;#6CD911&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 2 || #5AB411 ||backcolor=&amp;quot;#5AB411&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 3 || #478F11 ||backcolor=&amp;quot;#478F11&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 4 || #356A11 ||backcolor=&amp;quot;#356A11&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 5 || #224511 ||backcolor=&amp;quot;#224511&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 6 || #464645 ||backcolor=&amp;quot;#464645&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 7 || #6B6B45 ||backcolor=&amp;quot;#6B6B45&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 8 || #909045 ||backcolor=&amp;quot;#909045&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 9 || #B5B545 ||backcolor=&amp;quot;#B5B545&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 10 || #DADA45 ||backcolor=&amp;quot;#DADA45&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 11 || #FFFF45 ||backcolor=&amp;quot;#FFFF45&amp;quot;| &lt;br /&gt;
|-&lt;br /&gt;
| 12 || #FFFFFF ||backcolor=&amp;quot;#FFFFFF&amp;quot;| &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=WORLD.DAT&amp;diff=11534</id>
		<title>WORLD.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=WORLD.DAT&amp;diff=11534"/>
		<updated>2007-04-10T00:07:06Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: /* The last value */  TFTD update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The original XCOM file is 13320 bytes long, while TFTD is 14660 bytes long. However, each uses the same 20-byte record length giving the original 666 entries and TFTD 733 entries. This file describes the terrain on the geoscape screen using quadrilateral polygons and  triangles.&lt;br /&gt;
&lt;br /&gt;
The first 16 bytes of file contain the points for the quad/triangle. 4 sets of 2 short (2-byte) integers, designating the &#039;X&#039; and &#039;Y&#039; coordinate (or latitude and longitude if you prefer). If the last set has an x value of -1 then it is to be rendered as a triangle, otherwise it is a quad.&lt;br /&gt;
&lt;br /&gt;
The last 4 bytes in the record contain the terrain type. This could be a long integer or 2 short integers as the last 2 bytes in each record are 0.&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
{| {{StdDescTable}}&lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
! Offsets !! Meaning !! Values&lt;br /&gt;
|-&lt;br /&gt;
| 0-1   || First X coordinate || 0 - 2880&lt;br /&gt;
|-&lt;br /&gt;
| 2-3   || First Y coordinate || -720 - 720&lt;br /&gt;
|-&lt;br /&gt;
| 4-5   || Second X coordinate || 0 - 2880&lt;br /&gt;
|-&lt;br /&gt;
| 6-7   || Second Y coordinate || -720 - 720&lt;br /&gt;
|-&lt;br /&gt;
| 8-9   || Third X coordinate || 0 - 2880&lt;br /&gt;
|-&lt;br /&gt;
| 10-11 || Third Y coordinate || -720 - 720&lt;br /&gt;
|-&lt;br /&gt;
| 12-13 || Fourth* X coordinate || 0 - 2880&lt;br /&gt;
|-&lt;br /&gt;
| 14-15 || Fourth* Y coordinate || -720 - 720&lt;br /&gt;
|-&lt;br /&gt;
| 16-19 || &amp;lt;s&amp;gt;Terrain Type&amp;lt;/s&amp;gt; [[#The last value|See Below]] || 0-10 and 12&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;small&amp;gt;&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; As mentioned above, the fourth coordinate could be (-1, 0) denoting a triangle&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The values were obtained only on the original XCOM. Presumably the same restrictions apply for TFTD except for maybe the terrain types. Also the X ranges are assumed to max at 2880 as this is a multiple of 360, the max observed in the file is actually 2877&lt;br /&gt;
&lt;br /&gt;
=== The last value ===&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| [[Image:world_render.gif|640px]]&lt;br /&gt;
| &lt;br /&gt;
Originally I thought the last value was the terrain type but it is obvious that it cannot be since there are only 6 real terrain types on the map (10 in all, but xcom base, alien base, city, and mars aren&#039;t on the world map) There are 12 discrete values, 0 to 10 and then 12. Some reason 11 is skipped. There are 12 regions in the world but a rough rendering of the data shows it must be representing the terrain as well.&lt;br /&gt;
&lt;br /&gt;
Rough rendering of the data in WORLD.DAT. Each color is a different number in offset 16-19, for example white is 2. You can see that it does follow some terrain as found, but for example the Rocky Mountains and the Alps are different colors but should both be mountainous.&lt;br /&gt;
&lt;br /&gt;
--[[User:Pi Masta|Pi Masta]] 23:24, 5 April 2007 (PDT)&lt;br /&gt;
: &#039;&#039;&#039;Update&#039;&#039;&#039;: I checked TFTD&#039;s WORLD.DAT file, it &#039;&#039;&#039;does&#039;&#039;&#039; include entries with this number as 11 (88 of them exist). Not sure what this means though --[[User:Pi Masta|Pi Masta]] 17:07, 9 April 2007 (PDT)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[Saved Game Files]]&lt;br /&gt;
&lt;br /&gt;
[[COS.DAT]]&lt;br /&gt;
[[Category:Game Files]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=ENGLISH.DAT&amp;diff=11528</id>
		<title>ENGLISH.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=ENGLISH.DAT&amp;diff=11528"/>
		<updated>2007-04-07T21:01:07Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: initial draft, table of categories of strings contained in the file&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
{| {{StdDescTable}}&lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
! Begin !! End !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1   || 5   || UFOpaedia: Craft Descriptions&lt;br /&gt;
|-&lt;br /&gt;
| 6   || 11  || Craft Weapon Descriptions (Not Used?)&lt;br /&gt;
|-&lt;br /&gt;
| 12  || 33  || UFOpaedia: Alien Descriptions (immediately followed by autopsy)*&lt;br /&gt;
|-&lt;br /&gt;
| 34  || 36  || UFOpaedia: [[UFO Power Source]], [[UFO Navigation]], [[UFO Construction]]&lt;br /&gt;
|-&lt;br /&gt;
| 37  || 41  || UFOpaedia: [[Alien Food]], [[Alien Reproduction]], [[Alien Entertainment]], [[Alien Surgery]], [[Examination Room]]&lt;br /&gt;
|-&lt;br /&gt;
| 42  ||     || UFOpaedia: [[Alien Alloys]]&lt;br /&gt;
|-&lt;br /&gt;
| 44  ||     || UFOpaedia: [[Elerium]]&lt;br /&gt;
|-&lt;br /&gt;
| 45  || 47  || UFOpaedia: Alien Research: [[Alien Origins]], [[Martian Solution]], [[Cydonia or Bust]]&lt;br /&gt;
|-&lt;br /&gt;
| 51  || 56  || Research progress status&lt;br /&gt;
|-&lt;br /&gt;
| 58  || 67  || Base view button labels&lt;br /&gt;
|-&lt;br /&gt;
| 79  || 92  || Research view labels (including start new project)&lt;br /&gt;
|-&lt;br /&gt;
| 93  || 123 || Manufacturing view labels (including start new production)&lt;br /&gt;
|-&lt;br /&gt;
| 124 || 128 || Purchase/Hire view labels&lt;br /&gt;
|-&lt;br /&gt;
| 129 || 145 || Base Info labels (including base transfers screen)&lt;br /&gt;
|-&lt;br /&gt;
| 146 || 147 || New Base (Base Name, Select position for Access Lift)&lt;br /&gt;
|-&lt;br /&gt;
| 148 || 152 || Transfers screen labels&lt;br /&gt;
|-&lt;br /&gt;
| 153 || 160 || Cinematic Sequence Captions&lt;br /&gt;
|-&lt;br /&gt;
| 161 || 170 || Graph Labels&lt;br /&gt;
|-&lt;br /&gt;
| 171 || 174 || [http://en.wikipedia.org/wiki/Names_of_numbers_in_English#Ordinal_numbers Ordinal endings] (st, nd)&lt;br /&gt;
|-&lt;br /&gt;
| 175 || 180 || Production message windows (e.g. Production complete: ITEM at BASE)&lt;br /&gt;
|-&lt;br /&gt;
| 181 ||     || OK - 5 secs&lt;br /&gt;
|-&lt;br /&gt;
| 182 || 185 || Research message windows (e.g., Research Completed)&lt;br /&gt;
|-&lt;br /&gt;
| 186 || 192 || Days of the week (Sunday through Saturday)&lt;br /&gt;
|-&lt;br /&gt;
| 193 || 196 || Craft rearm/refuel error messages (e.g., Not enough Elerium at BASE to refuel CRAFT)&lt;br /&gt;
|-&lt;br /&gt;
| 197 || 208 || Mission outcome titles (Aliens Defeated, UFO is Recovered, etc.)&lt;br /&gt;
|-&lt;br /&gt;
| 209 || 221 || Mission outcome statistics labels (CIVILIANS KILLS, ALIENS KILLED, etc.)&lt;br /&gt;
|-&lt;br /&gt;
| 222 || 223 || Recovery title labels (UFO Recovery, Alien Base Recovery)&lt;br /&gt;
|-&lt;br /&gt;
| 224 || 230 || Base Defense labels/messages (HIT!, MISSED!, etc)&lt;br /&gt;
|-&lt;br /&gt;
| 231 || 235 || Sell/Sack screen labels&lt;br /&gt;
|-&lt;br /&gt;
| 236 || 237 || UFO and Craft prefixes (UFO-, and CRAFT&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| 238 || 247 || Mission types titles and briefings (screen you see before going to tactical)&lt;br /&gt;
|-&lt;br /&gt;
| 248 ||     || Cydonia briefing&lt;br /&gt;
|-&lt;br /&gt;
| 249 ||     || prefix: TERROR SITE-&lt;br /&gt;
|-&lt;br /&gt;
| 250 || 251 || Terror site title followed by briefing&lt;br /&gt;
|-&lt;br /&gt;
| 252 || 264 || Various Error messages (Not enough store space, No free hangars, etc)&lt;br /&gt;
|-&lt;br /&gt;
| 265 || 273 || Launch interception screen labels&lt;br /&gt;
|-&lt;br /&gt;
| 275 || 277 || Prefixes (ALIEN BASE-, LANDING SITE- , etc)&lt;br /&gt;
|-&lt;br /&gt;
| 279 ||     || Confirmation message for Cydonia&lt;br /&gt;
|-&lt;br /&gt;
| 280 || 281 || Affirmative and Negative (Yes, No)&lt;br /&gt;
|-&lt;br /&gt;
| 285 || 311 || Craft Info Screen Labels (Including Altitude and status labels)&lt;br /&gt;
|-&lt;br /&gt;
| 312 || 315 || Hostile, Friendly, Committed... Not used??&lt;br /&gt;
|-&lt;br /&gt;
| 316 || 318 || Options screen labels&lt;br /&gt;
|-&lt;br /&gt;
| 319 || 327 || Labels for Equip Craft screens&lt;br /&gt;
|-&lt;br /&gt;
| 328 || 333 || X-Com [[ranks]]&lt;br /&gt;
|-&lt;br /&gt;
| 334 || 339 || Selecting crew for craft screen&lt;br /&gt;
|-&lt;br /&gt;
| 344 || 345 || Landing confirmation labels (ready to land near, Begin Mission?)&lt;br /&gt;
|-&lt;br /&gt;
| 346 || 350 || Select Craft Armament screen labels&lt;br /&gt;
|-&lt;br /&gt;
| 351 || 357 || Select Armor for soldier screen labels (including names of armor)&lt;br /&gt;
|-&lt;br /&gt;
| 358 || 365 || Heading directions (North, East, etc)&lt;br /&gt;
|-&lt;br /&gt;
| 366 || 368 || Actions for Avenger/Lightning (Continue Interception Pursuit, Pursue without interception)&lt;br /&gt;
|-&lt;br /&gt;
| 369 || 373 || Alien craft sizes (Very Large - Very Small)&lt;br /&gt;
|-&lt;br /&gt;
| 374 || 378 || Alien altitude labels (ground, high)&lt;br /&gt;
|-&lt;br /&gt;
| 379 || 384 || UFO detected screen labels&lt;br /&gt;
|-&lt;br /&gt;
| 385 || 387 || UFO Tracking lost screen labels (Go to last known UFO position)&lt;br /&gt;
|-&lt;br /&gt;
| 388 || 395 || Prefixes (CRAFT-, BASE-, ALIEN BASE-, etc)**&lt;br /&gt;
|-&lt;br /&gt;
| 396 || 398 || Craft reached destination labels (Now Patrolling)&lt;br /&gt;
|-&lt;br /&gt;
| 399 || 401 || Alien Research Titles (Alien Origins, etc)&lt;br /&gt;
|-&lt;br /&gt;
| 402 ||     || UFOpaedia&lt;br /&gt;
|-&lt;br /&gt;
| 403 || 412 || UFOpaedia Category names (and subsequent screen&#039;s Select Item title)&lt;br /&gt;
|-&lt;br /&gt;
| 413 || 426 || Various prefixes and suffixes for data in UFOpaedia ( autopsy, CARGO SPACE&amp;gt;, km, s, etc.)&lt;br /&gt;
|-&lt;br /&gt;
| 427 || 432 || Damage types (Armour Piercing, Laser Beam, etc.)&lt;br /&gt;
|-&lt;br /&gt;
| 433 || 436 || Presumably reserved damage type slots that aren&#039;t used(6-?, 7-?, etc.)&lt;br /&gt;
|-&lt;br /&gt;
| 437 || 441 || Various labels for weapon entries (AMMO, TU COST&amp;gt;, etc.)&lt;br /&gt;
|-&lt;br /&gt;
| 442 || 444 || Shot action names, (Auto, Snap, Aimed)&lt;br /&gt;
|-&lt;br /&gt;
| 445 || 448 || Base Facilities suffixes and prefixes (days, Construction Cost)&lt;br /&gt;
|-&lt;br /&gt;
| 449 || 450 || Unknown.. &#039; autopsy&#039; and &#039; - &#039;&lt;br /&gt;
|-&lt;br /&gt;
| 451 || 454 || Unknown, in order: Low, Medium, High, High&lt;br /&gt;
|-&lt;br /&gt;
| 455 || 462 || Various sub-category names and labels for crafts and equipment (as well as Alien Corpse)&lt;br /&gt;
|-&lt;br /&gt;
| 463 ||     || Personal Armour&lt;br /&gt;
|-&lt;br /&gt;
| 464 ||     || Raw Materials (Not Used?)&lt;br /&gt;
|-&lt;br /&gt;
| 465 ||     || HWP Cannon Shells&lt;br /&gt;
|-&lt;br /&gt;
| 466 ||     || simply: &#039;Alien&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 467 || 477 || Alien unit names (excluding zombie)&lt;br /&gt;
|-&lt;br /&gt;
| 478 || 484 || Names of [[Alien Ranks]]&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;485 || 540&#039;&#039;&#039;|| Names of &#039;&#039;most&#039;&#039; Items (Including ammunition for crafts)&lt;br /&gt;
|-&lt;br /&gt;
| 541 || 543 || Soldier, Scientist, Engineer, presumably used by Purchase/Sell screens&lt;br /&gt;
|-&lt;br /&gt;
| 544 || 558 || Region names including oceans (North America, Siberia, etc.)&lt;br /&gt;
|-&lt;br /&gt;
| 559 || 566 || [[Alien Missions| Alien Mission]] Names&lt;br /&gt;
|-&lt;br /&gt;
| 567 || 568 || Alien craft descriptions labels (in UFOpaedia)&lt;br /&gt;
|-&lt;br /&gt;
| 569 ||     || HYPER-WAVE DECODER (Unused? Out of place)&lt;br /&gt;
|-&lt;br /&gt;
| 570 || 574 || Craft Names (In all caps)&lt;br /&gt;
|-&lt;br /&gt;
| 575 ||     || UFO&lt;br /&gt;
|-&lt;br /&gt;
| 576 || 581 || Craft weapon names in all caps&lt;br /&gt;
|-&lt;br /&gt;
| 582 || 584 || Craft weapon description labels&lt;br /&gt;
|-&lt;br /&gt;
| 585 || 601 || Base Facility names (Access Lift, Mind Shield, etc.)&lt;br /&gt;
|-&lt;br /&gt;
| 602 || 617 || Country Names&lt;br /&gt;
|-&lt;br /&gt;
| 618 || 623 || Combination of Floater and all ranks (except terrorist, e.g. Floater Soldier, Floater Navigator, etc.) (Unused?)&lt;br /&gt;
|-&lt;br /&gt;
| 624 ||     || Reaper&lt;br /&gt;
|-&lt;br /&gt;
| 625 || 626 || &#039;Tank&#039; and &#039;Civilian&#039; (Not sure where it&#039;s used)&lt;br /&gt;
|-&lt;br /&gt;
| 627 || 638 || Short names of Gregorian calender months (Jan, Feb, etc)&lt;br /&gt;
|-&lt;br /&gt;
| 639 || 642 || Funding Screen labels&lt;br /&gt;
|-&lt;br /&gt;
| 643 || 646 || Equip Craft labels (transport craft)&lt;br /&gt;
|-&lt;br /&gt;
| 647 || 663 || Facility Descriptions&lt;br /&gt;
|-&lt;br /&gt;
| 664 || 679 || Soldier Equipment Descriptions (non-alien influenced except for psi-amp)&lt;br /&gt;
|-&lt;br /&gt;
| 680 ||     || &#039;The subject has died due to the trauma of interrogation.&#039; (Unused?)&lt;br /&gt;
|-&lt;br /&gt;
| 681 || 683 || [[Mind Probe]], [[Plasma Pistol]], and [[Plasma Rifle]] descriptions&lt;br /&gt;
|-&lt;br /&gt;
| 684 || 685 || &#039;Size&#039; and &#039;The corpse may be researched for a full autopsy report.&#039; (Unused?)&lt;br /&gt;
|-&lt;br /&gt;
| 686 ||     || &#039;Not Enough Ammunition to arm&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 687 || 689 || Descriptions for [[Blaster Launcher]], [[Small Launcher]], and [[Alien Grenade]]&lt;br /&gt;
|-&lt;br /&gt;
| 690 || 697 || Alien craft names&lt;br /&gt;
|-&lt;br /&gt;
| 698 || 721 || Monthly Report/Score screen labels (&#039;are particularly happy with your...&#039;, &#039;have signed a secret...&#039;) However 716 is &#039;knots&#039; (Unused? Precursor to TFTD?)&lt;br /&gt;
|-&lt;br /&gt;
| 722 || 726 || UFO Hyper-wave detection labels (RACE, MISSION, etc)&lt;br /&gt;
|-&lt;br /&gt;
| 727 || 728 || &#039;Allocate Research&#039; and &#039;Allocate Manufacture&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 729 || 779 || Names of major cities (sites for Terror Missions)&lt;br /&gt;
|-&lt;br /&gt;
| 780 || 788 || Initial menu screen labels (UFO Enemy Unknown, Load Saved Game, 1&amp;gt; Beginner, etc.)&lt;br /&gt;
|-&lt;br /&gt;
| 789 || 792 || Save/Load screen labels&lt;br /&gt;
|-&lt;br /&gt;
| 793 || 798 || Psi Training screen labels (but also includes &#039;Psi-Amp&#039;, possibly unused?)&lt;br /&gt;
|-&lt;br /&gt;
| 800 ||     || &#039;WEAPONS/CREW/HWPs&#039; used on launch interception and equip craft screens&lt;br /&gt;
|-&lt;br /&gt;
| 801 || 802 || &#039;Abandon Game&#039; and &#039;Quit to DOS&#039; (just &#039;Quit&#039; on WinCE Version)&lt;br /&gt;
|-&lt;br /&gt;
| 803 ||     || Low on fuel warning message&lt;br /&gt;
|-&lt;br /&gt;
| 804 || 818 || Soldiers screen and stats&lt;br /&gt;
|-&lt;br /&gt;
| 819 || 821 || Promotions screen labels&lt;br /&gt;
|-&lt;br /&gt;
| 822 || 826 || Descriptions of HWPs&lt;br /&gt;
|-&lt;br /&gt;
| 827 || 830 || Descriptions of Heavy Plasma Clip, Plasma Rifle Clip, Plasma Pistol Clip and stun bomb&lt;br /&gt;
|-&lt;br /&gt;
| 831 || 832 || Literally empty entries (Unused?)&lt;br /&gt;
|-&lt;br /&gt;
| 833 || 840 || [[Alien Missions]] UFOpaedia descriptions&lt;br /&gt;
|-&lt;br /&gt;
| 841 || 848 || [[UFOs|UFO]] descriptions&lt;br /&gt;
|-&lt;br /&gt;
| 849 || 857 || Various messages (Dismantle, Alien dies as there is no ..., Items Arriving)&lt;br /&gt;
|-&lt;br /&gt;
| 858 || 908 || Names of items in Purchase/Sell screens (and equip craft)&lt;br /&gt;
|-&lt;br /&gt;
| 909 || 912 || Various messages after mission (Not enough equipment to fully..., Not enough rockets to arm HWP, etc)&lt;br /&gt;
|-&lt;br /&gt;
| 913 || 916 || Final 2 missions title and briefing&lt;br /&gt;
|-&lt;br /&gt;
| 917 || 919 || Various messages (In order to use or produce..., The aliens have destroyed the undefended base)&lt;br /&gt;
|-&lt;br /&gt;
| 920 || 932 || UFO interception (Aeroscape) screen labels (CAUTIOUS, UFO HIT!, etc.)&lt;br /&gt;
|-&lt;br /&gt;
| 933 ||     || &#039;ALIENS TERRORIZE&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 934 ||     || &#039;Long Range Detection&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 935 || 936 || Stores button label, and &#039;Difficulty Level&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 937 || 948 || Button labels in world view (5 sec, GRAPHS, BASES, etc.)&lt;br /&gt;
|-&lt;br /&gt;
| 949 ||     || &#039;XCom Performance Roster&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 950 ||     || &#039;Enter Name&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 951 || 952 || Performance roster labels&lt;br /&gt;
|-&lt;br /&gt;
| 953 || 954 || [[Electro-flare]] name followed by description&lt;br /&gt;
|-&lt;br /&gt;
| 955 || 961 || Monthly Costs screen labels&lt;br /&gt;
|-&lt;br /&gt;
| 962 || 963 || &#039; day&#039; and &#039; days&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 964 ||     || &#039;In Psionic Training&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 965 ||     || Blaster bomb description&lt;br /&gt;
|-&lt;br /&gt;
| 966 ||     || Copy-protection message (&#039;Please look up the page listed... enter the eight digit...&#039;)&lt;br /&gt;
|-&lt;br /&gt;
| 967 || 971 || Armour side names (Front Armour, Right Armour, Under Armour, etc)&lt;br /&gt;
|-&lt;br /&gt;
| 972 ||     || &#039;Rounds&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 973 ||     || Empty string&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Alien_races&amp;diff=11527</id>
		<title>Alien races</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Alien_races&amp;diff=11527"/>
		<updated>2007-04-07T19:56:53Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: redirect to Alien Life forms&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Alien Life Forms]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=GEOSCAPE.EXE&amp;diff=11526</id>
		<title>GEOSCAPE.EXE</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=GEOSCAPE.EXE&amp;diff=11526"/>
		<updated>2007-04-07T18:35:07Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: /* XCOM: UFO Defense (U.S. DOS) version 1.4 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &amp;quot;Geoscape&amp;quot; program that handles base management and aircraft, a.k.a. XCOM outside of tactical combat. [[TACTICAL.EXE]] handles combat. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; In the WinCE version, GEOSCAPE and TACTICAL are one executable, &amp;quot;UFO Defense.exe&amp;quot;. Due to this confusion (what wiki pages place things on, when they&#039;re practically identical), currently GEOSCAPE, TACTICAL, and UFO Defense information appear here. (Unless and until someone wants to break everything up... then again, having highly related stuff in one place is a good thing.)&lt;br /&gt;
&lt;br /&gt;
Also see [[Versions]].&lt;br /&gt;
&lt;br /&gt;
= XCOM: UFO Defense (U.S. DOS) version 1.4 =&lt;br /&gt;
*Is 382,957 bytes long for the virgin 1.4 executable&lt;br /&gt;
*Has [[Alien_Stats|alien statistics]] starting at (non-offset) byte 379,729. There are 33 records of 39 bytes each. No alien names, though.&lt;br /&gt;
*If you have installed [[XcomUtil]], it may alter the length of GEOSCAPE. &#039;&#039;Does anybody have a modified version, so we can put the length here? --[[User:MikeTheRed|MikeTheRed]]&#039;&#039;&lt;br /&gt;
** My XCOM Util GEOSCAPE size is 415,271 --[[User:Pi Masta|Pi Masta]]&lt;br /&gt;
&lt;br /&gt;
= XCOM Windows Collector&#039;s Edition =&lt;br /&gt;
*Variously called the Win CE or Gold version on the wiki&lt;br /&gt;
*Is 495,616 bytes long &lt;br /&gt;
*Starting at byte 648, reads:&lt;br /&gt;
 XCOM: UFO Defense Gold Edition&lt;br /&gt;
 This awesome game was compiled on Sep  8 1999 at 08:57:11&lt;br /&gt;
 Copyright - 1999 Hasbro Interactive/MicroProse Software&lt;br /&gt;
 Party on dude.&lt;br /&gt;
*If you install XcomUtil, it separates your &#039;&#039;UFO Defense.exe&#039;&#039; into GEOSCAPE and TACTICAL executables. They are almost identical copies of &#039;&#039;UFO Defense.exe&#039;&#039;, however they start at the right place when run. This allows the game to closely mimick the Dos version by having its main loop run in a batch file. &lt;br /&gt;
*Has [[Alien_Stats|alien statistics]] starting at (non-offset) byte 480,145. There are 33 records of 39 bytes each. No alien names, though.&lt;br /&gt;
*Has tank &amp;amp; inbuilt alien weapon stats at byte 447,868 (see below)&lt;br /&gt;
&lt;br /&gt;
= Alien Stats =&lt;br /&gt;
&lt;br /&gt;
This section is for the structure of the alien stats, as found in GEOSCAPE. For actual data and additional information, see the [[Alien_Stats|alien statistics]] page. Also see Zombie&#039;s excellent alien stats page at [http://www.strategycore.co.uk/xcom/pg/ufoalienstats StrategyCore]. &#039;&#039;(Have YOU made your StratCore and [http://www.xcomufo.com XCOMUFO] accounts yet?)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alien stats are found as 33 records of 39 bytes each, in all versions of X-COM. They are identical in all versions. This data actually represents the &amp;quot;core&amp;quot; alien stats; modifiers are used to determine the final stats relative to game difficulty level. (In most, but not all, cases, the core stats are the same as the Beginner level stats.)&lt;br /&gt;
&lt;br /&gt;
Alien stats start in each version of X-COM at the following location. This is a byte &#039;&#039;count&#039;&#039;, not an offset; with counts, the first byte in the file is byte 1:&lt;br /&gt;
 &amp;lt;u&amp;gt;Version&amp;lt;/u&amp;gt;        &amp;lt;u&amp;gt;Location&amp;lt;/u&amp;gt;&lt;br /&gt;
 DOS 1.4         379,729  (GEOSCAPE.EXE)  &lt;br /&gt;
 WinCE Gold      480,145  (UFO Defense.exe)&lt;br /&gt;
 Playstation     501,212&lt;br /&gt;
 TFTD            486,930&lt;br /&gt;
&lt;br /&gt;
Alien names are not actually found in Geoscape; it just has 33 strings of data... the alien each string applies to has been inferred by matching against aliens in the game.&lt;br /&gt;
&lt;br /&gt;
The 39 bytes correspond to the following values. For the below, statements also apply to TFTD, since it&#039;s relevant to understanding the bytes:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0:&#039;&#039;&#039;   Race - Corresponds to Unitref[000]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1:&#039;&#039;&#039;   Rank - Corresponds to Unitref[042]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2:&#039;&#039;&#039;   &#039;&#039;Unknown - Always 0&#039;&#039; - Corresponds to Unitref[011]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3:&#039;&#039;&#039;   Can Fly - No Corresponding Unitref offset&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4:&#039;&#039;&#039;   TUs - Corresponds to Unitref[025]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5:&#039;&#039;&#039;   Health - Corresponds to Unitref[026]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;6:&#039;&#039;&#039;   Energy - Corresponds to Unitref[027]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;7:&#039;&#039;&#039;   Reactions - Corresponds to Unitref[028]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;8:&#039;&#039;&#039;   Strength - Corresponds to Unitref[017]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;9:&#039;&#039;&#039;   Firing Accuracy - Corresponds to Unitref[023]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:&#039;&#039;&#039;   Throwing Accuracy - Corresponds to Unitref[024]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;11:&#039;&#039;&#039;   Melee Accuracy - Corresponds to Unitref[056]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;12:&#039;&#039;&#039;   Front Armor - Corresponds to Unitref[029]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;13:&#039;&#039;&#039;   Left Armor - Corresponds to Unitref[030]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:&#039;&#039;&#039;   Right Armor - Corresponds to Unitref[031]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;15:&#039;&#039;&#039;   Rear Armor - Corresponds to Unitref[032]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;16:&#039;&#039;&#039;   Under Armor - Corresponds to Unitref[033]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;17:&#039;&#039;&#039;   &#039;&#039;Unknown - Always 0&#039;&#039; - Corresponds to Unitref[034]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;18:&#039;&#039;&#039;   Energy Recharge - Corresponds to Unitref[035]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;19:&#039;&#039;&#039;   &#039;&#039;Unknown - Always 0&#039;&#039; - Corresponds to Unitref[036]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;20:&#039;&#039;&#039;   &#039;&#039;Unknown - Always 1&#039;&#039;  No Corresponding Unitref offset&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;21:&#039;&#039;&#039;   &#039;&#039;Unknown - Always 0&#039;&#039; - Corresponds to Unitref[046]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;22:&#039;&#039;&#039;   &#039;&#039;Unknown&#039;&#039; - Corresponds to Unitref[048] (see below)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;23:&#039;&#039;&#039;   &#039;&#039;Unknown&#039;&#039; - Corresponds to Unitref[052] (see below)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NOTE: For additional important info on these two bytes, see [[Talk:UNITREF.DAT]]. My notes below do not take that info into account. For the moment though I&#039;m leaving it as is. I sure wish we could figure the bytes out, and get rid of all the conjecture! - [[User:MikeTheRed|MikeTheRed]] 08:05, 6 November 2006 (PST)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
These Unitref bytes ([48] and [52]) and now Geoscape Core values have long stumped us hardcore X-Commies. The two bytes &amp;lt;b&amp;gt;always&amp;lt;/b&amp;gt; equal the same value for a given alien, including all aliens of the same race (the N&#039;s below). And, they&#039;re the same between Geoscape and Unitref. Clearly it must be important (or a goof!), but exactly what it is, who knows. Although this page is for X-COM, I&#039;ve included TFTD in the hopes it helps folks - but it&#039;s been so long since I&#039;ve played TFTD, I can&#039;t remember those units at all.&lt;br /&gt;
&lt;br /&gt;
How&#039;s this for a thought?... &lt;br /&gt;
 &amp;lt;u&amp;gt;Dimension&amp;lt;/u&amp;gt;   &amp;lt;u&amp;gt;Byte(s)&amp;lt;/u&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
        X     22&lt;br /&gt;
 &lt;br /&gt;
        Y     23&lt;br /&gt;
 &lt;br /&gt;
        Z     24  (top when standing)&lt;br /&gt;
              25  (top when kneeling)&lt;br /&gt;
              26  (bottom)&lt;br /&gt;
&lt;br /&gt;
Maybe they represent the &amp;quot;size in profile&amp;quot; (&amp;quot;width&amp;quot;), affecting likelihood to hit. A game could be tried with a target 20 squares away, set 22 and 23 alternately to 5 or 2 (or 1 or 0?), and see if it affects the successful shots percentage. 0 or even 1 might break the game, though.&lt;br /&gt;
&lt;br /&gt;
Also, how do these values (2 to 5) correlate with the &amp;quot;pixel drawings&amp;quot; of units? I can&#039;t seem to find that info at the moment... aren&#039;t units and tiles defined as something like 16x16x[[Height|28]]? If so, then perhaps the values (2 to 5) are multiplied by 3 or something to get their final &amp;quot;width&amp;quot; for bullet interception??  --[[User:MikeTheRed|MikeTheRed]] 05:20, 17 September 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
:I finally got the OSG (w00t!), and noticed the following: The section on weapon accuracy says (p. 221) that target size affects the chance to hit, and &amp;quot;the &#039;size&#039; of each alien is listed along with all other alien statistics in Chapter 9&amp;quot;. But the alien stats tables (p. 250 ff.) only lists Height as a possible &#039;size&#039; stat, and the text write-ups don&#039;t otherwise address &amp;quot;target size&amp;quot; with any precision. This discrepancy - that Chapter 8 talks about &#039;&#039;&#039;size&#039;&#039;&#039;, but Chapter 9 only has &#039;&#039;&#039;height&#039;&#039;&#039; - might (might!) mean there are more variables that determine target area size, but somehow they didn&#039;t make it to the alien stats tables.&lt;br /&gt;
&lt;br /&gt;
:The description for Height (p. 249) does say, &amp;quot;Taller creatures are easier to hit than short ones are. An alien with a height of 40, for example, is twice as easy to hit as an alien with a height of 20.&amp;quot; (Note: The tallest [[Height]] is actually 23. And also notice, Float is never mentioned.) This &#039;&#039;might&#039;&#039; mean only height affects this, or it could be read in a general way; other dimensions (X and Y in addition to Z) might also affect it.&lt;br /&gt;
&lt;br /&gt;
:Somebody should do some firing accuracy tests while hacking these potential X &amp;amp; Y bytes! But I still don&#039;t know how the values for [22] &amp;amp; [23] compare to what X-COM considers tile width... we know the Height byte accurately reflects the full range of possible values (0 to 23), but I doubt 5 is the full (pixel?) width of a tile. This might mean it&#039;s not width, then (or maybe [22] &amp;amp; [23] are added, or they are individually multiplied by 3 or something??) If anyone who knows about tile width could say something, I&#039;d appreciate it. --[[User:MikeTheRed|MikeTheRed]] 11:24, 1 October 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
In any event, here&#039;s a summary of bytes [22] and [23], in the hopes we can figure it out. They&#039;re always identical for a given race, and [22] always equals [23].&lt;br /&gt;
&lt;br /&gt;
                  &#039;&#039;&#039;X-COM                            TFTD&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
          &amp;lt;U&amp;gt;Value&amp;lt;/U&amp;gt;   &amp;lt;U&amp;gt;Alien&amp;lt;/U&amp;gt;           &amp;lt;U&amp;gt;N&amp;lt;/U&amp;gt;        &amp;lt;U&amp;gt;Value&amp;lt;/U&amp;gt;   &amp;lt;U&amp;gt;Alien&amp;lt;/U&amp;gt;           &amp;lt;U&amp;gt;N&amp;lt;/U&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
            2     Sectoid         6          2     Aquatoid        6   &lt;br /&gt;
                                                   Bio-Drone       1 &lt;br /&gt;
            3     Celatid         1                Tentaculat      1   &lt;br /&gt;
                  Chryssalid      1&lt;br /&gt;
                  Civilian        2          3     Calcinite       1   &lt;br /&gt;
                  Ethereal        3                Civilian        2   &lt;br /&gt;
                  Floater         6                Deep_One        1   &lt;br /&gt;
                  Muton           3                Gill_Man        4   &lt;br /&gt;
                  Snakeman        5                Tasoth          2   &lt;br /&gt;
 &lt;br /&gt;
            4     Cyberdisc       1          4     Coelacant       1   &lt;br /&gt;
                  Hovertank       1                Displacer       1   &lt;br /&gt;
                  Reaper          1                Hallucinoid     1   &lt;br /&gt;
                  Sectopod        1                Lobster_Man     5   &lt;br /&gt;
                  Tank            1                Triscene        1   &lt;br /&gt;
                                                   Xarquid         1 &lt;br /&gt;
            5     Silacoid        1  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;24:&#039;&#039;&#039;   Standing Height - Corresponds to Unitref[049]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;25:&#039;&#039;&#039;   Kneeling Height - Corresponds to Unitref[050]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;26:&#039;&#039;&#039;   Floating Height - Corresponds to Unitref[051]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;27:&#039;&#039;&#039;   [[Damage#Susceptible_to...|Damage Modifier]] Category - Corresponds to Unitref[055]&lt;br /&gt;
&lt;br /&gt;
This field is simply a look-up table, or more directly, a way to categorize the units into similar groups. The actual modifiers are listed elsewhere in the executable. A value of 1 indicates the first DM category, a value of 4 indicates the 4th, etc. The values of 2 and 3 are not seen in the alien stats as they refer to X-COM soldier armor info. I&#039;m not sure about 13 as the Zombie&#039;s stats haven&#039;t been found yet, but I think there is a category in the DM&#039;s for it.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Column&#039;&#039;&#039;    &#039;&#039;&#039;Unit Type(s)&#039;&#039;&#039;&lt;br /&gt;
    &#039;&#039;&#039;1&#039;&#039;&#039;      Civilian, Sectoid, Celatid, Floater&lt;br /&gt;
    &#039;&#039;&#039;2&#039;&#039;&#039;      Personal Armor&lt;br /&gt;
    &#039;&#039;&#039;3&#039;&#039;&#039;      Power Suit, Flying Suit&lt;br /&gt;
    &#039;&#039;&#039;4&#039;&#039;&#039;      Tanks, Hovertanks&lt;br /&gt;
    &#039;&#039;&#039;5&#039;&#039;&#039;      Snakemen&lt;br /&gt;
    &#039;&#039;&#039;6&#039;&#039;&#039;      Ethereal&lt;br /&gt;
    &#039;&#039;&#039;7&#039;&#039;&#039;      Muton&lt;br /&gt;
    &#039;&#039;&#039;8&#039;&#039;&#039;      Silacoid&lt;br /&gt;
    &#039;&#039;&#039;9&#039;&#039;&#039;      Chryssalid&lt;br /&gt;
   &#039;&#039;&#039;10&#039;&#039;&#039;      Reaper&lt;br /&gt;
   &#039;&#039;&#039;11&#039;&#039;&#039;      Sectopod&lt;br /&gt;
   &#039;&#039;&#039;12&#039;&#039;&#039;      Cyberdisc&lt;br /&gt;
   &#039;&#039;&#039;13&#039;&#039;&#039;      Zombie&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;28:&#039;&#039;&#039;   Psi Skill - Corresponds to Unitref[037]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;29:&#039;&#039;&#039;   Psi Strength - Corresponds to Unitref[057]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;30:&#039;&#039;&#039;   Bravery (encoded) - Corresponds to Unitref[059]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;31:&#039;&#039;&#039;   Motion scanner size - Corresponds to Unitref[061]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;32:&#039;&#039;&#039;   &#039;&#039;1 for Cyberdisc, 0 for all others including TFTD... isn&#039;t &amp;quot;Explodes&amp;quot;; the TFTD Bio-Drone also explodes...&#039;&#039; - Corresponds to Unitref[071]&lt;br /&gt;
&lt;br /&gt;
I edited the Cyberdisc&#039;s field to 0 and checked to see if it exploded. It still did. Obviously this field is for something else. I&#039;ll work on this some more. --[[User:Zombie|Zombie]] 20:15, 15 September 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;33:&#039;&#039;&#039;   &#039;&#039;Unknown - Always 0&#039;&#039;  No Corresponding Unitref offset&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;34:&#039;&#039;&#039;   Corpse type - Corresponds to Unitref[038]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;35:&#039;&#039;&#039;   Big unit (2x2)  No Corresponding Unitref offset&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;36:&#039;&#039;&#039;   Victory point score - Corresponds to Unitref[039]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;37:&#039;&#039;&#039;   Aggression - Corresponds to Unitref[044]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;38:&#039;&#039;&#039;   Intelligence - Corresponds to Unitref[073]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This data was just put together working heavily with Zombie and his great SC [http://www.strategycore.co.uk/xcom/pg/ufoalienstats alien stats] page.&lt;br /&gt;
&lt;br /&gt;
= Country Labels =&lt;br /&gt;
Starting at offset 396480 (hex: 0x60CC0) are the records that contain the location of the labels for the country names on the world. In order they are X, Y, and English.dat index all signed short integers (6 bytes for each record). X should never be negative but between 0 and 2880, Y should be between -720 and 720 (See [[WORLD.DAT]]). The English.dat file, despite all other array indexes appears to start at 1 and not 0, thus a value of 611 in here represents index 610 in a zero based English.dat array. (It stands to reason that these work for the other language files as well)&lt;br /&gt;
&lt;br /&gt;
= File Templates =&lt;br /&gt;
There appears to be &#039;templates&#039; of some of the [[Saved Game Files|game files]] stored within this executable. Makes sense as initially no saved game files are present when installed. Here is a list of known positions and the corresponding file.&lt;br /&gt;
{| {{StdDescTable}}&lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
! Offset (Hex) !! Offset (Dec) !! Length (Bytes) !! File&lt;br /&gt;
|-&lt;br /&gt;
| 5D894 || 383124 || 576 || [[DIPLOM.DAT]]&lt;br /&gt;
|-&lt;br /&gt;
| 5E48C || 386188 || 1392|| [[UP.DAT]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
* [[TACTICAL.EXE]] - Sister executable used for Turn based strategy (merged with geoscape.exe in WinCE edition)&lt;br /&gt;
* [[UNITREF.DAT]] - Stats on current units (both XCOM and Alien) in play&lt;br /&gt;
* [[Saved Game Files]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Files]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=GEOSCAPE.EXE&amp;diff=11525</id>
		<title>GEOSCAPE.EXE</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=GEOSCAPE.EXE&amp;diff=11525"/>
		<updated>2007-04-07T18:32:49Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: Location of File Templates&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &amp;quot;Geoscape&amp;quot; program that handles base management and aircraft, a.k.a. XCOM outside of tactical combat. [[TACTICAL.EXE]] handles combat. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; In the WinCE version, GEOSCAPE and TACTICAL are one executable, &amp;quot;UFO Defense.exe&amp;quot;. Due to this confusion (what wiki pages place things on, when they&#039;re practically identical), currently GEOSCAPE, TACTICAL, and UFO Defense information appear here. (Unless and until someone wants to break everything up... then again, having highly related stuff in one place is a good thing.)&lt;br /&gt;
&lt;br /&gt;
Also see [[Versions]].&lt;br /&gt;
&lt;br /&gt;
= XCOM: UFO Defense (U.S. DOS) version 1.4 =&lt;br /&gt;
*Is 382,957 bytes long for the virgin 1.4 executable&lt;br /&gt;
*Has [[Alien_Stats|alien statistics]] starting at (non-offset) byte 379,729. There are 33 records of 39 bytes each. No alien names, though.&lt;br /&gt;
*If you have installed [[XcomUtil]], it may alter the length of GEOSCAPE. &#039;&#039;Does anybody have a modified version, so we can put the length here? --[[User:MikeTheRed|MikeTheRed]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= XCOM Windows Collector&#039;s Edition =&lt;br /&gt;
*Variously called the Win CE or Gold version on the wiki&lt;br /&gt;
*Is 495,616 bytes long &lt;br /&gt;
*Starting at byte 648, reads:&lt;br /&gt;
 XCOM: UFO Defense Gold Edition&lt;br /&gt;
 This awesome game was compiled on Sep  8 1999 at 08:57:11&lt;br /&gt;
 Copyright - 1999 Hasbro Interactive/MicroProse Software&lt;br /&gt;
 Party on dude.&lt;br /&gt;
*If you install XcomUtil, it separates your &#039;&#039;UFO Defense.exe&#039;&#039; into GEOSCAPE and TACTICAL executables. They are almost identical copies of &#039;&#039;UFO Defense.exe&#039;&#039;, however they start at the right place when run. This allows the game to closely mimick the Dos version by having its main loop run in a batch file. &lt;br /&gt;
*Has [[Alien_Stats|alien statistics]] starting at (non-offset) byte 480,145. There are 33 records of 39 bytes each. No alien names, though.&lt;br /&gt;
*Has tank &amp;amp; inbuilt alien weapon stats at byte 447,868 (see below)&lt;br /&gt;
&lt;br /&gt;
= Alien Stats =&lt;br /&gt;
&lt;br /&gt;
This section is for the structure of the alien stats, as found in GEOSCAPE. For actual data and additional information, see the [[Alien_Stats|alien statistics]] page. Also see Zombie&#039;s excellent alien stats page at [http://www.strategycore.co.uk/xcom/pg/ufoalienstats StrategyCore]. &#039;&#039;(Have YOU made your StratCore and [http://www.xcomufo.com XCOMUFO] accounts yet?)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alien stats are found as 33 records of 39 bytes each, in all versions of X-COM. They are identical in all versions. This data actually represents the &amp;quot;core&amp;quot; alien stats; modifiers are used to determine the final stats relative to game difficulty level. (In most, but not all, cases, the core stats are the same as the Beginner level stats.)&lt;br /&gt;
&lt;br /&gt;
Alien stats start in each version of X-COM at the following location. This is a byte &#039;&#039;count&#039;&#039;, not an offset; with counts, the first byte in the file is byte 1:&lt;br /&gt;
 &amp;lt;u&amp;gt;Version&amp;lt;/u&amp;gt;        &amp;lt;u&amp;gt;Location&amp;lt;/u&amp;gt;&lt;br /&gt;
 DOS 1.4         379,729  (GEOSCAPE.EXE)  &lt;br /&gt;
 WinCE Gold      480,145  (UFO Defense.exe)&lt;br /&gt;
 Playstation     501,212&lt;br /&gt;
 TFTD            486,930&lt;br /&gt;
&lt;br /&gt;
Alien names are not actually found in Geoscape; it just has 33 strings of data... the alien each string applies to has been inferred by matching against aliens in the game.&lt;br /&gt;
&lt;br /&gt;
The 39 bytes correspond to the following values. For the below, statements also apply to TFTD, since it&#039;s relevant to understanding the bytes:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0:&#039;&#039;&#039;   Race - Corresponds to Unitref[000]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1:&#039;&#039;&#039;   Rank - Corresponds to Unitref[042]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2:&#039;&#039;&#039;   &#039;&#039;Unknown - Always 0&#039;&#039; - Corresponds to Unitref[011]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3:&#039;&#039;&#039;   Can Fly - No Corresponding Unitref offset&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4:&#039;&#039;&#039;   TUs - Corresponds to Unitref[025]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5:&#039;&#039;&#039;   Health - Corresponds to Unitref[026]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;6:&#039;&#039;&#039;   Energy - Corresponds to Unitref[027]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;7:&#039;&#039;&#039;   Reactions - Corresponds to Unitref[028]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;8:&#039;&#039;&#039;   Strength - Corresponds to Unitref[017]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;9:&#039;&#039;&#039;   Firing Accuracy - Corresponds to Unitref[023]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:&#039;&#039;&#039;   Throwing Accuracy - Corresponds to Unitref[024]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;11:&#039;&#039;&#039;   Melee Accuracy - Corresponds to Unitref[056]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;12:&#039;&#039;&#039;   Front Armor - Corresponds to Unitref[029]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;13:&#039;&#039;&#039;   Left Armor - Corresponds to Unitref[030]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:&#039;&#039;&#039;   Right Armor - Corresponds to Unitref[031]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;15:&#039;&#039;&#039;   Rear Armor - Corresponds to Unitref[032]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;16:&#039;&#039;&#039;   Under Armor - Corresponds to Unitref[033]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;17:&#039;&#039;&#039;   &#039;&#039;Unknown - Always 0&#039;&#039; - Corresponds to Unitref[034]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;18:&#039;&#039;&#039;   Energy Recharge - Corresponds to Unitref[035]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;19:&#039;&#039;&#039;   &#039;&#039;Unknown - Always 0&#039;&#039; - Corresponds to Unitref[036]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;20:&#039;&#039;&#039;   &#039;&#039;Unknown - Always 1&#039;&#039;  No Corresponding Unitref offset&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;21:&#039;&#039;&#039;   &#039;&#039;Unknown - Always 0&#039;&#039; - Corresponds to Unitref[046]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;22:&#039;&#039;&#039;   &#039;&#039;Unknown&#039;&#039; - Corresponds to Unitref[048] (see below)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;23:&#039;&#039;&#039;   &#039;&#039;Unknown&#039;&#039; - Corresponds to Unitref[052] (see below)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NOTE: For additional important info on these two bytes, see [[Talk:UNITREF.DAT]]. My notes below do not take that info into account. For the moment though I&#039;m leaving it as is. I sure wish we could figure the bytes out, and get rid of all the conjecture! - [[User:MikeTheRed|MikeTheRed]] 08:05, 6 November 2006 (PST)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
These Unitref bytes ([48] and [52]) and now Geoscape Core values have long stumped us hardcore X-Commies. The two bytes &amp;lt;b&amp;gt;always&amp;lt;/b&amp;gt; equal the same value for a given alien, including all aliens of the same race (the N&#039;s below). And, they&#039;re the same between Geoscape and Unitref. Clearly it must be important (or a goof!), but exactly what it is, who knows. Although this page is for X-COM, I&#039;ve included TFTD in the hopes it helps folks - but it&#039;s been so long since I&#039;ve played TFTD, I can&#039;t remember those units at all.&lt;br /&gt;
&lt;br /&gt;
How&#039;s this for a thought?... &lt;br /&gt;
 &amp;lt;u&amp;gt;Dimension&amp;lt;/u&amp;gt;   &amp;lt;u&amp;gt;Byte(s)&amp;lt;/u&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
        X     22&lt;br /&gt;
 &lt;br /&gt;
        Y     23&lt;br /&gt;
 &lt;br /&gt;
        Z     24  (top when standing)&lt;br /&gt;
              25  (top when kneeling)&lt;br /&gt;
              26  (bottom)&lt;br /&gt;
&lt;br /&gt;
Maybe they represent the &amp;quot;size in profile&amp;quot; (&amp;quot;width&amp;quot;), affecting likelihood to hit. A game could be tried with a target 20 squares away, set 22 and 23 alternately to 5 or 2 (or 1 or 0?), and see if it affects the successful shots percentage. 0 or even 1 might break the game, though.&lt;br /&gt;
&lt;br /&gt;
Also, how do these values (2 to 5) correlate with the &amp;quot;pixel drawings&amp;quot; of units? I can&#039;t seem to find that info at the moment... aren&#039;t units and tiles defined as something like 16x16x[[Height|28]]? If so, then perhaps the values (2 to 5) are multiplied by 3 or something to get their final &amp;quot;width&amp;quot; for bullet interception??  --[[User:MikeTheRed|MikeTheRed]] 05:20, 17 September 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
:I finally got the OSG (w00t!), and noticed the following: The section on weapon accuracy says (p. 221) that target size affects the chance to hit, and &amp;quot;the &#039;size&#039; of each alien is listed along with all other alien statistics in Chapter 9&amp;quot;. But the alien stats tables (p. 250 ff.) only lists Height as a possible &#039;size&#039; stat, and the text write-ups don&#039;t otherwise address &amp;quot;target size&amp;quot; with any precision. This discrepancy - that Chapter 8 talks about &#039;&#039;&#039;size&#039;&#039;&#039;, but Chapter 9 only has &#039;&#039;&#039;height&#039;&#039;&#039; - might (might!) mean there are more variables that determine target area size, but somehow they didn&#039;t make it to the alien stats tables.&lt;br /&gt;
&lt;br /&gt;
:The description for Height (p. 249) does say, &amp;quot;Taller creatures are easier to hit than short ones are. An alien with a height of 40, for example, is twice as easy to hit as an alien with a height of 20.&amp;quot; (Note: The tallest [[Height]] is actually 23. And also notice, Float is never mentioned.) This &#039;&#039;might&#039;&#039; mean only height affects this, or it could be read in a general way; other dimensions (X and Y in addition to Z) might also affect it.&lt;br /&gt;
&lt;br /&gt;
:Somebody should do some firing accuracy tests while hacking these potential X &amp;amp; Y bytes! But I still don&#039;t know how the values for [22] &amp;amp; [23] compare to what X-COM considers tile width... we know the Height byte accurately reflects the full range of possible values (0 to 23), but I doubt 5 is the full (pixel?) width of a tile. This might mean it&#039;s not width, then (or maybe [22] &amp;amp; [23] are added, or they are individually multiplied by 3 or something??) If anyone who knows about tile width could say something, I&#039;d appreciate it. --[[User:MikeTheRed|MikeTheRed]] 11:24, 1 October 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
In any event, here&#039;s a summary of bytes [22] and [23], in the hopes we can figure it out. They&#039;re always identical for a given race, and [22] always equals [23].&lt;br /&gt;
&lt;br /&gt;
                  &#039;&#039;&#039;X-COM                            TFTD&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
          &amp;lt;U&amp;gt;Value&amp;lt;/U&amp;gt;   &amp;lt;U&amp;gt;Alien&amp;lt;/U&amp;gt;           &amp;lt;U&amp;gt;N&amp;lt;/U&amp;gt;        &amp;lt;U&amp;gt;Value&amp;lt;/U&amp;gt;   &amp;lt;U&amp;gt;Alien&amp;lt;/U&amp;gt;           &amp;lt;U&amp;gt;N&amp;lt;/U&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
            2     Sectoid         6          2     Aquatoid        6   &lt;br /&gt;
                                                   Bio-Drone       1 &lt;br /&gt;
            3     Celatid         1                Tentaculat      1   &lt;br /&gt;
                  Chryssalid      1&lt;br /&gt;
                  Civilian        2          3     Calcinite       1   &lt;br /&gt;
                  Ethereal        3                Civilian        2   &lt;br /&gt;
                  Floater         6                Deep_One        1   &lt;br /&gt;
                  Muton           3                Gill_Man        4   &lt;br /&gt;
                  Snakeman        5                Tasoth          2   &lt;br /&gt;
 &lt;br /&gt;
            4     Cyberdisc       1          4     Coelacant       1   &lt;br /&gt;
                  Hovertank       1                Displacer       1   &lt;br /&gt;
                  Reaper          1                Hallucinoid     1   &lt;br /&gt;
                  Sectopod        1                Lobster_Man     5   &lt;br /&gt;
                  Tank            1                Triscene        1   &lt;br /&gt;
                                                   Xarquid         1 &lt;br /&gt;
            5     Silacoid        1  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;24:&#039;&#039;&#039;   Standing Height - Corresponds to Unitref[049]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;25:&#039;&#039;&#039;   Kneeling Height - Corresponds to Unitref[050]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;26:&#039;&#039;&#039;   Floating Height - Corresponds to Unitref[051]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;27:&#039;&#039;&#039;   [[Damage#Susceptible_to...|Damage Modifier]] Category - Corresponds to Unitref[055]&lt;br /&gt;
&lt;br /&gt;
This field is simply a look-up table, or more directly, a way to categorize the units into similar groups. The actual modifiers are listed elsewhere in the executable. A value of 1 indicates the first DM category, a value of 4 indicates the 4th, etc. The values of 2 and 3 are not seen in the alien stats as they refer to X-COM soldier armor info. I&#039;m not sure about 13 as the Zombie&#039;s stats haven&#039;t been found yet, but I think there is a category in the DM&#039;s for it.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Column&#039;&#039;&#039;    &#039;&#039;&#039;Unit Type(s)&#039;&#039;&#039;&lt;br /&gt;
    &#039;&#039;&#039;1&#039;&#039;&#039;      Civilian, Sectoid, Celatid, Floater&lt;br /&gt;
    &#039;&#039;&#039;2&#039;&#039;&#039;      Personal Armor&lt;br /&gt;
    &#039;&#039;&#039;3&#039;&#039;&#039;      Power Suit, Flying Suit&lt;br /&gt;
    &#039;&#039;&#039;4&#039;&#039;&#039;      Tanks, Hovertanks&lt;br /&gt;
    &#039;&#039;&#039;5&#039;&#039;&#039;      Snakemen&lt;br /&gt;
    &#039;&#039;&#039;6&#039;&#039;&#039;      Ethereal&lt;br /&gt;
    &#039;&#039;&#039;7&#039;&#039;&#039;      Muton&lt;br /&gt;
    &#039;&#039;&#039;8&#039;&#039;&#039;      Silacoid&lt;br /&gt;
    &#039;&#039;&#039;9&#039;&#039;&#039;      Chryssalid&lt;br /&gt;
   &#039;&#039;&#039;10&#039;&#039;&#039;      Reaper&lt;br /&gt;
   &#039;&#039;&#039;11&#039;&#039;&#039;      Sectopod&lt;br /&gt;
   &#039;&#039;&#039;12&#039;&#039;&#039;      Cyberdisc&lt;br /&gt;
   &#039;&#039;&#039;13&#039;&#039;&#039;      Zombie&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;28:&#039;&#039;&#039;   Psi Skill - Corresponds to Unitref[037]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;29:&#039;&#039;&#039;   Psi Strength - Corresponds to Unitref[057]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;30:&#039;&#039;&#039;   Bravery (encoded) - Corresponds to Unitref[059]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;31:&#039;&#039;&#039;   Motion scanner size - Corresponds to Unitref[061]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;32:&#039;&#039;&#039;   &#039;&#039;1 for Cyberdisc, 0 for all others including TFTD... isn&#039;t &amp;quot;Explodes&amp;quot;; the TFTD Bio-Drone also explodes...&#039;&#039; - Corresponds to Unitref[071]&lt;br /&gt;
&lt;br /&gt;
I edited the Cyberdisc&#039;s field to 0 and checked to see if it exploded. It still did. Obviously this field is for something else. I&#039;ll work on this some more. --[[User:Zombie|Zombie]] 20:15, 15 September 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;33:&#039;&#039;&#039;   &#039;&#039;Unknown - Always 0&#039;&#039;  No Corresponding Unitref offset&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;34:&#039;&#039;&#039;   Corpse type - Corresponds to Unitref[038]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;35:&#039;&#039;&#039;   Big unit (2x2)  No Corresponding Unitref offset&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;36:&#039;&#039;&#039;   Victory point score - Corresponds to Unitref[039]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;37:&#039;&#039;&#039;   Aggression - Corresponds to Unitref[044]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;38:&#039;&#039;&#039;   Intelligence - Corresponds to Unitref[073]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This data was just put together working heavily with Zombie and his great SC [http://www.strategycore.co.uk/xcom/pg/ufoalienstats alien stats] page.&lt;br /&gt;
&lt;br /&gt;
= Country Labels =&lt;br /&gt;
Starting at offset 396480 (hex: 0x60CC0) are the records that contain the location of the labels for the country names on the world. In order they are X, Y, and English.dat index all signed short integers (6 bytes for each record). X should never be negative but between 0 and 2880, Y should be between -720 and 720 (See [[WORLD.DAT]]). The English.dat file, despite all other array indexes appears to start at 1 and not 0, thus a value of 611 in here represents index 610 in a zero based English.dat array. (It stands to reason that these work for the other language files as well)&lt;br /&gt;
&lt;br /&gt;
= File Templates =&lt;br /&gt;
There appears to be &#039;templates&#039; of some of the [[Saved Game Files|game files]] stored within this executable. Makes sense as initially no saved game files are present when installed. Here is a list of known positions and the corresponding file.&lt;br /&gt;
{| {{StdDescTable}}&lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
! Offset (Hex) !! Offset (Dec) !! Length (Bytes) !! File&lt;br /&gt;
|-&lt;br /&gt;
| 5D894 || 383124 || 576 || [[DIPLOM.DAT]]&lt;br /&gt;
|-&lt;br /&gt;
| 5E48C || 386188 || 1392|| [[UP.DAT]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
* [[TACTICAL.EXE]] - Sister executable used for Turn based strategy (merged with geoscape.exe in WinCE edition)&lt;br /&gt;
* [[UNITREF.DAT]] - Stats on current units (both XCOM and Alien) in play&lt;br /&gt;
* [[Saved Game Files]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Files]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=User:Pi_Masta&amp;diff=11524</id>
		<title>User:Pi Masta</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=User:Pi_Masta&amp;diff=11524"/>
		<updated>2007-04-07T17:38:00Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: removed long lease.dat table, updated some info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Alright I finally created this page. Tired of seeing so much red on the Recent Changes page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Um, I like computers and math (hence Pi) and of course XCOM or I wouldn&#039;t be here. Just something about the gameplay and concept of the game intrigues me.&lt;br /&gt;
&lt;br /&gt;
==PyXcom==&lt;br /&gt;
I&#039;m hoping to get a possible &#039;free-for-all&#039; editor going in python. I had success getting an old version of Python to work in DOSBox, though it&#039;s not very stable. I&#039;m working on a &#039;back-end&#039; (currently dubbed PyXcom) for all the saved game files so applications would just have to worry about what values to put in and not formatting the file correctly, giving it a more &#039;pythonic&#039; interface. Could still use work, but I have a simple class that can read and write .DAT files (really any fixed-length files), and is somewhat simple to add new fields as values in files are discovered.&lt;br /&gt;
&lt;br /&gt;
From this I could make a Tk/Tcl version that would require a much later version of Python to do editing on modern machines (including *nix, and probably Mac). This would probably do more in depth editing, of say the bases, stats of objects or soldiers, etc. &lt;br /&gt;
&lt;br /&gt;
Before that I think I&#039;ll make a DOS friendly version (aka command prompt, maybe keyboard selection) that could implement changes (I&#039;m thinking of making a better soldier equip screen that runs before going into tactical, downside is I don&#039;t it will be easy to display images). &lt;br /&gt;
&lt;br /&gt;
Another idea I have is to make a Monitoring program (PyXMon?) that can watch the save game and MISSDAT directories and apply patches to them automattically. The main use this would have is renaming soldiers since it is impossible to have an App, like XcomUtil,rename them after combat (GEOSCAPE updates the stats then), instead you could save your game, possibly wait a second or 2 and then reload it. The monitoring program will catch the new save game and apply the fix. This would also go with the &#039;Finished&#039; Dirt Modules bug, though handling that between battles would probably be enough. Another application would be for Data Miners to have the scripts automattically output data from files (in a more readable format) on saves, for instance Zombie&#039;s initial Funds data could have had a script written in python to automatically append a file with the data about the countries.&lt;br /&gt;
&lt;br /&gt;
I have too many ideas, and most likely I won&#039;t complete these projects, but I hope to get close. I&#039;m updating this Wiki for the most part on the files, and trying to crack some of the others.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
I have almost all decoded files supported (with the exception of graphic files which I don&#039;t intend to directly load) and I&#039;ve started on making a layer on top of it. Namely BaseInfo, SoldierInfo, LocInfo, and CraftInfo that can all be connected together and I have made a &#039;master&#039; module to do this given a directory for it to load from. Let me give some examples:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; t = Geoscape(&#039;missdat&#039;)&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; t.base[0].name&lt;br /&gt;
 &#039;Main&#039;&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for x in t.base[0].soldiers:&lt;br /&gt;
         print x&lt;br /&gt;
 D Likhachev (r)aBRst (Rookie)&lt;br /&gt;
 F Robinson (r)aRbr (Rookie)&lt;br /&gt;
 Evans TU (C)C-AC*ST* (Captain)&lt;br /&gt;
 .......&lt;br /&gt;
 Sarah Watson (r)arbrst (Rookie)&lt;br /&gt;
 Ed Kemp SACK (Rookie)&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for x in t.loc.used:&lt;br /&gt;
         print x, &#039;:&#039;,  x.data	&lt;br /&gt;
 Loc[0] - XCOM Base : Base 0: Main&lt;br /&gt;
 Loc[1] - XCOM Ship : Skyranger-1&lt;br /&gt;
 Loc[2] - XCOM Ship : Interceptor-1&lt;br /&gt;
 Loc[3] - XCOM Ship : Interceptor-4&lt;br /&gt;
 Loc[4] - XCOM Base : Base 1: Asia&lt;br /&gt;
 Loc[5] - Crash Site : Large Scout-51&lt;br /&gt;
 Loc[6] - XCOM Base : Base 2: America&lt;br /&gt;
 Loc[7] - XCOM Ship : Interceptor-5&lt;br /&gt;
 ... &lt;br /&gt;
 Loc[15] - Alien Base : None&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; t.loc[5].data.damage #The crashed large scout&lt;br /&gt;
 150&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for x in t.loc[1].data.soldiers: #Skyranger 1&#039;s soldiers&lt;br /&gt;
         print x, &#039;;&#039;,	&lt;br /&gt;
 D Likhachev (r)aBRst (Rookie) ; F Robinson (r)aRbr (Rookie) ; Evans TU (C)C-AC*ST* (Captain) ; Robinson TU (Co)ACrbr*ST* (Colonel);&lt;br /&gt;
 C Dodge (S)*AC*Rbrst (Seargent) ; Yuzo Kojima SACK (Rookie) ; K Okamoto (r)W-ACr (Rookie) ; Yataka Shoji (r)C-st (Rookie) ; &lt;br /&gt;
 Austin King SACK (Rookie) ; Y Matsumara (r)C-W-ACR (Rookie) ;&lt;br /&gt;
&lt;br /&gt;
And now to show that you can chain these together. This one get&#039;s the second LOC.DAT entry (which is skyranger-1), grabs its data (the skyranger craft itself), gets the craft&#039;s second soldier (remember is all 0-based), then his/her base, that base&#039;s location, that location&#039;s data (which just goes back to the base), that base&#039;s last soldier, and then that soldier&#039;s name.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; t.loc[1].data.soldiers[1].base.loc.data.crafts[0].soldiers[-1].name&lt;br /&gt;
 &#039;Y Matsumara (r)C-W-ACR&#039;&lt;br /&gt;
&lt;br /&gt;
This is all just the tip of the iceberg!&lt;br /&gt;
&lt;br /&gt;
Right now I just have mostly Geoscape stuff made for use. The Tactical saves can be manipulated but there&#039;s no referencing other files or what not. So far there is no GUI. This is intentional as it is mean to run at the command prompt with XCOM if possible. I might whip up a generated GUI using tkinter, one that just makes fields based on the information from these class objects (read: not going to look pretty). But right now I think I&#039;m going to get on to the Tactical files (the main ones, OBREF, UNITREF, etc).&lt;br /&gt;
&lt;br /&gt;
Oh and I do have a stat string generator that is very customizeable, although probably not as simplistic.&lt;br /&gt;
&lt;br /&gt;
I also now have a simple graphical soldier equipment utility to possibly replace the ingame initial equipment screen.&lt;br /&gt;
&lt;br /&gt;
===As a tool===&lt;br /&gt;
I&#039;ve whipped up a handy file monitoring script that will run a function when a file is modified. With this I can have it automatically apply patches or fix issues whenever a game is saved. Also it could be possible with modification of the batch file that switches between Tactical and Geoscape to have it add or even replace parts of the game. (I&#039;m trying to get a soldier editor, but there&#039;s a few issues I have to work out)&lt;br /&gt;
&lt;br /&gt;
Mainly though, I can use this monitoring process to help figure out what certain bytes mean. For example when I was looking for what offset 12 does for [[OBPOS.DAT]], I simply monitored one of my save folder&#039;s obpos.dat file. Whenever it changed my script would parse the information and compare it to the last known information (rather quickly too might I add), it then printed to a seperate console the results as well as appending it to a log file. I even added more functionality by having it read the [[SAVEINFO.DAT]] file to get the save name, thus I could put some comments on what I did while I saved. Put this all together and I could see what happened to the files (or what parts I want to know about) as often as I saved, no need to alt-tab out and run a script.&lt;br /&gt;
&lt;br /&gt;
==[[LEASE.DAT]]==&lt;br /&gt;
some working notes on lease.dat&lt;br /&gt;
&lt;br /&gt;
fixed length of 180 bytes, prime factorization of 180:&lt;br /&gt;
 2^2 * 3^2 * 5, &lt;br /&gt;
&lt;br /&gt;
factors of 180: (probable line widths)&lt;br /&gt;
 2, 3, 4, 5, 6, 9, 10, 12, 15, 18, 20, 30, 36, 45, 60, 90, 180&lt;br /&gt;
&lt;br /&gt;
only offsets that seem to change (out of about 14 files) (&#039;&#039;compared from 1st to 14 others, but not 2nd or 3rd etc with the other 14 so could be more&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
 0-1,  5-17,  20-23,  26-28,  32-35,  38-41,  44-47,  50-53,  56-59,  62-65,  68-71,  74-77,  80-83,  86-89,  &lt;br /&gt;
 92-95,  98-101,  104-107,  110-113,  116-119,  122-125,  128-131,  134-137,  140-142,  146-149,  152-155,  &lt;br /&gt;
 158-161,  164-167,  170-173,&lt;br /&gt;
&lt;br /&gt;
There is a lot of symmetry in this format, lots of double 0&#039;s will line up at the line widths of the factors, with the exception of the very first byte, almost as if the first record is somehow different...&lt;br /&gt;
&lt;br /&gt;
* 13 Seems to be 0 for saves, 1 after combat and in missdat, 2 only for before combat, but I&#039;ve seen this number change in Geoscape saves, particularly when intercepting craft&lt;br /&gt;
&lt;br /&gt;
===Speculation===&lt;br /&gt;
LEASE as the name of this file makes me think of it pertaining to either:&lt;br /&gt;
* Purchased craft monthly (shouldn&#039;t need this much data)&lt;br /&gt;
* Base monthly costs&lt;br /&gt;
The &#039;orange&#039; set of values seems to be the most popular and &#039;simple&#039;.&lt;br /&gt;
&lt;br /&gt;
From tests using PyXCOM of over 70 saves, this file seems to change most often when a UFO is detected or an interceptor is launched at it. &lt;br /&gt;
&lt;br /&gt;
==Base Items store space==&lt;br /&gt;
I dug into GEOSCAPE.EXE and found the pattern of sizes like that listed on the stores page (offset 0x5DB34). However it different some areas, namely the HWP ammo was not with the actual HWPs. Also interesting was that there were gaps of 0&#039;s between some items, usually from the different groups like craft weapons, to agent weapons, to alien weapons, etc.&lt;br /&gt;
&lt;br /&gt;
I got to looking at [[PURCHASE.DAT]] as this seemed to be the only logical place for size information to be. Of particular interest was the so called &#039;sort&#039; order offset. I really doubted the programmers devoted a byte to help &#039;sort&#039; the information for display, but given what could be gleaned from that file alone it was a good guess. I&#039;m pretty sure it&#039;s an index (which technically does sort it) to at least one array (I surmise others below). I used some python scripts to read in a Purchase.dat file and a hex editor to find the pattern in geoscape.exe. &lt;br /&gt;
&lt;br /&gt;
Simply by placing the values in an array and having each item in purchase.dat use it&#039;s &#039;sort&#039; value to fetch the record in the array, everything matched up, well almost. The plasma beam and Fusion Ball Launcher were backwards (plasma had 20 space while fusion had 12). I almost gave up but then I thought what if the order is wrong? There isn&#039;t much info linking to what item a record is in that file, but I looked at the sell price. Turns out I was right, the sell price of the Fusion Ball Launcher is well known as it&#039;s the second runner up for [[Manufacturing Profitability]].&lt;br /&gt;
&lt;br /&gt;
===Other Possibilities===&lt;br /&gt;
These items have to index to English.dat somewhere (probably in the executable). My guess is that it is near the array that I found. There is probably other information such as the craft weapon statistics. The gaps between these indexes might make it possible to add new items to the game as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[INTER.DAT]]==&lt;br /&gt;
Took a stab at this file. I believe it deals with interceptions based on the name and that it changed whenever I attacked a UFO with an interceptor. However it is 568 bytes with a factorization of:&lt;br /&gt;
 2 * 2 * 2 * 71&lt;br /&gt;
Which baffles me because 71, 142, or 248 seem like weird lengths. I don&#039;t know of anything relating to these numbers in X-COM.&lt;br /&gt;
&lt;br /&gt;
I observed one set of changes that is interesting:&lt;br /&gt;
 0246: 000 ( 0) -&amp;gt; 008 ( 8)&lt;br /&gt;
 0248: 000 ( 0) -&amp;gt; 090 (5A)&lt;br /&gt;
 0388: 000 ( 0) -&amp;gt; 008 ( 8)&lt;br /&gt;
 0390: 000 ( 0) -&amp;gt; 090 (5A)&lt;br /&gt;
 0530: 000 ( 0) -&amp;gt; 008 ( 8)&lt;br /&gt;
 0532: 000 ( 0) -&amp;gt; 090 (5A)&lt;br /&gt;
&lt;br /&gt;
This appeared right after I downed a UFO in Brazil (Snakeman Large Scout on Retaliation) along with some other changes, but this set caught my eye because of the repetition, but more when I found that 388 - 246 = 142, and 530 - 388 = 142, with the significance of 142 being one of the factors of file size (2*71 = 142 -&amp;gt; 142 * 4 = 568)&lt;br /&gt;
&lt;br /&gt;
Also observed offsets 32 and 33 jump from 0&#039;s to 254 and 255 respectively and back. 30 and 31 changed somewhat but appears unrelated with the value of 32 and 33. So my guess is 4 sets of 142 bytes, with 71 2-byte values inside of each set. &lt;br /&gt;
&lt;br /&gt;
Perhaps this file is suppose to save the state of interceptions as they happen so they could be restored upon loading (which we all know crashes the game). Perhaps an adjustment could be made to this file to allow it to work, just like with the Difficulty bug and &lt;br /&gt;
&lt;br /&gt;
I might have to check this, but I think the maximum number of interceptions you can have minimized is 4, so possibly this file keeps track of each one.&lt;br /&gt;
[[IGLOB.DAT]].&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=WORLD.DAT&amp;diff=11522</id>
		<title>WORLD.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=WORLD.DAT&amp;diff=11522"/>
		<updated>2007-04-06T06:24:14Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: Hrrmm, last value can&amp;#039;t be just terrain type&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The original XCOM file is 13320 bytes long, while TFTD is 14660 bytes long. However, each uses the same 20-byte record length giving the original 666 entries and TFTD 733 entries. This file describes the terrain on the geoscape screen using quadrilateral polygons and  triangles.&lt;br /&gt;
&lt;br /&gt;
The first 16 bytes of file contain the points for the quad/triangle. 4 sets of 2 short (2-byte) integers, designating the &#039;X&#039; and &#039;Y&#039; coordinate (or latitude and longitude if you prefer). If the last set has an x value of -1 then it is to be rendered as a triangle, otherwise it is a quad.&lt;br /&gt;
&lt;br /&gt;
The last 4 bytes in the record contain the terrain type. This could be a long integer or 2 short integers as the last 2 bytes in each record are 0.&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
{| {{StdDescTable}}&lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
! Offsets !! Meaning !! Values&lt;br /&gt;
|-&lt;br /&gt;
| 0-1   || First X coordinate || 0 - 2880&lt;br /&gt;
|-&lt;br /&gt;
| 2-3   || First Y coordinate || -720 - 720&lt;br /&gt;
|-&lt;br /&gt;
| 4-5   || Second X coordinate || 0 - 2880&lt;br /&gt;
|-&lt;br /&gt;
| 6-7   || Second Y coordinate || -720 - 720&lt;br /&gt;
|-&lt;br /&gt;
| 8-9   || Third X coordinate || 0 - 2880&lt;br /&gt;
|-&lt;br /&gt;
| 10-11 || Third Y coordinate || -720 - 720&lt;br /&gt;
|-&lt;br /&gt;
| 12-13 || Fourth* X coordinate || 0 - 2880&lt;br /&gt;
|-&lt;br /&gt;
| 14-15 || Fourth* Y coordinate || -720 - 720&lt;br /&gt;
|-&lt;br /&gt;
| 16-19 || &amp;lt;s&amp;gt;Terrain Type&amp;lt;/s&amp;gt; [[#The last value|See Below]] || 0-10 and 12&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;small&amp;gt;&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; As mentioned above, the fourth coordinate could be (-1, 0) denoting a triangle&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The values were obtained only on the original XCOM. Presumably the same restrictions apply for TFTD except for maybe the terrain types. Also the X ranges are assumed to max at 2880 as this is a multiple of 360, the max observed in the file is actually 2877&lt;br /&gt;
&lt;br /&gt;
=== The last value ===&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| [[Image:world_render.gif|640px]]&lt;br /&gt;
| &lt;br /&gt;
Originally I thought the last value was the terrain type but it is obvious that it cannot be since there are only 6 real terrain types on the map (10 in all, but xcom base, alien base, city, and mars aren&#039;t on the world map) There are 12 discrete values, 0 to 10 and then 12. Some reason 11 is skipped. There are 12 regions in the world but a rough rendering of the data shows it must be representing the terrain as well.&lt;br /&gt;
&lt;br /&gt;
Rough rendering of the data in WORLD.DAT. Each color is a different number in offset 16-19, for example white is 2. You can see that it does follow some terrain as found, but for example the Rocky Mountains and the Alps are different colors but should both be mountainous.&lt;br /&gt;
&lt;br /&gt;
--[[User:Pi Masta|Pi Masta]] 23:24, 5 April 2007 (PDT)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[Saved Game Files]]&lt;br /&gt;
[[Category:Game Files]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=WORLD.DAT&amp;diff=11520</id>
		<title>WORLD.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=WORLD.DAT&amp;diff=11520"/>
		<updated>2007-04-06T03:13:37Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: got my offsets... off&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The original XCOM file is 13320 bytes long, while TFTD is 14660 bytes long. However, each uses the same 20-byte record length giving the original 666 entries and TFTD 733 entries. This file describes the terrain on the geoscape screen using quadrilateral polygons and  triangles.&lt;br /&gt;
&lt;br /&gt;
The first 16 bytes of file contain the points for the quad/triangle. 4 sets of 2 short (2-byte) integers, designating the &#039;X&#039; and &#039;Y&#039; coordinate (or latitude and longitude if you prefer). If the last set has an x value of -1 then it is to be rendered as a triangle, otherwise it is a quad.&lt;br /&gt;
&lt;br /&gt;
The last 4 bytes in the record contain the terrain type. This could be a long integer or 2 short integers as the last 2 bytes in each record are 0.&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
{| {{StdDescTable}}&lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
! Offsets !! Meaning !! Values&lt;br /&gt;
|-&lt;br /&gt;
| 0-1   || First X coordinate || 0 - 2880&lt;br /&gt;
|-&lt;br /&gt;
| 2-3   || First Y coordinate || -720 - 720&lt;br /&gt;
|-&lt;br /&gt;
| 4-5   || Second X coordinate || 0 - 2880&lt;br /&gt;
|-&lt;br /&gt;
| 6-7   || Second Y coordinate || -720 - 720&lt;br /&gt;
|-&lt;br /&gt;
| 8-9   || Third X coordinate || 0 - 2880&lt;br /&gt;
|-&lt;br /&gt;
| 10-11 || Third Y coordinate || -720 - 720&lt;br /&gt;
|-&lt;br /&gt;
| 12-13 || Fourth* X coordinate || 0 - 2880&lt;br /&gt;
|-&lt;br /&gt;
| 14-15 || Fourth* Y coordinate || -720 - 720&lt;br /&gt;
|-&lt;br /&gt;
| 16-19 || Terrain Type || 0-10 and 12&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;small&amp;gt;&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; As mentioned above, the fourth coordinate could be (-1, 0) denoting a triangle&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The values were obtained only on the original XCOM. Presumably the same restrictions apply for TFTD except for maybe the terrain types. Also the X ranges are assumed to max at 2880 as this is a multiple of 360, the max observed in the file is actually 2877&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[Saved Game Files]]&lt;br /&gt;
[[Category:Game Files]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:WORLD.DAT&amp;diff=11519</id>
		<title>Talk:WORLD.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:WORLD.DAT&amp;diff=11519"/>
		<updated>2007-04-06T03:05:17Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: oops I was wrong, BladeFire was right :D&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;   // World.Dat = World Map Terrain&lt;br /&gt;
   &lt;br /&gt;
   typedef struct worlddat&lt;br /&gt;
   {&lt;br /&gt;
      short         QuadData[4][2]; // Coordinates of quadrilateral&lt;br /&gt;
      unsigned long texture;        // Terrain texture of quad&lt;br /&gt;
   } WorldDat;&lt;br /&gt;
   &lt;br /&gt;
   #define MaxQuads 768      // Observed values, XCOM = 666, TFTD = 733&lt;br /&gt;
&lt;br /&gt;
QuadData/8 = realworld latitude and longitude numbers.&lt;br /&gt;
&lt;br /&gt;
if QuadData[3][1] = -1 then the shape is a triangle and that entery is not used. (for you non programers QuadData[0] is the first so [3] is the forth.)&lt;br /&gt;
&lt;br /&gt;
This may not be usefull for the wiki but I once wrote a program to detect what world.dat entry a givin ship was located in and therefor what texture/terrain file used to create the battlescape map. I have the function if anyone is interested in the math.&lt;br /&gt;
&lt;br /&gt;
--[[User:BladeFireLight|BladeFireLight]] 21:24, 20 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
:Gah, I just spent the last 20 minutes or so figuring this file out, wish I would have seen this before. &lt;br /&gt;
&lt;br /&gt;
:Wonder how it defines the countries since this file only seems to designate terrain types. Maybe indexed all the polygons in this file? Be tough to find it then...&lt;br /&gt;
&lt;br /&gt;
Oh, and one thing. When QuadData[3][&#039;&#039;&#039;0&#039;&#039;&#039;] is -1 when it designates a triangle (and actually QuadData[3][1] is 0 as well).&lt;br /&gt;
&lt;br /&gt;
I&#039;ll probably put this info on the page article here soon though. --[[User:Pi Masta|Pi Masta]] 19:42, 5 April 2007 (PDT)&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=WORLD.DAT&amp;diff=11518</id>
		<title>WORLD.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=WORLD.DAT&amp;diff=11518"/>
		<updated>2007-04-06T03:03:59Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: fleshed out structure&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The original XCOM file is 13320 bytes long, while TFTD is 14660 bytes long. However, each uses the same 20-byte record length giving the original 666 entries and TFTD 733 entries. This file describes the terrain on the geoscape screen using quadrilateral polygons and  triangles.&lt;br /&gt;
&lt;br /&gt;
The first 16 bytes of file contain the points for the quad/triangle. 4 sets of 2 short (2-byte) integers, designating the &#039;X&#039; and &#039;Y&#039; coordinate (or latitude and longitude if you prefer). If the last set has an x value of -1 then it is to be rendered as a triangle, otherwise it is a quad.&lt;br /&gt;
&lt;br /&gt;
The last 4 bytes in the record contain the terrain type. This could be a long integer or 2 short integers as the last 2 bytes in each record are 0.&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
{| {{StdDescTable}}&lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
! Offsets !! Meaning !! Values&lt;br /&gt;
|-&lt;br /&gt;
| 0-1   || First X coordinate || 0 - 2880&lt;br /&gt;
|-&lt;br /&gt;
| 1-2   || First Y coordinate || -720 - 720&lt;br /&gt;
|-&lt;br /&gt;
| 2-3   || Second X coordinate || 0 - 2880&lt;br /&gt;
|-&lt;br /&gt;
| 3-4   || Second Y coordinate || -720 - 720&lt;br /&gt;
|-&lt;br /&gt;
| 5-6   || Third X coordinate || 0 - 2880&lt;br /&gt;
|-&lt;br /&gt;
| 7-8   || Third Y coordinate || -720 - 720&lt;br /&gt;
|-&lt;br /&gt;
| 9-10  || Fourth* X coordinate || 0 - 2880&lt;br /&gt;
|-&lt;br /&gt;
| 11-12 || Fourth* Y coordinate || -720 - 720&lt;br /&gt;
|-&lt;br /&gt;
| 13-19 || Terrain Type || 0-10 and 12&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;small&amp;gt;&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; As mentioned above, the fourth coordinate could be (-1, 0) denoting a triangle&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The values were obtained only on the original XCOM. Presumably the same restrictions apply for TFTD except for maybe the terrain types. Also the X ranges are assumed to max at 2880 as this is a multiple of 360, the max observed in the file is actually 2877&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[Saved Game Files]]&lt;br /&gt;
[[Category:Game Files]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:WORLD.DAT&amp;diff=11517</id>
		<title>Talk:WORLD.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:WORLD.DAT&amp;diff=11517"/>
		<updated>2007-04-06T02:42:59Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;   // World.Dat = World Map Terrain&lt;br /&gt;
   &lt;br /&gt;
   typedef struct worlddat&lt;br /&gt;
   {&lt;br /&gt;
      short         QuadData[4][2]; // Coordinates of quadrilateral&lt;br /&gt;
      unsigned long texture;        // Terrain texture of quad&lt;br /&gt;
   } WorldDat;&lt;br /&gt;
   &lt;br /&gt;
   #define MaxQuads 768      // Observed values, XCOM = 666, TFTD = 733&lt;br /&gt;
&lt;br /&gt;
QuadData/8 = realworld latitude and longitude numbers.&lt;br /&gt;
&lt;br /&gt;
if QuadData[3][1] = -1 then the shape is a triangle and that entery is not used. (for you non programers QuadData[0] is the first so [3] is the forth.)&lt;br /&gt;
&lt;br /&gt;
This may not be usefull for the wiki but I once wrote a program to detect what world.dat entry a givin ship was located in and therefor what texture/terrain file used to create the battlescape map. I have the function if anyone is interested in the math.&lt;br /&gt;
&lt;br /&gt;
--[[User:BladeFireLight|BladeFireLight]] 21:24, 20 January 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
:Gah, I just spent the last 20 minutes or so figuring this file out, wish I would have seen this before. &lt;br /&gt;
&lt;br /&gt;
:Wonder how it defines the countries since this file only seems to designate terrain types. Maybe indexed all the polygons in this file? Be tough to find it then...&lt;br /&gt;
&lt;br /&gt;
Oh, and there&#039;s a couple mistakes. The terrain type is just a short or unsigned short (there&#039;s only 12 types, though values go from 0-10 and then include 12, skipping 11) and its when QuadData[3][&#039;&#039;&#039;0&#039;&#039;&#039;] is -1 when it designates a triangle.&lt;br /&gt;
&lt;br /&gt;
I&#039;ll probably put this info on the page article here soon though. --[[User:Pi Masta|Pi Masta]] 19:42, 5 April 2007 (PDT)&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=User:Pi_Masta&amp;diff=11516</id>
		<title>User:Pi Masta</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=User:Pi_Masta&amp;diff=11516"/>
		<updated>2007-04-06T00:52:25Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: INTER.DAT notes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Alright I finally created this page. Tired of seeing so much red on the Recent Changes page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Um, I like computers and math (hence Pi) and of course XCOM or I wouldn&#039;t be here. Just something about the gameplay and concept of the game intrigues me.&lt;br /&gt;
&lt;br /&gt;
==PyXcom==&lt;br /&gt;
I&#039;m hoping to get a possible &#039;free-for-all&#039; editor going in python. I had success getting an old version of Python to work in DOSBox, though it&#039;s not very stable. I&#039;m working on a &#039;back-end&#039; (currently dubbed PyXcom) for all the saved game files so applications would just have to worry about what values to put in and not formatting the file correctly, giving it a more &#039;pythonic&#039; interface. Could still use work, but I have a simple class that can read and write .DAT files (really any fixed-length files), and is somewhat simple to add new fields as values in files are discovered.&lt;br /&gt;
&lt;br /&gt;
From this I could make a Tk/Tcl version that would require a much later version of Python to do editing on modern machines (including *nix, and probably Mac). This would probably do more in depth editing, of say the bases, stats of objects or soldiers, etc. &lt;br /&gt;
&lt;br /&gt;
Before that I think I&#039;ll make a DOS friendly version (aka command prompt, maybe keyboard selection) that could implement changes (I&#039;m thinking of making a better soldier equip screen that runs before going into tactical, downside is I don&#039;t it will be easy to display images). &lt;br /&gt;
&lt;br /&gt;
Another idea I have is to make a Monitoring program (PyXMon?) that can watch the save game and MISSDAT directories and apply patches to them automattically. The main use this would have is renaming soldiers since it is impossible to have an App, like XcomUtil,rename them after combat (GEOSCAPE updates the stats then), instead you could save your game, possibly wait a second or 2 and then reload it. The monitoring program will catch the new save game and apply the fix. This would also go with the &#039;Finished&#039; Dirt Modules bug, though handling that between battles would probably be enough. Another application would be for Data Miners to have the scripts automattically output data from files (in a more readable format) on saves, for instance Zombie&#039;s initial Funds data could have had a script written in python to automatically append a file with the data about the countries.&lt;br /&gt;
&lt;br /&gt;
I have too many ideas, and most likely I won&#039;t complete these projects, but I hope to get close. I&#039;m updating this Wiki for the most part on the files, and trying to crack some of the others.&lt;br /&gt;
&lt;br /&gt;
===Current Status===&lt;br /&gt;
I have a large number of files supported and I&#039;ve started on making a layer on top of it. Namely BaseInfo, SoldierInfo, LocInfo, and CraftInfo that can all be connected together and I have made a &#039;master&#039; module to do this given a directory for it to load from. Let me give some examples:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; t = Geoscape(&#039;missdat&#039;)&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; t.base[0].name&lt;br /&gt;
 &#039;Main&#039;&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for x in t.base[0].soldiers:&lt;br /&gt;
         print x&lt;br /&gt;
 D Likhachev (r)aBRst (Rookie)&lt;br /&gt;
 F Robinson (r)aRbr (Rookie)&lt;br /&gt;
 Evans TU (C)C-AC*ST* (Captain)&lt;br /&gt;
 .......&lt;br /&gt;
 Sarah Watson (r)arbrst (Rookie)&lt;br /&gt;
 Ed Kemp SACK (Rookie)&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for x in t.loc.used:&lt;br /&gt;
         print x, &#039;:&#039;,  x.data	&lt;br /&gt;
 Loc[0] - XCOM Base : Base 0: Main&lt;br /&gt;
 Loc[1] - XCOM Ship : Skyranger-1&lt;br /&gt;
 Loc[2] - XCOM Ship : Interceptor-1&lt;br /&gt;
 Loc[3] - XCOM Ship : Interceptor-4&lt;br /&gt;
 Loc[4] - XCOM Base : Base 1: Asia&lt;br /&gt;
 Loc[5] - Crash Site : Large Scout-51&lt;br /&gt;
 Loc[6] - XCOM Base : Base 2: America&lt;br /&gt;
 Loc[7] - XCOM Ship : Interceptor-5&lt;br /&gt;
 Loc[8] - XCOM Ship : Skyranger-2&lt;br /&gt;
 Loc[10] - XCOM Ship : Interceptor-6&lt;br /&gt;
 Loc[11] - XCOM Ship : Interceptor-7&lt;br /&gt;
 Loc[12] - XCOM Base : Base 4: Australia&lt;br /&gt;
 Loc[13] - XCOM Base : Base 5: South America&lt;br /&gt;
 Loc[15] - Alien Base : None&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; t.loc[5].data.damage #The crashed large scout&lt;br /&gt;
 150&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; for x in t.loc[1].data.soldiers: #Skyranger 1&#039;s soldiers&lt;br /&gt;
         print x, &#039;;&#039;,	&lt;br /&gt;
 D Likhachev (r)aBRst (Rookie) ; F Robinson (r)aRbr (Rookie) ; Evans TU (C)C-AC*ST* (Captain) ; Robinson TU (Co)ACrbr*ST* (Colonel);&lt;br /&gt;
 C Dodge (S)*AC*Rbrst (Seargent) ; Yuzo Kojima SACK (Rookie) ; K Okamoto (r)W-ACr (Rookie) ; Yataka Shoji (r)C-st (Rookie) ; &lt;br /&gt;
 Austin King SACK (Rookie) ; Y Matsumara (r)C-W-ACR (Rookie) ;&lt;br /&gt;
&lt;br /&gt;
And now to show that you can chain these together. This one get&#039;s the second LOC.DAT entry (which is skyranger-1), grabs its data (the skyranger craft itself), gets the craft&#039;s second soldier (remember is all 0-based), then his/her base, that base&#039;s location, that location&#039;s data (which just goes back to the base), that base&#039;s last soldier, and then that soldier&#039;s name.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; t.loc[1].data.soldiers[1].base.loc.data.crafts[0].soldiers[-1].name&lt;br /&gt;
 &#039;Y Matsumara (r)C-W-ACR&#039;&lt;br /&gt;
&lt;br /&gt;
This is all just the tip of the iceberg!&lt;br /&gt;
&lt;br /&gt;
Right now I just have mostly Geoscape stuff made for use. The Tactical saves can be manipulated but there&#039;s no referencing other files or what not. So far there is no GUI. This is intentional as it is mean to run at the command prompt with XCOM if possible. I might whip up a generated GUI using tkinter, one that just makes fields based on the information from these class objects (read: not going to look pretty). But right now I think I&#039;m going to get on to the Tactical files (the main ones, OBREF, UNITREF, etc).&lt;br /&gt;
&lt;br /&gt;
Oh and I do have a stat string generator that is very customizeable, although probably not as simplistic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===As a tool===&lt;br /&gt;
I&#039;ve whipped up a handy file monitoring script that will run a function when a file is modified. With this I can have it automatically apply patches or fix issues whenever a game is saved. Also it could be possible with modification of the batch file that switches between Tactical and Geoscape to have it add or even replace parts of the game. (I&#039;m trying to get a soldier editor, but there&#039;s a few issues I have to work out)&lt;br /&gt;
&lt;br /&gt;
Mainly though, I can use this monitoring process to help figure out what certain bytes mean. For example when I was looking for what offset 12 does for [[OBPOS.DAT]], I simply monitored one of my save folder&#039;s obpos.dat file. Whenever it changed my script would parse the information and compare it to the last known information (rather quickly too might I add), it then printed to a seperate console the results as well as appending it to a log file. I even added more functionality by having it read the [[SAVEINFO.DAT]] file to get the save name, thus I could put some comments on what I did while I saved. Put this all together and I could see what happened to the files (or what parts I want to know about) as often as I saved, no need to alt-tab out and run a script.&lt;br /&gt;
&lt;br /&gt;
==&#039;GLOB&#039; Files==&lt;br /&gt;
I&#039;ve noticed a lot of saved files end in &#039;GLOB&#039;, presumably short for Globe or Globals.&lt;br /&gt;
  [[BGLOB.DAT]] - ambient lighting on tactical maps&lt;br /&gt;
  [[IGLOB.DAT]] - date and time&lt;br /&gt;
 [[LIGLOB.DAT]] - Money (I also think it holds income,expenses, etc for graphs as well)&lt;br /&gt;
 [[UIGLOB.DAT]] - Largely unknown, but holds scores for completed research?&lt;br /&gt;
  [[WGLOB.DAT]] - Tactical turns elapsed, number of aliens/soldiers/tanks/civvies kills as well as score&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
==[[LEASE.DAT]]==&lt;br /&gt;
some working notes on lease.dat&lt;br /&gt;
&lt;br /&gt;
fixed length of 180 bytes, prime factorization of 180:&lt;br /&gt;
 2^2 * 3^2 * 5, &lt;br /&gt;
&lt;br /&gt;
factors of 180: (probable line widths)&lt;br /&gt;
 2, 3, 4, 5, 6, 9, 10, 12, 15, 18, 20, 30, 36, 45, 60, 90, 180&lt;br /&gt;
&lt;br /&gt;
only offsets that seem to change (out of about 14 files) (&#039;&#039;compared from 1st to 14 others, but not 2nd or 3rd etc with the other 14 so could be more&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
 0-1,  5-17,  20-23,  26-28,  32-35,  38-41,  44-47,  50-53,  56-59,  62-65,  68-71,  74-77,  80-83,  86-89,  &lt;br /&gt;
 92-95,  98-101,  104-107,  110-113,  116-119,  122-125,  128-131,  134-137,  140-142,  146-149,  152-155,  &lt;br /&gt;
 158-161,  164-167,  170-173,&lt;br /&gt;
&lt;br /&gt;
There is a lot of symmetry in this format, lots of double 0&#039;s will line up at the line widths of the factors, with the exception of the very first byte, almost as if the first record is somehow different...&lt;br /&gt;
&lt;br /&gt;
On the fields that change, there doesn&#039;t appear to be many different values for them, usually only 2 or 3, with the exception of the first byte again.&lt;br /&gt;
&lt;br /&gt;
===Patterns from 14 files===&lt;br /&gt;
Out of all 14 files I&#039;m looking at there are only 11 variations which make offsets 0 and 6 special as they are the only fields to have 11 different observed values. There are only a couple of offsets that didn&#039;t fall into 2 categories perfectly, this is demonstrated by the background of the offsets. Orange values are only seen with other orange values, and yellow values the same. Thus if say offset 0 is 65 (orange) all the bytes after offset 14 will be the ones highlighted in orange. If there is no background then it has been seen with both orange and yellow.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039; There&#039;s a good chance I goofed something up reguarding the orange and yellow&#039;s on offsets 1, 7, 12, and 13&lt;br /&gt;
&lt;br /&gt;
Fields marked with volatile I have noticed to change the most between consecutive saves, usually when a UFO is detected, but not always.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width = &amp;quot;90%&amp;quot;&lt;br /&gt;
! offset &lt;br /&gt;
! colspan=&amp;quot;11&amp;quot; | observed values&lt;br /&gt;
! #&lt;br /&gt;
! comments&lt;br /&gt;
|-&lt;br /&gt;
! 0&lt;br /&gt;
|style=&amp;quot;background: orange;&amp;quot;| 65 ||style=&amp;quot;background: orange;&amp;quot;| 37 ||style=&amp;quot;background: yellow;&amp;quot;| 234 ||style=&amp;quot;background: orange;&amp;quot;| 108 ||style=&amp;quot;background: yellow;&amp;quot;| 143 ||style=&amp;quot;background: yellow;&amp;quot;| 177 ||style=&amp;quot;background: yellow;&amp;quot;| 181 ||style=&amp;quot;background: orange;&amp;quot;| 22 ||style=&amp;quot;background: yellow;&amp;quot;| 215 ||style=&amp;quot;background: orange;&amp;quot;| 61 ||style=&amp;quot;background: yellow;&amp;quot;| 53 || 11 || Volatile&lt;br /&gt;
|-&lt;br /&gt;
! 1&lt;br /&gt;
| 0 ||style=&amp;quot;background: orange;&amp;quot;| 1 ||style=&amp;quot;background: orange;&amp;quot;| 10 ||  ||  ||  ||  ||  ||  ||  ||  || 3 || Volatile&lt;br /&gt;
|-&lt;br /&gt;
! 5&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 77 || style=&amp;quot;background: yellow;&amp;quot;| 141  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 6&lt;br /&gt;
|style=&amp;quot;background: yellow;&amp;quot;| 32 ||style=&amp;quot;background: orange;&amp;quot;| 197 ||style=&amp;quot;background: yellow;&amp;quot;| 71 ||style=&amp;quot;background: orange;&amp;quot;| 234 ||style=&amp;quot;background: yellow;&amp;quot;| 235 ||style=&amp;quot;background: orange;&amp;quot;| 145 ||style=&amp;quot;background: yellow;&amp;quot;| 51 ||style=&amp;quot;background: orange;&amp;quot;| 24 ||style=&amp;quot;background: yellow;&amp;quot;| 56 ||style=&amp;quot;background: orange;&amp;quot;| 186 ||style=&amp;quot;background: yellow;&amp;quot;| 138 || 11 || Volatile&lt;br /&gt;
|-&lt;br /&gt;
! 7&lt;br /&gt;
|style=&amp;quot;background: yellow;&amp;quot;| 0 ||style=&amp;quot;background: orange;&amp;quot;| 1 || 2 ||style=&amp;quot;background: yellow;&amp;quot;| 10 ||style=&amp;quot;background: orange;&amp;quot;| 6 ||  ||  ||  ||  ||  ||  || 5 || Volatile&lt;br /&gt;
|-&lt;br /&gt;
! 8&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 13 || style=&amp;quot;background: yellow;&amp;quot;| 200  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 9&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 196 || style=&amp;quot;background: yellow;&amp;quot;| 4  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 10&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 94 || style=&amp;quot;background: yellow;&amp;quot;| 0  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 11&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 248 || style=&amp;quot;background: yellow;&amp;quot;| 0  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 12&lt;br /&gt;
| style=&amp;quot;background: yellow;&amp;quot;|120 ||style=&amp;quot;background: orange;&amp;quot;| 208 || 90 || 180 || 14 ||  ||  ||  ||  ||  ||  || 5 ||&lt;br /&gt;
|-&lt;br /&gt;
! 13&lt;br /&gt;
| 0 || 1 ||style=&amp;quot;background: orange;&amp;quot;| 2 ||  ||  ||  ||  ||  ||  ||  ||  || 3 || Seems to be 0 for saves, 1 after combat and in missdat, 2 only for before combat, but I&#039;ve seen this number change in Geoscape saves, particularly when intercepting craft&lt;br /&gt;
|-&lt;br /&gt;
! 14&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 7 || style=&amp;quot;background: yellow;&amp;quot;| 136  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 15&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 38 || style=&amp;quot;background: yellow;&amp;quot;| 60  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 16&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 136 || style=&amp;quot;background: yellow;&amp;quot;| 142  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 17&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 71 || style=&amp;quot;background: yellow;&amp;quot;| 216  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 20&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 78 || style=&amp;quot;background: yellow;&amp;quot;| 19  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 21&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 248 || style=&amp;quot;background: yellow;&amp;quot;| 199  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 22&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 139 || style=&amp;quot;background: yellow;&amp;quot;| 70  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 23&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 70 || style=&amp;quot;background: yellow;&amp;quot;| 252  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 26&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 70 || style=&amp;quot;background: yellow;&amp;quot;| 137  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 27&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 248 || style=&amp;quot;background: yellow;&amp;quot;| 70  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 28&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 115 || style=&amp;quot;background: yellow;&amp;quot;| 254  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 32&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 252 || style=&amp;quot;background: yellow;&amp;quot;| 104  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 33&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 38 || style=&amp;quot;background: yellow;&amp;quot;| 239  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 34&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 198 || style=&amp;quot;background: yellow;&amp;quot;| 25  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 35&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 7 || style=&amp;quot;background: yellow;&amp;quot;| 232  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 38&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 201 || style=&amp;quot;background: yellow;&amp;quot;| 80  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 39&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 203 || style=&amp;quot;background: yellow;&amp;quot;| 255  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 40&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 200 || style=&amp;quot;background: yellow;&amp;quot;| 118  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 41&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 4 || style=&amp;quot;background: yellow;&amp;quot;| 254  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 44&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 30 || style=&amp;quot;background: yellow;&amp;quot;| 252  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 45&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 184 || style=&amp;quot;background: yellow;&amp;quot;| 30  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 46&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 136 || style=&amp;quot;background: yellow;&amp;quot;| 104  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 47&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 60 || style=&amp;quot;background: yellow;&amp;quot;| 251  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 50&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 161 || style=&amp;quot;background: yellow;&amp;quot;| 14  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 51&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 172 || style=&amp;quot;background: yellow;&amp;quot;| 232  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 52&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 19 || style=&amp;quot;background: yellow;&amp;quot;| 238  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 53&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 199 || style=&amp;quot;background: yellow;&amp;quot;| 226  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 56&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 0 || style=&amp;quot;background: yellow;&amp;quot;| 10  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 57&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 0 || style=&amp;quot;background: yellow;&amp;quot;| 11  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 58&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 137 || style=&amp;quot;background: yellow;&amp;quot;| 192  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 59&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 70 || style=&amp;quot;background: yellow;&amp;quot;| 117  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 62&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 60 || style=&amp;quot;background: yellow;&amp;quot;| 118  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 63&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 30 || style=&amp;quot;background: yellow;&amp;quot;| 254  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 64&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 104 || style=&amp;quot;background: yellow;&amp;quot;| 255  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 65&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 239 || style=&amp;quot;background: yellow;&amp;quot;| 118  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 68&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 29 || style=&amp;quot;background: yellow;&amp;quot;| 118  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 69&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 15 || style=&amp;quot;background: yellow;&amp;quot;| 8  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 70&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 80 || style=&amp;quot;background: yellow;&amp;quot;| 255  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 71&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 255 || style=&amp;quot;background: yellow;&amp;quot;| 118  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 74&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 255 || style=&amp;quot;background: yellow;&amp;quot;| 157  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 75&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 118 || style=&amp;quot;background: yellow;&amp;quot;| 15  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 76&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 252 || style=&amp;quot;background: yellow;&amp;quot;| 235  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 77&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 30 || style=&amp;quot;background: yellow;&amp;quot;| 25  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 80&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 25 || style=&amp;quot;background: yellow;&amp;quot;| 254  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 81&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 144 || style=&amp;quot;background: yellow;&amp;quot;| 255  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 82&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 14 || style=&amp;quot;background: yellow;&amp;quot;| 118  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 83&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 232 || style=&amp;quot;background: yellow;&amp;quot;| 252  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 86&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 131 || style=&amp;quot;background: yellow;&amp;quot;| 14  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 87&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 196 || style=&amp;quot;background: yellow;&amp;quot;| 64  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 88&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 10 || style=&amp;quot;background: yellow;&amp;quot;| 1  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 89&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 11 || style=&amp;quot;background: yellow;&amp;quot;| 70  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 92&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 17 || style=&amp;quot;background: yellow;&amp;quot;| 94  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 93&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 255 || style=&amp;quot;background: yellow;&amp;quot;| 252  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 94&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 118 || style=&amp;quot;background: yellow;&amp;quot;| 38  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 95&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 254 || style=&amp;quot;background: yellow;&amp;quot;| 128  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 98&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 252 || style=&amp;quot;background: yellow;&amp;quot;| 117  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 99&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 255 || style=&amp;quot;background: yellow;&amp;quot;| 187  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 100&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 118 || style=&amp;quot;background: yellow;&amp;quot;| 184  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 101&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 8 || style=&amp;quot;background: yellow;&amp;quot;| 1  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 104&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 6 || style=&amp;quot;background: yellow;&amp;quot;| 201  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 105&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 232 || style=&amp;quot;background: yellow;&amp;quot;| 202  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 106&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 157 || style=&amp;quot;background: yellow;&amp;quot;| 4  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 107&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 15 || style=&amp;quot;background: yellow;&amp;quot;| 0  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 110&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 255 || style=&amp;quot;background: yellow;&amp;quot;| 0  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 111&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 118 || style=&amp;quot;background: yellow;&amp;quot;| 0  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 112&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 254 || style=&amp;quot;background: yellow;&amp;quot;| 30  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 113&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 255 || style=&amp;quot;background: yellow;&amp;quot;| 184  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 116&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 232 || style=&amp;quot;background: yellow;&amp;quot;| 142  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 117&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 236 || style=&amp;quot;background: yellow;&amp;quot;| 216  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 118&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 14 || style=&amp;quot;background: yellow;&amp;quot;| 199  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 119&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 64 || style=&amp;quot;background: yellow;&amp;quot;| 70  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 122&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 252 || style=&amp;quot;background: yellow;&amp;quot;| 0  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 123&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 196 || style=&amp;quot;background: yellow;&amp;quot;| 30  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 124&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 94 || style=&amp;quot;background: yellow;&amp;quot;| 197  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 125&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 252 || style=&amp;quot;background: yellow;&amp;quot;| 86  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 128&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 63 || style=&amp;quot;background: yellow;&amp;quot;| 0  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 129&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 0 || style=&amp;quot;background: yellow;&amp;quot;| 67  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 130&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 117 || style=&amp;quot;background: yellow;&amp;quot;| 205  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 131&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 187 || style=&amp;quot;background: yellow;&amp;quot;| 33  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 134&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 0 || style=&amp;quot;background: yellow;&amp;quot;| 137  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 135&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 31 || style=&amp;quot;background: yellow;&amp;quot;| 78  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 136&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 201 || style=&amp;quot;background: yellow;&amp;quot;| 254  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 137&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 202 || style=&amp;quot;background: yellow;&amp;quot;| 31  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 140&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 200 || style=&amp;quot;background: yellow;&amp;quot;| 254  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 141&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 2 || style=&amp;quot;background: yellow;&amp;quot;| 37  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 142&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 0 || style=&amp;quot;background: yellow;&amp;quot;| 24  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 146&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 136 || style=&amp;quot;background: yellow;&amp;quot;| 0  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 147&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 60 || style=&amp;quot;background: yellow;&amp;quot;| 27  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 148&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 142 || style=&amp;quot;background: yellow;&amp;quot;| 192  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 149&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 216 || style=&amp;quot;background: yellow;&amp;quot;| 247  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 152&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 254 || style=&amp;quot;background: yellow;&amp;quot;| 201  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 153&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 24 || style=&amp;quot;background: yellow;&amp;quot;| 202  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 154&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 0 || style=&amp;quot;background: yellow;&amp;quot;| 4  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 155&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 30 || style=&amp;quot;background: yellow;&amp;quot;| 0  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 158&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 6 || style=&amp;quot;background: yellow;&amp;quot;| 0  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 159&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 184 || style=&amp;quot;background: yellow;&amp;quot;| 0  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 160&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 0 || style=&amp;quot;background: yellow;&amp;quot;| 86  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 161&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 67 || style=&amp;quot;background: yellow;&amp;quot;| 30  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 164&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 114 || style=&amp;quot;background: yellow;&amp;quot;| 60  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 165&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 3 || style=&amp;quot;background: yellow;&amp;quot;| 142  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 166&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 137 || style=&amp;quot;background: yellow;&amp;quot;| 216  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 167&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 78 || style=&amp;quot;background: yellow;&amp;quot;| 233  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 170&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 138 || style=&amp;quot;background: yellow;&amp;quot;| 38  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 171&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 70 || style=&amp;quot;background: yellow;&amp;quot;| 128  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 172&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 254 || style=&amp;quot;background: yellow;&amp;quot;| 63  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 173&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 37 || style=&amp;quot;background: yellow;&amp;quot;| 32  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 176&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 61 || style=&amp;quot;background: yellow;&amp;quot;| 38  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 177&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 1 || style=&amp;quot;background: yellow;&amp;quot;| 128  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 178&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 0 || style=&amp;quot;background: yellow;&amp;quot;| 63  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
! 179&lt;br /&gt;
| style=&amp;quot;background: orange;&amp;quot;| 27 || style=&amp;quot;background: yellow;&amp;quot;| 0  ||  ||  ||  ||  ||  ||  ||  ||  ||  || 2 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Offsets 1, 7, 12, 13===&lt;br /&gt;
Comparing offsets 1, 7, 12, and 13 (the only offsets that will not &#039;determine&#039; the values after offset 14 (and others)).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039; There&#039;s a good chance I goofed something up reguarding the orange and yellow&#039;s on offsets 1, 7, 12, and 13, most of it should be accurate though&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;2&amp;quot;&lt;br /&gt;
! 1 !! 7 !! 12 !! 13 !! Comments&lt;br /&gt;
|-&lt;br /&gt;
| 0 ||style=&amp;quot;background: orange;&amp;quot;| 0 || 14 || 1 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0 ||style=&amp;quot;background: orange;&amp;quot;| 0 || 180 || 0 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0 ||style=&amp;quot;background: orange;&amp;quot;| 1 || 90 || 0 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0 ||style=&amp;quot;background: orange;&amp;quot;| 10 || 90 || 0 ||&lt;br /&gt;
|-&lt;br /&gt;
| 0 ||style=&amp;quot;background: yellow;&amp;quot;| 10 ||style=&amp;quot;background: yellow;&amp;quot;| 120 || 0 || &lt;br /&gt;
|-&lt;br /&gt;
| 0 || 2 ||style=&amp;quot;background: yellow;&amp;quot;| 120 || 0 ||&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;background: orange;&amp;quot;| 1 || 2 || 180 || 0 ||&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;background: orange;&amp;quot;| 10 ||style=&amp;quot;background: orange;&amp;quot;| 6 || 14 || 1 ||&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;background: orange;&amp;quot;| 10 ||style=&amp;quot;background: orange;&amp;quot;| 6 ||style=&amp;quot;background: orange;&amp;quot;| 208 ||style=&amp;quot;background: orange;&amp;quot;| 2 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Speculation===&lt;br /&gt;
LEASE as the name of this file makes me think of it pertaining to either:&lt;br /&gt;
* Purchased craft monthly (shouldn&#039;t need this much data)&lt;br /&gt;
* Base monthly costs&lt;br /&gt;
The &#039;orange&#039; set of values seems to be the most popular and &#039;simple&#039;.&lt;br /&gt;
&lt;br /&gt;
From tests using PyXCOM of over 70 saves, this file seems to change most often when a UFO is detected or an interceptor is launched at it. &lt;br /&gt;
&lt;br /&gt;
The 2 &#039;sets&#039; of the files are probably a result from me having essentially 2 games mixed in with my saves (at different difficulty levels). I was wanting to try something else but I didn&#039;t want to loose my current status, and now it&#039;s rather hard to tell which is which.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Base Items store space==&lt;br /&gt;
Currently the [[General Stores]] page lists the space needed for holding items. I couldn&#039;t find anywhere here where these values were found, so I assumed they were gathered empirically. However I knew they had to be stored somewhere together. Also I figured that they would be stored as simple integers and not some floating point number. I noticed that each &#039;size&#039; would become an integer if you multiplied it by 10, so from that ammo clips of size 0.1 would be stored as 1.&lt;br /&gt;
&lt;br /&gt;
I dug into GEOSCAPE.EXE and found the pattern of sizes like that listed on the stores page (offset 0x5DB34). However it different some areas, namely the HWP ammo was not with the actual HWPs. Also interesting was that there were gaps of 0&#039;s between some items, usually from the different groups like craft weapons, to agent weapons, to alien weapons, etc.&lt;br /&gt;
&lt;br /&gt;
I got to looking at [[PURCHASE.DAT]] as this seemed to be the only logical place for size information to be. Of particular interest was the so called &#039;sort&#039; order offset. I really doubted the programmers devoted a byte to help &#039;sort&#039; the information for display, but given what could be gleaned from that file alone it was a good guess. I&#039;m pretty sure it&#039;s an index (which technically does sort it) to at least one array (I surmise others below). I used some python scripts to read in a Purchase.dat file and a hex editor to find the pattern in geoscape.exe. &lt;br /&gt;
&lt;br /&gt;
Simply by placing the values in an array and having each item in purchase.dat use it&#039;s &#039;sort&#039; value to fetch the record in the array, everything matched up, well almost. The plasma beam and Fusion Ball Launcher were backwards (plasma had 20 space while fusion had 12). I almost gave up but then I thought what if the order is wrong? There isn&#039;t much info linking to what item a record is in that file, but I looked at the sell price. Turns out I was right, the sell price of the Fusion Ball Launcher is well known as it&#039;s the second runner up for [[Manufacturing Profitability]].&lt;br /&gt;
&lt;br /&gt;
===Other Possibilities===&lt;br /&gt;
These items have to index to English.dat somewhere (probably in the executable). My guess is that it is near the array that I found. There is probably other information such as the craft weapon statistics. The gaps between these indexes might make it possible to add new items to the game as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==[[INTER.DAT]]==&lt;br /&gt;
Took a stab at this file. I believe it deals with interceptions based on the name and that it changed whenever I attacked a UFO with an interceptor. However it is 568 to a factorization of:&lt;br /&gt;
 2 * 2 * 2 * 71&lt;br /&gt;
Which baffles me because 71, 142, or 248 seem like weird lengths. I don&#039;t know of anything relating to these numbers in X-COM.&lt;br /&gt;
&lt;br /&gt;
I observed one set of changes that is interesting:&lt;br /&gt;
 0246: 000 ( 0) -&amp;gt; 008 ( 8)&lt;br /&gt;
 0248: 000 ( 0) -&amp;gt; 090 (5A)&lt;br /&gt;
 0388: 000 ( 0) -&amp;gt; 008 ( 8)&lt;br /&gt;
 0390: 000 ( 0) -&amp;gt; 090 (5A)&lt;br /&gt;
 0530: 000 ( 0) -&amp;gt; 008 ( 8)&lt;br /&gt;
 0532: 000 ( 0) -&amp;gt; 090 (5A)&lt;br /&gt;
&lt;br /&gt;
This appeared right after I downed a UFO in Brazil (Snakeman Large Scout on Retaliation) along with some other changes, but this set caught my eye because of the repetition, but more when I found that 388 - 246 = 142, and 530 - 388 = 142, with the significance of 142 being one of the factors of file size (2*71 = 142 -&amp;gt; 142 * 4 = 568)&lt;br /&gt;
&lt;br /&gt;
Also observed offsets 32 and 33 jump from 0&#039;s to 254 and 255 respectively and back. 30 and 31 changed somewhat but appears unrelated with the value of 32 and 33. So my guess is 4 sets of 142 bytes, with 71 2-byte values inside of each set. &lt;br /&gt;
&lt;br /&gt;
Perhaps this file is suppose to save the state of interceptions as they happen so they could be restored upon loading (which we all know crashes the game). Perhaps an adjustment could be made to this file to allow it to work, just like with the Difficulty bug and [[IGLOB.DAT]].&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:Known_Bugs&amp;diff=11515</id>
		<title>Talk:Known Bugs</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:Known_Bugs&amp;diff=11515"/>
		<updated>2007-04-05T21:23:23Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: /* Crash Site in the atlantic ocean */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;did anyone find ANNOYING! the airbourne intercept window of TFTD when flying over water?&lt;br /&gt;
&lt;br /&gt;
Annoying:&lt;br /&gt;
&lt;br /&gt;
Intercept a USO over land then follow it and it may (should) fly out towards to water. The aliens don&#039;t usually go straight into the drink so the &amp;quot;Unable to continue pursuit while airbourne&amp;quot; window comes when flying over water &amp;quot;return to base&amp;quot; OR &amp;quot;continue pursuit&amp;quot; as the options. If you&#039;d press the &#039;continue pursuit&#039;, it would just display the window again. The only way to continue pursuit was to click it maybe 10 or 20 times before the aliens submerged. This is nuts! Are there any work-arounds to this than just pressing the &amp;quot;return to base&amp;quot; button?&lt;br /&gt;
&lt;br /&gt;
just checking up ?&lt;br /&gt;
&lt;br /&gt;
== Difficulty Bug ==&lt;br /&gt;
&lt;br /&gt;
We should for historical reasons outline the &amp;quot;Difficulty Bug&amp;quot; that [[XcomUtil]] has saved most of us from. Any takers? --[[User:JellyfishGreen|JellyfishGreen]]&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
That would only require two or three short lines. Something like this: &lt;br /&gt;
&lt;br /&gt;
&#039;&#039; &amp;quot; Because of one or two incorrectly set bytes in all dos versions of the game( 1.0 through to 1.4), no matter what difficulty was selected, the difficulty bug would reset to beginner at the end of the first mission. XcomUtil performs a very minor tweak that corrects this problem. This bug was officially fixed in the Collectors Edition Windows port (also commonly known as UFO Gold). &amp;quot; &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Or perhaps something a bit more succinct, and with less commas. Ha! &lt;br /&gt;
&lt;br /&gt;
- [[User:NKF|NKF]]&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
This is a technical bug that doesn&#039;t happen to everyone and one this article wasn&#039;t really meant to chronical - but we won&#039;t turn away helping a fellow player if it can&#039;t be helped. It&#039;s just that there are so many random crash points in this game that it would take far too long to find them all or come up with solutions for them. &lt;br /&gt;
&lt;br /&gt;
Certainly, the transfer crash can happen to some players, but it&#039;s not one that can be reproduced easily. It&#039;s just like the random crash that some players get when they research a floater medic. It crashes the game for some of us, but others don&#039;t seem to notice it at all. &lt;br /&gt;
&lt;br /&gt;
It really depends on your hardware and OS setup, whether or not your copy of the game is damaged or your savegame is damaged, etc. &lt;br /&gt;
&lt;br /&gt;
Does it happen in all games or just this one savegame? &lt;br /&gt;
&lt;br /&gt;
- [[User:NKF|NKF]] &lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;Invisible Muton&amp;quot; bug ==&lt;br /&gt;
&lt;br /&gt;
Upon shooting repeatedly a Muton, it sometimes plays its &amp;quot;death&amp;quot; animation without sound (as if falling unconscious) and it is no longer displayed in the screen, while remaining visible to my soldiers (I can center the screen and the cursor appears yellow over them). Under this state, they cannot be targeted by Stun Rods. They may play their death animation anytime they get shot, until they truly die, when they emit their characteristic sound and leave a corpse (along with any items carried).&lt;br /&gt;
&lt;br /&gt;
I&#039;m quite fond of laser weapons, maybe this happens more often with those.&lt;br /&gt;
&lt;br /&gt;
Also, though I remember experiencing this quite often fighting Mutons,  it may happen to any other high health race.--[[User:Trotsky|Trotsky]] 02:59, 2 July 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
Never seen that one myself. Another &amp;quot;unpatched game&amp;quot; thing maybe?&lt;br /&gt;
&lt;br /&gt;
There&#039;s a (very rare) bug that allows your soldiers to live if they become stunned by an explosion that happens to kill them. Sometimes the game will register their death, and THEN register that they&#039;ve been stunned. In every case I&#039;ve seen this happen, however, the unit will have such a low amount of health that a single fatal wound will render it dead (again) on the next turn. I have a vague memory that other players may have been able to get a medkit to the scene on time...&lt;br /&gt;
&lt;br /&gt;
I dunno if that&#039;s related to your issue at all (I doubt it, but... meh). I&#039;d advise using a Mind Probe on the alien the next time it happens so you can check the aliens stun/health levels.&lt;br /&gt;
&lt;br /&gt;
- [[User:Bomb_Bloke|Bomb Bloke]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I&#039;m pretty sure I&#039;ve seen this with Mutons. Possibly Chrysallids as well, another high health, high armor creature. They were still readily killed by shooting the place they are. Good thought on the MP, BB&lt;br /&gt;
&lt;br /&gt;
---[[User:MikeTheRed|MikeTheRed]] 08:51, 2 July 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;ve been known to have a dying muton(in fire) to spin around and then switch to the female civilian death animation. With the scream and everything. Even got a civilian death registered at the end of the mission. And this didn&#039;t just happen once, but on another separate occasion.&lt;br /&gt;
&lt;br /&gt;
Unusually enough, I once had a sectopod die and then drop a tank corpse. I was using the Lightning at the time for my troop carrier, so you can imagine my surprise. &lt;br /&gt;
&lt;br /&gt;
Then there was one occasion where a floater dropped a snakeman corpse. Let&#039;s not even get into the sort of things the aliens like to stuff themselves with. &lt;br /&gt;
&lt;br /&gt;
Your invisible alien bug is quite common, although there appears to be many causes for it. I think one involves a full object table when it comes to invisible aliens in bases. But it can also happen in ordinary missions as well. I&#039;m guessing the game may have tried to do something in the wrong order, and sprite information for the unit may have been lost or corrupted along the way. &lt;br /&gt;
&lt;br /&gt;
Having had an experience where all the chryssalids become invisible in one base defence mission was quite a shocker. I fixed this by saving the game, quitting and then restarting the game. If you ever get an invisible alien again, try this and see if it helps. If it doesn&#039;t, well, just keep a careful watch on your map and any alerts that pop up as you play. &lt;br /&gt;
&lt;br /&gt;
There&#039;s a similar but less severe bug where a dead alien will still leave its centre-on-unit alert button, but this goes away shortly after you move or turn. &lt;br /&gt;
&lt;br /&gt;
- [[User:NKF|NKF]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
That last bug happens when exploding Cyberdiscs kill nearby Sectoids, doesn&#039;t it?--[[User:Trotsky|Trotsky]] 23:56, 2 July 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
This is a pretty easy one. I guess this bug occured on UFO recovery on a battleship, an alien base assault or a base defense mission? As soon as there are too many items on the map, the game saves some item slots for the equipment to be displayed (since it is more valuable and more important to research). This would also make stun weapons lethal if the stunned aliens would vanish. therefore the game has a failsafe if an alien is stunned (or badly wounded and becoming uncontious). The downed alien&#039;s stun level is set exactly on its left health points therefore resurrecting it instantly. This cycle is broken when the alien is finally killed. This means if you want to stun an alien in such a situation you have to destroy some items first.&lt;br /&gt;
&lt;br /&gt;
- by tequilachef (April 4th 2007)&lt;br /&gt;
&lt;br /&gt;
== Vanishing snakemen ==&lt;br /&gt;
&lt;br /&gt;
I&#039;ve known snakemen to become invisible when standing on a hay bale. On the first occassion I had a poor tank getting shot while spending numerous turns looking for it. On the second occasion I had an alien under Psi-control, left it on the hay bale, and couldn&#039;t find it next turn. - Egor&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
This is not limited to snakemen. Hay bale block visibility quite much when a unit is standing on it. Two possible solutions:&lt;br /&gt;
- Destroy the hay before entering&lt;br /&gt;
- Shoot at the hay. If it is destroyed any unit on it will become visible (as long as no other bales are blocking the line of sight). You might also hit the enemy directly.&lt;br /&gt;
&lt;br /&gt;
I Dnt know if the aliens are affected by this diminished sight, too. My guess would be no.&lt;br /&gt;
&lt;br /&gt;
- By tequilachef (April 4th, 2007)&lt;br /&gt;
&lt;br /&gt;
== Blaster Bomb Bug ==&lt;br /&gt;
&lt;br /&gt;
I&#039;m currently playing through X-com UFO Defense, I have the collectors edition version.  I&#039;m in the process of trying to catch a live alien commander and the blaster bomb bug is making this very difficult.  If i remember correctly a commander is always in the command center of the the alien bases.  The problem is anytime i get close there is always a dude with a blaster launcher up there that tries to kill my troops.  When they try to fire it down at me the bug kicks in and they blow up the whole command room and all the aliens in it because they can&#039;t figure out how to get the blaster bomb down the grav lift thing in there.  This is making it very dificult to actually catch a live commander.  Anyone have any ideas for tactics or anything to breach that room without the aliens trying to fire a blaster launcher up there? - eL Hector&lt;br /&gt;
&lt;br /&gt;
: I can suggest two possible solutions. The first is to wait outside the command room for the alien to move closer to you. If it comes out of the room or if you know it has moved down the lift, you then burst in and stand right next to it to stop it from firing the blaster. This is risky because there could very well be a heavy plasma toting alien in there. The other is to use a small launcher and launch it up at the ceiling near where you think the alien with the blaster is standing. -[[User:NKF|NKF]]&lt;br /&gt;
&lt;br /&gt;
== Disappearing Ammunition ==&lt;br /&gt;
&lt;br /&gt;
I have observed that problem with X-COM 1.2, modded with XCOMUTIL. My stun bombs and heavy rocket missiles, along with clips for the auto cannon went missing.&lt;br /&gt;
[[User:Vagabond|Vagabond]]&lt;br /&gt;
&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
Just run a test using my 1.4 DOS version with XComUtil but my stun bombs didn&#039;t disappear: 30 + 1 back in the base they came from, same number after I went tactical and I dusted-off immediately. Are you running XComUtil with Runxcom.bat or did you simply run Xcusetup?&lt;br /&gt;
&lt;br /&gt;
[[User:Hobbes|Hobbes]] 22:12, 22 February 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
:Is it a case of hitting the 80-item limit?--[[User:Ethereal Cereal|Ethereal Cereal]] 12:28, 23 February 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
------&lt;br /&gt;
With runxcomw.bat, as everytime. Apologies, I retested and it seems like I was mistakened, but I could have sworn that I lost them dang stunbombs. Had to manufacture some. I will test some more, using four heavy weapons and seeing whether their ammunition disappears at all. Thanks. [[User:Vagabond|Vagabond]]&lt;br /&gt;
&lt;br /&gt;
==MC at end = MIA?==&lt;br /&gt;
&lt;br /&gt;
I am sure I have seen this again recently, where I won a mission with no casualties (I thought), but the last thing I killed was a Commander that had been chain MC&#039;ing a psi-attack-magnet trooper, and that trooper was listed as MIA at the end (presumably because he was on the enemy side at the end of combat). Is this a bug, or is there another way to get MIA&#039;s on a completed mission that I might have missed?&lt;br /&gt;
&lt;br /&gt;
Since then I have been waiting for the leaders to panic at the end before killing them (or waiting for a rare resist), so I can safely exit, but am I being overcautious?&lt;br /&gt;
&lt;br /&gt;
--[[User:Sfnhltb|Sfnhltb]] 13:45, 27 February 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
If the trooper was mind controlled on the turn you killed the last alien it will be listed as MIA. No bug there :) &lt;br /&gt;
&lt;br /&gt;
[[User:Hobbes|Hobbes]] 18:16, 1 March 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
Huh, why would that happen - your soldier should recover the very next round, why would he go MIA?&lt;br /&gt;
&lt;br /&gt;
--[[User:Sfnhltb|Sfnhltb]] 18:20, 1 March 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
Doesn&#039;t make sense to me as well but that&#039;s how the game works. &lt;br /&gt;
&lt;br /&gt;
[[User:Hobbes|Hobbes]] 15:05, 2 March 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
It seems that regaining control of units under enemy mind control works different for alien and human players. My guess: aliens under human MC are reverted to alien control AFTER THE ALIEN AND BEFORE THE HUMAN TURN while human units under alien control are reverted RIGHT AT THE BEGINNING OF THE HUMAN TURN. This explains three different phenomenons:&lt;br /&gt;
&lt;br /&gt;
- The discussed MIA &amp;quot;bug&amp;quot; (he unit would be returned in the next human turn, but since it never starts it is lost. The mission is still won since no unit with a &amp;quot;genuine alien&amp;quot; marking is left)&lt;br /&gt;
&lt;br /&gt;
- The fact that a mission is lost when the last human falls under MC while it is not won when this happens to the last standing alien (the aliens get their unit back before their turn starts and therefore have a unit left to pass the &amp;quot;anyone alive?&amp;quot; check, the humans would have no unit left to start a turn with. They WOULD have as soon as the turn starts, but no unit left before turn means bust)&lt;br /&gt;
&lt;br /&gt;
- The fact that aliens still can see all an MCed human saw at the end of the human turn that follows the MC while this is not vice versa (The MCed human can give information to the alien side before reverted while an MCed alien is reverted too early). The result is that aliens can control a human indefinitely without having any alien seeing him until the MC is disrupted for one turn.&lt;br /&gt;
&lt;br /&gt;
All confused? Then I did a good job! No seriously, this must be the explanation, I couldn&#039;t think of any other way.&lt;br /&gt;
&lt;br /&gt;
- By tequilachef (April 4th, 2007)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: You&#039;re absolutely correct on the first two points. It&#039;s a sequence issue - you never get round to recovering the unit before the new turn starts, so you end without any units whatsoever. Makes senses too since the aliens would continue to continue to mind control that same unit over and over indefinitely. &lt;br /&gt;
&lt;br /&gt;
: The third point however: The aliens don&#039;t need to know the location of the last MC&#039;d unit. They know the location of all your troops  whether they&#039;ve seen them or not from the very start. They appear to give you a few turns of grace where they won&#039;t attack you outright (unless, from my observation, all your soldiers are incredibly weak). This is evident because all of the aliens will eventually make their way towards the nearest soldier even though their movement pattern may seem semi-random. Also, they know where you are because they can initiate psionic attacks without having seen any of your troops. They generally go after the weakest troops first.  &lt;br /&gt;
&lt;br /&gt;
: Just to add a semi-related point, but from the alien&#039;s perspective. If an MC&#039;d alien unit is in the exits when you abort the mission, this alien is not recovered and in fact simply vanishes. Any equipment it was carrying is recovered, unknown artefacts or otherwise. You could possibly think of this as their version of MIA. However, the aliens differ ever so slightly in that if it&#039;s the last alien standing and under temporary mind control by the player, the mission doesn&#039;t end straight away. But I guess this is only because the player has everything under control, whereas in the other scenario, the Ai is in control. &lt;br /&gt;
&lt;br /&gt;
: -[[User:NKF|NKF]]&lt;br /&gt;
&lt;br /&gt;
== Crash Site in the atlantic ocean ==&lt;br /&gt;
&lt;br /&gt;
That&#039;s right, my game generated a crash site on water. Here are the details:&lt;br /&gt;
&lt;br /&gt;
- Crash Site a bit southeast of the USA (which was infiltrated a few days before by sectoids, resulting base had already been taken out), but certainly not on land.&lt;br /&gt;
&lt;br /&gt;
- UFO: battleship, floater, alien harvest&lt;br /&gt;
&lt;br /&gt;
- Geoscape: 8 X-Com Bases, 1 (known) Alien base, 2 other crash sites, 1 other (known) flying UFO (though almost worldwide decoder coverage), 3 X-Com Crafts out, 1 waypoint&lt;br /&gt;
&lt;br /&gt;
- Date: January 2000&lt;br /&gt;
&lt;br /&gt;
- Most Interesting: The Craft that downed the ship was a recently finished Firestorm (first human-alien hybrid craft I had built, I know this is lame for that date. Limited myself on 25 Scientists to improve the challenge) equipped with twin plasma. I had it built and equipped in Antarctica and then transferred to Europe. This base had no Elerium, a fact that enabled me to use the infinite fuel exploit which was in effect when downing the UFO. My craft was only slightly damaged when doing so. The battleship was the first target assigned to the craft, it came directly from my base. &lt;br /&gt;
&lt;br /&gt;
- When shot down, the UFO was not targetted by any other craft.&lt;br /&gt;
&lt;br /&gt;
- I had not lost or sold a single craft to that point.&lt;br /&gt;
&lt;br /&gt;
- When sending a squad to the crash site the game didn&#039;t crash but generated a farm land ground combat terrain.&lt;br /&gt;
&lt;br /&gt;
- I was not able to reproduce the bug from the savegame dated 2 hours before downing the UFO&lt;br /&gt;
&lt;br /&gt;
Well guys, any intelligent guesses? I still have the savegames (before and after downing)! If you want to have a look, write here.&lt;br /&gt;
&lt;br /&gt;
- By tequilachef (April 5th 2007)&lt;br /&gt;
----&lt;br /&gt;
: Well I&#039;m sure you know about crash sites that are near land can sometimes actually be on water, so I&#039;m going to assume that this site is well far away from any land mass. Could it be a weird entry in GEODATA\WORLD.DAT that has a land mass out in the ocean? Also are you sure the game didn&#039;t crash? Sometimes when it does it will load the previous mission (and usually 90% are at farm terrain). Are you sure it generated a new map and not load the last one?&lt;br /&gt;
:No real guesses but maybe some starting points to look at. I&#039;ve probably stated some obvious situations you know about and have accounted for, but it never hurts to double check :D&lt;br /&gt;
- [[User:Pi Masta|Pi Masta]] 14:23, 5 April 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
== Inconsitencies in MCing Cyberdiscs and Sectopods ==&lt;br /&gt;
&lt;br /&gt;
I experienced, that when MCing one quadrant of a large terror unit any action it does only affects this quadrant (especially use of time units). That means, when TUs are up for one part, MC another one and continue firing. This however does not work out when moving the unit while it is not under complete control. The TUs used up by the resulting reaction fire from the rest of the unit is also deducted from the TUs &amp;quot;your&amp;quot; part has left (making it impossible for the controlled parts to return fire). This however only happens under reaction fire, not if &amp;quot;your&amp;quot; part fires on it&#039;s own. I don&#039;t know if this comes up when uncontrolled parts shoot by themselves in the alien turn, since this is hard to find out.&lt;br /&gt;
&lt;br /&gt;
: That&#039;s because large units literally are made up of four separate units. They only share the same set of general stats (in unitref.dat). Unfortunately the &#039;under mind control flag&#039; is unique to the four units, not the shared stats! So you in effect have multiple units under different control sharing the same stats. So if you move and it results in a reaction from the unit, it will spend the TUs you&#039;re using.  &lt;br /&gt;
: Successful mind control automatically fills up the unit&#039;s TUs, so each mind controlled sector gets to move or attack again until there are no more sectors to mind control. Useful way of turning reapers into long range scouts! &lt;br /&gt;
: In TFTD, they attempted to fix this bug, but in fact made it much-much worse! The only way to mind control the unit properly is to control the upper left quadrant. Only! Any other quadrant will result in a partial (clockwise) control, and you may gain control of units other than that unit, or may even get into situations where you gain permanent &#039;partial control&#039; of a large unit you haven&#039;t even sited. Wackiness all around! &lt;br /&gt;
&lt;br /&gt;
:- [[User:NKF|NKF]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=User:Zaimoni&amp;diff=11462</id>
		<title>User:Zaimoni</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=User:Zaimoni&amp;diff=11462"/>
		<updated>2007-03-23T18:23:36Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: DNS solution maybe? (feel free to delete)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Mathematician/programmer.  On CE edition, want DOS 1.4 as well.&lt;br /&gt;
&lt;br /&gt;
In case you&#039;re wondering why I&#039;m not that visible on XCOMUfo: DNS doesn&#039;t work from my local ISP, I have to use a long-distance call to reach an ISP that&#039;ll get there.  At least, until I actually purchase broadband (which *won&#039;t* be from the local ISP).  It&#039;s one of four domains I want to routinely visit, that are affected this way; they&#039;re all EU-hosted.&lt;br /&gt;
&lt;br /&gt;
:Wow.  I&#039;ve never even heard of an ISP that doesn&#039;t offer DNS.  Severely restrictive firewall?  Something like [http://www.opendns.com/faq/ opendns] won&#039;t work?--[[User:Ethereal Cereal|Ethereal Cereal]] 11:20, 23 March 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:Zaimoni, I actually have the same problem here too. I had to manually add a DNS server of 66.133.150.12. Don&#039;t know if you can reach it or not. Probably something I should talk to my ISP, because I was getting it for a while and then it stopped. I&#039;m not sure how XComUFO&#039;s site is set-up, but http-ing to the same IP just gives an error, it has to have the name in the request. &lt;br /&gt;
:I just now noticed the DNS server I added wasn&#039;t responding but I could still get the site, but anyways there&#039;s a list of DNS servers here [http://myway.faq.frontiernet.net/faq_answer.asp?q=143] through frontiernet. Though, I&#039;m not sure if that will help if you&#039;re not in the US. &amp;lt;small&amp;gt;&#039;&#039;feel free to delete this if you wish&#039;&#039;&amp;lt;/small&amp;gt;--[[User:Pi Masta|Pi Masta]] 11:23, 23 March 2007 (PDT)&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:Game_Files&amp;diff=11414</id>
		<title>Talk:Game Files</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:Game_Files&amp;diff=11414"/>
		<updated>2007-03-17T05:49:30Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;BB, thanks for your continuing work on this. A question to make sure I&#039;m understanding correctly: MISSDAT has copies of UNITREF from the beginning (UNIREF) and end (UNIREF2) of your latest combat, and they could be compared to see all changes from the combat, yes? Thanks! ---[[User:MikeTheRed|MikeTheRed]] 14:57, 16 June 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
-------------&lt;br /&gt;
&lt;br /&gt;
This is true, so long as the game was started from scratch. If the game was loaded from a save slot, then you&#039;ll need to use UNITREF.DAT from the slot in concern.&lt;br /&gt;
&lt;br /&gt;
For example, if you started a combat, saved it, started another combat, saved it, loaded the first combat and completed it, the UNIREF file in the missdat folder would refer to the second combat, and the UNIREF2 file would refer to the first combat - two entirely different battles!&lt;br /&gt;
&lt;br /&gt;
If you wiped the contents of your missdat folder and then loaded a save file, the UNIREF.DAT file won&#039;t turn up at all.&lt;br /&gt;
&lt;br /&gt;
Hence, if you didn&#039;t save the first combat at the very beginning, the initial data would be lost. Does that make sense?&lt;br /&gt;
&lt;br /&gt;
- [[User:Bomb_Bloke|Bomb Bloke]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I&#039;m watching my experience counters in UNITREF closely; I have a little util that shows their current values. It&#039;s resulted in additional nuances I&#039;ve pointed out. Also of course I&#039;m using the util for firing-squad training (getting specific soldiers to 3 exp. pts. when aliens are few or weak). Sometimes e.g. my last reaction shot kills the last alien, but I couldn&#039;t catch who made that last shot as combat ended. Now that I know a final copy of UNITREF is made, I can always consult it if I want. So, thanks for pointing that out! As for my original question, in truth I don&#039;t currently see a reason to compare beginning and ending UNITREF - but I figured the answer would make clear how to work with these files. And you pointed out important potential problems.&lt;br /&gt;
&lt;br /&gt;
In any event. Here&#039;s something I do a fair amount, where this can help: I start a combat, save the game, quit X-COM. Later, reload that same savegame and finish the combat. You&#039;re saying that those two UNITREFs will be the beginning and end of that combat, no matter how much &amp;quot;real time&amp;quot; has passed. Cool. (As long as I don&#039;t start or end any other combats in between!) I gather that if I end a particular combat multiple times (for testing), it will have the initial pristine combat (UNIREF) and only the last ended combat (UNIREF2).&lt;br /&gt;
&lt;br /&gt;
I have a &amp;quot;comparer&amp;quot; that compares one file to another to see changes, such as soldier stats before and after combat. Previously I&#039;ve worked with individual save slots (one versus the other), but now I see I can cut to the chase and just compare these two UNITREFs, if I want. No more mucking about.&lt;br /&gt;
&lt;br /&gt;
Along those lines though... there is no particular &amp;quot;before and after&amp;quot; for SOLDIER.DAT, right? I don&#039;t see two versions in the wiki&#039;s MISSDAT listing.&lt;br /&gt;
&lt;br /&gt;
Thanks, as always! ---[[User:MikeTheRed|MikeTheRed]] 18:57, 16 June 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I hope no one minds, but I&#039;ve never liked how the save-game files were artificially on a separate page from the main-game files. Us few hackers are interested in them all, as I see it. Conversely, folks not into hacking might be into the many tips on &amp;quot;Under the hood&amp;quot;, but are not so likely to be &#039;&#039;only&#039;&#039; interested in main-game files (not save-game files). So, I&#039;ve moved the main-game section here. However, &amp;quot;Saved Game Files&amp;quot; is no longer an appropriate name for this page. We could rename it (requires admin rights, yes?) or just refer to it as &amp;quot;Game Files&amp;quot; by &amp;lt;nowiki&amp;gt;[[Saved Game Files|Game Files]]&amp;lt;/nowiki&amp;gt;. BB, I hope I didn&#039;t just collide with your edits.&lt;br /&gt;
&lt;br /&gt;
---[[User:MikeTheRed|MikeTheRed]] 19:35, 16 June 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
---------&lt;br /&gt;
&lt;br /&gt;
You can complete as many battles as you wish without the uniref file being touched. You can also load battles without it being modified. Back it up if you need to.&lt;br /&gt;
&lt;br /&gt;
I doubt that unit stats are updated by the tactical engine, so I&#039;d assume that uniref and uniref2 won&#039;t show you any changes. I could be wrong, though. The experience counters should certainly change.&lt;br /&gt;
&lt;br /&gt;
The missdat folder contains the files listed, as well as a geoscape savegame for the point when combat began. That includes a copy of soldier.dat, however, I doubt the tactical engine modifies this file in any way. It certainly doesn&#039;t create another copy.&lt;br /&gt;
&lt;br /&gt;
- [[User:Bomb_Bloke|Bomb Bloke]]&lt;br /&gt;
&lt;br /&gt;
== Reformat ==&lt;br /&gt;
&lt;br /&gt;
What about moving most of this content to the [[:Category:Game Files]]? I&#039;m thinking of making the Tactical and Geoscape save files a sub category in it. Also maybe we could use a template on these files to standardize them a bit, they all have a &#039;structure&#039; that is generally in a table or a bulleted list, and of course a See Also section.&lt;br /&gt;
&lt;br /&gt;
Hmm, I guess I could copy-paste stuff from here onto the Category page and leave this one alone. We can tweak it to how we like and then set this to redirect.&lt;br /&gt;
&lt;br /&gt;
[[User:Pi Masta|Pi Masta]] 10:14, 4 March 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I know what categorization does on the back end (it lets one make an automatic &amp;quot;see also&amp;quot; page), but not sure what you mean on the front end. I would want all these files here on one page because they relate to each other so directly, for anyone taking a wrench under the hood. Also known as, I say, don&#039;t put things on separate pages just because they easily fit mental categories; put things on separate pages if they truly are not likely to be jumped around within, by someone into that level of topic. I for one like seeing everything related to being under the hood, on one page. If you&#039;re modifying what a soldier is holding, you need both the EXE level OBJECT.DAT and the Battle level other file, whatever its name was. I can look it up on this one page, hehe. My two cents.  - [[User:MikeTheRed|MikeTheRed]] 21:48, 9 March 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Using category pages as article pages has various problems, the biggest of which is you can&#039;t format how the list appears.  The tables on this page right now look good.  However, to save yourself some trouble, rather than put a &amp;quot;See Also: Saved Game Files&amp;quot; section at the bottom of each individual file article, you could just rely on the category link at the bottom (and put &amp;quot;Main Article: Saved Game Files&amp;quot; right at the top of the category page).--[[User:Ethereal Cereal|Ethereal Cereal]] 00:38, 10 March 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
I&#039;d vote against the Saved Games Files section being divvied up. But if a categorization scheme is added purely as an extra that can be used in &amp;quot;See Also&amp;quot; sections, that&#039;d be great. Maybe I&#039;m misunderstanding. &lt;br /&gt;
&lt;br /&gt;
BTW this page is, of course, inaccurately named - it&#039;s about saved games &#039;&#039;and&#039;&#039; static program-level files - and I&#039;m to blame for that. Back when Eth re-designed the Main Page, he did a great service given the dozens of pages and hundreds of concepts, but somehow the two pages on &amp;quot;under the hood&amp;quot; got a little disconnected. Back then I was tired of flipping back and forth between the separate pages for Saved Game files and the EXE-level files, so I copied the EXE info (the smaller set) to this page, and unified them. I guess that&#039;s sort of my vote for having them on a combined page. What are your thoughts, Pi? - [[User:MikeTheRed|MikeTheRed]] 18:59, 16 March 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
It&#039;s trivial to rename (move) pages.  What&#039;s a better name for this page?  Just &amp;quot;Game Files&amp;quot;?--[[User:Ethereal Cereal|Ethereal Cereal]] 22:33, 16 March 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Yeah, I think he mentioned in the comments above about naming it to game files. That&#039;s fine with me. &lt;br /&gt;
&lt;br /&gt;
Poof, it&#039;s done.--[[User:Pi Masta|Pi Masta]] 22:47, 16 March 2007 (PDT)&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:Saved_Game_Files&amp;diff=11413</id>
		<title>Talk:Saved Game Files</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:Saved_Game_Files&amp;diff=11413"/>
		<updated>2007-03-17T05:48:49Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: Talk:Saved Game Files moved to Talk:Game Files: better name as agreed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#redirect [[Talk:Game Files]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:Game_Files&amp;diff=11412</id>
		<title>Talk:Game Files</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:Game_Files&amp;diff=11412"/>
		<updated>2007-03-17T05:48:48Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: Talk:Saved Game Files moved to Talk:Game Files&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;BB, thanks for your continuing work on this. A question to make sure I&#039;m understanding correctly: MISSDAT has copies of UNITREF from the beginning (UNIREF) and end (UNIREF2) of your latest combat, and they could be compared to see all changes from the combat, yes? Thanks! ---[[User:MikeTheRed|MikeTheRed]] 14:57, 16 June 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
-------------&lt;br /&gt;
&lt;br /&gt;
This is true, so long as the game was started from scratch. If the game was loaded from a save slot, then you&#039;ll need to use UNITREF.DAT from the slot in concern.&lt;br /&gt;
&lt;br /&gt;
For example, if you started a combat, saved it, started another combat, saved it, loaded the first combat and completed it, the UNIREF file in the missdat folder would refer to the second combat, and the UNIREF2 file would refer to the first combat - two entirely different battles!&lt;br /&gt;
&lt;br /&gt;
If you wiped the contents of your missdat folder and then loaded a save file, the UNIREF.DAT file won&#039;t turn up at all.&lt;br /&gt;
&lt;br /&gt;
Hence, if you didn&#039;t save the first combat at the very beginning, the initial data would be lost. Does that make sense?&lt;br /&gt;
&lt;br /&gt;
- [[User:Bomb_Bloke|Bomb Bloke]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I&#039;m watching my experience counters in UNITREF closely; I have a little util that shows their current values. It&#039;s resulted in additional nuances I&#039;ve pointed out. Also of course I&#039;m using the util for firing-squad training (getting specific soldiers to 3 exp. pts. when aliens are few or weak). Sometimes e.g. my last reaction shot kills the last alien, but I couldn&#039;t catch who made that last shot as combat ended. Now that I know a final copy of UNITREF is made, I can always consult it if I want. So, thanks for pointing that out! As for my original question, in truth I don&#039;t currently see a reason to compare beginning and ending UNITREF - but I figured the answer would make clear how to work with these files. And you pointed out important potential problems.&lt;br /&gt;
&lt;br /&gt;
In any event. Here&#039;s something I do a fair amount, where this can help: I start a combat, save the game, quit X-COM. Later, reload that same savegame and finish the combat. You&#039;re saying that those two UNITREFs will be the beginning and end of that combat, no matter how much &amp;quot;real time&amp;quot; has passed. Cool. (As long as I don&#039;t start or end any other combats in between!) I gather that if I end a particular combat multiple times (for testing), it will have the initial pristine combat (UNIREF) and only the last ended combat (UNIREF2).&lt;br /&gt;
&lt;br /&gt;
I have a &amp;quot;comparer&amp;quot; that compares one file to another to see changes, such as soldier stats before and after combat. Previously I&#039;ve worked with individual save slots (one versus the other), but now I see I can cut to the chase and just compare these two UNITREFs, if I want. No more mucking about.&lt;br /&gt;
&lt;br /&gt;
Along those lines though... there is no particular &amp;quot;before and after&amp;quot; for SOLDIER.DAT, right? I don&#039;t see two versions in the wiki&#039;s MISSDAT listing.&lt;br /&gt;
&lt;br /&gt;
Thanks, as always! ---[[User:MikeTheRed|MikeTheRed]] 18:57, 16 June 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I hope no one minds, but I&#039;ve never liked how the save-game files were artificially on a separate page from the main-game files. Us few hackers are interested in them all, as I see it. Conversely, folks not into hacking might be into the many tips on &amp;quot;Under the hood&amp;quot;, but are not so likely to be &#039;&#039;only&#039;&#039; interested in main-game files (not save-game files). So, I&#039;ve moved the main-game section here. However, &amp;quot;Saved Game Files&amp;quot; is no longer an appropriate name for this page. We could rename it (requires admin rights, yes?) or just refer to it as &amp;quot;Game Files&amp;quot; by &amp;lt;nowiki&amp;gt;[[Saved Game Files|Game Files]]&amp;lt;/nowiki&amp;gt;. BB, I hope I didn&#039;t just collide with your edits.&lt;br /&gt;
&lt;br /&gt;
---[[User:MikeTheRed|MikeTheRed]] 19:35, 16 June 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
---------&lt;br /&gt;
&lt;br /&gt;
You can complete as many battles as you wish without the uniref file being touched. You can also load battles without it being modified. Back it up if you need to.&lt;br /&gt;
&lt;br /&gt;
I doubt that unit stats are updated by the tactical engine, so I&#039;d assume that uniref and uniref2 won&#039;t show you any changes. I could be wrong, though. The experience counters should certainly change.&lt;br /&gt;
&lt;br /&gt;
The missdat folder contains the files listed, as well as a geoscape savegame for the point when combat began. That includes a copy of soldier.dat, however, I doubt the tactical engine modifies this file in any way. It certainly doesn&#039;t create another copy.&lt;br /&gt;
&lt;br /&gt;
- [[User:Bomb_Bloke|Bomb Bloke]]&lt;br /&gt;
&lt;br /&gt;
== Reformat ==&lt;br /&gt;
&lt;br /&gt;
What about moving most of this content to the [[:Category:Game Files]]? I&#039;m thinking of making the Tactical and Geoscape save files a sub category in it. Also maybe we could use a template on these files to standardize them a bit, they all have a &#039;structure&#039; that is generally in a table or a bulleted list, and of course a See Also section.&lt;br /&gt;
&lt;br /&gt;
Hmm, I guess I could copy-paste stuff from here onto the Category page and leave this one alone. We can tweak it to how we like and then set this to redirect.&lt;br /&gt;
&lt;br /&gt;
[[User:Pi Masta|Pi Masta]] 10:14, 4 March 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I know what categorization does on the back end (it lets one make an automatic &amp;quot;see also&amp;quot; page), but not sure what you mean on the front end. I would want all these files here on one page because they relate to each other so directly, for anyone taking a wrench under the hood. Also known as, I say, don&#039;t put things on separate pages just because they easily fit mental categories; put things on separate pages if they truly are not likely to be jumped around within, by someone into that level of topic. I for one like seeing everything related to being under the hood, on one page. If you&#039;re modifying what a soldier is holding, you need both the EXE level OBJECT.DAT and the Battle level other file, whatever its name was. I can look it up on this one page, hehe. My two cents.  - [[User:MikeTheRed|MikeTheRed]] 21:48, 9 March 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Using category pages as article pages has various problems, the biggest of which is you can&#039;t format how the list appears.  The tables on this page right now look good.  However, to save yourself some trouble, rather than put a &amp;quot;See Also: Saved Game Files&amp;quot; section at the bottom of each individual file article, you could just rely on the category link at the bottom (and put &amp;quot;Main Article: Saved Game Files&amp;quot; right at the top of the category page).--[[User:Ethereal Cereal|Ethereal Cereal]] 00:38, 10 March 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
I&#039;d vote against the Saved Games Files section being divvied up. But if a categorization scheme is added purely as an extra that can be used in &amp;quot;See Also&amp;quot; sections, that&#039;d be great. Maybe I&#039;m misunderstanding. &lt;br /&gt;
&lt;br /&gt;
BTW this page is, of course, inaccurately named - it&#039;s about saved games &#039;&#039;and&#039;&#039; static program-level files - and I&#039;m to blame for that. Back when Eth re-designed the Main Page, he did a great service given the dozens of pages and hundreds of concepts, but somehow the two pages on &amp;quot;under the hood&amp;quot; got a little disconnected. Back then I was tired of flipping back and forth between the separate pages for Saved Game files and the EXE-level files, so I copied the EXE info (the smaller set) to this page, and unified them. I guess that&#039;s sort of my vote for having them on a combined page. What are your thoughts, Pi? - [[User:MikeTheRed|MikeTheRed]] 18:59, 16 March 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
It&#039;s trivial to rename (move) pages.  What&#039;s a better name for this page?  Just &amp;quot;Game Files&amp;quot;?--[[User:Ethereal Cereal|Ethereal Cereal]] 22:33, 16 March 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Yeah, I think he mentioned in the comments above about naming it to game files. That&#039;s fine with me. --[[User:Pi Masta|Pi Masta]] 22:47, 16 March 2007 (PDT)&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Saved_Game_Files&amp;diff=11411</id>
		<title>Saved Game Files</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Saved_Game_Files&amp;diff=11411"/>
		<updated>2007-03-17T05:48:47Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: Saved Game Files moved to Game Files: better name as agreed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#redirect [[Game Files]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Game_Files&amp;diff=11410</id>
		<title>Game Files</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Game_Files&amp;diff=11410"/>
		<updated>2007-03-17T05:48:46Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: Saved Game Files moved to Game Files&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Not-for-profit, just-for-fun reverse engineering.&lt;br /&gt;
&lt;br /&gt;
* General note re: [[HackerTools|Hex editing game files]]&lt;br /&gt;
:&amp;lt;small&amp;gt;Contains a quick introduction to using a most unlikely program to edit your game files, and suggestions on other editors out there.&amp;lt;/small&amp;gt;&lt;br /&gt;
* A primer for the [[Command Prompt]] (aka the command console). &lt;br /&gt;
:&amp;lt;small&amp;gt;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&#039;s era of point and click madness.&amp;lt;/small&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[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&#039;s file formats not yet detailed on this wiki.&lt;br /&gt;
&lt;br /&gt;
== Program Files ==&lt;br /&gt;
&lt;br /&gt;
These are program files and static data files that are not part of the saved game files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table {{StdDescTable}}&amp;gt;&lt;br /&gt;
&amp;lt;th {{StdDescTable_Heading}}&amp;gt;File&amp;lt;/th&amp;gt;&amp;lt;th {{StdDescTable_Heading}}&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[GEODATA]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Text for localization. Includes [[OBDATA.DAT]] object data file.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[GEOGRAPH]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Graphics for [[UFOpaedia]] and research screen backgrounds.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[MAPS]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Pre-generated Battlescape terrain blocks (.MAP). These are filled in with terrain tiles. A few dozen blocks make up a battlescape.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[Saved_Game_Files#Missdat_Files|MISSDAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Holds the data from the previous mission. (Can be [[Exploits#Helpless_Tactical_Mission|exploited]]).&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[ROUTES]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Alien route maps (.RMP) for moving around the pre-generated Battlescape terrain blocks.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[SOUND]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1990-era sound drivers, or MIDI files for Windows version.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[TERRAIN]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Battlescape graphic tiles for buildings, ships, and terrain (.MCD, .PCK, and .TAB).&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;UFO2EXE\[[TACTICAL.EXE]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;The &amp;quot;Battlescape&amp;quot; program in DOS-release of UFO.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;UFOEXE\[[GEOSCAPE.EXE]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;The &amp;quot;Geoscape&amp;quot; program that handles base management and aircraft.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;UFOEXE\BLACK.EXE&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;The black screen UFO.BAT puts up when swapping between the above two programs.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[UFOGRAPH]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Misc graphics (.PCK) for soldier equipment screens, smoke, motion detector blobs.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[UFOINTRO]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Holds the introduction movie (.FLI) and the endgame pictures (.LBM).&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[UNITS]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Battlescape graphics for soldiers, aliens, and the pixelated guns they hold. (.PCK and .TAB).&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Geoscape Files == &lt;br /&gt;
These are savegame files used by the [[Geoscape]] portion of the game. This can be considered a &#039;standard&#039; save.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table {{StdDescTable}}&amp;gt;&lt;br /&gt;
&amp;lt;th {{StdDescTable_Heading}}&amp;gt;File&amp;lt;/th&amp;gt;&amp;lt;th {{StdDescTable_Heading}}&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[ACTS.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Contains information which acts with which priority in respective zones aliens are going to try.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[AKNOW.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[ALIEN.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Contains Alien activity in Countries and areas, for graphs.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[ASTORE.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Has the info on aliens in [[Alien Containment]].&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[BASE.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Has all of the [[X-COM Bases|base]] layout and contents information, radar scanning abilities and other base information.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[BPROD.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;List of [[equipment]] being [[manufacturing|produced]].&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[CRAFT.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;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.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[DIPLOM.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Diplomacy info, and current and historical [[Country Funding]].&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[DUM.BIN]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Dummy file for keeping directory structure. Not used.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[FACIL.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Info on [[Base Facilities]] you can build.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[IGLOB.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Date and time.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[INTER.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[LEASE.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[LIGLOB.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Money! Also financial graph information.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[LOC.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;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.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[MISSIONS.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Contains counters and race info on the ongoing alien acts.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[PRODUCT.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Info on things you can produce.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[PROJECT.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;These are things you are [[research]]ing.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[PURCHASE.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Info on stuff you can buy.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[RESEARCH.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Completed research.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[SAVEINFO.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Name of the saved game.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[SOLDIER.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Data about the [[soldiers]].&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[TRANSFER.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Personnel and equipment being transferred.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[UIGLOB.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Holds the next numbers for [[UFOs]], Terror Sites, [[Interceptor]]s, etc. Also contains monthly scores for research.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[UP.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[[UFOpaedia]] info.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[XBASES.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[[Alien Missions#Alien Base|Alien Base]] information.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[XCOM.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Contains X-Com activity in Countries and areas, for graphs.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[ZONAL.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Information on which zones and with what priority aliens are going to attack.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(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).&lt;br /&gt;
&lt;br /&gt;
== Battlescape Files ==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;table {{StdDescTable}}&amp;gt;&lt;br /&gt;
&amp;lt;th {{StdDescTable_Heading}}&amp;gt;File&amp;lt;/th&amp;gt;&amp;lt;th {{StdDescTable_Heading}}&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[BGLOB.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Describes ambient light on map.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[GEODATA.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[MAP.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Stores tile information for the whole map. Basically all static structures, such as trees, walls, floors and furniture.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[MISDATA.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Contains information on craft in use and which alien artefacts are available for use in combat.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[OBPOS.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Stores all the objects that your soldiers can pick up (guns, corpses, etc).&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[ROUTES.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Stores nodes for soldier and alien spawn points, also acts as waypoints for AI pathfinding.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[SEEMAP.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Fog of war overlay.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[SMOKBIT.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Smoke particles and fire patches on the map.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[SMOKREF.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Smoke particles and fire patches on the map.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[SOURCEMP.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Light source overlays for mobile light sources (i.e. your soldiers).&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[TERMP.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Light source overlays for ambient (or fixed) lighting.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[UNITPOS.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Controls ownership, visibility, whether the unit is under temporary mind control, etc. Works hand in hand with [[UNITREF.DAT]].&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[UNITREF.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Contains the primary stats for all units in combat. X-Com owned soldiers in this file are &#039;&#039;virtual&#039;&#039; copies of the soldiers in soldier.dat. Works very closely with unitpos.dat.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[WGLOB.DAT]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Battlescape map global information such as map dimensions and the number of turns that have elapsed.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(14 unique files, plus all 28 standard save files, totaling 42).&lt;br /&gt;
&lt;br /&gt;
== Missdat Files ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
When the tactical game engine starts, it first checks [[SAVEINFO.DAT]] to see if this is a new battle, or if you&#039;re loading a battlescape save game. In the case of the former, it generates a new map, based off these files:&lt;br /&gt;
*[[GEODATA.DAT]]&lt;br /&gt;
*[[MISSION.DAT]]&lt;br /&gt;
*[[OBPOSREF.DAT]]&lt;br /&gt;
*[[UNIPOS.DAT]]&lt;br /&gt;
*[[UNIREF.DAT]]&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
When combat ends, these files are created:&lt;br /&gt;
*[[CODE.DAT]]&lt;br /&gt;
*[[MISSION2.DAT]]&lt;br /&gt;
*[[OBPOS2.DAT]]&lt;br /&gt;
*[[OPTION.DAT]]&lt;br /&gt;
*[[UNIREF2.DAT]]&lt;br /&gt;
*[[UNITPOS.DAT_(MISSDAT)|UNITPOS.DAT]]&lt;br /&gt;
&lt;br /&gt;
(12 unique files, plus 27 standard save files (does not use dum.bin), totaling 39).&lt;br /&gt;
-----&lt;br /&gt;
&#039;&#039;&#039;Did You Know?&#039;&#039;&#039; If your game crashes and you are returned to previous mission, the game is actually referring to the battlescape information in the MISSDAT directory.&lt;br /&gt;
&lt;br /&gt;
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 &#039;&#039;previous&#039;&#039; mission that was able to end normally.&lt;br /&gt;
&lt;br /&gt;
Abnormal program termination simply means that the tactical game engine crashed or was forced to crash by the user.&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Files]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:Game_Files&amp;diff=11409</id>
		<title>Talk:Game Files</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:Game_Files&amp;diff=11409"/>
		<updated>2007-03-17T05:47:47Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;BB, thanks for your continuing work on this. A question to make sure I&#039;m understanding correctly: MISSDAT has copies of UNITREF from the beginning (UNIREF) and end (UNIREF2) of your latest combat, and they could be compared to see all changes from the combat, yes? Thanks! ---[[User:MikeTheRed|MikeTheRed]] 14:57, 16 June 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
-------------&lt;br /&gt;
&lt;br /&gt;
This is true, so long as the game was started from scratch. If the game was loaded from a save slot, then you&#039;ll need to use UNITREF.DAT from the slot in concern.&lt;br /&gt;
&lt;br /&gt;
For example, if you started a combat, saved it, started another combat, saved it, loaded the first combat and completed it, the UNIREF file in the missdat folder would refer to the second combat, and the UNIREF2 file would refer to the first combat - two entirely different battles!&lt;br /&gt;
&lt;br /&gt;
If you wiped the contents of your missdat folder and then loaded a save file, the UNIREF.DAT file won&#039;t turn up at all.&lt;br /&gt;
&lt;br /&gt;
Hence, if you didn&#039;t save the first combat at the very beginning, the initial data would be lost. Does that make sense?&lt;br /&gt;
&lt;br /&gt;
- [[User:Bomb_Bloke|Bomb Bloke]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I&#039;m watching my experience counters in UNITREF closely; I have a little util that shows their current values. It&#039;s resulted in additional nuances I&#039;ve pointed out. Also of course I&#039;m using the util for firing-squad training (getting specific soldiers to 3 exp. pts. when aliens are few or weak). Sometimes e.g. my last reaction shot kills the last alien, but I couldn&#039;t catch who made that last shot as combat ended. Now that I know a final copy of UNITREF is made, I can always consult it if I want. So, thanks for pointing that out! As for my original question, in truth I don&#039;t currently see a reason to compare beginning and ending UNITREF - but I figured the answer would make clear how to work with these files. And you pointed out important potential problems.&lt;br /&gt;
&lt;br /&gt;
In any event. Here&#039;s something I do a fair amount, where this can help: I start a combat, save the game, quit X-COM. Later, reload that same savegame and finish the combat. You&#039;re saying that those two UNITREFs will be the beginning and end of that combat, no matter how much &amp;quot;real time&amp;quot; has passed. Cool. (As long as I don&#039;t start or end any other combats in between!) I gather that if I end a particular combat multiple times (for testing), it will have the initial pristine combat (UNIREF) and only the last ended combat (UNIREF2).&lt;br /&gt;
&lt;br /&gt;
I have a &amp;quot;comparer&amp;quot; that compares one file to another to see changes, such as soldier stats before and after combat. Previously I&#039;ve worked with individual save slots (one versus the other), but now I see I can cut to the chase and just compare these two UNITREFs, if I want. No more mucking about.&lt;br /&gt;
&lt;br /&gt;
Along those lines though... there is no particular &amp;quot;before and after&amp;quot; for SOLDIER.DAT, right? I don&#039;t see two versions in the wiki&#039;s MISSDAT listing.&lt;br /&gt;
&lt;br /&gt;
Thanks, as always! ---[[User:MikeTheRed|MikeTheRed]] 18:57, 16 June 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I hope no one minds, but I&#039;ve never liked how the save-game files were artificially on a separate page from the main-game files. Us few hackers are interested in them all, as I see it. Conversely, folks not into hacking might be into the many tips on &amp;quot;Under the hood&amp;quot;, but are not so likely to be &#039;&#039;only&#039;&#039; interested in main-game files (not save-game files). So, I&#039;ve moved the main-game section here. However, &amp;quot;Saved Game Files&amp;quot; is no longer an appropriate name for this page. We could rename it (requires admin rights, yes?) or just refer to it as &amp;quot;Game Files&amp;quot; by &amp;lt;nowiki&amp;gt;[[Saved Game Files|Game Files]]&amp;lt;/nowiki&amp;gt;. BB, I hope I didn&#039;t just collide with your edits.&lt;br /&gt;
&lt;br /&gt;
---[[User:MikeTheRed|MikeTheRed]] 19:35, 16 June 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
---------&lt;br /&gt;
&lt;br /&gt;
You can complete as many battles as you wish without the uniref file being touched. You can also load battles without it being modified. Back it up if you need to.&lt;br /&gt;
&lt;br /&gt;
I doubt that unit stats are updated by the tactical engine, so I&#039;d assume that uniref and uniref2 won&#039;t show you any changes. I could be wrong, though. The experience counters should certainly change.&lt;br /&gt;
&lt;br /&gt;
The missdat folder contains the files listed, as well as a geoscape savegame for the point when combat began. That includes a copy of soldier.dat, however, I doubt the tactical engine modifies this file in any way. It certainly doesn&#039;t create another copy.&lt;br /&gt;
&lt;br /&gt;
- [[User:Bomb_Bloke|Bomb Bloke]]&lt;br /&gt;
&lt;br /&gt;
== Reformat ==&lt;br /&gt;
&lt;br /&gt;
What about moving most of this content to the [[:Category:Game Files]]? I&#039;m thinking of making the Tactical and Geoscape save files a sub category in it. Also maybe we could use a template on these files to standardize them a bit, they all have a &#039;structure&#039; that is generally in a table or a bulleted list, and of course a See Also section.&lt;br /&gt;
&lt;br /&gt;
Hmm, I guess I could copy-paste stuff from here onto the Category page and leave this one alone. We can tweak it to how we like and then set this to redirect.&lt;br /&gt;
&lt;br /&gt;
[[User:Pi Masta|Pi Masta]] 10:14, 4 March 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I know what categorization does on the back end (it lets one make an automatic &amp;quot;see also&amp;quot; page), but not sure what you mean on the front end. I would want all these files here on one page because they relate to each other so directly, for anyone taking a wrench under the hood. Also known as, I say, don&#039;t put things on separate pages just because they easily fit mental categories; put things on separate pages if they truly are not likely to be jumped around within, by someone into that level of topic. I for one like seeing everything related to being under the hood, on one page. If you&#039;re modifying what a soldier is holding, you need both the EXE level OBJECT.DAT and the Battle level other file, whatever its name was. I can look it up on this one page, hehe. My two cents.  - [[User:MikeTheRed|MikeTheRed]] 21:48, 9 March 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Using category pages as article pages has various problems, the biggest of which is you can&#039;t format how the list appears.  The tables on this page right now look good.  However, to save yourself some trouble, rather than put a &amp;quot;See Also: Saved Game Files&amp;quot; section at the bottom of each individual file article, you could just rely on the category link at the bottom (and put &amp;quot;Main Article: Saved Game Files&amp;quot; right at the top of the category page).--[[User:Ethereal Cereal|Ethereal Cereal]] 00:38, 10 March 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
I&#039;d vote against the Saved Games Files section being divvied up. But if a categorization scheme is added purely as an extra that can be used in &amp;quot;See Also&amp;quot; sections, that&#039;d be great. Maybe I&#039;m misunderstanding. &lt;br /&gt;
&lt;br /&gt;
BTW this page is, of course, inaccurately named - it&#039;s about saved games &#039;&#039;and&#039;&#039; static program-level files - and I&#039;m to blame for that. Back when Eth re-designed the Main Page, he did a great service given the dozens of pages and hundreds of concepts, but somehow the two pages on &amp;quot;under the hood&amp;quot; got a little disconnected. Back then I was tired of flipping back and forth between the separate pages for Saved Game files and the EXE-level files, so I copied the EXE info (the smaller set) to this page, and unified them. I guess that&#039;s sort of my vote for having them on a combined page. What are your thoughts, Pi? - [[User:MikeTheRed|MikeTheRed]] 18:59, 16 March 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
It&#039;s trivial to rename (move) pages.  What&#039;s a better name for this page?  Just &amp;quot;Game Files&amp;quot;?--[[User:Ethereal Cereal|Ethereal Cereal]] 22:33, 16 March 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Yeah, I think he mentioned in the comments above about naming it to game files. That&#039;s fine with me. --[[User:Pi Masta|Pi Masta]] 22:47, 16 March 2007 (PDT)&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:Experience&amp;diff=11381</id>
		<title>Talk:Experience</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:Experience&amp;diff=11381"/>
		<updated>2007-03-15T21:42:25Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Just some thoughts I want to jot down before I forget them, based off a discussion I read on one of the forums:&lt;br /&gt;
&lt;br /&gt;
* Kills. Just to be clear, it needs to be emphasised that kills do not count towards stat increases. Was this mentioned or has it been mentioned elsewhere? &lt;br /&gt;
&lt;br /&gt;
* Similarly, kill attribution. When do you get the kill counter incremented. Grenades (thrown and unthrown), volatile battlescape element (i.e. gas tank), secondary explosion from cyberdisc, or volatile battlescape element set off by cyberdisc explosion. Probably by reactions and active attacks too. Don&#039;t remember if we ever quantified all the methods that&#039;ll increment the kill counter. &lt;br /&gt;
&lt;br /&gt;
- [[User:NKF|NKF]]&lt;br /&gt;
&lt;br /&gt;
:Tested the secondary explosion from oil drums, found within my X-COM base hanger. Waited til that last snakeman soldier roamed around weaponlessly, and then smacked the barrel infront of him him. Boom, and Tatsuo Iwahara graduates to a squaddie after this base defense with 1 kills in 3 missions, via a unarmed snakeman using a barrel for cover. Can someone confirm my test?&lt;br /&gt;
&lt;br /&gt;
:Hmm, but is only just off one barrel exploding. I don&#039;t know if things change, if you say, line up barrels across the screen and fry the poor sectoid at the other end. --[[User:Vagabond|Vagabond]] 01:53, 15 March 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
::I&#039;m not positive, but I think the rule is &amp;quot;whoever takes the action gets the kill&amp;quot;, i.e., the last soldier to take any sort of action which results in an enemy death gets credited.  I infer this from how Proximity Grenades work: credit for the kill goes to whoever &#039;&#039;sets off&#039;&#039; the grenade.  I suspect this&#039;ll be borne out for &amp;quot;chain reaction&amp;quot; kills and the like.  Alien-on-alien kills probably don&#039;t apply (Cyberdisc explosions probably do), and grenade kills are already known to go to the last soldier who threw it.--[[User:Ethereal Cereal|Ethereal Cereal]] 02:54, 15 March 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:Might also want to double check that the guy credited with the kill is &#039;&#039;&#039;not&#039;&#039;&#039; the first soldier in the list just to make sure it&#039;s not like dropping a grenade. --[[User:Pi Masta|Pi Masta]] 14:42, 15 March 2007 (PDT)&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:TACTICAL.EXE&amp;diff=11370</id>
		<title>Talk:TACTICAL.EXE</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:TACTICAL.EXE&amp;diff=11370"/>
		<updated>2007-03-15T04:47:24Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: /* English2.dat */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==English2.dat==&lt;br /&gt;
Hey I think I found the lookup table for English2.dat (or german2, etc) in TACTICAL.EXE. It&#039;s at offset 0x5F910, each entry is 2 bytes long. It corresponds with the entry in [[OBDATA.DAT]]. The index in obdata is the offset in this array of 2 bytes. Let me give an example:&lt;br /&gt;
 (AT OFFSET 5F910)&lt;br /&gt;
 7B 00 | 7C 00 | 7D 00 | 7E 00 | 7F 00&lt;br /&gt;
   0       1       2       3       4&lt;br /&gt;
&lt;br /&gt;
* 0x7B (or really 0x007B) is 123, which in English2.dat is Pistol&lt;br /&gt;
&lt;br /&gt;
For further Proof:&lt;br /&gt;
&lt;br /&gt;
 (OFFSET 5F944, 52 bytes from begining, so 52/2 = 26)&lt;br /&gt;
 95 00 | B0 00 | 00 00 | 00 00&lt;br /&gt;
   26      27      28      29&lt;br /&gt;
&lt;br /&gt;
* 0x0095 = 149; english2.dat[149] = &#039;Stun Rod&#039; (OBDATA[26] Is info for Stun Rod)&lt;br /&gt;
* 0x00B0 = 176; english2.dat[176] = &#039;Electro-flare&#039; (OBDATA[27] is info for electro-flare)&lt;br /&gt;
* OBDATA[28-30] are &#039;empty&#039; unused obdata slots&lt;br /&gt;
&lt;br /&gt;
 (OFFSET 5F94E, 62 byte from begining, so 62/2 = 31)&lt;br /&gt;
 AE 00 | AE 00 | AE 00 | 96 00&lt;br /&gt;
   31      32      33      34&lt;br /&gt;
&lt;br /&gt;
* 0x00AE = 174; english2.dat[174] = &#039;Corpse&#039;, Obdata[31-33] are all corpses (with different armor)&lt;br /&gt;
* 0x0096 = 150; english2.dat[150] = &#039;Heavy Plasma&#039;, Obdata[34] is info for Heavy Plasma&lt;br /&gt;
&lt;br /&gt;
[[User:Pi Masta|Pi Masta]] 19:19, 9 February 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: Speaking of English.dat (and english2.dat), I noticed we haven&#039;t got any documentation for it. From what I can rememeber from a little C++ experimentation a while back, the language file simply loads each null-terminated string into an array of strings and the index for each string is used as the lookup value as seen in files like facil.dat and obdata.dat. I&#039;m not sure if english.dat and english2.dat are loaded into one large string array or if they are in separate arrays. - [[User:NKF|NKF]]&lt;br /&gt;
&lt;br /&gt;
:: I think english.dat is used by geoscape and english2.dat is for tactical. And yes they are simply null terminated strings in an array. Though interestingly I&#039;ve noticed that it seems to start at 1 and not 0 in some situations (still investigating this). I say this because the sequence matches what I expect except that the offsets are 1 greater than if the array was 0 based. Possibly a value is &#039;injected&#039; before all this and contains the 0 slot. I guess we could alter one of the look ups to 0 and see what it comes out to.&lt;br /&gt;
:: I find these patterns mainly by looking for the electro-flare entry. It appears this item was added later in the game (IRC it&#039;s the last string in these files) but in the lists it&#039;s in the middle, just before alien weapons and researched items. Otherwise it normally just enumerates (which I&#039;ve noticed a lot of enumeration in the executables), but of course when it gets to the electro-flare it has to jump to the end, and then jump back. Also the un-used entries help as they break this sequence.&lt;br /&gt;
:: I could also make some pages on these files, but should I worry about listing the contents? Is it technically copyrighted?  --[[User:Pi Masta|Pi Masta]] 21:47, 14 March 2007 (PDT)&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=GEOSCAPE.EXE&amp;diff=11364</id>
		<title>GEOSCAPE.EXE</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=GEOSCAPE.EXE&amp;diff=11364"/>
		<updated>2007-03-14T19:32:00Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: Removed weapon stats (they are on tactical.exe), added see also links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &amp;quot;Geoscape&amp;quot; program that handles base management and aircraft, a.k.a. XCOM outside of tactical combat. [[TACTICAL.EXE]] handles combat. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; In the WinCE version, GEOSCAPE and TACTICAL are one executable, &amp;quot;UFO Defense.exe&amp;quot;. Due to this confusion (what wiki pages place things on, when they&#039;re practically identical), currently GEOSCAPE, TACTICAL, and UFO Defense information appear here. (Unless and until someone wants to break everything up... then again, having highly related stuff in one place is a good thing.)&lt;br /&gt;
&lt;br /&gt;
Also see [[Versions]].&lt;br /&gt;
&lt;br /&gt;
= XCOM: UFO Defense (U.S. DOS) version 1.4 =&lt;br /&gt;
*Is 382,957 bytes long for the virgin 1.4 executable&lt;br /&gt;
*Has [[Alien_Stats|alien statistics]] starting at (non-offset) byte 379,729. There are 33 records of 39 bytes each. No alien names, though.&lt;br /&gt;
*If you have installed [[XcomUtil]], it may alter the length of GEOSCAPE. &#039;&#039;Does anybody have a modified version, so we can put the length here? --[[User:MikeTheRed|MikeTheRed]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= XCOM Windows Collector&#039;s Edition =&lt;br /&gt;
*Variously called the Win CE or Gold version on the wiki&lt;br /&gt;
*Is 495,616 bytes long &lt;br /&gt;
*Starting at byte 648, reads:&lt;br /&gt;
 XCOM: UFO Defense Gold Edition&lt;br /&gt;
 This awesome game was compiled on Sep  8 1999 at 08:57:11&lt;br /&gt;
 Copyright - 1999 Hasbro Interactive/MicroProse Software&lt;br /&gt;
 Party on dude.&lt;br /&gt;
*If you install XcomUtil, it separates your &#039;&#039;UFO Defense.exe&#039;&#039; into GEOSCAPE and TACTICAL executables. They are almost identical copies of &#039;&#039;UFO Defense.exe&#039;&#039;, however they start at the right place when run. This allows the game to closely mimick the Dos version by having its main loop run in a batch file. &lt;br /&gt;
*Has [[Alien_Stats|alien statistics]] starting at (non-offset) byte 480,145. There are 33 records of 39 bytes each. No alien names, though.&lt;br /&gt;
*Has tank &amp;amp; inbuilt alien weapon stats at byte 447,868 (see below)&lt;br /&gt;
&lt;br /&gt;
= Alien Stats =&lt;br /&gt;
&lt;br /&gt;
This section is for the structure of the alien stats, as found in GEOSCAPE. For actual data and additional information, see the [[Alien_Stats|alien statistics]] page. Also see Zombie&#039;s excellent alien stats page at [http://www.strategycore.co.uk/xcom/pg/ufoalienstats StrategyCore]. &#039;&#039;(Have YOU made your StratCore and [http://www.xcomufo.com XCOMUFO] accounts yet?)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Alien stats are found as 33 records of 39 bytes each, in all versions of X-COM. They are identical in all versions. This data actually represents the &amp;quot;core&amp;quot; alien stats; modifiers are used to determine the final stats relative to game difficulty level. (In most, but not all, cases, the core stats are the same as the Beginner level stats.)&lt;br /&gt;
&lt;br /&gt;
Alien stats start in each version of X-COM at the following location. This is a byte &#039;&#039;count&#039;&#039;, not an offset; with counts, the first byte in the file is byte 1:&lt;br /&gt;
 &amp;lt;u&amp;gt;Version&amp;lt;/u&amp;gt;        &amp;lt;u&amp;gt;Location&amp;lt;/u&amp;gt;&lt;br /&gt;
 DOS 1.4         379,729  (GEOSCAPE.EXE)  &lt;br /&gt;
 WinCE Gold      480,145  (UFO Defense.exe)&lt;br /&gt;
 Playstation     501,212&lt;br /&gt;
 TFTD            486,930&lt;br /&gt;
&lt;br /&gt;
Alien names are not actually found in Geoscape; it just has 33 strings of data... the alien each string applies to has been inferred by matching against aliens in the game.&lt;br /&gt;
&lt;br /&gt;
The 39 bytes correspond to the following values. For the below, statements also apply to TFTD, since it&#039;s relevant to understanding the bytes:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0:&#039;&#039;&#039;   Race - Corresponds to Unitref[000]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1:&#039;&#039;&#039;   Rank - Corresponds to Unitref[042]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2:&#039;&#039;&#039;   &#039;&#039;Unknown - Always 0&#039;&#039; - Corresponds to Unitref[011]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3:&#039;&#039;&#039;   Can Fly - No Corresponding Unitref offset&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4:&#039;&#039;&#039;   TUs - Corresponds to Unitref[025]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;5:&#039;&#039;&#039;   Health - Corresponds to Unitref[026]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;6:&#039;&#039;&#039;   Energy - Corresponds to Unitref[027]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;7:&#039;&#039;&#039;   Reactions - Corresponds to Unitref[028]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;8:&#039;&#039;&#039;   Strength - Corresponds to Unitref[017]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;9:&#039;&#039;&#039;   Firing Accuracy - Corresponds to Unitref[023]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:&#039;&#039;&#039;   Throwing Accuracy - Corresponds to Unitref[024]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;11:&#039;&#039;&#039;   Melee Accuracy - Corresponds to Unitref[056]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;12:&#039;&#039;&#039;   Front Armor - Corresponds to Unitref[029]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;13:&#039;&#039;&#039;   Left Armor - Corresponds to Unitref[030]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:&#039;&#039;&#039;   Right Armor - Corresponds to Unitref[031]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;15:&#039;&#039;&#039;   Rear Armor - Corresponds to Unitref[032]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;16:&#039;&#039;&#039;   Under Armor - Corresponds to Unitref[033]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;17:&#039;&#039;&#039;   &#039;&#039;Unknown - Always 0&#039;&#039; - Corresponds to Unitref[034]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;18:&#039;&#039;&#039;   Energy Recharge - Corresponds to Unitref[035]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;19:&#039;&#039;&#039;   &#039;&#039;Unknown - Always 0&#039;&#039; - Corresponds to Unitref[036]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;20:&#039;&#039;&#039;   &#039;&#039;Unknown - Always 1&#039;&#039;  No Corresponding Unitref offset&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;21:&#039;&#039;&#039;   &#039;&#039;Unknown - Always 0&#039;&#039; - Corresponds to Unitref[046]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;22:&#039;&#039;&#039;   &#039;&#039;Unknown&#039;&#039; - Corresponds to Unitref[048] (see below)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;23:&#039;&#039;&#039;   &#039;&#039;Unknown&#039;&#039; - Corresponds to Unitref[052] (see below)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NOTE: For additional important info on these two bytes, see [[Talk:UNITREF.DAT]]. My notes below do not take that info into account. For the moment though I&#039;m leaving it as is. I sure wish we could figure the bytes out, and get rid of all the conjecture! - [[User:MikeTheRed|MikeTheRed]] 08:05, 6 November 2006 (PST)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
These Unitref bytes ([48] and [52]) and now Geoscape Core values have long stumped us hardcore X-Commies. The two bytes &amp;lt;b&amp;gt;always&amp;lt;/b&amp;gt; equal the same value for a given alien, including all aliens of the same race (the N&#039;s below). And, they&#039;re the same between Geoscape and Unitref. Clearly it must be important (or a goof!), but exactly what it is, who knows. Although this page is for X-COM, I&#039;ve included TFTD in the hopes it helps folks - but it&#039;s been so long since I&#039;ve played TFTD, I can&#039;t remember those units at all.&lt;br /&gt;
&lt;br /&gt;
How&#039;s this for a thought?... &lt;br /&gt;
 &amp;lt;u&amp;gt;Dimension&amp;lt;/u&amp;gt;   &amp;lt;u&amp;gt;Byte(s)&amp;lt;/u&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
        X     22&lt;br /&gt;
 &lt;br /&gt;
        Y     23&lt;br /&gt;
 &lt;br /&gt;
        Z     24  (top when standing)&lt;br /&gt;
              25  (top when kneeling)&lt;br /&gt;
              26  (bottom)&lt;br /&gt;
&lt;br /&gt;
Maybe they represent the &amp;quot;size in profile&amp;quot; (&amp;quot;width&amp;quot;), affecting likelihood to hit. A game could be tried with a target 20 squares away, set 22 and 23 alternately to 5 or 2 (or 1 or 0?), and see if it affects the successful shots percentage. 0 or even 1 might break the game, though.&lt;br /&gt;
&lt;br /&gt;
Also, how do these values (2 to 5) correlate with the &amp;quot;pixel drawings&amp;quot; of units? I can&#039;t seem to find that info at the moment... aren&#039;t units and tiles defined as something like 16x16x[[Height|28]]? If so, then perhaps the values (2 to 5) are multiplied by 3 or something to get their final &amp;quot;width&amp;quot; for bullet interception??  --[[User:MikeTheRed|MikeTheRed]] 05:20, 17 September 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
:I finally got the OSG (w00t!), and noticed the following: The section on weapon accuracy says (p. 221) that target size affects the chance to hit, and &amp;quot;the &#039;size&#039; of each alien is listed along with all other alien statistics in Chapter 9&amp;quot;. But the alien stats tables (p. 250 ff.) only lists Height as a possible &#039;size&#039; stat, and the text write-ups don&#039;t otherwise address &amp;quot;target size&amp;quot; with any precision. This discrepancy - that Chapter 8 talks about &#039;&#039;&#039;size&#039;&#039;&#039;, but Chapter 9 only has &#039;&#039;&#039;height&#039;&#039;&#039; - might (might!) mean there are more variables that determine target area size, but somehow they didn&#039;t make it to the alien stats tables.&lt;br /&gt;
&lt;br /&gt;
:The description for Height (p. 249) does say, &amp;quot;Taller creatures are easier to hit than short ones are. An alien with a height of 40, for example, is twice as easy to hit as an alien with a height of 20.&amp;quot; (Note: The tallest [[Height]] is actually 23. And also notice, Float is never mentioned.) This &#039;&#039;might&#039;&#039; mean only height affects this, or it could be read in a general way; other dimensions (X and Y in addition to Z) might also affect it.&lt;br /&gt;
&lt;br /&gt;
:Somebody should do some firing accuracy tests while hacking these potential X &amp;amp; Y bytes! But I still don&#039;t know how the values for [22] &amp;amp; [23] compare to what X-COM considers tile width... we know the Height byte accurately reflects the full range of possible values (0 to 23), but I doubt 5 is the full (pixel?) width of a tile. This might mean it&#039;s not width, then (or maybe [22] &amp;amp; [23] are added, or they are individually multiplied by 3 or something??) If anyone who knows about tile width could say something, I&#039;d appreciate it. --[[User:MikeTheRed|MikeTheRed]] 11:24, 1 October 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
In any event, here&#039;s a summary of bytes [22] and [23], in the hopes we can figure it out. They&#039;re always identical for a given race, and [22] always equals [23].&lt;br /&gt;
&lt;br /&gt;
                  &#039;&#039;&#039;X-COM                            TFTD&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
          &amp;lt;U&amp;gt;Value&amp;lt;/U&amp;gt;   &amp;lt;U&amp;gt;Alien&amp;lt;/U&amp;gt;           &amp;lt;U&amp;gt;N&amp;lt;/U&amp;gt;        &amp;lt;U&amp;gt;Value&amp;lt;/U&amp;gt;   &amp;lt;U&amp;gt;Alien&amp;lt;/U&amp;gt;           &amp;lt;U&amp;gt;N&amp;lt;/U&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
            2     Sectoid         6          2     Aquatoid        6   &lt;br /&gt;
                                                   Bio-Drone       1 &lt;br /&gt;
            3     Celatid         1                Tentaculat      1   &lt;br /&gt;
                  Chryssalid      1&lt;br /&gt;
                  Civilian        2          3     Calcinite       1   &lt;br /&gt;
                  Ethereal        3                Civilian        2   &lt;br /&gt;
                  Floater         6                Deep_One        1   &lt;br /&gt;
                  Muton           3                Gill_Man        4   &lt;br /&gt;
                  Snakeman        5                Tasoth          2   &lt;br /&gt;
 &lt;br /&gt;
            4     Cyberdisc       1          4     Coelacant       1   &lt;br /&gt;
                  Hovertank       1                Displacer       1   &lt;br /&gt;
                  Reaper          1                Hallucinoid     1   &lt;br /&gt;
                  Sectopod        1                Lobster_Man     5   &lt;br /&gt;
                  Tank            1                Triscene        1   &lt;br /&gt;
                                                   Xarquid         1 &lt;br /&gt;
            5     Silacoid        1  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;24:&#039;&#039;&#039;   Standing Height - Corresponds to Unitref[049]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;25:&#039;&#039;&#039;   Kneeling Height - Corresponds to Unitref[050]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;26:&#039;&#039;&#039;   Floating Height - Corresponds to Unitref[051]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;27:&#039;&#039;&#039;   [[Damage#Susceptible_to...|Damage Modifier]] Category - Corresponds to Unitref[055]&lt;br /&gt;
&lt;br /&gt;
This field is simply a look-up table, or more directly, a way to categorize the units into similar groups. The actual modifiers are listed elsewhere in the executable. A value of 1 indicates the first DM category, a value of 4 indicates the 4th, etc. The values of 2 and 3 are not seen in the alien stats as they refer to X-COM soldier armor info. I&#039;m not sure about 13 as the Zombie&#039;s stats haven&#039;t been found yet, but I think there is a category in the DM&#039;s for it.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Column&#039;&#039;&#039;    &#039;&#039;&#039;Unit Type(s)&#039;&#039;&#039;&lt;br /&gt;
    &#039;&#039;&#039;1&#039;&#039;&#039;      Civilian, Sectoid, Celatid, Floater&lt;br /&gt;
    &#039;&#039;&#039;2&#039;&#039;&#039;      Personal Armor&lt;br /&gt;
    &#039;&#039;&#039;3&#039;&#039;&#039;      Power Suit, Flying Suit&lt;br /&gt;
    &#039;&#039;&#039;4&#039;&#039;&#039;      Tanks, Hovertanks&lt;br /&gt;
    &#039;&#039;&#039;5&#039;&#039;&#039;      Snakemen&lt;br /&gt;
    &#039;&#039;&#039;6&#039;&#039;&#039;      Ethereal&lt;br /&gt;
    &#039;&#039;&#039;7&#039;&#039;&#039;      Muton&lt;br /&gt;
    &#039;&#039;&#039;8&#039;&#039;&#039;      Silacoid&lt;br /&gt;
    &#039;&#039;&#039;9&#039;&#039;&#039;      Chryssalid&lt;br /&gt;
   &#039;&#039;&#039;10&#039;&#039;&#039;      Reaper&lt;br /&gt;
   &#039;&#039;&#039;11&#039;&#039;&#039;      Sectopod&lt;br /&gt;
   &#039;&#039;&#039;12&#039;&#039;&#039;      Cyberdisc&lt;br /&gt;
   &#039;&#039;&#039;13&#039;&#039;&#039;      Zombie&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;28:&#039;&#039;&#039;   Psi Skill - Corresponds to Unitref[037]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;29:&#039;&#039;&#039;   Psi Strength - Corresponds to Unitref[057]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;30:&#039;&#039;&#039;   Bravery (encoded) - Corresponds to Unitref[059]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;31:&#039;&#039;&#039;   Motion scanner size - Corresponds to Unitref[061]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;32:&#039;&#039;&#039;   &#039;&#039;1 for Cyberdisc, 0 for all others including TFTD... isn&#039;t &amp;quot;Explodes&amp;quot;; the TFTD Bio-Drone also explodes...&#039;&#039; - Corresponds to Unitref[071]&lt;br /&gt;
&lt;br /&gt;
I edited the Cyberdisc&#039;s field to 0 and checked to see if it exploded. It still did. Obviously this field is for something else. I&#039;ll work on this some more. --[[User:Zombie|Zombie]] 20:15, 15 September 2006 (PDT)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;33:&#039;&#039;&#039;   &#039;&#039;Unknown - Always 0&#039;&#039;  No Corresponding Unitref offset&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;34:&#039;&#039;&#039;   Corpse type - Corresponds to Unitref[038]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;35:&#039;&#039;&#039;   Big unit (2x2)  No Corresponding Unitref offset&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;36:&#039;&#039;&#039;   Victory point score - Corresponds to Unitref[039]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;37:&#039;&#039;&#039;   Aggression - Corresponds to Unitref[044]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;38:&#039;&#039;&#039;   Intelligence - Corresponds to Unitref[073]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This data was just put together working heavily with Zombie and his great SC [http://www.strategycore.co.uk/xcom/pg/ufoalienstats alien stats] page.&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
* [[TACTICAL.EXE]] - Sister executable used for Turn based strategy (merged with geoscape.exe in WinCE edition)&lt;br /&gt;
* [[UNITREF.DAT]] - Stats on current units (both XCOM and Alien) in play&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Files]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=Talk:TACTICAL.EXE&amp;diff=11363</id>
		<title>Talk:TACTICAL.EXE</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=Talk:TACTICAL.EXE&amp;diff=11363"/>
		<updated>2007-03-14T19:26:23Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: /* English2.dat */  cleaned up explanation formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==English2.dat==&lt;br /&gt;
Hey I think I found the lookup table for English2.dat (or german2, etc) in TACTICAL.EXE. It&#039;s at offset 0x5F910, each entry is 2 bytes long. It corresponds with the entry in [[OBDATA.DAT]]. The index in obdata is the offset in this array of 2 bytes. Let me give an example:&lt;br /&gt;
 (AT OFFSET 5F910)&lt;br /&gt;
 7B 00 | 7C 00 | 7D 00 | 7E 00 | 7F 00&lt;br /&gt;
   0       1       2       3       4&lt;br /&gt;
&lt;br /&gt;
* 0x7B (or really 0x007B) is 123, which in English2.dat is Pistol&lt;br /&gt;
&lt;br /&gt;
For further Proof:&lt;br /&gt;
&lt;br /&gt;
 (OFFSET 5F944, 52 bytes from begining, so 52/2 = 26)&lt;br /&gt;
 95 00 | B0 00 | 00 00 | 00 00&lt;br /&gt;
   26      27      28      29&lt;br /&gt;
&lt;br /&gt;
* 0x0095 = 149; english2.dat[149] = &#039;Stun Rod&#039; (OBDATA[26] Is info for Stun Rod)&lt;br /&gt;
* 0x00B0 = 176; english2.dat[176] = &#039;Electro-flare&#039; (OBDATA[27] is info for electro-flare)&lt;br /&gt;
* OBDATA[28-30] are &#039;empty&#039; unused obdata slots&lt;br /&gt;
&lt;br /&gt;
 (OFFSET 5F94E, 62 byte from begining, so 62/2 = 31)&lt;br /&gt;
 AE 00 | AE 00 | AE 00 | 96 00&lt;br /&gt;
   31      32      33      34&lt;br /&gt;
&lt;br /&gt;
* 0x00AE = 174; english2.dat[174] = &#039;Corpse&#039;, Obdata[31-33] are all corpses (with different armor)&lt;br /&gt;
* 0x0096 = 150; english2.dat[150] = &#039;Heavy Plasma&#039;, Obdata[34] is info for Heavy Plasma&lt;br /&gt;
&lt;br /&gt;
[[User:Pi Masta|Pi Masta]] 19:19, 9 February 2007 (PST)&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=TACTICAL.EXE&amp;diff=11362</id>
		<title>TACTICAL.EXE</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=TACTICAL.EXE&amp;diff=11362"/>
		<updated>2007-03-14T19:24:35Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: moved weapon stats from geoscape.exe, reformatted table&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;NOTE:&#039;&#039;&#039; In the Windows CE version this is combined with [[GEOSCAPE.EXE]] into one executable called &#039;&#039;UFO Defense&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Weapon Stats =&lt;br /&gt;
&lt;br /&gt;
For WinCE, the tank and inbuilt alien weapon stats start at byte 447,868 (0x6D57C), for DOS Tactical.EXE it starts at byte 391,278 (0x5F86E). These are 8 records of 20 bytes each. They&#039;re all stored in 16-bit (2 byte) values.  &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;0:&#039;&#039;&#039; Damage Type&lt;br /&gt;
* &#039;&#039;&#039;1:&#039;&#039;&#039; Ammo Type&lt;br /&gt;
* &#039;&#039;&#039;2:&#039;&#039;&#039; Damage&lt;br /&gt;
* &#039;&#039;&#039;3:&#039;&#039;&#039; Snap Shot Acc.&lt;br /&gt;
* &#039;&#039;&#039;4:&#039;&#039;&#039; Snap Shot TU&#039;s&lt;br /&gt;
* &#039;&#039;&#039;5:&#039;&#039;&#039; Auto Shot Acc.&lt;br /&gt;
* &#039;&#039;&#039;6:&#039;&#039;&#039; Auto Shot TU&#039;s&lt;br /&gt;
* &#039;&#039;&#039;7:&#039;&#039;&#039; Aim Shot Acc.&lt;br /&gt;
* &#039;&#039;&#039;8:&#039;&#039;&#039; Aim Shot TU&#039;s&lt;br /&gt;
* &#039;&#039;&#039;9:&#039;&#039;&#039; Blaster Effect&lt;br /&gt;
&lt;br /&gt;
Weapons are in the order listed in this table:&lt;br /&gt;
{| {{StdCenterTable}} &lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
!align=&amp;quot;left&amp;quot;| Unit !! Damage Type !! Ammo Type !! Damage !! Snap Acc. !! Snap TU&#039;s !! Auto Acc. &lt;br /&gt;
! Auto TU&#039;s !! Aim Acc. !! Aim TU&#039;s !! Blaster Eff? &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;left&amp;quot;| [[Tank/Cannon]]          || 0 || 4  || 60  || 60 || 33 || 0  || 0  || 90  || 80 || 0 &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;left&amp;quot;| [[Tank/Rocket Launcher]] || 2 || 12 || 85  || 55 || 45 || 0  || 0  || 115 || 75 || 0 &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;left&amp;quot;| [[Tank/Laser Cannon]]    || 3 || 17 || 110 || 50 || 33 || 0  || 0  || 85  || 75 || 0 &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;left&amp;quot;| [[Hovertank/Plasma]]     || 4 || 36 || 110 || 86 || 30 || 0  || 0  || 100 || 60 || 0 &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;left&amp;quot;| [[Hovertank/Launcher]]   || 2 || 40 || 140 || 0  || 0  || 0  || 0  || 120 || 80 || 1 &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;left&amp;quot;| [[Celatid]]              || 7 || 38 || 140 || 75 || 30 || 0  || 0  || 110 || 60 || 0 &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;left&amp;quot;| [[Cyberdisc]]            || 4 || 34 || 130 || 75 || 30 || 0  || 0  || 110 || 60 || 0 &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;left&amp;quot;| [[Sectopod]]             || 3 || 34 || 100 || 75 || 30 || 50 || 35 || 110 || 60 || 0 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= English2.dat mapping =&lt;br /&gt;
* 0x5F910 (DOS version) - obdata index to english2.dat lookup (2 bytes each, data is the index to english2.dat (or german2.dat, etc)&lt;br /&gt;
** See the [[Talk:TACTICAL.EXE|discussion page]] for more details&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Files]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=LOC.DAT&amp;diff=11349</id>
		<title>LOC.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=LOC.DAT&amp;diff=11349"/>
		<updated>2007-03-13T23:55:59Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: speculation on offset 16, 0 in offset 0 is definately for unused entries&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Ripped from [http://www.stonepool.com/xcom/hacking/index.html Hatfarm / Chris Voss&#039;s great pages]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LOC.DAT:&#039;&#039;&#039; Each entry is 20 bytes long (most of this info is from NKF, thanks a lot)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;00:&#039;&#039;&#039; Object type:&lt;br /&gt;
    00 - Unused entry&lt;br /&gt;
    01 - Alien Ship&lt;br /&gt;
    02 - X-Com Ship&lt;br /&gt;
    03 - X-Com Base&lt;br /&gt;
    04 - Alien Base&lt;br /&gt;
    05 - Crash Site&lt;br /&gt;
    06 - Landed UFO&lt;br /&gt;
    07 - Waypoint&lt;br /&gt;
    08 - Terror Site&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;01:&#039;&#039;&#039; Object table reference - Possible values - 00 to FF - Just a reference. This just shows how many there are of this type on the geoscape. (UFOs and X-COM craft are both type ship and will both increment this number.) This is used for determining base number, for use in other files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;02-03:&#039;&#039;&#039; Horizontal starting coordinates (low bit then high bit respectively). I&#039;m not sure of possible values, changing them moves it around the map.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;04-05:&#039;&#039;&#039; Vertical starting coordinates (low bit then high bit respectively). I&#039;m not sure of possible values, changing them moves it around the map.&lt;br /&gt;
&lt;br /&gt;
NOTE: Ships don&#039;t land on the exact place that the alien ship is, that&#039;s why there will be discrepancies between the alien and x-com ship destination info.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;06-07:&#039;&#039;&#039; Horizontal destination coordinates (low bit then high bit respectively). I&#039;m not sure of possible values, changing them moves it around the map.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;08-09:&#039;&#039;&#039; Vertical destination coordinates (low bit then high bit respectively). I&#039;m not sure of possible values, changing them moves it around the map.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0A-0B:&#039;&#039;&#039; Appears to be the &#039;count suffix&#039; of the item, eg: Skyranger-&#039;&#039;&#039;1&#039;&#039;&#039; or Crash Site-&#039;&#039;&#039;47&#039;&#039;&#039;. It appears to have no meaning for XCOM Bases, but for other types where it is set, the next byte (0B) always seems to be 0, and is probably the high byte but I&#039;ve never gotten over 255 UFO&#039;s or crafts to test this. &#039;&#039;--[[User:Pi Masta|Pi Masta]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0C-0F:&#039;&#039;&#039; NEED HELP&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:&#039;&#039;&#039; Something to do with visibility, not really sure however.&lt;br /&gt;
 Possible bit field? --[[User:Pi Masta|Pi Masta]] 16:55, 13 March 2007 (PDT)&lt;br /&gt;
 bit&lt;br /&gt;
 2 (value 4) seen this change on alien crafts when I targeted it for the first time&lt;br /&gt;
 1 (value 2) Alien craft always have this flagged, for Xcom craft 0 - At base or patrolling, 1 - Moving (moving bit field?)&lt;br /&gt;
 0 (value 1) not visible/detected field, 0 - visible, 1 - not visible&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;11-13:&#039;&#039;&#039; NEED HELP&lt;br /&gt;
&lt;br /&gt;
NOTE: Other files (e.g., [[CRAFT.DAT]]) reference the entry number for the base. For example, if the value is 0A then that base is in entry 10 of this file.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
* [[BASE.DAT]] - Contains information about Xcom bases&lt;br /&gt;
* [[CRAFT.DAT]] - Contains information on the crafts&lt;br /&gt;
* [[GEODATA.DAT]] - Contains information about what crafts and terrain a battle should use&lt;br /&gt;
* [[WORLD.DAT]] - Defines the zones and terrain on the globe&lt;br /&gt;
* [[Saved Game Files]]&lt;br /&gt;
[[Category:Game Files]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=BASE.DAT&amp;diff=11348</id>
		<title>BASE.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=BASE.DAT&amp;diff=11348"/>
		<updated>2007-03-13T17:42:55Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: /* Structure */  unknown offsets probably high bytes for other values&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;Ripped from [http://www.stonepool.com/xcom/hacking/index.html Hatfarm / Chris Voss&#039;s] great pages&lt;br /&gt;
&lt;br /&gt;
==Structure==&lt;br /&gt;
&#039;&#039;&#039;BASE.DAT:&#039;&#039;&#039; Each entry is 292 Bytes long&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;00-0E:&#039;&#039;&#039; Base Name, pretty obvious&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0F:&#039;&#039;&#039; Presumably the Null character if the Base Name uses all 15 characters&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10:&#039;&#039;&#039; Base&#039;s short range detection capability.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;12:&#039;&#039;&#039; Base&#039;s long range detection capability.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:&#039;&#039;&#039; Base&#039;s hyperwave detection capability.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;11, 13, 15:&#039;&#039;&#039; These are probably the high bytes for the Short, Long, and Hyper-wave detections respectively. Should always be 0 as a value of 100 (hex: 64 00) is perfect detection.&lt;br /&gt;
&lt;br /&gt;
Logical values for the detection capabilities:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;10 short, 0 long:&#039;&#039; This base has small radar(s) only.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;20 short, 20 long:&#039;&#039; This base has large radar(s) only.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;30 short, 20 long:&#039;&#039; This base has small and large radar(s).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;100 hyperwave:&#039;&#039; This base has a hyperwave decoder(s).&lt;br /&gt;
&lt;br /&gt;
The radar values can be set to 100 for perfect short range detection (presumably -- it definitely makes UFOs appear more often), but these reset to the correct values any time you complete a build in that base.&lt;br /&gt;
&lt;br /&gt;
{| width = &amp;quot;60%&amp;quot; style = &amp;quot;border: 1px solid; border-collapse:collapse;&amp;quot;&lt;br /&gt;
|+ Table 1: Radar Ability Combinations&lt;br /&gt;
|- style = &amp;quot;font-size:larger; font-weight: bold; border-bottom: 1px black solid; background: gray; color:white;&amp;quot; &lt;br /&gt;
| Radar Module / Scan Type || Short || Long || Hyperwave&lt;br /&gt;
|- style = &amp;quot;&amp;quot;&lt;br /&gt;
| Small Radar || 10 || 0 || 0&lt;br /&gt;
|-&lt;br /&gt;
| Large Radar || 20 || 20 || 0&lt;br /&gt;
|-&lt;br /&gt;
| Hyperwave || 0 || 0 || 100&lt;br /&gt;
|- colspan = &amp;quot;4&amp;quot; style = &amp;quot;border-top: 1px dotted; font-wight: bold;&amp;quot;&lt;br /&gt;
| Radar Combinations&lt;br /&gt;
|- style = &amp;quot;background: #EEE;&amp;quot;&lt;br /&gt;
| Sm + Sm || 10 || 0 || 0&lt;br /&gt;
|-&lt;br /&gt;
| Sm + Lg || 30 || 20 || 0&lt;br /&gt;
|-style = &amp;quot;background: #EEE;&amp;quot;&lt;br /&gt;
| Sm + Hyp || 10 || 0 || 100&lt;br /&gt;
|-&lt;br /&gt;
| Lg + Lg || 20 || 20 || 0&lt;br /&gt;
|-style = &amp;quot;background: #EEE;&amp;quot;&lt;br /&gt;
| Lg + Hyp || 20 || 20 || 100&lt;br /&gt;
|- &lt;br /&gt;
| Hyp + Hyp || 0 || 0 || 100 &lt;br /&gt;
|-style = &amp;quot;background: #EEE;&amp;quot;&lt;br /&gt;
| Sm + Lg + Hyp || 30 || 20 || 100&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;16-39:&#039;&#039;&#039; The next offsets are arranged so they&#039;re easier to understand. They are for facilities in the base:&lt;br /&gt;
&lt;br /&gt;
 /-----------------------------\&lt;br /&gt;
 | 16 | 17 | 18 | 19 | 1A | 1B |&lt;br /&gt;
 |-----------------------------|&lt;br /&gt;
 | 1C | 1D | 1E | 1F | 20 | 21 |&lt;br /&gt;
 |-----------------------------|&lt;br /&gt;
 | 22 | 23 | 24 | 25 | 26 | 27 |&lt;br /&gt;
 |-----------------------------|&lt;br /&gt;
 | 28 | 29 | 2A | 2B | 2C | 2D |&lt;br /&gt;
 |-----------------------------|&lt;br /&gt;
 | 2E | 2F | 30 | 31 | 32 | 33 |&lt;br /&gt;
 |-----------------------------|&lt;br /&gt;
 | 34 | 35 | 36 | 37 | 38 | 39 |&lt;br /&gt;
 \-----------------------------/&lt;br /&gt;
The possible values are as follows:&lt;br /&gt;
 00 - Access Lift&lt;br /&gt;
 01 - Living Quarters&lt;br /&gt;
 02 - Laboratory&lt;br /&gt;
 03 - Workshop&lt;br /&gt;
 04 - Small Radar System&lt;br /&gt;
 05 - Large Radar System&lt;br /&gt;
 06 - Missile Defense&lt;br /&gt;
 07 - General Stores&lt;br /&gt;
 08 - Alien Containment&lt;br /&gt;
 09 - Laser Defense&lt;br /&gt;
 0A - Plasma Defense&lt;br /&gt;
 0B - Fusion Ball Defense&lt;br /&gt;
 0C - Grav Shield&lt;br /&gt;
 0D - Mind Shield&lt;br /&gt;
 0E - Psionic Laboratory&lt;br /&gt;
 0F - Hyper-wave Decoder&lt;br /&gt;
 10 - Hangar (Top Left)&lt;br /&gt;
 11 - Hangar (Top Right)&lt;br /&gt;
 12 - Hangar (Bottom Left)&lt;br /&gt;
 13 - Hangar (Bottom Right)&lt;br /&gt;
 FF - Empty&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3A-5D:&#039;&#039;&#039; The next offsets represent the days until a facility is completed. They&#039;re set up the same way:&lt;br /&gt;
 /-----------------------------\&lt;br /&gt;
 | 3A | 3B | 3C | 3D | 3E | 3F |&lt;br /&gt;
 |-----------------------------|&lt;br /&gt;
 | 40 | 41 | 42 | 43 | 44 | 45 |&lt;br /&gt;
 |-----------------------------|&lt;br /&gt;
 | 46 | 47 | 48 | 49 | 4A | 4B |&lt;br /&gt;
 |-----------------------------|&lt;br /&gt;
 | 4C | 4D | 4E | 4F | 50 | 51 |&lt;br /&gt;
 |-----------------------------|&lt;br /&gt;
 | 52 | 53 | 54 | 55 | 56 | 57 |&lt;br /&gt;
 |-----------------------------|&lt;br /&gt;
 | 58 | 59 | 5A | 5B | 5C | 5D |&lt;br /&gt;
 \-----------------------------/&lt;br /&gt;
Possible values are 00 to FF. Empty spaces must have a FF value in their corresponding offset.&lt;br /&gt;
&lt;br /&gt;
The following are the rest of the offsets I know. There are holes in the numbering but I have no idea what they are. All possible values are 00 to FF, but when you go over 32,766 on 2-byte values, the number goes negative. And if it&#039;s two bytes then the first byte is the low bit and the second bit is the high bit. Example: 05 00 should be read as 00 05. &#039;&#039;&#039;The first two (Engineers and Scientists) are one byte; all the rest are two bytes.&#039;&#039;&#039; Here&#039;s the info:&lt;br /&gt;
&lt;br /&gt;
 005E  Engineer&lt;br /&gt;
 005F  Scientist&lt;br /&gt;
 0060  Stingray Launcher&lt;br /&gt;
 0062  Avalanche Launcher&lt;br /&gt;
 0064  Cannon&lt;br /&gt;
 0066  Fusion Ball Launcher&lt;br /&gt;
 0068  Laser Cannon&lt;br /&gt;
 006A  Plasma Beam&lt;br /&gt;
 006C  Stingray Missile&lt;br /&gt;
 006E  Avalanche Missile&lt;br /&gt;
 0070  Cannon Rounds&lt;br /&gt;
 0072  Fusion Balls&lt;br /&gt;
 0074  Tank/Cannon&lt;br /&gt;
 0076  Tank/Rocket Launcher&lt;br /&gt;
 0078  Tank/Laser Cannon&lt;br /&gt;
 007A  Hovertank/Plasma&lt;br /&gt;
 007C  Hovertank/Launcher&lt;br /&gt;
 007E  Pistol&lt;br /&gt;
 0080  Pistol Clip&lt;br /&gt;
 0082  Rifle&lt;br /&gt;
 0084  Rifle Clip&lt;br /&gt;
 0086  Heavy Cannon&lt;br /&gt;
 0088  HC-AP Ammo&lt;br /&gt;
 008A  HC-HE Ammo&lt;br /&gt;
 008C  HC-IN Ammo&lt;br /&gt;
 008E  Auto Cannon&lt;br /&gt;
 0090  AC-AP Ammo&lt;br /&gt;
 0092  AC-HE Ammo&lt;br /&gt;
 0094  AC-IN Ammo&lt;br /&gt;
 0096  Rocket Launcher&lt;br /&gt;
 0098  Small Rocket&lt;br /&gt;
 009A  Large Rocket&lt;br /&gt;
 009C  Incendiary Rocket&lt;br /&gt;
 009E  Laser Pistol&lt;br /&gt;
 00A0  Laser Rifle&lt;br /&gt;
 00A2  Heavy Laser&lt;br /&gt;
 00A4  Grenade&lt;br /&gt;
 00A6  Smoke Grenade&lt;br /&gt;
 00A8  Proximity Grenade&lt;br /&gt;
 00AA  High Explosive&lt;br /&gt;
 00AC  Motion Scanner&lt;br /&gt;
 00AE  Medi-Kit&lt;br /&gt;
 00B0  Psi-Amp&lt;br /&gt;
 00B2  Stun Rod&lt;br /&gt;
 00B4  Electro Flare&lt;br /&gt;
 00C2  Heavy Plasma&lt;br /&gt;
 00C4  Heavy Plasma Clip&lt;br /&gt;
 00C6  Plasma Rifle&lt;br /&gt;
 00C8  Plasma Rifle Clip&lt;br /&gt;
 00CA  Plasma Pistol&lt;br /&gt;
 00CC  Plasma Pistol Clip&lt;br /&gt;
 00CE  Blaster Launcher&lt;br /&gt;
 00D0  Blaster Bomb&lt;br /&gt;
 00D2  Small Launcher&lt;br /&gt;
 00D4  Stun Bomb&lt;br /&gt;
 00D6  Alien Grenade&lt;br /&gt;
 00D8  Elerium-115&lt;br /&gt;
 00DA  Mind Probe&lt;br /&gt;
 00E2  Sectoid Corpse&lt;br /&gt;
 00E4  Snakeman Corpse&lt;br /&gt;
 00E6  Ethereal Corpse&lt;br /&gt;
 00E8  Muton Corpse&lt;br /&gt;
 00EA  Floater Corpse&lt;br /&gt;
 00EC  Celatid Corpse&lt;br /&gt;
 00EE  Silacoid Corpse&lt;br /&gt;
 00F0  Chryssalid Corpse&lt;br /&gt;
 00F2  Reaper Corpse&lt;br /&gt;
 00F4  Sectopod Corpse&lt;br /&gt;
 00F6  Cyberdisc Corpse&lt;br /&gt;
 0100  UFO Power Source&lt;br /&gt;
 0102  UFO Navigation&lt;br /&gt;
 0104  UFO Construction&lt;br /&gt;
 0106  Alien Food&lt;br /&gt;
 0108  Alien Reproduction&lt;br /&gt;
 010A  Alien Entertainment&lt;br /&gt;
 010C  Alien Surgery&lt;br /&gt;
 010E  Examination Room&lt;br /&gt;
 0110  Alien Alloys&lt;br /&gt;
 0112  Alien Habitat&lt;br /&gt;
 0114  Personal Armour&lt;br /&gt;
 0116  Power Suit&lt;br /&gt;
 0118  Flying Suit&lt;br /&gt;
 011A  HWP Cannon Shell&lt;br /&gt;
 011C  HWP Rockets&lt;br /&gt;
 011E  HWP Fusion Bomb&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;011F-0123:&#039;&#039;&#039; I have no idea, any help would be appreciated.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
* [[ASTORE.DAT]] - Information on captured aliens at bases&lt;br /&gt;
* [[BPROD.DAT]] - Information on what bases are producing&lt;br /&gt;
* [[CRAFT.DAT]] - Information on crafts (both X-Com and Alien)&lt;br /&gt;
* [[FACIL.DAT]] - Information on the facilities you can build in bases&lt;br /&gt;
* [[LOC.DAT]] - Location Data for bases and crafts&lt;br /&gt;
* [[PROJECT.DAT]] - Information on current research&lt;br /&gt;
* [[SOLDIER.DAT]] - Information on soldiers at bases&lt;br /&gt;
* [[TRANSFER.DAT]] - Information on item/personnel being transferred to/from bases&lt;br /&gt;
* [[Saved Game Files]]&lt;br /&gt;
[[Category:Game Files]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=RESEARCH.DAT&amp;diff=11345</id>
		<title>RESEARCH.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=RESEARCH.DAT&amp;diff=11345"/>
		<updated>2007-03-13T05:17:40Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: /* General Information */  split table up a bit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== General Information ==&lt;br /&gt;
&lt;br /&gt;
RESEARCH.DAT contains information about all the different research projects available,&lt;br /&gt;
including total time the research requires and the number of points awarded upon completion.&lt;br /&gt;
It consists of 96 records, each 22 bytes long, in the following sequence:&lt;br /&gt;
{| cellspacing=&amp;quot;5&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
{| {{StdDescTable}} cellspacing=&amp;quot;2&amp;quot;&lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
! #  !! Title               &lt;br /&gt;
|-&lt;br /&gt;
|1   ||Laser Weapons        &lt;br /&gt;
|-&lt;br /&gt;
|2   ||Motion Scanner       &lt;br /&gt;
|-&lt;br /&gt;
|3   ||Medi-Kit             &lt;br /&gt;
|-&lt;br /&gt;
|4   ||Psi-Amp              &lt;br /&gt;
|-&lt;br /&gt;
|5   ||Heavy Plasma         &lt;br /&gt;
|-&lt;br /&gt;
|6   ||Heavy Plasma Clip    &lt;br /&gt;
|-&lt;br /&gt;
|7   ||Plasma Rifle         &lt;br /&gt;
|-&lt;br /&gt;
|8   ||Plasma Rifle Clip    &lt;br /&gt;
|-&lt;br /&gt;
|9   ||Plasma Pistol        &lt;br /&gt;
|-&lt;br /&gt;
|10  ||Plasma Pistol Clip   &lt;br /&gt;
|-&lt;br /&gt;
|11  ||Blaster Launcher     &lt;br /&gt;
|-&lt;br /&gt;
|12  ||Blaster Bomb         &lt;br /&gt;
|-&lt;br /&gt;
|13  ||Small Launcher       &lt;br /&gt;
|-&lt;br /&gt;
|14  ||Stun Bomb            &lt;br /&gt;
|-&lt;br /&gt;
|15  ||Alien Grenade        &lt;br /&gt;
|-&lt;br /&gt;
|16  ||Elerium-115          &lt;br /&gt;
|-&lt;br /&gt;
|17  ||Mind Probe           &lt;br /&gt;
|-&lt;br /&gt;
|18  ||UFO Power Source     &lt;br /&gt;
|-&lt;br /&gt;
|19  ||UFO Navigation       &lt;br /&gt;
|-&lt;br /&gt;
|20  ||UFO Construction     &lt;br /&gt;
|-&lt;br /&gt;
|21  ||Alien Food           &lt;br /&gt;
|-&lt;br /&gt;
|22  ||Alien Reproduction   &lt;br /&gt;
|-&lt;br /&gt;
|23  ||Alien Entertainment  &lt;br /&gt;
|-&lt;br /&gt;
|24  ||Alien Surgery        &lt;br /&gt;
|}&lt;br /&gt;
|&lt;br /&gt;
{| {{StdDescTable}} cellspacing=&amp;quot;2&amp;quot;&lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
! # !! Title                     &lt;br /&gt;
|-&lt;br /&gt;
|25  ||Examination Room           &lt;br /&gt;
|-&lt;br /&gt;
|26  ||Alien Alloys               &lt;br /&gt;
|-&lt;br /&gt;
|27  ||New Fighter                &lt;br /&gt;
|-&lt;br /&gt;
|28  ||New Fighter-Transporter    &lt;br /&gt;
|-&lt;br /&gt;
|29  ||Ultimate Craft             &lt;br /&gt;
|-&lt;br /&gt;
|30  ||Laser Pistol               &lt;br /&gt;
|-&lt;br /&gt;
|31  ||Laser Rifle                &lt;br /&gt;
|-&lt;br /&gt;
|32  ||Heavy Laser                &lt;br /&gt;
|-&lt;br /&gt;
|33  ||Laser Cannon               &lt;br /&gt;
|-&lt;br /&gt;
|34  ||Plasma Cannon              &lt;br /&gt;
|-&lt;br /&gt;
|35  ||Fusion Missile             &lt;br /&gt;
|-&lt;br /&gt;
|36  ||Laser Defense              &lt;br /&gt;
|-&lt;br /&gt;
|37  ||Plasma Defense             &lt;br /&gt;
|-&lt;br /&gt;
|38  ||Fusion Defense             &lt;br /&gt;
|-&lt;br /&gt;
|39  ||Grav Shield                &lt;br /&gt;
|-&lt;br /&gt;
|40  ||Mind Shield                &lt;br /&gt;
|-&lt;br /&gt;
|41  ||Psionic Laboratory         &lt;br /&gt;
|-&lt;br /&gt;
|42  ||Hyper-Wave Decoder         &lt;br /&gt;
|-&lt;br /&gt;
|43  ||(N/A) Tank/Laser Cannon*   &lt;br /&gt;
|-&lt;br /&gt;
|44  ||(N/A) Plasma Hovertank*    &lt;br /&gt;
|-&lt;br /&gt;
|45  ||(N/A) Launcher Hovertank*  &lt;br /&gt;
|-&lt;br /&gt;
|46  ||Sectoid Corpse             &lt;br /&gt;
|-&lt;br /&gt;
|47  ||Snakeman Corpse            &lt;br /&gt;
|-&lt;br /&gt;
|48  ||Ethereal Corpse            &lt;br /&gt;
|}&lt;br /&gt;
|&lt;br /&gt;
{| {{StdDescTable}} cellspacing=&amp;quot;2&amp;quot;&lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
! #  !! Title                   &lt;br /&gt;
|-&lt;br /&gt;
|49  ||Muton Corpse             &lt;br /&gt;
|-&lt;br /&gt;
|50  ||Floater Corpse           &lt;br /&gt;
|-&lt;br /&gt;
|51  ||Celatid Corpse           &lt;br /&gt;
|-&lt;br /&gt;
|52  ||Silacoid Corpse          &lt;br /&gt;
|-&lt;br /&gt;
|53  ||Chryssalid Corpse        &lt;br /&gt;
|-&lt;br /&gt;
|54  ||Reaper Corpse            &lt;br /&gt;
|-&lt;br /&gt;
|55  ||Sectopod Corpse          &lt;br /&gt;
|-&lt;br /&gt;
|56  ||Cyberdisc Corpse         &lt;br /&gt;
|-&lt;br /&gt;
|57  ||Alien Origins            &lt;br /&gt;
|-&lt;br /&gt;
|58  ||The Martian Solution     &lt;br /&gt;
|-&lt;br /&gt;
|59  ||Cydonia or Bust          &lt;br /&gt;
|-&lt;br /&gt;
|60  ||Personal Armor           &lt;br /&gt;
|-&lt;br /&gt;
|61  ||Power Suit               &lt;br /&gt;
|-&lt;br /&gt;
|62  ||Flying Suit              &lt;br /&gt;
|-&lt;br /&gt;
|63  ||Live Sectoid Commander   &lt;br /&gt;
|-&lt;br /&gt;
|64  ||Live Sectoid Leader      &lt;br /&gt;
|-&lt;br /&gt;
|65  ||Live Sectoid Engineer    &lt;br /&gt;
|-&lt;br /&gt;
|66  ||Live Sectoid Medic       &lt;br /&gt;
|-&lt;br /&gt;
|67  ||Live Sectoid Navigator   &lt;br /&gt;
|-&lt;br /&gt;
|68  ||Live Sectoid Soldier     &lt;br /&gt;
|-&lt;br /&gt;
|69  ||Live Snakeman Commander  &lt;br /&gt;
|-&lt;br /&gt;
|70  ||Live Snakeman Leader     &lt;br /&gt;
|-&lt;br /&gt;
|71  ||Live Snakeman Engineer   &lt;br /&gt;
|-&lt;br /&gt;
|72  ||Live Snakeman Medic      &lt;br /&gt;
|}&lt;br /&gt;
|&lt;br /&gt;
{| {{StdDescTable}} cellspacing=&amp;quot;2&amp;quot;&lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
! #  !! Title                    &lt;br /&gt;
|-&lt;br /&gt;
|73  ||Live Snakeman Navigator   &lt;br /&gt;
|-&lt;br /&gt;
|74  ||Live Snakeman Soldier     &lt;br /&gt;
|-&lt;br /&gt;
|75  ||Live Ethereal Commander   &lt;br /&gt;
|-&lt;br /&gt;
|76  ||Live Ethereal Leader      &lt;br /&gt;
|-&lt;br /&gt;
|77  ||Live Ethereal Engineer    &lt;br /&gt;
|-&lt;br /&gt;
|78  ||Live Ethereal Medic       &lt;br /&gt;
|-&lt;br /&gt;
|79  ||Live Ethereal Navigator   &lt;br /&gt;
|-&lt;br /&gt;
|80  ||Live Ethereal Soldier     &lt;br /&gt;
|-&lt;br /&gt;
|81  ||Live Muton Commander      &lt;br /&gt;
|-&lt;br /&gt;
|82  ||Live Muton Leader         &lt;br /&gt;
|-&lt;br /&gt;
|83  ||Live Muton Engineer       &lt;br /&gt;
|-&lt;br /&gt;
|84  ||Live Muton Medic          &lt;br /&gt;
|-&lt;br /&gt;
|85  ||Live Muton Navigator      &lt;br /&gt;
|-&lt;br /&gt;
|86  ||Live Muton Soldier        &lt;br /&gt;
|-&lt;br /&gt;
|87  ||Live Floater Commander    &lt;br /&gt;
|-&lt;br /&gt;
|88  ||Live Floater Leader       &lt;br /&gt;
|-&lt;br /&gt;
|89  ||Live Floater Engineer     &lt;br /&gt;
|-&lt;br /&gt;
|90  ||Live Floater Medic        &lt;br /&gt;
|-&lt;br /&gt;
|91  ||Live Floater Navigator    &lt;br /&gt;
|-&lt;br /&gt;
|92  ||Live Floater Soldier      &lt;br /&gt;
|-&lt;br /&gt;
|93  ||Live Celatid Terrorist    &lt;br /&gt;
|-&lt;br /&gt;
|94  ||Live Silacoid Terrorist   &lt;br /&gt;
|-&lt;br /&gt;
|95  ||Live Chryssalid Terrorist &lt;br /&gt;
|-&lt;br /&gt;
|96  ||Live Reaper Terrorist     &lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;*NOTE&#039;&#039;&#039;: there are no entries for the Sectopod or Cyberdisc terrorists.  Also, the&lt;br /&gt;
three tank entries are not used by the game.  If you hack RESEARCH.DAT to open&lt;br /&gt;
these as research possibilities, the title of the research project will be &amp;quot;NOT USED.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
&lt;br /&gt;
Each record in RESEARCH.DAT consists of 22 bytes.  In what follows, the hex offset&lt;br /&gt;
is written in bold, followed by a description of the purpose of the byte(s).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;00-01&amp;lt;/b&amp;gt;: The first two bytes determine the amount of time it takes to perform&lt;br /&gt;
the research, written low-high (for example 12 34 refers to the hex number 3412).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;02-04&amp;lt;/b&amp;gt;: These three bytes determine the name of the research topic as it&lt;br /&gt;
appears on the Current Research screen in the game.&lt;br /&gt;
The table below shows how different&lt;br /&gt;
types of research are coded:&lt;br /&gt;
&lt;br /&gt;
{| {{stdDescTable}} width=&amp;quot;70%&amp;quot;&lt;br /&gt;
! 02 !! 03 !! 04 !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 00 || 00 || 00 || Laser Weapons&lt;br /&gt;
|-&lt;br /&gt;
| 31-3D || 00 || 00 || Alien Artifacts&lt;br /&gt;
|-&lt;br /&gt;
| 41-4B || 00 || 00 || Alien Autopsy&lt;br /&gt;
|-&lt;br /&gt;
| 50-58 || 00 || 00 || UFO Components&lt;br /&gt;
|-&lt;br /&gt;
| 00 || 01-0B || 01-07 || Live Alien&lt;br /&gt;
|-&lt;br /&gt;
| 00 || 00 || 01-1d || X-Com Craft and Armaments, Heavy Weapons Platforms, Base Facilities, Alien Research&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that, for live aliens, bytes &amp;lt;b&amp;gt;03&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;04&amp;lt;/b&amp;gt; determine the alien&#039;s species and rank,&lt;br /&gt;
respectively, with the same convention as in [[ASTORE.DAT]].  Also, for Alien Autopsy&lt;br /&gt;
researches, the second bit of byte &amp;lt;b&amp;gt;02&amp;lt;/b&amp;gt; determines the species.&lt;br /&gt;
&lt;br /&gt;
Also note that, in addition to determining the name of the research project&lt;br /&gt;
for the purposes of the Current Research control screen, these bytes also determine&lt;br /&gt;
what object, if any, needs to be on hand in order for the research to begin.&lt;br /&gt;
Namely, if either or bytes &amp;lt;b&amp;gt;02&amp;lt;/b&amp;gt; or &amp;lt;b&amp;gt;03&amp;lt;/b&amp;gt; are non-zero, the research requires that&lt;br /&gt;
the named object be in the base&#039;s stores in order for the research to be listed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;05&amp;lt;/b&amp;gt;: non-zero only for some live aliens.  It&#039;s meaning is uncertain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;06&amp;lt;/b&amp;gt;: with the exception of 0B which is unique to Laser Weapons research, indicates the category in the [[UFOpaedia]] into which the topic falls:&lt;br /&gt;
&lt;br /&gt;
 00 = X-Com Craft and Armament&lt;br /&gt;
 01 = Heavy Weapons Platforms&lt;br /&gt;
 02 = Weapons and Equipment&lt;br /&gt;
 03 = Alien Artifacts&lt;br /&gt;
 04 = Base Facilities&lt;br /&gt;
 05 = Alien Life Forms (corpses)&lt;br /&gt;
 06 = Alien Life Forms (live aliens) and Alien Research&lt;br /&gt;
 07 = UFO Components&lt;br /&gt;
 0B = Laser Weapons&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;07&amp;lt;/b&amp;gt;: determines the specific UFOpaedia entry, within each category, that&lt;br /&gt;
the research unlocks.  In the case of live aliens, this byte contains&lt;br /&gt;
their race.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;08&amp;lt;/b&amp;gt;: determines the number of points awarded when the research is completed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;09&amp;lt;/b&amp;gt;: seems to always be 00.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;0A&amp;lt;/b&amp;gt;: is a boolean flag indicating, when true, that the research has been&lt;br /&gt;
completed and cannot be repeated.  For research topics that can be repeated (e.g., research&lt;br /&gt;
on living aliens), this byte is always 00.  Manually setting this byte to 01, however,&lt;br /&gt;
does not in any way give the player credit for completing the research - it will not&lt;br /&gt;
be unlocked in the UFOpaedia, nor will production options be made available.  It&lt;br /&gt;
is simply to prevent a topic from appearing in the list of available research topics&lt;br /&gt;
once it has been completed.&lt;br /&gt;
&lt;br /&gt;
Bytes &amp;lt;b&amp;gt;0B-0D&amp;lt;/b&amp;gt; are 00.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;0E&amp;lt;/b&amp;gt;: a boolean value indicating whether or not the research topic&lt;br /&gt;
requires one or more prerequisites.  It is true when there is not a prerequisite.&lt;br /&gt;
&lt;br /&gt;
Bytes &amp;lt;b&amp;gt;0F-11&amp;lt;/b&amp;gt; are 00.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;12&amp;lt;/b&amp;gt;: a boolean flag indicating that the prerequisites have been&lt;br /&gt;
fulfilled.  It is true when either the prerequisites have been satisfied or there&lt;br /&gt;
are no prerequisites and false when there is a prerequisite which has not been met.&lt;br /&gt;
Changing this value is a way to get around prerequisite research topics.&lt;br /&gt;
&lt;br /&gt;
Bytes &amp;lt;b&amp;gt;13-15&amp;lt;/b&amp;gt; are 00.&lt;br /&gt;
&lt;br /&gt;
== Cheats and Hacks ==&lt;br /&gt;
&lt;br /&gt;
First, what you cannot do with RESARCH.DAT: there is no way to modify this file to instantly&lt;br /&gt;
get credit for completing research, open UFOpaedia entries, or unlock production capabilities.&lt;br /&gt;
&lt;br /&gt;
Things you can do, if you so choose:&lt;br /&gt;
&lt;br /&gt;
*Modify the time required to complete research (bytes &amp;lt;b&amp;gt;00-01&amp;lt;/b&amp;gt;).  Note that this is the initial time, not the time remaining on research you&#039;ve already started.  For that, see [[PROJECT.DAT]].&lt;br /&gt;
&lt;br /&gt;
*Modify the points you obtain by completing the research projects (byte &amp;lt;b&amp;gt;08&amp;lt;/b&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
*Make research projects available without completing their prerequisites (byte &amp;lt;b&amp;gt;12&amp;lt;/b&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
*Eliminate the need to possess an object (either artifact or live alien) before researching it. Warning: this one&#039;s a bit odd: change bytes &amp;lt;b&amp;gt;02-04&amp;lt;/b&amp;gt; to 00 00 11.  This will make &amp;quot;NOT USED&amp;quot; appear in the list of research topics (it is the name of the Laser Cannon Tank - a project not used by the game). Research &amp;quot;NOT USED&amp;quot;, and once it is completed, you will have access to the UFOpaedia entry access to any research that is lower in the research tree, and access to the relevant production capabilities.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
* [[FACIL.DAT]] - Information on facilities you can build&lt;br /&gt;
* [[PROJECT.DAT]] - Information on projects currently being researched at bases&lt;br /&gt;
* [[OBDATA.DAT]] - Statistics on items in the game&lt;br /&gt;
* [[UP.DAT]] - Stores information on the UFOpaedia entries&lt;br /&gt;
* [[Saved Game Files]]&lt;br /&gt;
[[Category:Game Files]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=PURCHASE.DAT&amp;diff=11343</id>
		<title>PURCHASE.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=PURCHASE.DAT&amp;diff=11343"/>
		<updated>2007-03-13T03:41:53Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: /* Entry Index */  whoops forgot to close the last table&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== General Notes ==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
There are 91 entries, each of which is 20 bytes long, for a total of 1,820 bytes long.  &lt;br /&gt;
&lt;br /&gt;
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&#039;t seem to use (UFO Construction, Alien Reproduction, and Alien Habitat.)&lt;br /&gt;
&lt;br /&gt;
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-&amp;gt;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. &lt;br /&gt;
&lt;br /&gt;
Values are presented according to offset (0 to 19) in &amp;lt;b&amp;gt;bold&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0:&#039;&#039;&#039; Item Category:&lt;br /&gt;
   0 General Item...basically, anything not Personnel or Crafts&lt;br /&gt;
   1 X-Com Craft&lt;br /&gt;
   2 Soldier&lt;br /&gt;
   3 Scientist&lt;br /&gt;
   4 Engineer&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1:&#039;&#039;&#039; Sort Order (or Index, [[#Notes on Sorting|see below]]): for General Items(Item Category=0), this value seems to control sort order on the Base Information-&amp;gt;Stores screen (only General Items appear there.)&lt;br /&gt;
   00-42 &#039;Human&#039; Items...all purchaseable equipment, all Craft weapons/ammo, all HWPs, Lasers,&lt;br /&gt;
         Motion Scanner, Medikit, and PsiAmp&lt;br /&gt;
   43-48 Not Used&lt;br /&gt;
   49-59 Alien Weapons/Ammo...Heavy Plasma through Alien Grenade&lt;br /&gt;
   60-61 E-115 &amp;amp; Mind Probe...Alien Non-Weapon items that can be picked up in Battlescape?&lt;br /&gt;
   62-64 Not Used&lt;br /&gt;
   65-75 Alien Corpses&lt;br /&gt;
   76-79 Not Used&lt;br /&gt;
   80-89 Alien Items...UFO Power Source through Alien Habitat&lt;br /&gt;
   90-92 Armor...Personal Armor, Power Suit, Flying Suit&lt;br /&gt;
   93-95 HWP Ammo...HWP Cannon Shells, HWP Rockets, HWP Fusion Bomb&lt;br /&gt;
For Personnel, this value is &#039;0&#039;, while for Crafts, it indicates Craft Type:&lt;br /&gt;
   0 Skyranger&lt;br /&gt;
   1 Lightning&lt;br /&gt;
   2 Avenger&lt;br /&gt;
   3 Interceptor&lt;br /&gt;
   4 Firestorm&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2-3:&#039;&#039;&#039; ?? These two bytes are set to [E8 03] (=1000) for all entries except manufactured Crafts (Firestorm, Lightning, Avenger) ([[#Special Note|See Below]])&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4-5:&#039;&#039;&#039; ?? These two bytes are set to [00 00] (0) for all entries ([[#Special Note|See Below]])&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;6-8:&#039;&#039;&#039; Item Cost if Purchaseable. 24 bits = max value ~16.7mil, ~8.4mil if a signed integer.  Curiously, starting with entry 56 (Heavy Plasma Clip), set to [E8 03 00] (=1000) for the remainder of entries (none of which is normally purchaseable.) Not sure why, or why it didn&#039;t start with entry 55 (Heavy Plasma), the first &#039;pure&#039; alien item in the file. Needs more research...&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;9:&#039;&#039;&#039; Set to [00] (0) for all entries ([[#Special Note|See Below]])&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10-12:&#039;&#039;&#039; Item Selling Price. 24 bits = max value ~16.7mil, ~8.4mil if a signed integer&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;13:&#039;&#039;&#039; Set to [00] (0) for all entries ([[#Special Note|See Below]])&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:&#039;&#039;&#039; Transfer time for new purchases, in hours. All items have this value, even manufacture-only and alien items, and it is usually a multiple of 24 (=1 day):&lt;br /&gt;
   96 for most Crafts, HWPs, and Craft Cannon Rounds&lt;br /&gt;
   72 for Skyranger and Personnel hires&lt;br /&gt;
   48 for Craft Weapons and Ammo (ex. Cannon Rounds), HWP Ammo, and non-Battlescape Alien Items&lt;br /&gt;
   32 for Alien Corpses and X-Com Armor&lt;br /&gt;
   24 for everything else&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;15-17:&#039;&#039;&#039; Set to [00 00 00] (0) for all entries ([[#Special Note|See Below]])&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;18:&#039;&#039;&#039; Purchaseability flag: 1 for everything that you can buy on the Purchase/Recruit screen, 0 for everything else&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;19:&#039;&#039;&#039; Set to [00] (0) for all entries&lt;br /&gt;
&lt;br /&gt;
===Special Note===&lt;br /&gt;
Alot of these 0 values can be explained by using 4 byte integers (longs), since the game stores these values in [http://en.wikipedia.org/wiki/Little_endian little-endian] format. Also for values such as Item Cost and Item Selling Price, 24-bit integers are not common, however 32-bit integers (longs) are more common and are used in the game, the your current funds in [[LIGLOB.DAT]] for example is a long integer. It also makes sense that the prices would be in the same data type to help with calculations. &lt;br /&gt;
&lt;br /&gt;
With offset 2, it also explains why offsets 3 and 4 are always 0, since the only values used are 0 and 1000, it would always set the higher bytes to 0. The last offset (19) is probably also the high byte for the Purchasability flag, and again would always be 0.&lt;br /&gt;
&lt;br /&gt;
All of this is speculation (read: I&#039;m too lazy to test this) but would make this file&#039;s values completely known. Only the Purchaseability and &#039;Manufactured&#039; craft flags the only thing worth looking into more. --&#039;&#039;[[User:Pi Masta|Pi Masta]] 15:14, 8 February 2007 (PST)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Entry Index ==&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
{| {{StdDescTable}} &lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
! # !! Item&lt;br /&gt;
|- &lt;br /&gt;
|  0||Soldier             &lt;br /&gt;
|-&lt;br /&gt;
|  1||Scientist           &lt;br /&gt;
|-&lt;br /&gt;
|  2||Engineer            &lt;br /&gt;
|-&lt;br /&gt;
|  3||Skyranger           &lt;br /&gt;
|-&lt;br /&gt;
|  4||Lightning           &lt;br /&gt;
|-&lt;br /&gt;
|  5||Avenger             &lt;br /&gt;
|-&lt;br /&gt;
|  6||Interceptor         &lt;br /&gt;
|-&lt;br /&gt;
|  7||Firestorm           &lt;br /&gt;
|-&lt;br /&gt;
|  8||Stingray Launcher   &lt;br /&gt;
|-&lt;br /&gt;
|  9||Avalanche Launcher  &lt;br /&gt;
|-&lt;br /&gt;
| 10||Cannon              &lt;br /&gt;
|-&lt;br /&gt;
| 11||Fusion Ball Launcher&lt;br /&gt;
|-&lt;br /&gt;
| 12||Laser Cannon        &lt;br /&gt;
|-&lt;br /&gt;
| 13||Plasma Beam         &lt;br /&gt;
|-&lt;br /&gt;
| 14||Stingray Missile    &lt;br /&gt;
|-&lt;br /&gt;
| 15||Avalanche Missile   &lt;br /&gt;
|-&lt;br /&gt;
| 16||Cannon Rounds[x50]  &lt;br /&gt;
|-&lt;br /&gt;
| 17||Fusion Ball         &lt;br /&gt;
|-&lt;br /&gt;
| 18||Tank/Cannon         &lt;br /&gt;
|-&lt;br /&gt;
| 19||HWP Cannon Shells   &lt;br /&gt;
|-&lt;br /&gt;
| 20||Tank/Rocket         &lt;br /&gt;
|-&lt;br /&gt;
| 21||HWP Rockets         &lt;br /&gt;
|-&lt;br /&gt;
| 22||Tank/Laser Cannon   &lt;br /&gt;
|-&lt;br /&gt;
| 23||Hovertank/Plasma    &lt;br /&gt;
|-&lt;br /&gt;
| 24||Hovertank/Launcher  &lt;br /&gt;
|-&lt;br /&gt;
| 25||HWP Fusion Bomb     &lt;br /&gt;
|-&lt;br /&gt;
| 26||Pistol              &lt;br /&gt;
|-&lt;br /&gt;
| 27||Pistol Clip         &lt;br /&gt;
|-&lt;br /&gt;
| 28||Rifle               &lt;br /&gt;
|-&lt;br /&gt;
| 29||Rifle Clip          &lt;br /&gt;
|}&lt;br /&gt;
|&lt;br /&gt;
{| {{StdDescTable}} &lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
! # !! Item&lt;br /&gt;
|-&lt;br /&gt;
| 30||Heavy Cannon        &lt;br /&gt;
|-&lt;br /&gt;
| 31||HC-AP Ammo          &lt;br /&gt;
|-&lt;br /&gt;
| 32||HC-HE Ammo          &lt;br /&gt;
|-&lt;br /&gt;
| 33||HC-I Ammo           &lt;br /&gt;
|-&lt;br /&gt;
| 34||Auto-Cannon         &lt;br /&gt;
|-&lt;br /&gt;
| 35||AC-AP Ammo          &lt;br /&gt;
|-&lt;br /&gt;
| 36||AC-HE Ammo          &lt;br /&gt;
|-&lt;br /&gt;
| 37||AC-I Ammo           &lt;br /&gt;
|-&lt;br /&gt;
| 38||Rocket Launcher     &lt;br /&gt;
|-&lt;br /&gt;
| 39||Small Rocket        &lt;br /&gt;
|-&lt;br /&gt;
| 40||Large Rocket        &lt;br /&gt;
|-&lt;br /&gt;
| 41||Incindiary Rocket   &lt;br /&gt;
|-&lt;br /&gt;
| 42||Laser Pistol        &lt;br /&gt;
|-&lt;br /&gt;
| 43||Laser Rifle         &lt;br /&gt;
|-&lt;br /&gt;
| 44||Heavy Laser         &lt;br /&gt;
|-&lt;br /&gt;
| 45||Grenade             &lt;br /&gt;
|-&lt;br /&gt;
| 46||Smoke Grenade       &lt;br /&gt;
|-&lt;br /&gt;
| 47||Proximity Grenade   &lt;br /&gt;
|-&lt;br /&gt;
| 48||High Explosive      &lt;br /&gt;
|-&lt;br /&gt;
| 49||Motion Scanner      &lt;br /&gt;
|-&lt;br /&gt;
| 50||Medi-Kit            &lt;br /&gt;
|-&lt;br /&gt;
| 51||Psi-Amp             &lt;br /&gt;
|-&lt;br /&gt;
| 52||Stun Rod            &lt;br /&gt;
|-&lt;br /&gt;
| 53||Electro-flare       &lt;br /&gt;
|-&lt;br /&gt;
| 54||Elerium-115         &lt;br /&gt;
|-&lt;br /&gt;
| 55||Heavy Plasma        &lt;br /&gt;
|-&lt;br /&gt;
| 56||Heavy Plasma Clip   &lt;br /&gt;
|-&lt;br /&gt;
| 57||Plasma Rifle        &lt;br /&gt;
|-&lt;br /&gt;
| 58||Plasma Rifle Clip   &lt;br /&gt;
|-&lt;br /&gt;
| 59||Plasma Pistol       &lt;br /&gt;
|}&lt;br /&gt;
|&lt;br /&gt;
{| {{StdDescTable}} &lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
! # !! Item&lt;br /&gt;
|-&lt;br /&gt;
| 60||Plasma Pistol Clip&lt;br /&gt;
|-&lt;br /&gt;
| 61||Blaster Launcher&lt;br /&gt;
|-&lt;br /&gt;
| 62||Blaster Bomb&lt;br /&gt;
|-&lt;br /&gt;
| 63||Small Launcher&lt;br /&gt;
|-&lt;br /&gt;
| 64||Stun Bomb&lt;br /&gt;
|-&lt;br /&gt;
| 65||Alien Grenade&lt;br /&gt;
|-&lt;br /&gt;
| 66||Mind Probe&lt;br /&gt;
|-&lt;br /&gt;
| 67||Sectoid Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 68||Snakeman Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 69||Ethereal Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 70||Muton Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 71||Floater Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 72||Celatid Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 73||Silacoid Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 74||Chryssalid Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 75||Reaper Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 76||Sectopod Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 77||Cyberdisk Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 78||UFO Power Source&lt;br /&gt;
|-&lt;br /&gt;
| 79||UFO Navigation&lt;br /&gt;
|-&lt;br /&gt;
| 80||UFO Construction&lt;br /&gt;
|-&lt;br /&gt;
| 81||Alien Food&lt;br /&gt;
|-&lt;br /&gt;
| 82||Alien Reproduction&lt;br /&gt;
|-&lt;br /&gt;
| 83||Alien Entertainment&lt;br /&gt;
|-&lt;br /&gt;
| 84||Alien Surgery&lt;br /&gt;
|-&lt;br /&gt;
| 85||Examination Room&lt;br /&gt;
|-&lt;br /&gt;
| 86||Alien Alloys&lt;br /&gt;
|-&lt;br /&gt;
| 87||Alien Habitat&lt;br /&gt;
|-&lt;br /&gt;
| 88||Personal Armour&lt;br /&gt;
|-&lt;br /&gt;
| 89||Power Suit&lt;br /&gt;
|}&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
{| {{StdDescTable}} &lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
! # !! Item&lt;br /&gt;
|-&lt;br /&gt;
| 90||Flying Suit&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes on Sorting ==&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; Based on some hacking of [[GEOSCAPE.EXE]], the &#039;sort&#039; value appears to be an index to arrays. See [[User:Pi Masta#Base Items store space|User:Pi Masta]] for more details.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1)&#039;&#039;&#039; 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 &#039;Sort Order&#039; (offset 1) value as well, but are displayed as Fusion Ball Launcher, Laser Cannon, Plasma Beam on the screens)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2)&#039;&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3)&#039;&#039;&#039; 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)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4)&#039;&#039;&#039; Finally, on the Base Information-&amp;gt;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.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
* [[BASE.DAT]] - Items bases have in stores&lt;br /&gt;
* [[OBDATA.DAT]] - Stats on most of the items listed here&lt;br /&gt;
* [[TRANSFER.DAT]] - Items being transfered to bases including purchased items&lt;br /&gt;
* [[Saved Game Files]]&lt;br /&gt;
[[Category:Game Files]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
	<entry>
		<id>https://temp.ufopaedia.org/index.php?title=PURCHASE.DAT&amp;diff=11342</id>
		<title>PURCHASE.DAT</title>
		<link rel="alternate" type="text/html" href="https://temp.ufopaedia.org/index.php?title=PURCHASE.DAT&amp;diff=11342"/>
		<updated>2007-03-13T03:40:57Z</updated>

		<summary type="html">&lt;p&gt;Pi Masta: /* Entry Index */  reformatted table per EC&amp;#039;s suggestions, probably other tables out there I need to fix as well&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== General Notes ==&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
There are 91 entries, each of which is 20 bytes long, for a total of 1,820 bytes long.  &lt;br /&gt;
&lt;br /&gt;
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&#039;t seem to use (UFO Construction, Alien Reproduction, and Alien Habitat.)&lt;br /&gt;
&lt;br /&gt;
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-&amp;gt;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. &lt;br /&gt;
&lt;br /&gt;
Values are presented according to offset (0 to 19) in &amp;lt;b&amp;gt;bold&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;0:&#039;&#039;&#039; Item Category:&lt;br /&gt;
   0 General Item...basically, anything not Personnel or Crafts&lt;br /&gt;
   1 X-Com Craft&lt;br /&gt;
   2 Soldier&lt;br /&gt;
   3 Scientist&lt;br /&gt;
   4 Engineer&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1:&#039;&#039;&#039; Sort Order (or Index, [[#Notes on Sorting|see below]]): for General Items(Item Category=0), this value seems to control sort order on the Base Information-&amp;gt;Stores screen (only General Items appear there.)&lt;br /&gt;
   00-42 &#039;Human&#039; Items...all purchaseable equipment, all Craft weapons/ammo, all HWPs, Lasers,&lt;br /&gt;
         Motion Scanner, Medikit, and PsiAmp&lt;br /&gt;
   43-48 Not Used&lt;br /&gt;
   49-59 Alien Weapons/Ammo...Heavy Plasma through Alien Grenade&lt;br /&gt;
   60-61 E-115 &amp;amp; Mind Probe...Alien Non-Weapon items that can be picked up in Battlescape?&lt;br /&gt;
   62-64 Not Used&lt;br /&gt;
   65-75 Alien Corpses&lt;br /&gt;
   76-79 Not Used&lt;br /&gt;
   80-89 Alien Items...UFO Power Source through Alien Habitat&lt;br /&gt;
   90-92 Armor...Personal Armor, Power Suit, Flying Suit&lt;br /&gt;
   93-95 HWP Ammo...HWP Cannon Shells, HWP Rockets, HWP Fusion Bomb&lt;br /&gt;
For Personnel, this value is &#039;0&#039;, while for Crafts, it indicates Craft Type:&lt;br /&gt;
   0 Skyranger&lt;br /&gt;
   1 Lightning&lt;br /&gt;
   2 Avenger&lt;br /&gt;
   3 Interceptor&lt;br /&gt;
   4 Firestorm&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2-3:&#039;&#039;&#039; ?? These two bytes are set to [E8 03] (=1000) for all entries except manufactured Crafts (Firestorm, Lightning, Avenger) ([[#Special Note|See Below]])&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4-5:&#039;&#039;&#039; ?? These two bytes are set to [00 00] (0) for all entries ([[#Special Note|See Below]])&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;6-8:&#039;&#039;&#039; Item Cost if Purchaseable. 24 bits = max value ~16.7mil, ~8.4mil if a signed integer.  Curiously, starting with entry 56 (Heavy Plasma Clip), set to [E8 03 00] (=1000) for the remainder of entries (none of which is normally purchaseable.) Not sure why, or why it didn&#039;t start with entry 55 (Heavy Plasma), the first &#039;pure&#039; alien item in the file. Needs more research...&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;9:&#039;&#039;&#039; Set to [00] (0) for all entries ([[#Special Note|See Below]])&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;10-12:&#039;&#039;&#039; Item Selling Price. 24 bits = max value ~16.7mil, ~8.4mil if a signed integer&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;13:&#039;&#039;&#039; Set to [00] (0) for all entries ([[#Special Note|See Below]])&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;14:&#039;&#039;&#039; Transfer time for new purchases, in hours. All items have this value, even manufacture-only and alien items, and it is usually a multiple of 24 (=1 day):&lt;br /&gt;
   96 for most Crafts, HWPs, and Craft Cannon Rounds&lt;br /&gt;
   72 for Skyranger and Personnel hires&lt;br /&gt;
   48 for Craft Weapons and Ammo (ex. Cannon Rounds), HWP Ammo, and non-Battlescape Alien Items&lt;br /&gt;
   32 for Alien Corpses and X-Com Armor&lt;br /&gt;
   24 for everything else&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;15-17:&#039;&#039;&#039; Set to [00 00 00] (0) for all entries ([[#Special Note|See Below]])&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;18:&#039;&#039;&#039; Purchaseability flag: 1 for everything that you can buy on the Purchase/Recruit screen, 0 for everything else&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;19:&#039;&#039;&#039; Set to [00] (0) for all entries&lt;br /&gt;
&lt;br /&gt;
===Special Note===&lt;br /&gt;
Alot of these 0 values can be explained by using 4 byte integers (longs), since the game stores these values in [http://en.wikipedia.org/wiki/Little_endian little-endian] format. Also for values such as Item Cost and Item Selling Price, 24-bit integers are not common, however 32-bit integers (longs) are more common and are used in the game, the your current funds in [[LIGLOB.DAT]] for example is a long integer. It also makes sense that the prices would be in the same data type to help with calculations. &lt;br /&gt;
&lt;br /&gt;
With offset 2, it also explains why offsets 3 and 4 are always 0, since the only values used are 0 and 1000, it would always set the higher bytes to 0. The last offset (19) is probably also the high byte for the Purchasability flag, and again would always be 0.&lt;br /&gt;
&lt;br /&gt;
All of this is speculation (read: I&#039;m too lazy to test this) but would make this file&#039;s values completely known. Only the Purchaseability and &#039;Manufactured&#039; craft flags the only thing worth looking into more. --&#039;&#039;[[User:Pi Masta|Pi Masta]] 15:14, 8 February 2007 (PST)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Entry Index ==&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
{| {{StdDescTable}} &lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
! # !! Item&lt;br /&gt;
|- &lt;br /&gt;
|  0||Soldier             &lt;br /&gt;
|-&lt;br /&gt;
|  1||Scientist           &lt;br /&gt;
|-&lt;br /&gt;
|  2||Engineer            &lt;br /&gt;
|-&lt;br /&gt;
|  3||Skyranger           &lt;br /&gt;
|-&lt;br /&gt;
|  4||Lightning           &lt;br /&gt;
|-&lt;br /&gt;
|  5||Avenger             &lt;br /&gt;
|-&lt;br /&gt;
|  6||Interceptor         &lt;br /&gt;
|-&lt;br /&gt;
|  7||Firestorm           &lt;br /&gt;
|-&lt;br /&gt;
|  8||Stingray Launcher   &lt;br /&gt;
|-&lt;br /&gt;
|  9||Avalanche Launcher  &lt;br /&gt;
|-&lt;br /&gt;
| 10||Cannon              &lt;br /&gt;
|-&lt;br /&gt;
| 11||Fusion Ball Launcher&lt;br /&gt;
|-&lt;br /&gt;
| 12||Laser Cannon        &lt;br /&gt;
|-&lt;br /&gt;
| 13||Plasma Beam         &lt;br /&gt;
|-&lt;br /&gt;
| 14||Stingray Missile    &lt;br /&gt;
|-&lt;br /&gt;
| 15||Avalanche Missile   &lt;br /&gt;
|-&lt;br /&gt;
| 16||Cannon Rounds[x50]  &lt;br /&gt;
|-&lt;br /&gt;
| 17||Fusion Ball         &lt;br /&gt;
|-&lt;br /&gt;
| 18||Tank/Cannon         &lt;br /&gt;
|-&lt;br /&gt;
| 19||HWP Cannon Shells   &lt;br /&gt;
|-&lt;br /&gt;
| 20||Tank/Rocket         &lt;br /&gt;
|-&lt;br /&gt;
| 21||HWP Rockets         &lt;br /&gt;
|-&lt;br /&gt;
| 22||Tank/Laser Cannon   &lt;br /&gt;
|-&lt;br /&gt;
| 23||Hovertank/Plasma    &lt;br /&gt;
|-&lt;br /&gt;
| 24||Hovertank/Launcher  &lt;br /&gt;
|-&lt;br /&gt;
| 25||HWP Fusion Bomb     &lt;br /&gt;
|-&lt;br /&gt;
| 26||Pistol              &lt;br /&gt;
|-&lt;br /&gt;
| 27||Pistol Clip         &lt;br /&gt;
|-&lt;br /&gt;
| 28||Rifle               &lt;br /&gt;
|-&lt;br /&gt;
| 29||Rifle Clip          &lt;br /&gt;
|}&lt;br /&gt;
|&lt;br /&gt;
{| {{StdDescTable}} &lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
! # !! Item&lt;br /&gt;
|-&lt;br /&gt;
| 30||Heavy Cannon        &lt;br /&gt;
|-&lt;br /&gt;
| 31||HC-AP Ammo          &lt;br /&gt;
|-&lt;br /&gt;
| 32||HC-HE Ammo          &lt;br /&gt;
|-&lt;br /&gt;
| 33||HC-I Ammo           &lt;br /&gt;
|-&lt;br /&gt;
| 34||Auto-Cannon         &lt;br /&gt;
|-&lt;br /&gt;
| 35||AC-AP Ammo          &lt;br /&gt;
|-&lt;br /&gt;
| 36||AC-HE Ammo          &lt;br /&gt;
|-&lt;br /&gt;
| 37||AC-I Ammo           &lt;br /&gt;
|-&lt;br /&gt;
| 38||Rocket Launcher     &lt;br /&gt;
|-&lt;br /&gt;
| 39||Small Rocket        &lt;br /&gt;
|-&lt;br /&gt;
| 40||Large Rocket        &lt;br /&gt;
|-&lt;br /&gt;
| 41||Incindiary Rocket   &lt;br /&gt;
|-&lt;br /&gt;
| 42||Laser Pistol        &lt;br /&gt;
|-&lt;br /&gt;
| 43||Laser Rifle         &lt;br /&gt;
|-&lt;br /&gt;
| 44||Heavy Laser         &lt;br /&gt;
|-&lt;br /&gt;
| 45||Grenade             &lt;br /&gt;
|-&lt;br /&gt;
| 46||Smoke Grenade       &lt;br /&gt;
|-&lt;br /&gt;
| 47||Proximity Grenade   &lt;br /&gt;
|-&lt;br /&gt;
| 48||High Explosive      &lt;br /&gt;
|-&lt;br /&gt;
| 49||Motion Scanner      &lt;br /&gt;
|-&lt;br /&gt;
| 50||Medi-Kit            &lt;br /&gt;
|-&lt;br /&gt;
| 51||Psi-Amp             &lt;br /&gt;
|-&lt;br /&gt;
| 52||Stun Rod            &lt;br /&gt;
|-&lt;br /&gt;
| 53||Electro-flare       &lt;br /&gt;
|-&lt;br /&gt;
| 54||Elerium-115         &lt;br /&gt;
|-&lt;br /&gt;
| 55||Heavy Plasma        &lt;br /&gt;
|-&lt;br /&gt;
| 56||Heavy Plasma Clip   &lt;br /&gt;
|-&lt;br /&gt;
| 57||Plasma Rifle        &lt;br /&gt;
|-&lt;br /&gt;
| 58||Plasma Rifle Clip   &lt;br /&gt;
|-&lt;br /&gt;
| 59||Plasma Pistol       &lt;br /&gt;
|}&lt;br /&gt;
|&lt;br /&gt;
{| {{StdDescTable}} &lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
! # !! Item&lt;br /&gt;
|-&lt;br /&gt;
| 60||Plasma Pistol Clip&lt;br /&gt;
|-&lt;br /&gt;
| 61||Blaster Launcher&lt;br /&gt;
|-&lt;br /&gt;
| 62||Blaster Bomb&lt;br /&gt;
|-&lt;br /&gt;
| 63||Small Launcher&lt;br /&gt;
|-&lt;br /&gt;
| 64||Stun Bomb&lt;br /&gt;
|-&lt;br /&gt;
| 65||Alien Grenade&lt;br /&gt;
|-&lt;br /&gt;
| 66||Mind Probe&lt;br /&gt;
|-&lt;br /&gt;
| 67||Sectoid Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 68||Snakeman Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 69||Ethereal Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 70||Muton Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 71||Floater Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 72||Celatid Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 73||Silacoid Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 74||Chryssalid Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 75||Reaper Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 76||Sectopod Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 77||Cyberdisk Corpse&lt;br /&gt;
|-&lt;br /&gt;
| 78||UFO Power Source&lt;br /&gt;
|-&lt;br /&gt;
| 79||UFO Navigation&lt;br /&gt;
|-&lt;br /&gt;
| 80||UFO Construction&lt;br /&gt;
|-&lt;br /&gt;
| 81||Alien Food&lt;br /&gt;
|-&lt;br /&gt;
| 82||Alien Reproduction&lt;br /&gt;
|-&lt;br /&gt;
| 83||Alien Entertainment&lt;br /&gt;
|-&lt;br /&gt;
| 84||Alien Surgery&lt;br /&gt;
|-&lt;br /&gt;
| 85||Examination Room&lt;br /&gt;
|-&lt;br /&gt;
| 86||Alien Alloys&lt;br /&gt;
|-&lt;br /&gt;
| 87||Alien Habitat&lt;br /&gt;
|-&lt;br /&gt;
| 88||Personal Armour&lt;br /&gt;
|-&lt;br /&gt;
| 89||Power Suit&lt;br /&gt;
|}&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
{| {{StdDescTable}} &lt;br /&gt;
|- {{StdDescTable_Heading}}&lt;br /&gt;
! # !! Item&lt;br /&gt;
|-&lt;br /&gt;
| 90||Flying Suit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes on Sorting ==&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; Based on some hacking of [[GEOSCAPE.EXE]], the &#039;sort&#039; value appears to be an index to arrays. See [[User:Pi Masta#Base Items store space|User:Pi Masta]] for more details.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1)&#039;&#039;&#039; 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 &#039;Sort Order&#039; (offset 1) value as well, but are displayed as Fusion Ball Launcher, Laser Cannon, Plasma Beam on the screens)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;2)&#039;&#039;&#039; 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.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;3)&#039;&#039;&#039; 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)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;4)&#039;&#039;&#039; Finally, on the Base Information-&amp;gt;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.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
* [[BASE.DAT]] - Items bases have in stores&lt;br /&gt;
* [[OBDATA.DAT]] - Stats on most of the items listed here&lt;br /&gt;
* [[TRANSFER.DAT]] - Items being transfered to bases including purchased items&lt;br /&gt;
* [[Saved Game Files]]&lt;br /&gt;
[[Category:Game Files]]&lt;/div&gt;</summary>
		<author><name>Pi Masta</name></author>
	</entry>
</feed>