Making Custom Options in the Options Menu (YEP.165)

Hello!
I'd like to make some custom options in the options menu that control variables and/or switches using Yanfly's Options Core plugin. Not sure if it's possible with this plugin, but it would be amazing to know how to make custom options.
Something that would be great as well is, if I have a switch option, to be able to change ON/OFF to custom text like OPTION_1/OPTION_2.

Thanks to anyone who can help! 👋
Did you watch the video for it? It shows you how to add you're own section to it. You can even copy paste the other sections and use them as a template to get started.
Yes, I did watch it, but I'm still confused on where I can put
Code:
$gameSwitches.value(12)
or change the OFF/ON to custom text. It wasn't very clear to me, especially since I have no skill in javascript coding. 😅

Basically, I'd like to know what code to put in which section to have the ON/OFF value translate to a switch in the game.
I would also like to know if it's possible to change the ON/OFF text to custom text instead.

Sorry to be a bother, but could you help me figure it out?
If you want to use switches you need use "show = $gameSwitches.value[x];" without the quotations and place it in the show/hide section:

Screenshot 2018-12-08 22.10.14.png


As for changing the way options read I'm afraid that I don't know enough coding to change it within the plugin itself. You'll probably need to get a plugin made that can change the wording like you can with Yanfly's battle animation plugin extension.
Thanks for your efforts, however putting the code in the show/hide section results in an error. :\

Spoiler
upload_2018-12-8_19-56-3.png

Both having the code be "show = $gameSwitches.value[12];" or "show = $gameSwitches.value(12);" doesn't appear to work.
Also, is this code just supposed to show the current value of switch 12 or does it actually change the value of switch 12 when it's changed through the option? Or both?

Thanks! 👋
To change the wording, you'll have to change the Draw Option code. Try this: Replace this.drawOptionsOnOff(index); with this.drawOptionsOnOff(index, "on text", "off text");
Thanks for that @TakeHomeTheCup! Works great!~

Now I'm just gonna have to find out how to tie the switch's value to the toggle.
"show = $gameSwitches.value[x];" makes the option show up in the option menu. As for turning a switch on I regret to inform that again I am at a lost on how to do that from the menu itself. What I do is have an state be applied, like in this tutorial, and then I have a common event run when closing the window that checks if the state is applied and turns on and off switches from there.
Alright, thanks for your help!
In process OK code: replace this.changeValue(symbol, !value); with $gameSwitches.setValue(id of switch, !value);
Try that.
Okay, so I did that and unfortunately ended up with it not switching between ON/OFF when pressing enter.

So instead, I kept the this.changeValue(symbol, !value) but put $gameSwitches.setValue(12, !value); in the line below it.
This worked. (This is the Process OK Code btw)

Then I added $gameSwitches.setValue(12, true); to the current code in Cursor Right code and $gameSwitches.setValue(12, false); in Cursor Left Code.

This works great!
New problem though....
How can I have the value shown on the option update when I change the switch's value in-game?

I'll try messing around and see if I can come up with anything.
Process Okay Code:
Spoiler
var index = this.index();
var symbol = this.commandSymbol(index);
var value = $gameSwitches.value(12);

$gameSwitches.setValue(12, !value);

Cursor Right Code:
Spoiler
var index = this.index();

var symbol = this.commandSymbol(index);

var value = $gameSwitches.value(12);

$gameSwitches.setValue(12, true);

Cursor Left Code:
Spoiler
var index = this.index();

var symbol = this.commandSymbol(index);

var value = $gameSwitches.value(12);

$gameSwitches.setValue(12, false);

Load-, Default and Save Config code can be empty.
This just makes it so I can't change the selection from ON/OFF on the options menu.
Changing the value in-game doesn't change it either. :/

Maybe I can have a script call when I change the switch to manually change the ON/OFF option in the options menu?
Oh, sorry. I didn't know that the script relies on the "Config values"...

Process Okay Code:
Spoiler
var index = this.index();
var symbol = this.commandSymbol(index);
var value = $gameSwitches.value(12);

$gameSwitches.setValue(12, !value);
this.changeValue(symbol, !value);

Cursor Right Code:
Spoiler
var index = this.index();

var symbol = this.commandSymbol(index);

var value = $gameSwitches.value(12);

$gameSwitches.setValue(12, true);
this.changeValue(symbol, true);

Cursor Left Code:
Spoiler
var index = this.index();

var symbol = this.commandSymbol(index);

var value = $gameSwitches.value(12);

$gameSwitches.setValue(12, false);
this.changeValue(symbol, false);

Load config code can be: ConfigManager[symbol] = $gameSwitches.value(12);
That should fix both problems.
I'm getting this error:
Spoiler
upload_2018-12-9_15-55-1.png
Okay, use the default load code: ConfigManager[symbol] = config[symbol];
Sorry, I'm not testing. I'm just throwing ideas around.
It doesn't throw an error anymore, but it still won't update when I change the switch in-game.
And don't worry, this is a great way for me to learn how this works. XD
So apparently it's the draw code. Try replacing it with this:
Spoiler
var rect = this.itemRectForText(index);
var statusWidth = this.statusWidth();
var titleWidth = rect.width - statusWidth;
var halfStatusWidth = this.statusWidth() / 2;
this.resetTextColor();
this.changePaintOpacity(this.isCommandEnabled(index));
this.drawOptionsName(index);
var value = $gameSwitches.value(12);
this.changePaintOpacity(!value);
this.drawText("off text", titleWidth, rect.y, halfStatusWidth, 'center');
this.changePaintOpacity(value);
this.drawText("on text", titleWidth + halfStatusWidth, rect.y, halfStatusWidth,'center');
Are you some kind of a coding wizard?
It works perfectly, thank you so much @TakeHomeTheCup!

And thanks to you too @Uzuki! Your efforts were much appreciated!
Thread closed IgnoreMe

Original thread: https://forums.rpgmakerweb.com/threads/making-custom-options-in-the-options-menu-yep-165.103087/