An Options Menu – Part I

We’re back with the Iron Shoe, and I’m so excited to share lots of tips and tricks with y’all about RPG Maker. As I posted on Friday, the Vidar Kickstarter was a success, and that will be taking up a fair amount of time. Expect more dev blog posts going forward about that. However, it means I’ll only be updating on Mondays and Thursdays from here on out. So much to do, so much to do!

Today I’m starting a series on Options Menus. Anyone thinking of releasing an RPG Maker game commercially take note – a basic options menu is expected with any game by players these days. And RPG Maker’s default simply does not cut it.

This isn't going to cut it. Players absolutely demand more customization in how they play the game.

This isn’t going to cut it. Players absolutely demand more customization in how they play the game.

What do I mean by an options menu? A place where the player can go to set certain characteristics about the game, including display, audio, controls, and interface. We’re going to work over the next few weeks on creating a menu that does all of this and more. Today, we want to get our base in, and to do that, we’ll be using Yanfly’s System Options. Add it to your “scripts” list and we’ll get started. Over the next several weeks, you’ll learn to customize basically all of it.

What It Does.

Yanfly’s script is interesting in that it replaces the “Game End” command in your in-game menu with something called “System.” Clicking on System will bring up the Options Menu which includes, among other things, Game End. So don’t worry – your player can still exit the game.

We now have this mysterious menu option, just by adding Yanfly's script.

We now have this mysterious menu option, just by adding Yanfly’s script.

The menu has a bunch more options the player can set.

Window Color – the player can adjust the window color’s RGB values

Volume – the player can adjust the Music, Background Sound, and SFX volumes

Autodash – the player can decide whether to have dash always enabled, to avoid holding down a button

Instant Text – the player can choose whether text should all be displayed at once, rather than seeming to type out

Battle Animations – the player can choose to skin animations in battle

Yanfly's default script. It'll be tuned to your window skin/color, of course.

Yanfly’s default script. It’ll be tuned to your window skin/color, of course.

All of this is done with literally no customization – just drop the script into your game and this is what you’ll get.

Support For Additional Fields

Yanfly’s script also comes with support to give the player control over certain switches and variables. RPG Maker already allows the creator this control – just press F9 to bring up a menu which allows you to set any switch ON or OFF, and set any variable to a number you want.

But without Yanfly’s script, players can’t do that. And there may be reasons you want them to – for example, a player could use a variable to set a difficulty scale in game! You could take the number the player has set “DIFFICULTY” to, and multiply enemy stats by that number every time battle starts, or something similar.

In Yanfly’s script, around line 117, you’ll see lines that are “commented out” – lines that have a # in front of them which means they don’t do anything. You can delete the first hash (not the second!!!!) on any line you want to enable.

Switches – A Profanity Filter

So, suppose we want to allow the player to have total control over a switch in game. It’s switch number 1 in our game, and it will be a “profanity filter.” Any time the player wants, they can go to the menu and turn on or off profanity. We then use that switch in our dialogue options throughout the game. We might have an event that looks something like this:

An example event which would take advantage of the profanity filter.

An example event which would take advantage of the profanity filter.

As you can see, we have a switch, and the dialogue options are different depending on whether that switch is on or not. Now we need to give the player control over that switch. Open up Yanfly’s script and look around line 117 for a line that reads:

#  :switch_1,     # Custom Switch 1. Adjust settings below.

Delete the first # sign only. LEAVE THE SECOND ONE IN. This now enables a single switch in the options menu.

Now scroll down a little to around line 139, for a section that reads:

:switch_1 => [ 1, "Custom Switch 1", "OFF", "ON",
"Help description used for custom switch 1."
],

This is where we define what the menu actually does. The first number in the brackets is the switch ID we want to call. Notice in our screenshot above, “Profanity Filter” is switch 1, so we’ll leave it. Yours will almost certainly be different – make sure to note the switch number!

The first phrase in quotes is the name. We’ll call ours “Profanity Filter.” The next two are what the text should be for “off” and “on.” This might be relevant if you had a switch that controlled difficulty – you could do “EASY” or “HARD.” For our purposes, off and on are perfect.

Finally, we have the “help description.” This is a longer phrase that appears at the top of the menu screen when the player is highlighting the switch in the menu. So we’ll say something like “When ON, all dialogue will be family-friendly!” When we’ve added it, we’ll see this:

Don't worry about the switch 2 stuff, unless you've enabled it in the step before this.

Don’t worry about the switch 2 stuff, unless you’ve enabled it in the step before this (by deleting the #).

And now, when we run the game and go to our Options Menu, we’ll see this:

Help text at the top, title and options in the menu. Working perfectly.

Help text at the top, title and options in the menu. Working perfectly.

The exact same approach applies to setting custom variables. A player will be able to use a slider to adjust any variable, and you can use that in-game to some tremendous effect.

Wrap Up, Going Forward

Yanfly’s script is pretty powerful, but only has a limited set of options. Sometimes, we want to give the player control over something not represented by a switch or variable – we need to be able to do that.  Also, some of the “features” may not actually be desirable – what if I don’t want to replace the “Game End” menu? What if I don’t want to allow the player the chance to change the window color?

The volume controls are great, but having to set three different sliders is a pain. In addition to that level of control, it would be great to have a “master volume” bar. The menu also doesn’t have options for key bindings, something really important for people who are using different control pads or are left handed, or whatever.

The options menu is also only available in-game. But what about from the title screen, where players expect to see it? The options menu also doesn’t save settings between files – can we save the information for our game so that a player doesn’t have to reset them if they start a new game?

We’ll be covering all this and more in the next few weeks!!

Advertisements

One thought on “An Options Menu – Part I

  1. Pingback: An Options Menu – Part V | The Iron Shoe

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s