Skip to main content

Introduction

This component provides inventory for a character or object

"Inventory"

Fields#

NameDescription
RegisterPlace in the Tool Registry so it can be found easily by other components
Registry KeyKey to associate with this instance
Auto Convert FundsAutomatically convert funds when added/removed
PluginsList of plugins
SourceDetermine if source is a Direct Reference or in the Tool Registry
Stats KeyKey used to find source
On Recipe LearnedEvent raised when a recipe is learned
On Craft Queue AddedEvent raised when an item enters crafting queue
On Craft Queue RemovedEvent raised when an item exists crafting queue
On Equipment ChangeEvent raised whenever item equip status changed
On ShutdownEvent raised when system shuts down
On InitializedEvent raised when system is initialized
On Theme ChangedEvent raised whenever the active theme changes
Ignore LimitsIgnore item & category limits
Display NameName of the creature or object attached
ColorColor associated with this object
Broadcast MessagesBroadcast message to 'GDTK_Inventory' channel
On Funds ChangedEvent raised when funds are added or removed
On Item AddedEvent raised when an item is added to inventory
On Item RemovedEvent raised when an item is removed from inventory
On Inventory ChangedEvent raised when any inventory change occurs
On Item Count ChangedEvent raised whenever item count changes
On Weight ChangedEvent raised when total weight changes
On Display Name ChangedEvent raised when Display Name changes
On Color ChangedEvent raised when Color changes

Properties#

NameDescription
activeThemeGets/Sets the active theme
anyUnholsteredItemsGets if any equipped items that can be holstered are not
busyTrue if the system is currently loading or saving data.
craftingQueueGets a list of all items in the Crafting Queue
equippedItemsGets a list of all currently equipped items
initializedGets if the object has been initialized
knownRecipiesGets a list of all Recipes known to this object
quickSlotsGets a list of all Quick Slots for this object
remoteStatsGets the Stat Source bound to this object (Requires GDTK: Stats)
statSourceGets the Item Stat Source
totalFundsGets the total value of all non-premium funds
totalFundsWeightGets the total weight of all non-premium funds
totalWeightGets the total weight of all items and funds
actorGets reference to the associated actor
colorColor associated with this object
displayNameName of the creature or object attached
instanceIdGet the id of this instance of the object
itemContainerGets the item container
itemsGets a list of all items in the container
statIdsList of all Stat Ids
totalItemWeightGets the total weight of all items in the container

Methods#

NameDescription
AddFundsAdd non-preimum funds to inventory
AddFundsPremiumAdd preimum funds to inventory
AutoConvertFundsAutomaticaly convert non-preimum funds to use the lowest possible count
CanCraftCheck if a Recipe can be crafted
CanCraftInstantlyCheck if a Recipe can be crafted instantly
ClearFundsRemove all funds
CraftCraft a Recipe
DataLoadLoads data from a specified file
DataLoadJSONLoads JSON data from a JSON string
DataLoadJSONFileLoads JSON data from a specified file
DataSaveSaves data to a specified file
DataSaveJSONSaves JSON data to a specified file
GetCurrencyCountGet the current count of a currency in inventory
GetEquippedItemGet the item currently equipped to a Equip Slot
GetEquippedItemByGroupGet the item currently equipped to a group name
GetEquipSlotClientGet the EquipSlotClient associated with an EquipSlot
GetEquipSlotClientsByGroupGet all EquipSlotClients associated with a group
GetHolsterSlotClientGet the HolsterSlotClient associated with an HolsterSlot
GetItemByInstanceIdGet an item by its instance id
GetItemCategoryGet an Item Category
GetPremiumFundsGet count of premium funds in inventory
GetQuickSlotGet a Quick Slot
InitializeInitialize the object
IsRecipeKnownGet if a Recipe is known to this inventory
IsTrueCheck if an expression is true
ItemTotalCountGet the total count of an item in inventory
LearnRecipeAdd recipe to known list by id
RegisterEquipClientRegister an EquipClient for this inventory
RegisterHolsterClientRegister an HolsterClient for this inventory
RemoveFundsRemove non-premium funds from inventory
RemoveItemRemove item from inventory
RemoveItemByInstanceRemove item from inventory
ShutdownShutdown object and remove all subscriptions
ToggleWindowByIdOpen/Close a window by id
UpdateSetBonusUpdate Item Set Bonus values
AddItemAdd an item to the container
AddItemsAdd a list of items item to the container
GetStatValueGet the value of a stat
RefreshActorAttempt to find actor for component
ReplaceItemReplace an existing item with a new one
RunPluginCommandRun a plugin on an item