Skip to content
ct

Class

ItemStack

Generated GDScript class reference for ItemVault.ItemStack.

Status
Current
Version
v1.0
Updated
2026-07-31

A mutable stack of a single item type. Holds a reference to its ItemDefinition plus a quantity, with optional per-instance overrides.

Source: addons/item_vault/items/item_stack.gd

Syntax

class ItemStack extends RefCounted

Members

NameKindSummary
itemPropertyThe item type this stack represents.
quantityPropertyCurrent quantity in this stack.
instance_idProperty--- Optional instance overrides (0 / empty = use definition default) --- Unique identity for this particular stack instance (e.g. for save/load tracing).
stack_idPropertyStable identity for the concrete stack boundary. This is intentionally separate from [member instance_id]: one retained item instance can move through a stack, while stack_id identifies the storage boundary itself.
max_overridePropertyOverride for max_stack on this specific stack. 0 = use item.max_stack.
weight_overridePropertyOverride for weight on this specific stack. 0 = use item.weight.
resourcesPropertyRetained numeric resources attached to this item instance (charges, durability, fuel, water, energy, or another game-defined quantity).
effective_maxMethod
effective_weightMethod
is_fullMethod
spaceMethod
copy_with_quantityMethod
has_resourceMethod
resource_amountMethod
set_resourceMethod
to_dictMethod
from_dictMethod