Difference between revisions of "OBPOS.DAT"

From UFOpaedia
Jump to navigation Jump to search
m
Line 14: Line 14:
 
2: Y  -> Object coordinates when on the ground.  
 
2: Y  -> Object coordinates when on the ground.  
 
3: Z  /
 
3: Z  /
       Note: When first starting the mission, these coordinates all default
+
       These values are meant to tell the game where the items physically are.  
      to the first node in the Skyranger -- i.e. the 'equipment pile'.
+
      They determine where an unconcious unit will wake up.
       Even if the item supposedly begins in the soldier's inventory.
+
       They tell the game where to centre an explosion for area effect items.
(This is true for all equipment owned by you)
 
  
       Therefore, if a clip loaded into a gun is transformed into a grenade,
+
       Oddly enough, these values ARE NOT UPDATED when in inventory.
      the explosion will occur on the Skyranger's equipment pile (or where
+
      All items that start in your inventory default to the equipment pile.  
      the item was last 'dropped').
 
 
 
These values determine where an unconcious unit will wake up. Oddly enough,
 
when ported around by a unit, these values ARE NOT UPDATED.  
 
  
 
4: Owner of item
 
4: Owner of item
Line 43: Line 38:
 
6: -1/255 by default
 
6: -1/255 by default
  
7: Object the current item is loaded into
+
7: Object the current item is loaded into  
 
   Uses obpos item index - first object in obpos is 0
 
   Uses obpos item index - first object in obpos is 0
 
   -1/255 by default for no item.  
 
   -1/255 by default for no item.  
  
8: Ammo quantity
+
8: Item quantity 1 (Actually a multiple use value)
   (Ammo quantity)
+
   For ammo: Ammo quantity
   (Medikit medicine - painkiller)
+
   For Medikits:  - painkiller
   (grenade)
+
   For Grenade 'turn to detonate on' trigger
 +
 
 
   0 = grenade object has not been primed.
 
   0 = grenade object has not been primed.
  
Line 58: Line 54:
  
 
   When priming grenades this is set to the current turn
 
   When priming grenades this is set to the current turn
   number for 0 turns and +1 for every additional turn. (or was it +1?)
+
   number +1 for every additional turn added onto the timer.
 +
 
 +
  Refer to wglob for current number of turns. (Uses actual turns, not turns/2)
 +
 
 +
9 : Item Quantity 2
 +
    For Medikits: stimulants
 +
    For Grenades: Ownership flag (unitpos reference)  
  
9 : (Medikit medicine - stimulants)
 
    (grenades)
 
    Owner
 
 
       For remembering who last threw the live grenade. For morale loss
 
       For remembering who last threw the live grenade. For morale loss
 
       calculations and for determining the soldier's combat experience.  
 
       calculations and for determining the soldier's combat experience.  
       0 by default
+
       Refers to unit 0 by default. Refers to unit in unitpos.
      Does it refer to unitpos or unitref?
+
 
 +
 
 
        
 
        
10: (Medikit medicine - heal)
+
10: Item Quantity 3
 +
    For Medikits: Heal
 +
    No other use documented.
 
11:
 
11:
 
12:
 
12:

Revision as of 08:37, 15 October 2005

NKF: Minor correction, that's for geodata\obdata.dat - i.e. object information. Obpos is battlescape object information. Just to toss my notes on obpos in here for temporary reference. Remove as necessary after incorporating it into the apropriate format:

BB: Oops, my bad. My only notes at this time are what you gave me. I've chopped the obdata.dat notes out.

16 bytes per entry, 170 possible entries

Byte: 
0: Object type 
   Object is the item ID# in geodata\obdata.dat
   Value of 255/-1 = item in this slot is meant to be unused or destroyed.

1: X  \
2: Y  -> Object coordinates when on the ground. 
3: Z  /
       These values are meant to tell the game where the items physically are. 
       They determine where an unconcious unit will wake up.
       They tell the game where to centre an explosion for area effect items.  

       Oddly enough, these values ARE NOT UPDATED when in inventory. 
       All items that start in your inventory default to the equipment pile. 

4: Owner of item
   References the units in unitpos. First unit unit index is 0, naturally.
   Just tells the game who's holding the current item. 
   If 255 = object will be on the ground.

5: Inventory slot (from left to right)
    0 = Right hand (it's right in the battlescape, but not in the inventory)
    1 = Left hand
    2 - 5 = Leg slots 
    6 - 9 = Shoulder slots
    10 - 18 = backpack
    19 - 22 = top row of belt
    23 - 24 = side pockets of belt
    WARNING: If adding an item to the hand slots, remember to update the hand
    slot images in UNITREF for the soldier involved. 
6: -1/255 by default

7: Object the current item is loaded into 
   Uses obpos item index - first object in obpos is 0
   -1/255 by default for no item. 

8: Item quantity 1 (Actually a multiple use value) 
  For ammo: Ammo quantity
  For Medikits:  - painkiller
  For Grenade 'turn to detonate on' trigger 

  0 = grenade object has not been primed.

  Non zero positive value = What turn to explode on.
  Grenade will explode if current 'turn' is equal or
  greater than this number. See wglob.dat for No. of turns.

  When priming grenades this is set to the current turn
  number +1 for every additional turn added onto the timer. 

  Refer to wglob for current number of turns. (Uses actual turns, not turns/2) 

9 : Item Quantity 2 
    For Medikits: stimulants
    For Grenades: Ownership flag (unitpos reference) 

      For remembering who last threw the live grenade. For morale loss
      calculations and for determining the soldier's combat experience. 
      Refers to unit 0 by default. Refers to unit in unitpos. 


      
10: Item Quantity 3
    For Medikits: Heal
    No other use documented. 
11:
12:
13:
14:
15: