English Dub switch in System Options

Hello,

I have a question in regards to Yanfly's System Option script for RPG Maker VX Ace. There is an option where you can create your own switches and variables in the game options menu, but there's not a whole lot I know about coding. However with what I want to do I think I can tackle this if I can get some ideas from you guys. I'm looking to create a switch option for the player to enable or disable English dub since I will be including English voice overs for my game.



Any advice on how I can create an on/off switch for English Dub in the game's system options?

You all have been a great big help, if anyone could help me with this I would be deeply appreciated.



~ Omar
Any advice
If your english subs work by turning a switch on then that is super easy to add to yanfly's system options.

You just need to put the information in two spots.

Under COMMANDS =[
where you see window_red, green, volume_bgs, etc.
Just add in a line for the switch you want to use.
: switch_3,
Now by default yanfly has two in the script already. If you don't have them used at all then you can just use one of those. They are # switch 1, and # switch 2

Just take the # off the first one.

Next Under CUSTOM_SWITCHES =[
Write in the information you want to display and change the number to whatever switch you are using.
By default it is
:switch_1 => [ 1, "Custom Switch 1", "OFF", "ON",
"Help description used for custom switch 1."
],
So you can just change it to:
:switch_1 => [ 41, "English Subs", "OFF", "ON",
"Change if English subs will be shown."
],

Then when you play and set the value to on, the script changes the switch 41 to on. (or whatever number you are using)
So what would be the proper use of the number? Sorry if I sound kinda new at this, sorta figuring this out as I go along. Should I create an event named after the number the switch is designated to?
So what would be the proper use of the number?
I'm kinda confused with you not understanding. Sorry.

Proper use of the number? What number? The switch?
create an event named after the number the switch is designated to?
Very confused. How much of the engine are you familiar with? Perhaps you need to read some tutorials. There are links in my signature block
Here
↓
Yes, sorry. The number for the switch.
I assumed it has some purpose to the switch itself.

Since I will be adding voice dub along with the text in the events I need to connect it to the switch somehow don't I?
Sorry, I should have clarified that a lot better.
Since you double posted, I assume you don't know the forum rules. You should go read those.

Again, a bit confused. What your saying does not match very well to my understanding of the engine or logic. I don't know what you are uncertain of.

So, the number IS the switch. The number, 41 in the example given previously, is the switch number. I don't know how else to describe it.
Switches have two states, true or false. If you turn switch 41 to true then whatever you set to happen will happen when the switch is on (true).

When you play test, press F9. A screen comes up showing the switches and variables in the game. It shows their status. Switches, on or off and variables what value is assigned to them.
You can have, I think it's, 5000 switches in the game.
Ohh okay. Gotcha.

I've moved this thread to RGSS3 Script Support. Thank you.

Thanks.

I probably have one more question. I am able to access the system options during gameplay, I don't suppose there's a way to include the system options on the main menu of the title screen?

I am also trying to see if I can somehow have the switch set to on by default. :/
access the system options during gameplay
Yanfly system options?
Thanks.

I probably have one more question. I am able to access the system options during gameplay, I don't suppose there's a way to include the system options on the main menu of the title screen?

I am also trying to see if I can somehow have the switch set to on by default. :/
This should help you with the title options thing:
Spoiler
Oh, Awesome! Thanks for that! Now to figure out how to set the default switch to "on".
Thanks for all your help so far, I'll be sure to add names on the credits in the Thank You section. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/english-dub-switch-in-system-options.126264/