Disabled Choice Conditions

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

RPG Maker does not come with a way to disable individual choices from a list of choices. For example, if the player shouldn’t be allowed to select a particular option, but you still want to show it, there’s basically no way to do it.

This plugin provides an easy way for you to disable each choice based on your own custom conditions using tools that you are already familiar with!

Download

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

Related Plugins

Additional Reading

Want to read more about this plugin? Here are some dev logs and tutorials

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 DisabledChoiceConditions plugin.

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

Usage

Take a look at the following image:

choiceNumbering1

The numbers along the left is how choices are numbered. You will use these numbers when disabling choices.

There are two ways to disable a choice, depending on your preferences when it comes eventing and scripting:

1. Using a plugin command

disablingChoicesMVEx12

This option allows you to manually disable a choice by simply creating a plugin command and writing

   disable_choice choiceNumber

Where `choiceNumber` is the number of the choice that you wish to disable. Choices are numbered based on the order that they appear in the list, starting at 1.

For example, if you wish to disable the second choice, you can write in your plugin command

   disable_choice 2

2. Using a script call

disablingChoicesMVEx3

To disable a number using script calls, use the following syntax

   disable_choice( choiceNumber, formula )

Where the choiceNumber is the number of the choice that you wish to disable, and the formula is a valid Javascript formula.

For example, to disable choice 3 if switch 4 is OFF, you can say

   disable_choice(3, "$gameSwitches.value(4) === false")

Script calls are generally faster than using a series of conditional branches, but they require you to have some knowledge about Javascript. Of course, you can always ask the community how to write certain conditions and then you’ll know.

Which set of choices do conditions apply to?

Disable conditions apply to the immediate set of choices, on the same indentation level.

disablingChoicesMVEx13

As a rule of thumb, you should declare all disable conditions immediately before your choices. To avoid breaking up messages and choices, you can place the disable conditions before any messages as well.

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...

9 Responses

  1. adjin77 says:

    Hi, just to know is it possible to disable the choice depending on item possession ?

    • Hime says:

      Yes, in the conditional branch event command, the 4th page has options such as “Item”, “Weapon” and “Armor”. These are used to check whether you have those items or not.
      You can create a conditional branch and then just use the plugin command to disable a choice.

  2. Taka says:

    Could you add “limit time to choice or default special choice ” option ?

  3. David says:

    I could only find this page through youtube and not the website, I might not be looking in the right place, but thought I’d let you know! Great Plugin though!

  4. Nalia says:

    This is amazing! Thank you very much.

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