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.
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."
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.
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.
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.
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.
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."
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.
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.
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.