Skip to content

rsmm.sdk.config

Per-mod config: schema validation + persisted store.

Schema: {fields..{type, default, min, max, label, choices, enum, source}}

Types: bool, int, float, string, enum, multiselect, item-grid.

A multiselect field holds a LIST of ids. Its options are either spelled out in choices, or fetched from an allowlisted provider named by source — see rsmm.sdk.config_choices. A provider supplies a label, a group and an icon per option, which is what lets the client draw a searchable grid of game art instead of a wall of internal ids.

An item-grid field holds game items sorted into mod-declared sections, with an optional number per item. Its layout, filters and optional theme of game textures are declared in the schema itself — see rsmm.sdk.config_grid.

Storage: mods//config.toml — user-edited values mods//config_schema.toml — schema (authored by modder)

ConfigStore.get(self, key: 'str', fallback: 'Any' = None) -> 'Any'

Read a config value by key, returning fallback if unset.

ConfigStore.set(self, key: 'str', value: 'Any') -> 'None'

Set a config value, coercing to the schema field’s type and persisting.

Raises ConfigError if key is not declared in the schema.