Skip to content

Inventory items

The 23 item slots of each player's inventory, ids 0-22 (0x0041e420). CfgInventoryItem(object, id, count, sound, ms) gives a slot its object, pickup sound and duration in both players' inventories; InvGiveItem(id, n) adds to a player's count, InvNumberOf(id) reads it and HuPutItemInPocket(human, id, n) puts an item in a human's pocket (human +0x250, the count at +0x254), to be taken when the human is beaten or mugged.

What is complete

All 23 slots are listed; 15 have an object in config_preload2.lua and level20 reconfigures three. Slots 0 and 16-22 have no object and no script names them. What an item is comes from its object's name and its bindings (inferred); what the duration does for each item is not traced.

23 entries. Data: research/references/inventory.yaml.

Entries

Item Image Object What Pickup sound Duration (ms) Own bindings Reconfigured by Given Tested Pocketed Scripts
0
1 objects/dyn_revival.png dyn_revival A flash: a revive (InvGiveRevive); the flash command spends one to heal (Combat) vags/interface/powerup 30000 InvGiveRevive, InvNumberRevives 6 9 63 972fed2e, level20_bossfight.lua, level54_park.lua, level54_popsicle.lua, level55_lizziesattack.lua, level60_destroyers.lua, ... 20 more
2 Money, in dollars (no object) vags/interface/powerup 10000 InvGetMoney, InvSetMoney, GiveMoney, TakeMoney 6 4 level95_coney.lua
3 objects/dyn_spraycan.png dyn_spraycan Spray-paint charges, spent by tagging vags/interface/powerup 20000 InvGetSpraycanCharges, InvSetSpraycanCharges 6 4 7 level9.lua, level95_coney.lua, level9_chap1_radio.lua, level9_chap2_tags.lua
4 objects/dyn_swhbld_super.png dyn_swhbld_super A switchblade power-up (from the object's name) vags/interface/powerup 20000 1 level84_final.lua
5 objects/dyn_powercuffs.png dyn_powercuffs Handcuffs vags/interface/powerup 30000 12 7 global.lua, level95.lua, level95_clubhouse.lua, level95_coney.lua
6 objects/dyn_key.png dyn_key Handcuff (skeleton) keys vags/interface/powerup 30000 InvGiveSkeletonKey, InvNumberSkeletonKeys 6 4 level95_coney.lua
7 objects/dyn_pass.png dyn_pass A pass (mission item, level 11) vags/interface/mission_item 10000 2 2 1 level11_chapter5.lua
8 objects/dyn_boltcutter.png dyn_boltcutter Bolt cutters (mission item) vags/interface/mission_item 10000
9 objects/dyn_special_key.png dyn_special_key A special key (mission item) vags/interface/mission_item 10000 6 4 1 level83_c5_apartment.lua, level95_coney.lua
10 dyn_store_item Loot from a store vags/interface/powerup 10000
11 objects/dyn_carstereo.png dyn_carstereo A car stereo (loot) vags/interface/powerup 10000 2 level14_dirtycop.lua
12 objects/dyn_ledger.png dyn_ledger A ledger (mission item) vags/interface/mission_item 10000 level20: dyn_ledger 1 level20_marketplace.lua
13 dyn_dragon A dragon statue (mission item; level 20 uses its own object) vags/interface/mission_item 10000 level20: dyn_special_dragon
14 objects/dyn_bagcoins.png dyn_bagcoins A bag of coins (mission item) vags/interface/mission_item 10000 level20: dyn_bagcoins 2 level20_backalley.lua, level20_bossfight.lua
15 objects/dyn_brownbag.png dyn_brownbag A brown bag (mission item) vags/interface/mission_item 10000
16
17
18
19
20
21
22

Sources and evidence

Evidence levels used: confirmed-code.

  • config_preload2.lua, CfgInventoryItem; the Inv bindings

Fields

Field Type Hand-written Meaning
id int Item id: what InvGiveItem, InvNumberOf and HuPutItemInPocket take (0-22).
object str The object CfgInventoryItem makes the item (none for money).
meaning str yes What the item is, in our words.
count int CfgInventoryItem's third argument, stored with the item (+0x20).
sound str The pickup sound (stored as its hash).
ms int Duration in ms (+0x28; default 10,000).
bindings list Bindings made for this item alone.
overrides list Level scripts that configure the slot again, with the object they give it.
given int InvGiveItem calls with this item.
tested int InvNumberOf and InvPlayerHasItem calls with it.
pocketed int HuPutItemInPocket calls that put it in a human's pocket.
scripts list Scripts that give, test or pocket it.
image str A thumbnail, a path below docs/references/images/ (characters/warr_re_cv.png); set by extract from the files present.
source str yes Where the entry comes from: a script and binding, an address, a chunk.
evidence str yes How we know: confirmed-code, confirmed-runtime, inferred or speculative (evidence levels).
notes str yes Our own short notes.