Item Fields
This document describes all configurable ITEM
fields in the codebase. Use these to customize item behavior, appearance, interactions, and metadata.
Unspecified fields will use sensible defaults.
Overview
The global ITEM
table defines per-item settings such as sounds, inventory dimensions, restrictions, stats, and hooks. Unspecified fields will use sensible defaults.
Field Summary
Field | Type | Description |
---|---|---|
BagSound |
table |
Sound played when moving items to/from the bag. |
DropOnDeath |
boolean |
Deletes the item upon player death. |
FactionWhitelist |
number[] |
Allowed faction indices for vendor interaction. |
RequiredSkillLevels |
table |
Skill requirements needed to use the item. |
SteamIDWhitelist |
string[] |
Allowed Steam IDs for vendor interaction. |
UsergroupWhitelist |
string[] |
Allowed user groups for vendor interaction. |
VIPWhitelist |
boolean |
Restricts usage to VIP players. |
ammo |
string |
Ammo type provided. |
ammoAmount |
number |
Amount of ammo contained. |
armor |
number |
Armor value granted when equipped. |
attribBoosts |
table |
Attribute boosts applied when equipped. |
base |
string |
Base item this item derives from. |
canSplit |
boolean |
Whether the item stack can be divided. |
category |
string |
Inventory grouping category. |
class |
string |
Weapon entity class. |
contents |
string |
HTML contents of a readable book. |
desc |
string |
Short description shown to players. |
entityid |
string |
Entity class spawned by the item. |
equipSound |
string |
Sound played when equipping. |
flag |
string |
Flag required to purchase the item. |
functions |
table |
Table of interaction functions. |
grenadeClass |
string |
Class name used when spawning a grenade. |
health |
number |
Amount of health restored when used. |
height |
number |
Height in inventory grid. |
id |
any |
Database identifier. |
invHeight |
number |
Internal bag inventory height. |
invWidth |
number |
Internal bag inventory width. |
isBag |
boolean |
Marks the item as a bag providing extra inventory. |
isBase |
boolean |
Indicates the table is a base item. |
isOutfit |
boolean |
Marks the item as an outfit. |
isStackable |
boolean |
Allows stacking multiple quantities. |
isWeapon |
boolean |
Marks the item as a weapon. |
maxQuantity |
number |
Maximum stack size. |
model |
string |
3D model path for the item. |
name |
string |
Displayed name of the item. |
newSkin |
number |
Skin index applied to the player model. |
outfitCategory |
string |
Slot or category for the outfit. |
pacData |
table |
PAC3 customization information. |
postHooks |
table |
Table of post-hook callbacks. |
price |
number |
Item cost for trading or selling. |
quantity |
number |
Current amount in the item stack. |
rarity |
string |
Rarity level affecting vendor color. |
replacements |
string |
Model replacements when equipped. |
unequipSound |
string |
Sound played when unequipping. |
uniqueID |
string |
Overrides the automatically generated unique identifier. |
url |
string |
Web address opened when using the item. |
visualData |
table |
Table storing outfit visual information. |
weaponCategory |
string |
Slot category for the weapon. |
width |
number |
Width in inventory grid. |
Field Details
Audio & Interaction
BagSound
Type: table
Description: Sound played when moving items to/from the bag; specified as {path, volume}
.
Example:
ITEM.BagSound = {"physics/cardboard/cardboard_box_impact_soft2.wav", 50}
````
#### `equipSound`
**Type:** `string`
**Description:** Sound played when equipping the item.
**Example:**
```lua
ITEM.equipSound = "items/ammo_pickup.wav"
unequipSound
Type: string
Description: Sound played when unequipping the item.
Example:
Restrictions & Whitelists
DropOnDeath
Type: boolean
Description: Deletes the item upon player death.
Example:
FactionWhitelist
Type: number[]
Description: Allowed faction indices for vendor interaction.
Example:
RequiredSkillLevels
Type: table
Description: Skill requirements needed to use the item.
Example:
SteamIDWhitelist
Type: string[]
Description: Allowed Steam IDs for vendor interaction.
Example:
UsergroupWhitelist
Type: string[]
Description: Allowed user groups for vendor interaction.
Example:
VIPWhitelist
Type: boolean
Description: Restricts usage to VIP players.
Example:
Inventory & Stacking
isBag
Type: boolean
Description: Marks the item as a bag providing extra inventory.
Example:
invWidth
Type: number
Description: Internal bag inventory width.
Example:
invHeight
Type: number
Description: Internal bag inventory height.
Example:
width
Type: number
Description: Width in the external inventory grid.
Example:
height
Type: number
Description: Height in the external inventory grid.
Example:
canSplit
Type: boolean
Description: Whether the item stack can be divided.
Example:
isStackable
Type: boolean
Description: Allows stacking multiple quantities.
Example:
maxQuantity
Type: number
Description: Maximum stack size.
Example:
quantity
Type: number
Description: Current amount in the item stack.
Example:
Categorization & Metadata
base
Type: string
Description: Base item this item derives from.
Example:
isBase
Type: boolean
Description: Indicates the table is a base item.
Example:
category
Type: string
Description: Inventory grouping category.
Example:
name
Type: string
Description: Displayed name of the item.
Example:
desc
Type: string
Description: Short description shown to players.
Example:
uniqueID
Type: string
Description: Overrides the automatically generated unique identifier.
Example:
id
Type: any
Description: Database identifier.
Example:
Equipment & Stats
armor
Type: number
Description: Armor value granted when equipped.
Example:
health
Type: number
Description: Amount of health restored when used.
Example:
attribBoosts
Type: table
Description: Attribute boosts applied on equip.
Example:
isOutfit
Type: boolean
Description: Marks the item as an outfit.
Example:
newSkin
Type: number
Description: Skin index applied to the player model.
Example:
outfitCategory
Type: string
Description: Slot or category for the outfit.
Example:
visualData
Type: table
Description: Table storing outfit visual information.
Example:
pacData
Type: table
Description: PAC3 customization information.
Example:
replacements
Type: string
Description: Model replacements when equipped.
Example:
Combat & Ammo
class
Type: string
Description: Weapon entity class.
Example:
isWeapon
Type: boolean
Description: Marks the item as a weapon.
Example:
grenadeClass
Type: string
Description: Class name used when spawning a grenade.
Example:
ammo
Type: string
Description: Ammo type provided.
Example:
ammoAmount
Type: number
Description: Amount of ammo contained.
Example:
weaponCategory
Type: string
Description: Slot category for the weapon.
Example:
Visuals & Models
model
Type: string
Description: 3D model path for the item.
Example:
Entity & Content
entityid
Type: string
Description: Entity class spawned by the item.
Example:
contents
Type: string
Description: HTML contents of a readable book.
Example:
Economic & Pricing
price
Type: number
Description: Item cost for trading or selling.
Example:
flag
Type: string
Description: Flag required to purchase the item.
Example:
rarity
Type: string
Description: Rarity level affecting vendor color.
Example:
url
Type: string
Description: Web address opened when using the item.
Example:
Behavior & Hooks
functions
Type: table
Description: Table of interaction functions.
Example:
postHooks
Type: table
Description: Table of post-hook callbacks.
Example: