rsmm.sdk.config
rsmm.sdk.config
Section titled “rsmm.sdk.config”Per-mod config: schema validation + persisted store.
Schema:
{fields.
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/
ConfigStore
Section titled “ConfigStore”ConfigStore.get
Section titled “ConfigStore.get”ConfigStore.get(self, key: 'str', fallback: 'Any' = None) -> 'Any'Read a config value by key, returning fallback if unset.
ConfigStore.set
Section titled “ConfigStore.set”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.
