Difference between revisions of "MISDATA.DAT"

From UFOpaedia
Jump to navigation Jump to search
(Languages)
(Merging of the MISSION2 notes, plus a few new ones.)
Line 1: Line 1:
This 170 byte file is only used by tactical saves. It stores such information as the craft in use, and which alien artefacts are available for use in combat. Not many bytes have been decoded as yet, but not many seem to be used.
+
This 170 byte file is only used by tactical saves. It comes in three flavours:<br><br>
 +
 
 +
*<b>MISSION.DAT</b><br>
 +
Initially created by the GeoScape engine and stored in the [[Saved_Game_Files#Missdat_Files|MISSDAT]] folder. Contains the info required for gameplay in the battlescape.<br><br>
 +
 
 +
*<b>MISDATA.DAT</b><br>
 +
Created along with a [[Saved_Game_Files#Battlescape_Files|battlescape save]], effectively a mirror of the original "MISSION.DAT".<br><br>
 +
 
 +
*<b>MISSION2.DAT</b><br>
 +
Appears in the MISSDAT folder at the end of combat. Contains debreifing data (such as who won, what was recovered and what points were scored). The relevant offsets for this file are unused by the previous two versions.<br><br>
 +
 
 +
Values are presented according to byte offset (0 to 169) followed by the equivalent hex offset (00 to A9) in <b>bold</b>. Notes only apply to UFO (as opposed to TFTD) unless otherwise stated. Let us know what else you can find!!
  
 
== Structure ==
 
== Structure ==
  
<b>20/14</b> is the mission descriptor. Possible values:
+
The first 20 bytes are a count up of the various recoverable tile types in the map. They're only set if you actually won the mission by eliminating all enemy forces. These offsets + 100 index into the respecitve [[BASE.DAT]] values that need to be updated.
 +
 
 +
See [[Equipment Recovery]] for more information.
 +
 
 +
  <b>0-1/00-01:</b> [[UFO Power Source]]    (tiles with MCD[59] set to 02).
 +
  <b>2-3/02-03:</b> [[UFO Navigation]]      (tiles with MCD[59] set to 03).
 +
              Not counted for alien bases.
 +
  <b>4-5/04-05:</b> [[UFO Construction]]    (tiles with MCD[59] set to 04).
 +
              No known tiles have this set.
 +
  <b>6-7/06-07:</b> [[Alien Food]]          (tiles with MCD[59] set to 05).
 +
  <b>8-9/08-09:</b> [[Alien Reproduction]]  (tiles with MCD[59] set to 06).
 +
              No known tiles have this set.
 +
<b>10-11/0A-0B:</b> [[Alien Entertainment]] (tiles with MCD[59] set to 07).
 +
<b>12-13/0C-0D:</b> [[Alien Surgery]]      (tiles with MCD[59] set to 08).
 +
<b>14-15/0E-0F:</b> [[Examination Room]]    (tiles with MCD[59] set to 09).
 +
<b>16-17/10-11:</b> [[Alien Alloys]]        (tiles with MCD[59] set to 10).
 +
              The total is divided by 2 for a UFO mission or 30 for an alien base.
 +
              The value stored here is further divided by 5 to get the result you
 +
              see on the debriefing screen.
 +
<b>18-19/12-13:</b> [[Alien Habitat]]      (tiles with MCD[59] set to 11).
 +
              No known tiles have this set.
 +
 
 +
<b>20-21/14-15:</b> Mission descriptor. Possible values:
 
  0: UFO site
 
  0: UFO site
 
  1: Terror site
 
  1: Terror site
Line 11: Line 44:
 
  5: Mars part 2
 
  5: Mars part 2
  
<b>74/4A</b> serves some purpose. Perhaps terrain and alien craft stuff.
+
Values <b>22-73</b> (Hex: <b>16-49</b>) primarily hold scoring information. As per the tile recovery indexes, these are only stored in the final "end-of-combat" MISSION2.DAT. For temporary storage mid-mission, some of these values are stored in [[WGLOB.DAT]].
 +
 
 +
<b>22-23/16-17:</b> Aliens killed.
 +
 
 +
<b>24-25/18-19:</b> Aliens killed score.
 +
 
 +
<b>26-27/1A-1B:</b> Alien corpses.
 +
 
 +
<b>28-29/1C-1D:</b> Corpse score.
 +
 
 +
<b>30-31/1E-1F:</b> Live aliens captured.
 +
 
 +
<b>32-33/20-21:</b> Live alien score.
 +
 
 +
<b>34-35/22-23:</b> Artefacts (unresearched alien items) recovered.
 +
 
 +
<b>36-37/24-25:</b> Artifacts score.
 +
 
 +
<b>38-39/26-27:</b> Alien base control destroyed. This flags if you win a [[Alien_Base_Assault|base offense mission]] by killing all enemy forces, or if you destroy all 16 nav modules in the command center. If not zero, the base you were attacking will be removed from the world map at the end of combat.
 +
 
 +
<b>40-41/28-29:</b> Base control score.
 +
 
 +
<b>42-43/2A-2B:</b> Civilians killed by aliens.
 +
 
 +
<b>44-45/2C-2D:</b> Civilians killed by aliens score (typically negative).
 +
 
 +
<b>46-47/2E-2F:</b> Civilians killed by X-Com.
 +
 
 +
<b>48-49/30-31:</b> Civilians killed by X-Com score (typically negative).
 +
 
 +
<b>50-51/32-33:</b> Civilians saved.
 +
 
 +
<b>52-53/34-35:</b> Civilians saved score.
 +
 
 +
<b>54-55/36-37:</b> X-Com troopers killed.
 +
 
 +
<b>56-57/38-39:</b> X-Com troopers killed score (typically negative).
 +
 
 +
<b>58-59/3A-3B:</b> X-Com troopers "retired through injury" (never actually flags).
 +
 
 +
<b>60-61/3C-3D:</b> X-Com troopers "retired through injury" score (never actually flags).
 +
 
 +
<b>62-63/3E-3F:</b> X-Com troopers MIA.
 +
 
 +
<b>64-65/40-41:</b> X-Com troopers MIA score (typically negative).
 +
 
 +
<b>66-67/42-43:</b> Tanks lost.
 +
 
 +
<b>68-69/44-45:</b> Tanks lost score (typically negative).
 +
 
 +
<b>70-71/46-47:</b> X-Com craft lost (GeoScape ignores this if you actually lose a craft, Tactical sets it regardless).
 +
 
 +
<b>72-73/48-49:</b> X-Com craft lost score (GeoScape ignores this if you actually lose a craft, Tactical doesn't set it regardless).
 +
 
 +
<b>74-75/4A-4B:</b> Usually a low value, has something to do with lighting. High values are bright (Light values normally range from 0-15 in [[SOURCEMP.DAT]]/[[TERMP.DAT]]).
 +
 
 +
<b>76/4C:</b> For a UFO site, this is the [[LOC.DAT]] reference corresponding to the crash site. This is plausibly true for every mission type (with the possible exception of the [[Cydonia|Mars assault]]). Different combos of this and the above value will affect [[BGLOB.DAT]].
 +
 
 +
<b>77/4D:</b> Index into [[CRAFT.DAT]] pointing to the craft sent on this mission. In the case of base defense (see offset [79]), it indexes into [[BASE.DAT]].
 +
 
 +
<b>78/4E:</b> Victory status.
  
For a UFO site, <b>76/4C</b> is the LOC.DAT reference corresponding to the crash siteIt plausibly is always the LOC.DAT reference involved (with the possible exception of the Mars missions).
+
0: Mission aborted.
 +
1: Mission won.
 +
  2: Mission lost.
 +
3: Mission completely lost through abortion (no units in exit areas).
  
<b>77/4D</b> seems to map to the craft in use. I assume this value indexes off somewhere else (eg [[CRAFT.DAT]]). It seems to also serve when one of your bases is under attack ([[BASE.DAT]]). Most likely it is used when combat is over, as it shouldn't be required for creating a new tactical map.
+
<b>79/4F:</b> 0 unless the mission is a UFO site, in which case it is 1. Determines use of [77] but doesn't seem to affect [16-17].
  
<b>79/4F</b> is 0 unless the mission is a UFO site, in which case it is 1.
+
<b>80-151/50-97:</b> These 72 values are unknown (<i>I've never seen them flag. - [[User:Bomb Bloke|Bomb Bloke]] 20:32, 21 January 2008 (PST)</i>).
  
 
The following bytes allow you to use the following equipment only if they are set to 1:
 
The following bytes allow you to use the following equipment only if they are set to 1:
  
  <b>152/98</b> - [[Heavy Plasma]]
+
  <b>152/98:</b> [[Heavy Plasma]]       (ObData[34])
  <b>153/99</b> - [[Heavy Plasma Clip]]
+
  <b>153/99:</b> [[Heavy Plasma Clip]] (ObData[35])
  <b>154/9A</b> - [[Plasma Rifle]]
+
  <b>154/9A:</b> [[Plasma Rifle]]       (ObData[36])
  <b>155/9B</b> - [[Plasma Rifle Clip]]
+
  <b>155/9B:</b> [[Plasma Rifle Clip]] (ObData[37])
  <b>156/9C</b> - [[Plasma Pistol]]
+
  <b>156/9C:</b> [[Plasma Pistol]]     (ObData[38])
  <b>157/9D</b> - [[Plasma Pistol Clip]]
+
  <b>157/9D:</b> [[Plasma Pistol Clip]] (ObData[39])
  <b>158/9E</b> - [[Blaster Launcher]]
+
  <b>158/9E:</b> [[Blaster Launcher]]   (ObData[40])
  <b>159/9F</b> - [[Blaster Bomb]]
+
  <b>159/9F:</b> [[Blaster Bomb]]       (ObData[41])
  <b>160/A0</b> - [[Small Launcher]]
+
  <b>160/A0:</b> [[Small Launcher]]     (ObData[42])
  <b>161/A1</b> - [[Stun Bomb]]
+
  <b>161/A1:</b> [[Stun Bomb]]         (ObData[43])
  <b>162/A2</b> - [[Alien Grenade]]
+
  <b>162/A2:</b> [[Alien Grenade]]     (ObData[44])
  <b>163/A3</b> - [[Elerium-115]]
+
  <b>163/A3:</b> [[Elerium-115]]       (ObData[45])
  <b>164/A4</b> - [[Mind Probe]]
+
  <b>164/A4:</b> [[Mind Probe]]         (ObData[46])
 +
<b>165/A5:</b> null>>UNDEFINED << (ObData[47])
 +
<b>166/A6:</b> null>> empty <<    (ObData[48])
 +
<b>167/A7:</b> null>> empty <<    (ObData[49])
  
X-Com produced equipment can be used even if it hasn't been researched (however, in order to get it into combat, you must build it - and <i>that</i> requires research).
+
X-Com produced equipment can be used even if it hasn't been researched (however, in order to get it into combat, you must build it - and <i>that</i> requires research). The last three entries in the list are item slots that were never used in the game.
  
<b>168/A8</b> determines the language in which the mission was initiated. If the game is saved and later loaded, this overrides whatever language was selected when the program started.
+
<b>168/A8:</b> Determines the language in which the mission was initiated. If the game is saved and later loaded, this overrides whatever language was selected when the program started.
  
 
  0 - English
 
  0 - English
Line 43: Line 142:
 
  2 - French
 
  2 - French
  
All other bytes in this file seem to be set to 0.
+
<b>169/A9:</b> Unknown, never seen it flag. Could be part of the above value.
  
 
==See Also==
 
==See Also==
 
* [[Saved Game Files]]
 
* [[Saved Game Files]]
* [[Saved_Game_Files#Battlescape_Files|Battlescape Files]]
+
* [[OBDATA.DAT]]
* [[Saved_Game_Files#Missdat_Files|Missdat Files]]
+
* [[TERRAIN|MCD files]]
 +
* [[WGLOB.DAT]]
 +
* [[CRAFT.DAT]]
 +
* [[BASE.DAT]]
 
[[Category:Game Files]]
 
[[Category:Game Files]]

Revision as of 04:33, 22 January 2008

This 170 byte file is only used by tactical saves. It comes in three flavours:

  • MISSION.DAT

Initially created by the GeoScape engine and stored in the MISSDAT folder. Contains the info required for gameplay in the battlescape.

  • MISDATA.DAT

Created along with a battlescape save, effectively a mirror of the original "MISSION.DAT".

  • MISSION2.DAT

Appears in the MISSDAT folder at the end of combat. Contains debreifing data (such as who won, what was recovered and what points were scored). The relevant offsets for this file are unused by the previous two versions.

Values are presented according to byte offset (0 to 169) followed by the equivalent hex offset (00 to A9) in bold. Notes only apply to UFO (as opposed to TFTD) unless otherwise stated. Let us know what else you can find!!

Structure

The first 20 bytes are a count up of the various recoverable tile types in the map. They're only set if you actually won the mission by eliminating all enemy forces. These offsets + 100 index into the respecitve BASE.DAT values that need to be updated.

See Equipment Recovery for more information.

  0-1/00-01: UFO Power Source    (tiles with MCD[59] set to 02).
  2-3/02-03: UFO Navigation      (tiles with MCD[59] set to 03).
             Not counted for alien bases.
  4-5/04-05: UFO Construction    (tiles with MCD[59] set to 04). 
             No known tiles have this set.
  6-7/06-07: Alien Food          (tiles with MCD[59] set to 05).
  8-9/08-09: Alien Reproduction  (tiles with MCD[59] set to 06).
             No known tiles have this set.
10-11/0A-0B: Alien Entertainment (tiles with MCD[59] set to 07).
12-13/0C-0D: Alien Surgery       (tiles with MCD[59] set to 08).
14-15/0E-0F: Examination Room    (tiles with MCD[59] set to 09).
16-17/10-11: Alien Alloys        (tiles with MCD[59] set to 10).
             The total is divided by 2 for a UFO mission or 30 for an alien base. 
             The value stored here is further divided by 5 to get the result you 
             see on the debriefing screen.
18-19/12-13: Alien Habitat       (tiles with MCD[59] set to 11).
             No known tiles have this set.

20-21/14-15: Mission descriptor. Possible values:

0: UFO site
1: Terror site
2: Base defense (X-Com base)
3: Base offense (Alien base)
4: Mars part 1
5: Mars part 2

Values 22-73 (Hex: 16-49) primarily hold scoring information. As per the tile recovery indexes, these are only stored in the final "end-of-combat" MISSION2.DAT. For temporary storage mid-mission, some of these values are stored in WGLOB.DAT.

22-23/16-17: Aliens killed.

24-25/18-19: Aliens killed score.

26-27/1A-1B: Alien corpses.

28-29/1C-1D: Corpse score.

30-31/1E-1F: Live aliens captured.

32-33/20-21: Live alien score.

34-35/22-23: Artefacts (unresearched alien items) recovered.

36-37/24-25: Artifacts score.

38-39/26-27: Alien base control destroyed. This flags if you win a base offense mission by killing all enemy forces, or if you destroy all 16 nav modules in the command center. If not zero, the base you were attacking will be removed from the world map at the end of combat.

40-41/28-29: Base control score.

42-43/2A-2B: Civilians killed by aliens.

44-45/2C-2D: Civilians killed by aliens score (typically negative).

46-47/2E-2F: Civilians killed by X-Com.

48-49/30-31: Civilians killed by X-Com score (typically negative).

50-51/32-33: Civilians saved.

52-53/34-35: Civilians saved score.

54-55/36-37: X-Com troopers killed.

56-57/38-39: X-Com troopers killed score (typically negative).

58-59/3A-3B: X-Com troopers "retired through injury" (never actually flags).

60-61/3C-3D: X-Com troopers "retired through injury" score (never actually flags).

62-63/3E-3F: X-Com troopers MIA.

64-65/40-41: X-Com troopers MIA score (typically negative).

66-67/42-43: Tanks lost.

68-69/44-45: Tanks lost score (typically negative).

70-71/46-47: X-Com craft lost (GeoScape ignores this if you actually lose a craft, Tactical sets it regardless).

72-73/48-49: X-Com craft lost score (GeoScape ignores this if you actually lose a craft, Tactical doesn't set it regardless).

74-75/4A-4B: Usually a low value, has something to do with lighting. High values are bright (Light values normally range from 0-15 in SOURCEMP.DAT/TERMP.DAT).

76/4C: For a UFO site, this is the LOC.DAT reference corresponding to the crash site. This is plausibly true for every mission type (with the possible exception of the Mars assault). Different combos of this and the above value will affect BGLOB.DAT.

77/4D: Index into CRAFT.DAT pointing to the craft sent on this mission. In the case of base defense (see offset [79]), it indexes into BASE.DAT.

78/4E: Victory status.

0: Mission aborted.
1: Mission won.
2: Mission lost.
3: Mission completely lost through abortion (no units in exit areas).

79/4F: 0 unless the mission is a UFO site, in which case it is 1. Determines use of [77] but doesn't seem to affect [16-17].

80-151/50-97: These 72 values are unknown (I've never seen them flag. - Bomb Bloke 20:32, 21 January 2008 (PST)).

The following bytes allow you to use the following equipment only if they are set to 1:

152/98: Heavy Plasma       (ObData[34])
153/99: Heavy Plasma Clip  (ObData[35])
154/9A: Plasma Rifle       (ObData[36])
155/9B: Plasma Rifle Clip  (ObData[37])
156/9C: Plasma Pistol      (ObData[38])
157/9D: Plasma Pistol Clip (ObData[39])
158/9E: Blaster Launcher   (ObData[40])
159/9F: Blaster Bomb       (ObData[41])
160/A0: Small Launcher     (ObData[42])
161/A1: Stun Bomb          (ObData[43])
162/A2: Alien Grenade      (ObData[44])
163/A3: Elerium-115        (ObData[45])
164/A4: Mind Probe         (ObData[46])
165/A5: null>>UNDEFINED << (ObData[47])
166/A6: null>> empty <<    (ObData[48])
167/A7: null>> empty <<    (ObData[49])

X-Com produced equipment can be used even if it hasn't been researched (however, in order to get it into combat, you must build it - and that requires research). The last three entries in the list are item slots that were never used in the game.

168/A8: Determines the language in which the mission was initiated. If the game is saved and later loaded, this overrides whatever language was selected when the program started.

0 - English
1 - German
2 - French

169/A9: Unknown, never seen it flag. Could be part of the above value.

See Also