Difference between revisions of "OBPOS.DAT"
Jump to navigation
Jump to search
Bomb Bloke (talk | contribs) |
|||
Line 4: | Line 4: | ||
[20] is inventory picture. | [20] is inventory picture. | ||
[21] is ground picture. | [21] is ground picture. | ||
+ | |||
+ | ----- | ||
+ | [[User:NKF|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: | ||
+ | |||
+ | <pre> | ||
+ | 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 / | ||
+ | Note: When first starting the mission, these coordinates all default | ||
+ | to the first node in the Skyranger -- i.e. the 'equipment pile'. | ||
+ | Even if the item supposedly begins in the soldier's inventory. | ||
+ | (This is true for all equipment owned by you) | ||
+ | |||
+ | Therefore, if a clip loaded into a gun is transformed into a grenade, | ||
+ | the explosion will occur on the Skyranger's equipment pile (or where | ||
+ | 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 | ||
+ | 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: Ammo quantity | ||
+ | (Ammo quantity) | ||
+ | (Medikit medicine - painkiller) | ||
+ | (grenade) | ||
+ | 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 for 0 turns and +1 for every additional turn. (or was it +1?) | ||
+ | |||
+ | 9 : (Medikit medicine - stimulants) | ||
+ | (grenades) | ||
+ | Owner | ||
+ | For remembering who last threw the live grenade. For morale loss | ||
+ | calculations and for determining the soldier's combat experience. | ||
+ | 0 by default | ||
+ | Does it refer to unitpos or unitref? | ||
+ | |||
+ | 10: (Medikit medicine - heal) | ||
+ | 11: | ||
+ | 12: | ||
+ | 13: | ||
+ | 14: | ||
+ | 15: | ||
+ | </pre> |
Revision as of 08:18, 15 October 2005
54 bytes to the record. 80 records. First 20 bytes are the object name. Extra bytes are 0's.
[20] is inventory picture. [21] is ground picture.
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:
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 / Note: When first starting the mission, these coordinates all default to the first node in the Skyranger -- i.e. the 'equipment pile'. Even if the item supposedly begins in the soldier's inventory. (This is true for all equipment owned by you) Therefore, if a clip loaded into a gun is transformed into a grenade, the explosion will occur on the Skyranger's equipment pile (or where 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 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: Ammo quantity (Ammo quantity) (Medikit medicine - painkiller) (grenade) 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 for 0 turns and +1 for every additional turn. (or was it +1?) 9 : (Medikit medicine - stimulants) (grenades) Owner For remembering who last threw the live grenade. For morale loss calculations and for determining the soldier's combat experience. 0 by default Does it refer to unitpos or unitref? 10: (Medikit medicine - heal) 11: 12: 13: 14: 15: