1. Home
  2. Docs
  3. Inventory System
  4. Documentation
  5. Inventory Component

Inventory Component

Server Only does not mean they can only be executed on servers. Server Only mean that clients can not securely access this function and need to use the equivilant “SERVER // ” event to execute these functions.
Normally clients send a interface message to the controller and the controller sends a event to the server to execute the request. (See example inventory controller)

Function NameServerOnlyDescription
GetBaseResistanceNoReturn the base value of the corresponding resistance
GetBasePenetrationNoReturn the base value of the corresponding penetration
GetBaseCritChanceNoReturn the base value of the crit chance
GetBaseCritDamageNoReturn the base value of the crit damage
GetBaseDamageValueNoReturn the base value of the corresponding damage type
SetEquipmentPenetrationYesSet the equipment penetration (calculated value of all equipment slots)
SetEquipmentResistanceYesSet the equipment resistance (calculated value of all equipment slots)
SetEquipmentDamageValueYesSet the equipment damage value (calculated value of all equipment slots)
GetBaseDodgeChanceNoReturn the base value of the dodge chance
GetBaseBlockChanceNoReturn the base value of the block chance
GetBaseBlockDamageMultiplierNoReturn the base value of the block damage multiplier
GetBaseResourceRegenerationIntervalNoReturn the base regeneration interval of the corresponding resource
GetBaseResourceRegenerationDelay
NoReturn the base regeneration delayof the corresponding resource
GetBaseResourceRegenerationValueNoReturn the base regeneration value of the corresponding resource
GetBaseResourceMaxValueNoReturn the base max value of the corresponding resource
SetEquipmentResourceRegenerationIntervalYesSet the equipment resource regeneration interval (calculated value of all equipment slots)
SetEquipmentResourceRegenerationDelayYesSet the equipment resource regeneration delay (calculated value of all equipment slots)
SetEquipmentResourceRegenerationValueYesSet the equipment resource regeneration value (calculated value of all equipment slots)
SetEquipmentResourceMaxValueYesSet the equipment resource max value (calculated value of all equipment slots)
SetEquipmentResourceStealYesSet the equipment resource steal (calculated value of all equipment slots)
GetBaseResourceStealNoReturn the base resource steal of the corresponding resource
GetInventoryNoReturn all items of the inventory
IsSlotEmpty?NoReturn true if the slot is empty
SetInventorySlotYesSets the inventory slot and recalculate values if its a equipment slot
FindEmptyInventorySlotNoFind the first empty inventory slot
AddItemToInventoryYesAdd a item to inventory. It will try to stack them before adding. Must have enough space to store all items in individual slots
FindSlotsWithItemNoFinds the all slots with this item
TryToAddStacksToSlotYesTry to add x stacks to a slot, return the remaining stacks
FindFirstSlotWithItemNoFind the first slot with this item
GetEmptySlotAmountNoReturn the amount of empty slots
GetInventoryItemNoReturn the item in a specific slot
RemoveItemsYesRemove items. Inventory must contain all items or it will interrupt
CanStoreItemNoReturn true if inventory can store that item in empty slots
GetItemAmountNoReturn the amount of that item in the inventory over all slots
GetEquipmentNoReturn all items in the equipment slots
IsEquipmentSlotNoReturn true if its a equipment slot
GetEquipmentStatsNoReturn all stats of the equipped items
UpdateEquipmentValueYesUpdates a specific equipment value
GetBaseMaxWalkSpeedNoReturn the base value of the max walk speed
Create Default Inventory SlotsYesClears the inventory and add x empty slots
HasItemsNoCheck if the inventory contains items/amounts

VariableNameDescription
EquipmentCritChanceCalculated value of all equipment slots crit chance
EquipmentCritDamageCalculated value of all equipment slots crit damage
EquipmentPenetrationsCalculated value of all equipment slots penetrations
EquipmentResistancesCalculated value of all equipment slots resistances
EquipmentDamageValuesCalculated value of all equipment slots damage values
EquipmentDodgeChanceCalculated value of all equipment slots dodge chances
EquipmentBlockChanceCalculated value of all equipment slots block chances
EquipmentBlockDamageMultiplierCalculated value of all equipment slots block damage multiplier
EquipmentResourceRegenerationIntervallsCalculated value of all equipment slots resource regeneration intervals
EquipmentResourceRegenerationDelaysCalculated value of all equipment slots resource regeneration delays
EquipmentResourceRegenerationValuesCalculated value of all equipment slots resource regeneration values
EquipmentResourceMaxValuesCalculated value of all equipment slots resource max values
EquipmentResourceStealCalculated value of all equipment slots resource steals
EquipmentMaxWalkSpeedCalculated value of all equipment slots max walk speed
ConstantStaminaMaxValueConstant value that will be added while calculating max stamina
ConstantHealthMaxValueConstant value that will be added while calculating max healt
ConstantCritDamageConstant value that will be added while calculating crit damage
ConstantStaminaRegenerationValueConstant value that will be added while calculating stamina regeneration
ConstantHealthRegenerationValueConstant value that will be added while calculating health regeneration
ConstantMaxWalkSpeedConstant value that will be added while calculating max walk speed
ConstantBlockDamageMultiplierConstant value that will be added while calculating block damage multiplier
InventoryArray that holds all items
EquipmentSlotsAll default equipment slots that are added on construction
DefaultInventorySizeDefault size of the inventory

The inventory component is not used directly. If you want to move items etc. use the inventory manager component.

How can we help?