Difference between revisions of "GEODATA.DAT"

From UFOpaedia
Jump to navigation Jump to search
m
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Created in the MissDat folder when you start a battlescape mission, also copied to the savegame folder of choice when saving mid-mission. Primarily used to generate a new map at the beginning of combat and to determine which [[TERRAIN|MCD files]] to load.
+
Created in the MissDat folder when you start a battlescape mission, also copied to the savegame folder of choice when saving mid-mission. Primarily used for [[Battlescape Map Generation]] and to determine which [[MCD|MCD files]] to load.
  
 
File is 92 bytes long for both UFO and TFTD. Values are presented according to byte offset (0 to 91) followed by the equivalent hex offset (00 to 5B) in <b>bold</b>.
 
File is 92 bytes long for both UFO and TFTD. Values are presented according to byte offset (0 to 91) followed by the equivalent hex offset (00 to 5B) in <b>bold</b>.
Line 5: Line 5:
 
= Structure =
 
= Structure =
  
<b>0-1/00-01:</b> Amount of map modules to place vertically (Y dimension of the map / 10).
+
{| class="wikitable"
 +
|-
 +
!Offset<br>(Decimal)
 +
!Offset<br>(Hex)
 +
!Usage
 +
|- valign="top"
 +
!<span id="0-1"></span>0-1
 +
!<span id="0x00-0x01"></span>0x00-0x01
 +
|Amount of map modules to place vertically (Y dimension of the map / 10).
 +
|- valign="top"
 +
!<span id="2-3"></span>2-3
 +
!<span id="0x02-0x03"></span>0x02-0x03
 +
|Amount of map modules to place horizontally (X dimension of the map / 10).
 +
|- valign="top"
 +
!<span id="4-5"></span>4-5
 +
!<span id="0x04-0x05"></span>0x04-0x05
 +
|Z dimension of the map.
 +
|- valign="top"
 +
!<span id="6-7"></span>6-7
 +
!<span id="0x06-0x07"></span>0x06-0x07
 +
|X-COM craft type (ignore this if a base mission):
  
<b>2-3/02-03:</b> Amount of map modules to place horizontally (X dimension of the map / 10).
+
  <b>UFO</b>                                <b>TFTD</b>
 +
  0: SkyRanger                        0: Triton
 +
  1: Lightning                        1: Hammerhead
 +
  2: Avenger                          2: Leviathan
 +
  3: Interceptor *1                  3: Barracuda  *2
 +
  4: Firestorm  *1                  4: Manta      *2
 +
  5: Small Scout                      5: Survey Ship
 +
  6: Medium Scout                    6: Escort
 +
  7: Large Scout                      7: Cruiser
 +
  8: Harvestor                        8: Heavy Cruiser
 +
  9: Abductor                        9: Hunter
 +
10: Terror Ship                    10: Battleship
 +
11: Battleship                      11: Dreadnought
 +
12: Supply Ship                    12: Fleet Supply Cruiser
  
<b>4-5/04-05:</b> Z dimension of the map.
+
<i>*1 Requires maps "Interc" and "Fires". These don't exist normally, though XcomUtil adds versions similar to the SkyRanger and Lightning.</i>
  
<b>6-7/06-07:</b> X-Com craft type (ignore this if a base mission):
+
<i>*2 Requires maps "Barracud" and "Manta". These don't exist normally, though XcomUtil adds versions similar to the Triton and Hammerhead </i>
  0 - SkyRanger
+
|- valign="top"
  1 - Lightning
+
!<span id="8-9"></span>8-9
  2 - Avenger
+
!<span id="0x08-0x09"></span>0x08-0x09
  3 - Interceptor *
+
|Alien craft type (ignore this if not a UFO mission). Uses the above values.
  4 - Firestorm *     
+
|- valign="top"
  5 - Small Scout
+
!<span id="10-11"></span>10-11
  6 - Medium Scout
+
!<span id="0x0A-0x0B"></span>0x0A-0x0B
  7 - Large Scout
+
|Terrain type. Typically depends on the mission [[Missions|type]] and [[WORLD.DAT|location]].
  8 - Harvestor
 
  9 - Abductor
 
10 - Terror Ship
 
11 - Battleship
 
12 - Supply Ship
 
  
<i>* Requires maps "Interc" and "Fires". These don't exist normally, though XcomUtil adds versions similar to the SkyRanger and Lightning.</i>
+
  <b>UFO</b>                                 <b>TFTD</b>
 
+
  0: Jungle                           0: Seabed
<b>8-9/08-09:</b> Alien craft type (ignore this if not a UFO mission). Uses the above values.
+
  1: Farm                             1: Pipes
 
+
  2: Forest                           2: Crashed Plane
<b>10-11/0A-0B:</b> Terrain type:
+
  3: X-COM Base                       3: Atlantis
 
+
  4: Alien Base                       4: Mu
<b>UFO</b>                                 <b>TFTD</b>
+
  5: Urban                           5: Sunken Galleon
0: Jungle                           0: Seabed Trash
+
  6: Desert                           6: Sunken Liner
1: Farm                             1: Pipes
+
  7: Mountains                       7: Volcanic
2: Forest                           2: Crashed Plane
+
  8: Polar                           8: Coral
3: X-Com Base                       3: Atlantis
+
  9: Mars                             9: Artefact Site Stage 1
4: Alien Base                       4: Mu
 
5: Urban                             5: Sunken Galleon
 
6: Desert                           6: Sunken Liner
 
7: Mountains                         7: Volcanic
 
8: Polar                             8: Coral
 
9: Mars                             9: Artefact Site Stage 1
 
 
                                     10: Artefact Site Stage 2
 
                                     10: Artefact Site Stage 2
                                     11: Cargo Ship Stage 1 & 2 (Check [[MISDATA.DAT]][20-21] for which)
+
                                     11: Cargo Ship Stage 1 & 2 (Check [[MISDATA.DAT#20-21|MISDATA[20-21]]]
                                     12: Port Attack
+
                                     12: Port Attack                       for which)
 
                                     13: Island Attack
 
                                     13: Island Attack
 
                                     14: Colony Stage 2
 
                                     14: Colony Stage 2
Line 51: Line 73:
 
                                     16: T'leth Stage 2
 
                                     16: T'leth Stage 2
 
                                     17: T'leth Stage 3
 
                                     17: T'leth Stage 3
                                     18: X-Com Base
+
                                     18: X-COM Base
 
                                     19: Passenger Ship Stage 1
 
                                     19: Passenger Ship Stage 1
 
                                     20: Passenger Ship Stage 2
 
                                     20: Passenger Ship Stage 2
 
                                     21: Colony Stage 1
 
                                     21: Colony Stage 1
 +
|- valign="top"
 +
!<span id="12-47"></span>12-47
 +
!<span id="0x0C-0x2F"></span>0x0C-0x2F
 +
|A byte list of length [[#0-1|[0-1]]]*[[#2-3|[2-3]]], which details the [[MAPS_Terrain|map modules]] used to [[Battlescape Map Generation|build the battlescape]]. Reads in order from west to east, north to south. For example, in the case of the largest map (60x60), this list would be 36 bytes (offsets 12 through to 47).
  
<b>12-<i>XX</i>/0C-<i>XX</i>:</b> The next [0-1]*[2-3] bytes list the [[MAPS_Terrain|map modules]] used to build the battlescape. Reads in order from west to east, north to south. For example, in the case of the largest map (50x50), this list would be 25 bytes.
+
Values of 253/254/255 mean that the a module does not need to be placed in that area because a large 2x2 module (eg. An X-COM hangar) has already covered it.
 
+
|- valign="top"
<i>I've often observed the Tactical engine partly generating it's own maps, so there must be a way to have some of these values ignored. Sometimes the values 254 and 255 turn up in the list (last time I saw this was in an alien base), so likely they have something to do with it.
+
!<span id="48-83"></span>48-83
 
+
!<span id="0x30-0x53"></span>0x30-0x53
- [[User:Bomb Bloke|Bomb Bloke]] 01:05, 6 February 2008 (PST)</i>
+
|A byte list of length [[#0-1|[0-1]]]*[[#2-3|[2-3]]], one for each map module to be loaded by the game during [[Battlescape Map Generation]] (as detailed at [[#12-47|[12-47]]]). A byte here will be set to 1 if the [[ROUTES|RMP file]] for that module is to be loaded, or 0 if it is not. This is determined by whether X-COM/alien craft exist within the modules - those modules with craft will not have their own RMP files loaded (instead, the craft route nodes will be added to the [[ROUTES.DAT|combined table]] once all other nodes are in there).
 
 
...
 
 
 
<b>37-83/25-53:</b> These values are currently unknown, but they all seem to flag as either 0 or 1. Probably one of them determines whether UFOs landed or were shot down.
 
  
...
+
In the case of the largest maps (60x60), this list will be 36 bytes long (offsets 48 through to 83).
 
+
|- valign="top"
<b>84/54:</b> Amount of craft to be placed on the map.
+
!<span id="84"></span>84
 +
!<span id="0x54"></span>0x54
 +
|Amount of craft to be placed on the map.
 
  0: None.
 
  0: None.
  1: X-Com craft only.
+
  1: X-COM craft only.
  2: X-Com and alien craft.
+
  2: X-COM and alien craft.
 
+
|- valign="top"
<b>85/55:</b> Mirror of [6-7] (X-Com craft type).
+
!<span id="85"></span>85
 
+
!<span id="0x55"></span>0x55
<b>86/56:</b> Y location of X-Com craft on map. Usually a multiple of 10.
+
|Mirror of [[#6-7|[6-7]]] (X-COM craft type).
 
+
|- valign="top"
<b>87/57:</b> X location of X-Com craft on map. Usually a multiple of 10.
+
!<span id="86"></span>86
 
+
!<span id="0x56"></span>0x56
<b>88/58:</b> Mirror of [8-9] (alien craft type).
+
|Y location of X-COM craft on map. Usually a multiple of 10.
 
+
|- valign="top"
<b>89/59:</b> Y location of alien craft on map. Usually a multiple of 10.
+
!<span id="87"></span>87
 
+
!<span id="0x57"></span>0x57
<b>90/5A:</b> X location of alien craft on map. Usually a multiple of 10.
+
|X location of X-COM craft on map. Usually a multiple of 10.
 
+
|- valign="top"
<b>91/5B:</b> Unknown, never seen it flag.
+
!<span id="88"></span>88
 +
!<span id="0x58"></span>0x58
 +
|Mirror of [[#8-9|[8-9]]] (alien craft type).
 +
|- valign="top"
 +
!<span id="89"></span>89
 +
!<span id="0x59"></span>0x59
 +
|Y location of alien craft on map. Usually a multiple of 10.
 +
|- valign="top"
 +
!<span id="90"></span>90
 +
!<span id="0x5A"></span>0x5A
 +
|X location of alien craft on map. Usually a multiple of 10.
 +
|- valign="top"
 +
!<span id="91"></span>91
 +
!<span id="0x5B"></span>0x5B
 +
|Unknown, never seen it flag.
 +
|-
 +
|}
  
 
==See Also==
 
==See Also==
 
* [[Saved_Game_Files#Missdat_Files|Missdat Files]]
 
* [[Saved_Game_Files#Missdat_Files|Missdat Files]]
 +
* [[Battlescape Map Generation]]
 
[[Category:Game Files]]
 
[[Category:Game Files]]
 +
[[Category:Enemy Unknown/UFO Defense]]

Latest revision as of 04:39, 23 July 2013

Created in the MissDat folder when you start a battlescape mission, also copied to the savegame folder of choice when saving mid-mission. Primarily used for Battlescape Map Generation and to determine which MCD files to load.

File is 92 bytes long for both UFO and TFTD. Values are presented according to byte offset (0 to 91) followed by the equivalent hex offset (00 to 5B) in bold.

Structure

Offset
(Decimal)
Offset
(Hex)
Usage
0-1 0x00-0x01 Amount of map modules to place vertically (Y dimension of the map / 10).
2-3 0x02-0x03 Amount of map modules to place horizontally (X dimension of the map / 10).
4-5 0x04-0x05 Z dimension of the map.
6-7 0x06-0x07 X-COM craft type (ignore this if a base mission):
 UFO                                 TFTD
 0: SkyRanger                        0: Triton
 1: Lightning                        1: Hammerhead
 2: Avenger                          2: Leviathan
 3: Interceptor *1                   3: Barracuda   *2
 4: Firestorm   *1                   4: Manta       *2
 5: Small Scout                      5: Survey Ship
 6: Medium Scout                     6: Escort
 7: Large Scout                      7: Cruiser
 8: Harvestor                        8: Heavy Cruiser
 9: Abductor                         9: Hunter
10: Terror Ship                     10: Battleship
11: Battleship                      11: Dreadnought
12: Supply Ship                     12: Fleet Supply Cruiser

*1 Requires maps "Interc" and "Fires". These don't exist normally, though XcomUtil adds versions similar to the SkyRanger and Lightning.

*2 Requires maps "Barracud" and "Manta". These don't exist normally, though XcomUtil adds versions similar to the Triton and Hammerhead

8-9 0x08-0x09 Alien craft type (ignore this if not a UFO mission). Uses the above values.
10-11 0x0A-0x0B Terrain type. Typically depends on the mission type and location.
 UFO                                 TFTD
 0: Jungle                           0: Seabed
 1: Farm                             1: Pipes
 2: Forest                           2: Crashed Plane
 3: X-COM Base                       3: Atlantis
 4: Alien Base                       4: Mu
 5: Urban                            5: Sunken Galleon
 6: Desert                           6: Sunken Liner
 7: Mountains                        7: Volcanic
 8: Polar                            8: Coral
 9: Mars                             9: Artefact Site Stage 1
                                    10: Artefact Site Stage 2
                                    11: Cargo Ship Stage 1 & 2 (Check MISDATA[20-21]
                                    12: Port Attack                       for which)
                                    13: Island Attack
                                    14: Colony Stage 2
                                    15: T'leth Stage 1
                                    16: T'leth Stage 2
                                    17: T'leth Stage 3
                                    18: X-COM Base
                                    19: Passenger Ship Stage 1
                                    20: Passenger Ship Stage 2
                                    21: Colony Stage 1
12-47 0x0C-0x2F A byte list of length [0-1]*[2-3], which details the map modules used to build the battlescape. Reads in order from west to east, north to south. For example, in the case of the largest map (60x60), this list would be 36 bytes (offsets 12 through to 47).

Values of 253/254/255 mean that the a module does not need to be placed in that area because a large 2x2 module (eg. An X-COM hangar) has already covered it.

48-83 0x30-0x53 A byte list of length [0-1]*[2-3], one for each map module to be loaded by the game during Battlescape Map Generation (as detailed at [12-47]). A byte here will be set to 1 if the RMP file for that module is to be loaded, or 0 if it is not. This is determined by whether X-COM/alien craft exist within the modules - those modules with craft will not have their own RMP files loaded (instead, the craft route nodes will be added to the combined table once all other nodes are in there).

In the case of the largest maps (60x60), this list will be 36 bytes long (offsets 48 through to 83).

84 0x54 Amount of craft to be placed on the map.
0: None.
1: X-COM craft only.
2: X-COM and alien craft.
85 0x55 Mirror of [6-7] (X-COM craft type).
86 0x56 Y location of X-COM craft on map. Usually a multiple of 10.
87 0x57 X location of X-COM craft on map. Usually a multiple of 10.
88 0x58 Mirror of [8-9] (alien craft type).
89 0x59 Y location of alien craft on map. Usually a multiple of 10.
90 0x5A X location of alien craft on map. Usually a multiple of 10.
91 0x5B Unknown, never seen it flag.

See Also