Conditional Choice Text

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

RPG Maker allows you to offer your players choice selection, and depending on which choice they pick, your events will behave differently.

However, what happens if you wanted to have a particular choice display a different text, depending on whether certain conditions have been met? Maybe if you haven’t found an item that allows you to understand what the locals are saying in a foreign language, all of the text that is shown will be garbled.

In particular, if you combine it with a plugin that allows you to disable choices, you could show question marks instead of the actual text.

With this plugin, you can easily change a choice’s text using events.

Download

Plugin: download here (right-click, save as)

Related Plugins

Some other plugins that you might be interested in!

Installation

Download the plugin and place it in the “plugins” folder in your project’s “js” folder. Then open your Plugin Manager (F10), double-click an empty row, and select the ConditionalChoiceText plugin.

Once it is in your list of plugins, turn the plugin on.

Usage

choiceNumbering1

Take a look at the image above. The numbers along the left is how choices are numbered. You will use these numbers when changing a choice’s text.

There are two ways to change a choice’s text.

1. Using a Plugin Command

Create a plugin command and write

   choice_text choiceNumber customText

Where the `choiceNumber` is the number of the choice that the text will apply to, and `customText` is the text that you want to change to. You can include spaces in your text.

conditionalChoiceText2

For example, if you want to change the second choice’s text to “???” you can write

   choice_text 2 ???

It is up to you to set up the conditional branches appropriately.

2. Using a script call

Create a script call and write

   choice_text(choiceNumber, customText, condition)

Where the `choiceNumber` is the number of the choice that the text will apply to, and `customText` is the text that you want to change to.

The `condition` is a valid formula that evaluates to true or false. The specified choice’s text will only be changed if the condition is true.

To change the second choice’s text to ??? assuming switch 3 is OFF, you can write

   choice_text(2, "???", "$gameSwitches.value(3) === false")

When you create a hide choice command, it will only apply to the next set of choices down the list. If you have two sets of choices, you will need to create hide choice commands for each set.

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

You may also like...

Leave a Reply

Your email address will not be published.

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax