Astral Realms Documentation Help

Bank

Every town owns a balance handled by BankService. The balance is used to pay claim costs and can be operated by any member with the appropriate permission.

Commands

Command

Permission

Description

/town bank balance

member

Show current balance.

/town bank deposit <amount>

BANK_DEPOSIT

Move money from the player to the town.

/town bank withdraw <amount>

BANK_WITHDRAW

Move money from the town to the player.

Each transaction:

  1. Validates the amount is positive.

  2. Verifies the source has enough funds (BANK_INSUFFICIENT_FUNDS).

  3. Persists the change atomically.

  4. Writes a DEPOSIT or WITHDRAW audit log with a BankLogPayload (amount, target / actor UUIDs).

  5. Sends BANK_DEPOSIT_SUCCESS or BANK_WITHDRAW_SUCCESS.

Claim payments

ClaimService calls into the bank automatically: when cost-expression produces a non-zero amount, the claim attempt deducts from the town balance and surfaces CLAIM_INSUFFICIENT_FUNDS on shortfall — no hand-off is required from the player.

Placeholders

Placeholder

Value

%town_balance%

Raw integer balance.

%town_balanceFormatted%

Formatted with thousands separators.

%towns_current_balanceFormatted%

The viewer's selected town's formatted balance.

TOWN_BALANCE is the formatting template used by the balance menu and the bank confirmation messages.

Last modified: 25 July 2026