Difference between revisions of "XBASES.DAT"

From UFOpaedia
Jump to navigation Jump to search
Line 13: Line 13:
 
For a single base in North Africa, bytes 20-23 controlled the offset from the base where the Battleship headed straight to.  This suggests a layout of 12 records of 4 bytes, one for each geographical region in canonical order:
 
For a single base in North Africa, bytes 20-23 controlled the offset from the base where the Battleship headed straight to.  This suggests a layout of 12 records of 4 bytes, one for each geographical region in canonical order:
  
'''0-1''': longitude/horizontal offset
+
'''0-1''': longitude/horizontal offset(?)
  
'''2-3''': latitude/vertical offset
+
'''2-3''': latitude/vertical offset(?)
  
 
If both horizontal and vertical offset are 0, no conversion happens.
 
If both horizontal and vertical offset are 0, no conversion happens.
Line 21: Line 21:
 
If the horizontal offset is 1 while the vertical offset is 0, a base attack happens when the Battleship arrives.
 
If the horizontal offset is 1 while the vertical offset is 0, a base attack happens when the Battleship arrives.
 
If the horizontal offset is 0 while the vertical offset is 1, a weird buggy UFO flies in, likely missing the X-COM base.
 
If the horizontal offset is 0 while the vertical offset is 1, a weird buggy UFO flies in, likely missing the X-COM base.
 +
 +
In any case, a successful base defense sets both coordinates to 0.
  
 
==See Also==
 
==See Also==
 
[[Category:Game Files]]
 
[[Category:Game Files]]

Revision as of 12:18, 22 December 2009

This file likely records whether an X-COM base has been targeted for alien retaliation purposes. Total file size is 48 bytes and since the number of bases is limited to 8, this would suggest that each record is 6 bytes long (most likely 3 2-byte entries per record). Darkfred claims each record is only 4 bytes in length but that seems rather strange considering the base cap.

0-1 Unknown. Have seen a value of 4 here. Possible pointer into LOC.DAT?

2-3 Unknown.

4-5 Flag for alien retaliation in progress.

Alternate Reading

In experimental testing, this file was found capable of converting a Retaliation mission from the type indicated from MISSIONS.DAT, to a Battleship that headed straight for an X-COM base in the region.

For a single base in North Africa, bytes 20-23 controlled the offset from the base where the Battleship headed straight to. This suggests a layout of 12 records of 4 bytes, one for each geographical region in canonical order:

0-1: longitude/horizontal offset(?)

2-3: latitude/vertical offset(?)

If both horizontal and vertical offset are 0, no conversion happens. If both horizontal and vertical offset are 1, the resulting Battleship hovers directly over the X-COM base. No base attack occurs just from editing this file. If the horizontal offset is 1 while the vertical offset is 0, a base attack happens when the Battleship arrives. If the horizontal offset is 0 while the vertical offset is 1, a weird buggy UFO flies in, likely missing the X-COM base.

In any case, a successful base defense sets both coordinates to 0.

See Also