OBPOS.DAT: Difference between revisions
Appearance
Bomb Bloke (talk | contribs) No edit summary |
m Added see also |
||
| Line 77: | Line 77: | ||
15: | 15: | ||
</pre> | </pre> | ||
==See Also== | |||
* [[Saved Game Files]] | |||
Revision as of 15:21, 8 May 2006
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: Y \
2: X -> 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: