Skip to content

sdk.profile ​

Per-character key/value store on game.storage, plus alarm predicates. Alarms log/callback as before and use the optional native alert sink.

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

character ​

function · character(): string

Public alias of the storage namespace character.

Returns

TypeSummary
string—

path ​

function · path(name?: string): string

Sanitized game.storage key: profile_<character>_<name>.

Parameters

NameTypeSummary
namestring—

Returns

TypeSummary
string—

save ​

function · save(name: string, data: ProfileValue): Result?, ErrorMessage?

JSON-write a profile blob. Prefer this over the legacy tab-separated format.

Parameters

NameTypeSummary
namestring—
dataProfileValue—

Returns

TypeSummary
Result?, ErrorMessage?—

load ​

function · load(name: string): ProfileValue?, ErrorMessage?

JSON-read a profile; falls back to decode_legacy for pre-JSON blobs.

Parameters

NameTypeSummary
namestring—

Returns

TypeSummary
ProfileValue?, ErrorMessage?—

remove ​

function · remove(name: string): boolean, ErrorMessage?

Delete one profile key from game.storage.

Parameters

NameTypeSummary
namestring—

Returns

TypeSummary
boolean, ErrorMessage?—

clear_alarm ​

function · clear_alarm(name: string): Result

Drop one named alarm and its last-fire timestamp.

Parameters

NameTypeSummary
namestring—

Returns

TypeSummary
Result—

reset ​

function · reset()

Clear all alarms (tests / logout). Does not wipe stored profiles.

check ​

function · check(snapshot?: table): table[]

Evaluate alarms against a snapshot; honors cooldown and optional native beep/flash.

Parameters

NameTypeSummary
snapshottable—

Returns

TypeSummary
table[]—

alarm ​

function · alarm(name: string, options?: ProfileAlarmOptions): Result?, ErrorMessage?

Register or replace an alarm and start the tick watcher.

Parameters

NameTypeSummary
namestring—
optionsProfileAlarmOptions—

Returns

TypeSummary
Result?, ErrorMessage?—

Arcane SDK catalog generated from scripts/sdk