Difference between revisions of "GEODATA.DAT"

From UFOpaedia
Jump to navigation Jump to search
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 to generate a new map at the beginning of combat and to determine which [[TERRAIN|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> X dimension of the map / 10.
+
<b>0-1/00-01:</b> Amount of map modules to place vertically (Y dimension of the map / 10).
  
<b>2-3/02-03:</b> Y dimension of the map / 10.
+
<b>2-3/02-03:</b> Amount of map modules to place horizontally (X dimension of the map / 10).
  
 
<b>4-5/04-05:</b> Z dimension of the map.
 
<b>4-5/04-05:</b> Z dimension of the map.
Line 15: Line 15:
 
   1 - Lightning
 
   1 - Lightning
 
   2 - Avenger
 
   2 - Avenger
   3 - Interceptor
+
   3 - Interceptor *
   4 - Firestorm ???
+
   4 - Firestorm *     
 
   5 - Small Scout
 
   5 - Small Scout
 
   6 - Medium Scout
 
   6 - Medium Scout
Line 25: Line 25:
 
  11 - Battleship
 
  11 - Battleship
 
  12 - Supply Ship
 
  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>8-9/08-09:</b> Alien craft type (ignore this if not a UFO mission). Uses the above values.
 
<b>8-9/08-09:</b> Alien craft type (ignore this if not a UFO mission). Uses the above values.
Line 53: Line 55:
 
                                     20: Passenger Ship Stage 2
 
                                     20: Passenger Ship Stage 2
 
                                     21: Colony Stage 1
 
                                     21: Colony Stage 1
 +
 +
<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.
 +
 +
<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.
 +
 +
- [[User:Bomb Bloke|Bomb Bloke]] 01:05, 6 February 2008 (PST)</i>
  
 
...
 
...
 +
 +
<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.
 +
 +
...
 +
 +
<b>84/54:</b> Amount of craft to be placed on the map.
 +
0: None.
 +
1: X-Com craft only.
 +
2: X-Com and alien craft.
 +
 +
<b>85/55:</b> Mirror of [6-7] (X-Com craft type).
  
 
<b>86/56:</b> Y location of X-Com craft on map. Usually a multiple of 10.
 
<b>86/56:</b> Y location of X-Com craft on map. Usually a multiple of 10.
Line 60: Line 79:
 
<b>87/57:</b> X location of X-Com craft on map. Usually a multiple of 10.
 
<b>87/57:</b> X location of X-Com craft on map. Usually a multiple of 10.
  
...
+
<b>88/58:</b> Mirror of [8-9] (alien craft type).
  
 
<b>89/59:</b> Y location of alien craft on map. Usually a multiple of 10.
 
<b>89/59:</b> Y location of alien craft on map. Usually a multiple of 10.
  
 
<b>90/5A:</b> X location of alien craft on map. Usually a multiple of 10.
 
<b>90/5A:</b> X location of alien craft on map. Usually a multiple of 10.
 +
 +
<b>91/5B:</b> Unknown, never seen it flag.
  
 
==See Also==
 
==See Also==
 
* [[Saved_Game_Files#Missdat_Files|Missdat Files]]
 
* [[Saved_Game_Files#Missdat_Files|Missdat Files]]
 
[[Category:Game Files]]
 
[[Category:Game Files]]

Revision as of 09:05, 6 February 2008

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 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

0-1/00-01: Amount of map modules to place vertically (Y dimension of the map / 10).

2-3/02-03: Amount of map modules to place horizontally (X dimension of the map / 10).

4-5/04-05: Z dimension of the map.

6-7/06-07: X-Com craft type (ignore this if a base mission):

 0 - SkyRanger
 1 - Lightning
 2 - Avenger
 3 - Interceptor *
 4 - Firestorm *      
 5 - Small Scout
 6 - Medium Scout
 7 - Large Scout
 8 - Harvestor
 9 - Abductor
10 - Terror Ship
11 - Battleship
12 - Supply Ship

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

8-9/08-09: Alien craft type (ignore this if not a UFO mission). Uses the above values.

10-11/0A-0B: Terrain type:

UFO                                  TFTD
0: Jungle                            0: Seabed Trash
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.DAT[20-21] for which)
                                    12: Port Attack
                                    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-XX/0C-XX: The next [0-1]*[2-3] bytes list 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 (50x50), this list would be 25 bytes.

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.

- Bomb Bloke 01:05, 6 February 2008 (PST)

...

37-83/25-53: 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.

...

84/54: Amount of craft to be placed on the map.

0: None.
1: X-Com craft only.
2: X-Com and alien craft.

85/55: Mirror of [6-7] (X-Com craft type).

86/56: Y location of X-Com craft on map. Usually a multiple of 10.

87/57: X location of X-Com craft on map. Usually a multiple of 10.

88/58: Mirror of [8-9] (alien craft type).

89/59: Y location of alien craft on map. Usually a multiple of 10.

90/5A: X location of alien craft on map. Usually a multiple of 10.

91/5B: Unknown, never seen it flag.

See Also