Difference between revisions of "UNITPOS.DAT"

From UFOpaedia
Jump to navigation Jump to search
m (→‎Structure: Minor edit re: discussion)
m (→‎See Also: added category)
Line 57: Line 57:
 
* [[Saved_Game_Files#Battlescape_Files|Battlescape Files]]
 
* [[Saved_Game_Files#Battlescape_Files|Battlescape Files]]
 
* [[Saved_Game_Files#Missdat_Files|Missdat Files]]
 
* [[Saved_Game_Files#Missdat_Files|Missdat Files]]
 +
[[Category:Game Files]]

Revision as of 23:45, 7 February 2007

Stores positioning information for units in the playing field. Each large unit takes four individual records, small units have one record each.

There are 80 records of 14 values of one byte each. 1120 bytes in total. The same format is used by the files UNIPOS.DAT, and the MissDat version of UNITPOS.DAT.

Structure

0/00 - Y position. 255 if unit specifically unused.

1/01 - X position.

2/02 - Z position. (0 is top level).

3/03 - ???

4/04 - ???

5/05 - ???

6/06 - Seems to be the same number for all records, but does vary between saves.

7/07 - Always 0?

8/08 - ???

BB's notes:

Always seems to be 255 for X-Com controlled (as opposed to owned) units.

This is NOT race specific, but has something to do with whether a unit has been seen or not. I've observed this value changing to 0 as soon as an alien is spotted by a player controlled unit, even if the alien didn't see the other unit approach.

9/09 - Owner flag. Possible values:

  0: X-Com
  1: Alien
  2: Civilian

10/0A - Unit info flags. Bits (from left to right, 87654321):

  (  1) 1: 0 = Invisible, 1 = visible (i.e., unit has been spotted by the enemy).
  (  2) 2: 0 = Dead or unconcious, 1 = active.
  (  4) 3: 0 = Small unit, 1 = big unit.
  (  8) 4: 0 = Left section of unit, 1 = right side of unit.
  ( 16) 5: 0 = Upper side of unit, 1 = lower side of unit.
  ( 32) 6: Only seems to flag for certain tank parts. Could be where tank will fire from?
  ( 64) 7: 0 = Normal, 1 = under mind control.
  (128) 8: Unused?

Ignore bits 4 and 5 if bit 3 is unflagged.

11/0B - ???

12/0C - ???

13/0D - ???

See Also