Skip to content

sdk.resources ​

Session ResourceBalance cache keyed by official type. Bank / inventory gold / prey / hunting / dust arrive when those windows update; last-write-wins per type, not per event name. Canary Resource_t is intent for the type field (not a packet opcode).

lua
local M = require("sdk.resources")

Constants ​

Lua 5.4 has no enums — these are integer (or string) fields on the module.

NameValueSummary
BANK0—
INVENTORY_GOLD1—
PREY_WILDCARDS10—
INSTANT_REWARD20Canary Resource_t / 0xEE resource byte. Instant Reward Access + daily jokers.
DAILY_REWARD_JOKERS21—
HUNTING_POINTS50—
DUST70—

note ​

function · note(ev)

Last-write-wins ResourceBalance row by official type id. Keyed by type, not event name; bank and dust share this cache. Ignores events without a numeric type.

get ​

function · get(type_id)

Cached row for a Resource_t type, or nil. Row may have balance and/or amount depending on the packet. Callers treat nil as 'not seen this session'.

bankGold ​

function · bankGold()

Last bank gold balance, or nil if unseen. Not inventory gold; goldBalance() sums both. Windows update this via ResourceBalance.

inventoryGold ​

function · inventoryGold()

Last carried gold balance, or nil if unseen. Separate type from BANK; do not substitute. Nil until the inventory gold window has fired.

goldBalance ​

function · goldBalance()

Bank + inventory gold; nil only if both unseen. A single seen side counts as 0 + that side. Jobs use this before walking to a shop.

dusts ​

function · dusts()

Last dust balance (type 70). amount on the same row is dustsMaximum(), not confirmed max. Nil until the dust window updates.

dustsMaximum ​

function · dustsMaximum()

Companion amount on the dust row. Not a confirmed max-dust type id.

huntingPoints ​

function · huntingPoints()

Last hunting-task points (type 50). Not prey wildcards; that is type 10. Nil until seen.

preyWildcards ​

function · preyWildcards()

Last prey wildcard count (type 10). Instant reward / daily jokers are other types. Nil until seen.

request ​

function · request(type_id)

Send RequestResourceBalance for one type. Does not wait; M.note fills the cache when the server answers. type required or nil, 'type required'.

reset ​

function · reset()

Drop the session cache (SessionEnd). ensure_bound hooks this automatically. Does not unbind the game.on listeners.

Arcane SDK catalog generated from scripts/sdk