Jump to content

UNITPOS.DAT: Difference between revisions

From UFOpaedia
No edit summary
 
m Line breaks and stuff
Line 1: Line 1:
unitpos.dat
There are 80 records of 14 values of one byte each. 1120 bytes in total.<br>
-----------
<br>
 
unitpos[0] - Y position. 255 if unit specifically unused.<br>
There are 80 records of 14 values of one byte each. 1120 bytes in total.
unitpos[1] - X position.<br>
 
unitpos[2] - Z position. (0 is top level).<br>
unitpos[0] - Y position. 255 if unit specifically unused.
unitpos[3] - <br>
unitpos[1] - X position.
unitpos[4] - <br>
unitpos[2] - Z position. (0 is top level).
unitpos[5] - <br>
unitpos[3] -  
unitpos[6] - Seems to be the same number for all records, but does vary between saves.<br>
unitpos[4] -  
unitpos[7] - Always 0?<br>
unitpos[5] -  
<br>
unitpos[6] - Seems to be the same number for all records, but does vary between saves.
unitpos[8] - <br>
unitpos[7] - Always 0?
<br>
 
BB's notes:<br>
unitpos[8] -  
<br>
 
Always seems to be 255 for X-Com controlled (as opposed to owned) units.<br>
My notes:
<br>
 
Perhaps this dictates AI style for this unit or something?<br>
Always seems to be 255 for X-Com controlled (as opposed to owned) units.
<br>
   
NKF notes:<br>
Perhaps this dictates AI style for this unit or something?
<br>
 
  255 for XCOM, 2, 1 and 0 for floaters?<br>
NKF notes:
       X-COM  - 255    1111 1111<br>
 
       TANKC  - 1      0000 0001<br>
  255 for XCOM, 2, 1 and 0 for floaters?
    <br>
       X-COM  - 255    1111 1111
       Ethereal  - 3  0000 0011<br>
       TANKC  - 1      0000 0001
                 94    0101 1110<br>
 
                 15    0000 1111<br>
       Ethereal  - 3  0000 0011
             <br>
                 94    0101 1110
               Civ  -  0000 0000<br>
                 15    0000 1111
                     12 0000 1100<br>
              
                     91 0101 1011<br>
               Civ  -  0000 0000
       <br>
                     12 0000 1100
       Sectopod  - 1  0000 0001<br>
                     91 0101 1011
                 2    0000 0010<br>
        
                 13    0000 1101<br>
       Sectopod  - 1  0000 0001
                 92    0101 1100<br>
                 2    0000 0010
<br>
                 13    0000 1101
unitpos[9] - Owner flag. Possible values:<br>
                 92    0101 1100
0: X-Com<br>
 
1: Alien<br>
unitpos[9] - Owner flag. Possible values:
2: Civilian<br>
0: X-Com
<br>
1: Alien
unitpos[10] - Unit info flags. Bits (from left to right, 87654321):<br>
2: Civilian
(  1) 1: 0 = Invisible, 1 = visible.<br>
 
(  2) 2: 0 = Dead, 1 = alive.<br>
unitpos[10] - Unit info flags. Bits (from left to right, 87654321):
(  4) 3: 0 = Small unit, 1 = big unit.<br>
(  1) 1: 0 = Invisible, 1 = visible.
(  8) 4: 0 = Left section of unit, 1 = right side of unit.<br>
(  2) 2: 0 = Dead, 1 = alive.
( 16) 5: 0 = Upper side of unit, 1 = lower side of unit.<br>
(  4) 3: 0 = Small unit, 1 = big unit.
( 32) 6: Only seems to flag for certain tank parts. Could be where tank will fire from?<br>
(  8) 4: 0 = Left section of unit, 1 = right side of unit.
( 64) 7: 0 = Normal, 1 = under mind control.<br>
( 16) 5: 0 = Upper side of unit, 1 = lower side of unit.
(128) 8: Unused?<br>
( 32) 6: Only seems to flag for certain tank parts. Could be where tank will fire from?
<br>
( 64) 7: 0 = Normal, 1 = under mind control.
Ignore bits 4 and 5 if bit 3 is unflagged.<br>
(128) 8: Unused?
<br>
 
unitpos[11] - <br>
Ignore bits 4 and 5 if bit 3 is unflagged.
unitpos[12] - <br>
 
unitpos[13] -<br>
unitpos[11] -  
unitpos[12] -  
unitpos[13] -

Revision as of 09:10, 15 October 2005

There are 80 records of 14 values of one byte each. 1120 bytes in total.

unitpos[0] - Y position. 255 if unit specifically unused.
unitpos[1] - X position.
unitpos[2] - Z position. (0 is top level).
unitpos[3] -
unitpos[4] -
unitpos[5] -
unitpos[6] - Seems to be the same number for all records, but does vary between saves.
unitpos[7] - Always 0?

unitpos[8] -

BB's notes:

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

Perhaps this dictates AI style for this unit or something?

NKF notes:

255 for XCOM, 2, 1 and 0 for floaters?
X-COM - 255 1111 1111
TANKC - 1 0000 0001

Ethereal - 3 0000 0011
94 0101 1110
15 0000 1111

Civ - 0000 0000
12 0000 1100
91 0101 1011

Sectopod - 1 0000 0001
2 0000 0010
13 0000 1101
92 0101 1100


unitpos[9] - Owner flag. Possible values:
0: X-Com
1: Alien
2: Civilian

unitpos[10] - Unit info flags. Bits (from left to right, 87654321):
( 1) 1: 0 = Invisible, 1 = visible.
( 2) 2: 0 = Dead, 1 = alive.
( 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.

unitpos[11] -
unitpos[12] -
unitpos[13] -