volvox.Config (defined in Util/Config.lua) reads and writes JSON settings files under scripts/LootRoute/, keyed by character and realm, with in-memory caching.
Storage
- Path template:
scripts/LootRoute/DemonGUISettings<CharacterName><RealmName>.json(relative toC:/WGG/; realm whitespace stripped; either piece falls back to"Unknown"during early login). The directory is created on load if missing. - Key format: flat dotted-namespace strings — e.g.
gatherer.enabled,general.tickrate,modules.gatherer. Keys are top-level entries in the JSON object, not nested tables. - File I/O and JSON resolve through
volvox.ResolveApiFunction, so the layer works across WGG API naming variants. Profile decoding accepts both direct table returns and WGG’s Lua-source string return form. If a profile exists only at the legacyscripts/Gatherer/orconfigs/Demon/path, it is read once and migrated toscripts/LootRoute/.
Read fallback chain
Config:Read resolves a value in this order:
- Stored value in the cached per-character profile
- Registered default (set via
SetDefault) - Caller-supplied
defaultargument
API
Read
Write
true only when WGG accepts the file write.
SetDefault
SetDefault does not write unset defaults to disk; a key appears in the profile JSON only after Config:Write persists it. GUI builder widgets call this automatically for every keyed widget.
GetAll
function/userdata values). Empty table when no profile exists.
ClearCache
Example
The status toggle frame (
volvox:AddGlobalToggle) uses its own persistence file, scripts/LootRoute/DemonStatusFrame.json, independent of volvox.Config, with legacy read fallbacks from scripts/Gatherer/DemonStatusFrame.json and configs/Demon/DemonStatusFrame.json..png?fit=max&auto=format&n=yZatCT6YQ7S22QWv&q=85&s=bb502db827d4362d1268445c3b70d21d)