Chris' Tutorials
Docs/Item Vault

Class

Wallet

Generated GDScript class reference for ItemVault.Wallet.

StatusDraft
Versionv1.0
UpdatedDevelopment docs generated from GDScript source

This is unreleased documentation in active development. APIs, class names, and behavior may change before the final release.

Draft — Unreleased:This page is in active development. APIs, class names, and behavior may change before the release is finalized. Use it as a preview of what's coming — not as a stable integration target.

Source: addons/item_vault/inventory/wallet.gd

Syntax

class Wallet extends RefCounted

Members

NameKindSummary
currency_changedEventCurrency container. Sub-component of ItemContainer, but also usable standalone. Currencies are identified by StringName (e.g. &"coins", &"gems", &"research_points"). The wallet tracks a balance per currency id. There is no implicit cap; cap logic lives in the game (e.g. weight, level, quest progress) and is enforced externally via can_afford / add / remove round-trips. A wallet may be a sub-component of an Inventory (so a player has one container holding both items and currencies) or a standalone instance (e.g. an NPC's quest reward pool). The class doesn't care. Buy/sell transactions move currencies atomically: add_coins() and remove_coins() return the new balance or a negative number on failure, so callers can roll back on partial failure. Emitted whenever any currency's balance changes. payload: { "currency": StringName, "old": int, "new": int }
get_balanceMethod
can_affordMethod
balancesMethod
currenciesMethod
outProperty
addMethod
old_balanceProperty
new_balanceProperty
removeMethod
old_balanceProperty
takenProperty
new_balanceProperty
set_balanceMethod
old_balanceProperty
clearMethod
affectedProperty
transfer_fromMethod
takenProperty
resultProperty
merge_fromMethod
nProperty
balProperty
to_dictMethod
dProperty
balProperty
from_dictMethod
currencyProperty
amountProperty

Source

addons/item_vault/inventory/wallet.gd

Plugin docs root:gdscript/plugins/item_vault_dev/addons/item_vault/guides