Help spread the word! Tumblr Linkedin Reddit Flattr

This article discusses the event choices and how we can manipulate it using scripts to allow developers to easily provide more than 4 choices to the players without using any script calls or comments.

We start by understanding what how choices work, some limitations in the choice system, and finally I propose a solution that is easy to use and present an implementation.

Background

RPG Maker provides built-in support for creating a set of choices and what happens when a player chooses a particular choice. It is available in the event editor as the “Show Choices” command.

When you click on the command, it will display a dialog for setting up your choices

You have 5 choices available to work with. You will understand why there are 5 later.

The cancel behaviour dictates what happens when the player presses the cancel button during choice selection.

If it’s disallowed, nothing happens when the player presses cancel. You must pick an option.

If it’s one of the choices, then that choice will be selected when the player presses cancel.

If it’s a branch, it will execute a 5th option (which does not appear in the selection).

Each type of cancel behaviour has its own purpose depending on what you need, so you should experiment with each option to understand how they work.

Choice Branches

Here’s a setup with two choices.

You can see that under each choice, there are more commands. These are called branches, and you can see that the indentation specifies which choice they correspond to. You can have any number of commands under each branch, including more “show choice” commands.

Here’s the same setup, except we use the “branch” cancel option. A new branch now appears

And this is how it appears in the game. As you can see, the cancel option does not appear in the list of selections.

Displaying Message

Sometimes you might want to display a message along with your choices. You can do this by simply using a “show text” command immediately before a “show choice” command. The event interpreter knows that you want to show this message while the choices are displayed.

More Choices?

So far, everything runs smoothly. You can create up to 4 labeled choices and have the player make a selection. You can then set up cancel behaviours to further control what happens when the player decides none of the options are good and wants to back out.

Now what happens if you want to have more than 4 choices? This is when you can start getting creative.

You can call one of the options “More”, which will lead to another set of choices when the player selects that option. You can use the cancel branch to lead the player to more choices

The first option is reasonable: you show three choices, and if the player doesn’t like them, they can select the “More” option to show more choices. You may choose to use the cancel branch to go back to the previous set of choices if they decide to change their mind and want to go back. “Canceling” to go back is a common theme in RPG Maker.

The Approach

It would be convenient if there was an easy way to set up choices. I use the following criteria to determine whether something is easy

It is consistent It is easy to use It is compatible

Consistency means that you want to provide some functionality without making the eventing process feel too different.

Ease-of-use means that you should be able to figure out how to use the solution quickly and not have to do too much work to get it working. If it is consistent, then it will likely be easy to use as well.

Compatibility means that if you’ve already done work on your project (like set up existing choices), you don’t need to go back and change everything because the solution requires you to change how you set up choices.

The Solution

Suppose you want to display 8 choices. Intuitively, this is how it would look: you just have eight choices lined up one after another. You only have 4 choices per command, but that’s ok we can just use more commands.

Unfortunately, the way the event interpreter would handle this by default is to read one set of choices, ask the player to make a selection, and after handling the first choice, it would then proceed to the second set of choices and ask the player to make a selection.

Basically, they are handled separately, which is undesirable. So what do we do? Simply combine them into one large set of choices, and hence the name “Large Choices”.

There are a few design decisions that need to be made at this point, such as how the cancel behaviour should be handled. My decision was to only take the cancel behaviour from the last set of choices. And here is the result: Eight choices in our window with no extra script calls or commands.

You can see an implementation of this idea in the Large Choices script.

Closing

Choice selection is a powerful feature in RPG Maker that allows you to give players control over how they wish to proceed in your game. Despite some limitations due to design decisions, we can come up with ways to overcome these limitations. Fortunately, adding additional choices to your selection was not very difficult to achieve, but there are many other possible solutions, some of which are not as intuitive or easy to use.

Credits

Graphics were taken from Luna Engine’s sample project: Etrian

Spread the Word

If you liked the post and feel that others could benefit from it, consider tweeting it or sharing it on whichever social media channels that you use. You can also follow @HimeWorks on Twitter or like my Facebook page to get the latest updates or suggest topics that you would like to read about.