FrameworkZ API Documentation - FrameworkZ.Inventories
FrameworkZ.Inventories
The Inventories module for FrameworkZ. Defines and interacts with INVENTORY object.
0
Functions
10
Methods
4
Fields
📋 On This Page
- Overview
- Statistics
- Fields4
- Methods10
- FrameworkZ.Inventories:GetInventoryByID
- FrameworkZ.Inventories:GetItemByUniqueID
- FrameworkZ.Inventories:GetItemCountByID
- FrameworkZ.Inventories:Initialize
- FrameworkZ.Inventories:New
- FrameworkZ.Inventories:Rebuild
- FrameworkZ.Inventories:Restore
- FrameworkZ.Inventories:RestoreEquipment
- FrameworkZ.Inventories:RestoreLogicalItems
- FrameworkZ.Inventories:Save
Fields
4
FrameworkZ.Inventories
📋 table
The Inventories module for FrameworkZ. Defines and interacts with INVENTORY object.
Initial value:
{}
FrameworkZ.Inventories.SlotLookup
❓ unknown
inferred
Initial value:
FrameworkZ.Characters.SlotList or {
FrameworkZ.Inventories.SlotNameLookup
❓ unknown
inferred
Initial value:
{ [FZ_SLOT_BANDAGE] = FZ_ENUM_CHARACTER_SLOT_BANDAGE, [FZ_SLOT_WOUND] = FZ_ENUM_CHARACTER_SLOT_WOUND, [FZ_SLOT_BELT_EXTRA] = FZ_ENUM_CHARACTER_SLOT_BELT_EXTRA, [FZ_SLOT_BELT] = FZ_ENUM_CHARACTER_SLOT_BELT, [FZ_SLOT_BELLY_BUTTON] = FZ_ENUM_CHARACTER_SLOT_BELLY_BUTTON, [FZ_SLOT_MAKEUP_FULL_FACE] = FZ_ENUM_CHARACTER_SLOT_MAKEUP_FULL_FACE, [FZ_SLOT_MAKEUP_EYES] = FZ_ENUM_CHARACTER_SLOT_MAKEUP_EYES, [FZ_SLOT_MAKEUP_EYES_SHADOW] = FZ_ENUM_CHARACTER_SLOT_MAKEUP_EYES_SHADOW, [FZ_SLOT_MAKEUP_LIPS] = FZ_ENUM_CHARACTER_SLOT_MAKEUP_LIPS,
FrameworkZ.Inventories.Types
📋 table
inferred
Initial value:
{ Character = "Character", Container = "Container", Vehicle = "Vehicle" }Methods
10FrameworkZ.Inventories:GetInventoryByID(id)
method
undocumented
No documentation available
Parameters (inferred)
id
unknown
Parameter inferred from function signature
Returns (inferred)
❓ unknown
Return type inferred from function name pattern
FrameworkZ.Inventories:GetItemByUniqueID(inventoryID, uniqueID)
method
undocumented
No documentation available
Parameters (inferred)
inventoryID
unknown
Parameter inferred from function signature
uniqueID
unknown
Parameter inferred from function signature
Returns (inferred)
❓ unknown
Return type inferred from function name pattern
FrameworkZ.Inventories:GetItemCountByID(inventoryID, uniqueID)
method
undocumented
No documentation available
Parameters (inferred)
inventoryID
unknown
Parameter inferred from function signature
uniqueID
unknown
Parameter inferred from function signature
Returns (inferred)
❓ unknown
Return type inferred from function name pattern
FrameworkZ.Inventories:Initialize(id, object)
method
Initialize an inventory.
Parameters
id
📋 table
The inventory's id.
object
📋 table
The inventory's object.
Returns
🔢 integer
The inventory's ID.
FrameworkZ.Inventories:New(username, type, id)
method
Create a new inventory object.
Parameters
username
📝 string
The owner's username. Can be nil for no owner.
type
📝 string
The type of inventory. Can be nil, but creates a character inventory type by default. Refer to FrameworkZ.Inventories.Types table for available types.
id
📝 string
The inventory's ID. Can be nil for an auto generated ID (recommended).
Returns
📋 table
The new inventory object.
FrameworkZ.Inventories:Rebuild(isoPlayer, inventory, items)
method
Recursively traverses the inventory table for missing data while referencing the item definitions to rebuild the inventory.
Parameters
inventory
📋 table
The inventory to rebuild.
Returns
📋 table
The rebuilt inventory.
FrameworkZ.Inventories:Restore(character, inventoryData)
method
Restore character inventory and equipment data
Parameters
character
📋 table
The character object
inventoryData
📋 table
The saved inventory data
Returns
✅ boolean
Whether restoration was successful
FrameworkZ.Inventories:RestoreEquipment(character, inventoryData)
method
Restore all equipment (both physical and logical) for a character
Parameters
character
📋 table
The character object
inventoryData
📋 table
The complete inventory data containing equipment info
Returns
✅ boolean
Whether restoration was successful
FrameworkZ.Inventories:RestoreLogicalItems(character, logicalInventoryData)
method
Restore equipped FrameworkZ items (logical items) - DEPRECATED: Use RestoreEquipment instead
Parameters
character
📋 table
The character object
logicalInventoryData
📋 table
The logical inventory data containing equipped items
Returns
✅ boolean
Whether restoration was successful
FrameworkZ.Inventories:Save(character)
method
Save character inventory and equipment data
Parameters
character
📋 table
The character object with inventory
Returns
📋 table
The complete inventory data including equipment