MZ VisuStella Option Core: Adjusting from outside options menu.

Hello!

This has been puzzling me for a few hours. It's good practice since I'm learning JavaScript, but I'm stumped.

I want to be able to, through a script call outside of the options menu, be able adjust an option within the Option Core. I have set a difficulty toggle inside the options menu, that flips switches 646/647 when it toggles. Easy enough.

Spoiler: Image
s1.jpg



However, I'd really like it if I can have the player set the difficulty shortly after starting the game, and based off their choice (which will be through a standard choice window), the options menu will adjust accordingly. I'm trying to figure out the right thing to call to get it to run the code in the second image below (essentially, setting the "symbol" value of setConfigValue to true).

The unique name I gave the option was "Difficulty."

Spoiler: Code
s3.jpg
1642050266983.png


Probably a long shot, but I figured maybe I'd learn something from someone. TIA.




>> EDIT <<

Solution: Ended up being a lot simpler than I thought. Inside of every option is the "Symbol" category. This is important, as it is the unique identifier of that option.

Spoiler: Image
1642290718356.png

To change an option from true to false or vice versa, you'd do the following call: ConfigManager.symbol = boolean

'symbol' would be whatever you called it in the plugin manager.

Spoiler: Image
1642290593651.png

I haven't encountered any issues yet. Seems to be working just fine. It looks like true/false is the default setup for options with two choices (with false being the left option and right being the true option). For options with more than 2 choices, from what I can see it seems like they are identified with numbers: 0, 1, 2, 3. I haven't tested this out at all, though.
Thread closed

Original thread: https://forums.rpgmakerweb.com/threads/visustella-option-core-adjusting-from-outside-options-menu.143911/