Disabled Choice Conditions
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
- Large Choices
- Hidden Choice Conditions
- Conditional Choice Text
- Choice Display Mode – Change the way your choices are presented!
Additional Reading
Want to read more about this plugin? Here are some dev logs and tutorials
- Tutorial – Disabling Choices with Large Choices
- Devlog #1 – The Ability to Disable Individual Choices
- Devlog #2 – Disabling Choices by Enabling Choices
- Devlog #3 – Back to Basics: Disabling Choices
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:
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 simple script call
To disable a number using script calls, use this
disable_choice( choiceNumber )
Where the choiceNumber is the number of the choice that you wish to disable.
Advanced Usage
If you want to include your condition as a formula instead of using conditional branches, you can pass in a 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.
2. Using a plugin command (For MV only)
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
Which set of choices do conditions apply to?
Disable conditions apply to the immediate set of choices, on the same indentation level.
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.
Bro I looked at this for 3 days straight wondering why it wasn’t working and then realized that I didn’t enable the plugin
I feel stupid to have put so much time and efforts into creating a working event that does more or less the same without plugins.
At the difference my eventing takes 500 lines where this plugin only takes a few. xD
Thanks for this amazing plugin, worth alot of time and effort with a few single clicks.
Btw, you can also use :
disable_choice(5, "$gameVariables.value(ID) === Value")
Amzing plugin.
If the choice I want to disable is INSIDE another choice event, using the disable choice plugin command disables the choices from the first choices. Is there a way to disable the choices of the choices displayed after the first one?
Like
◆Show Choices:Yes, No (Window, Right, #1, #2)
:When Yes
◆Show Choices:Yes, No (Window, Right, #1, #2)
:When thing 1
◆plugin command disable_choice 1
:When thing 2
◆plugin command disable_choice 2
:End
◆
:When No
◆
:End
those would instead disable “yes” or “no” not “thing 1” and “thing 2”
Sorry I meant
◆Show Choices:Yes, No (Window, Right, #1, #2)
:When Yes
◆Show Choices:thing 1, thing 2 (Window, Right, #1, #2)
:When thing 1
◆Plugin Command:disable_choice 1
◆
:When thing 2
◆Plugin Command:disable_choice 2
◆
:End
◆
:When No
◆
:End
Nevermind, I just check for a switch before any choie I want to disable and disable it there with plugin command.
What if Choice in Choice ?
Hi, just to know is it possible to disable the choice depending on item possession ?
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.
Could you add “limit time to choice or default special choice ” option ?
By “limit time” do you mean, the choice is only available for a limited time? (like a special sale). Or do you mean a “time limit” so after 10 seconds, the game will pick a default choice?
My bad english. “Time limit” , System will pick default choice after some seconds.
Ok, I will look at some ways to implement it.
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!
Oops, I forgot to update the MV Plugins list.
This is amazing! Thank you very much.