Appearance
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
Returns shared when no character is available.
Returns
| Type | Summary |
|---|---|
string | — |
path
function · path(name?: string): string
JSON-backed, per-character profile service. Encoded data is subject to the native 2 MiB storage limit and must not contain functions/userdata/threads.
Parameters
| Name | Type | Summary |
|---|---|---|
name | string | — |
Returns
| Type | Summary |
|---|---|
string | — |
save
function · save(name: string, data: ProfileValue): Result?, ErrorMessage?
JSON-backed, per-character profile service. Encoded data is subject to the native 2 MiB storage limit and must not contain functions/userdata/threads.
Parameters
| Name | Type | Summary |
|---|---|---|
name | string | — |
data | ProfileValue | — |
Returns
| Type | Summary |
|---|---|
Result?, ErrorMessage? | — |
load
function · load(name: string): ProfileValue?, ErrorMessage?
JSON-backed, per-character profile service. Encoded data is subject to the native 2 MiB storage limit and must not contain functions/userdata/threads.
Parameters
| Name | Type | Summary |
|---|---|---|
name | string | — |
Returns
| Type | Summary |
|---|---|
ProfileValue?, ErrorMessage? | — |
remove
function · remove(name: string): boolean, ErrorMessage?
JSON-backed, per-character profile service. Encoded data is subject to the native 2 MiB storage limit and must not contain functions/userdata/threads.
Parameters
| Name | Type | Summary |
|---|---|---|
name | string | — |
Returns
| Type | Summary |
|---|---|
boolean, ErrorMessage? | — |
clear_alarm
function · clear_alarm(name: string): Result
JSON-backed, per-character profile service. Encoded data is subject to the native 2 MiB storage limit and must not contain functions/userdata/threads.
Parameters
| Name | Type | Summary |
|---|---|---|
name | string | — |
Returns
| Type | Summary |
|---|---|
Result | — |
reset
function · reset()
JSON-backed, per-character profile service. Encoded data is subject to the native 2 MiB storage limit and must not contain functions/userdata/threads.
check
function · check(snapshot?: table): table[]
JSON-backed, per-character profile service. Encoded data is subject to the native 2 MiB storage limit and must not contain functions/userdata/threads.
Parameters
| Name | Type | Summary |
|---|---|---|
snapshot | table | — |
Returns
| Type | Summary |
|---|---|
table[] | — |
alarm
function · alarm(name: string, options?: ProfileAlarmOptions): Result?, ErrorMessage?
JSON-backed, per-character profile service. Encoded data is subject to the native 2 MiB storage limit and must not contain functions/userdata/threads.
Parameters
| Name | Type | Summary |
|---|---|---|
name | string | — |
options | ProfileAlarmOptions | — |
Returns
| Type | Summary |
|---|---|
Result?, ErrorMessage? | — |