If you just want to reference an option in-game then you can do so via
Conditional Branch > Script, e.g. to check if the
alwaysDash setting is on:
JavaScript:
ConfigManager['alwaysDash']
You can set a value in a similar way, e.g.
JavaScript:
ConfigManager['alwaysDash'] = true;
Otherwise, note that by default all switches reset on game boot, New Game, and Continue, but in-game options do not (typically) reset like this. It sounds like you will need a plugin that lets specific switches keep their values through these transitions. VisuStella Save Core offers this in the form of "Global Switches":
www.yanfly.moe
If you still want to sync a persistent game switch with an in-game option, that'll require several edits in the parameters of Options Core. I think the easiest approach would be to show the option like normal but only ever reference/change the value of the persistent switch. Basically, you could make a copy of an existing on/off option, e.g.
alwaysDash, then:
- Swap all instances of
this.setConfigValue(symbol, value) for:
JavaScript:
$gameSwitches.setValue(1, value)
- Swap all instances of
this.getConfigValue(symbol) for:
These examples reference game switch 1, change that as appropriate. You might also need to edit other lines, e.g. any direct
ConfigManager[symbol] references.