Hidden 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 MV gives you a way to offer choice selection to your players through events, and depending on the choices they make, the game will respond differently.

One thing that it doesn’t support, however, is the ability to hide certain choices from view. For example, if you wanted to offer your players a list of quests that they can complete in any order that they wish, and to remove any completed quests from the list, your only option is to create multiple conditional branches for each combination of quests that are currently available, and create separate choice lists for all of those combinations.

With this plugin, you can use a simple event call to hide a choice. Combined with conditional branches and other event commands, you can tailor your events to your needs quickly and easily!

For perspective, this is how the event in the video is set up.

hiddenChoiceConditions6

Want to hide some choices? Try this plugin out!

Download

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

Related Plugins

Compatibility

Due to the way this plugin works, this plugin must be placed below other choice-related plugins!

In your plugin manager, make sure the order of the plugins are suitable.

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 HiddenChoiceConditions 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 hiding choices.

There are two ways to hide a choice.

1. Using a Plugin Command

To hide a choice, create a plugin command and write

hide_choice choiceNumber

Where the choiceNumber is the number of the choice that you would like to hide. You can use conditional branches to determine whether a choice should be hidden or not.

For example, if you want to hide the second choice, you would say

hide_choice 2

2. Using a Script Call

Create a script call and write

hide_choice( choiceNumber, condition )

Where the choiceNumber is the number of the choice that you would like to hide, and the condition is a javascript formula that evaluates to true or false.

For example, if you want to hide a choice if switch 3 is OFF, you can use the script call

hide_choice(3, "$gameSwitches.value(3) === false")

The following diagram shows how you might set up your event with hidden choices.

hiddenChoiceConditions4

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

13 Responses

  1. Moni says:

    Hi Hime, thank you so much for this plugin! It helps a lot!
    However, I have a bug when I use choice options as a script now. When I use this to show my choices:

    choices = []; params = [];
    $gameMessage.setChoices(choices, 0)
    choices.push(“I love you1”);choices.push(“I love you2”);
    choices.push(“I love you3”);choices.push(“I love you4”);
    choices.push(“I love you5”);choices.push(“I love you6”);
    choices.push(“I love you7”);choices.push(“I love you8”);
    params.push()

    and have the hidden choices plugin activated, then none of these options show. Do you know what I’m doing wrong?
    Thank you so much for your great work.

  2. rhaidor says:

    Hello !
    I have a problem. If i add the script call : hide_choice(1, “$game_variables[1] < 3″) ,, it gives me back the error massage : ” Reference error : $game_variables is not defined . ” .
    Any idea why? Thank You !

  3. henryfool says:

    Works beautifully! One issue I’m encountering has to do with default choices.

    I have a show choices with 3 choices, defaulting to the 1st choice. After that choice is selected, it runs the same show choices again, only hiding the first choice. However, this means that the default choice is now hidden, and no default selection appears.

    It’s not that big a deal obviously, more of a consistency detail. But if I have a default choice show up in the first iteration of the choices, is there a way to have the default choice bump down one choice if the default choice has become hidden?

    Thank you!!!

    • henryfool says:

      Aha, it was a conflict with the Yanfly Extended Message plugin. Now the next choice down properly gets default cursor.

      The Yanfly hidden choice solution seems a little inelegant — when choices are hidden, the choice box does not resize to fit the smaller set of choices. Hime’s solution does!

      • Hime says:

        Good to know about the compatibility issue. For the most part, since yanfly’s plugin is meant to provide hidden choices, it wouldn’t make sense for me to make my own hidden choices compatible with it since I’d basically be overwriting his implementation.

  4. Merit says:

    Hello! I’ve tried using this plugin along with your Large Choices plugin, but I’ve encountered some problems. It works well if I try to hide a choice from the first set of choices, but any of the choice sets below that either aren’t affected if you list them as choice 7/8/etc., or if you put the conditional branch with the ‘hide_choice’ plugin command before the second choice set, it splits them into two separate choice dialogues. Is there a way for these two plugins to work together?

    By the way, both of your plugins that I’ve used are amazing on their own, and have really given me hope for the little project I’ve been fiddling with!

    • Hime says:

      It works for me. I created two sets of choices with 4 options each one after another, and I see all 8 options.
      Then I make a plugin command to hide_choice 7 and the 7th option is hidden.

      You will need to determine whether there is another plugin that is causing the compatibility issue, or perhaps your condition isn’t working properly.

  5. meow says:

    ok I was trying to use this and large choices together and they worked well then I copied the event that had and changed the switches that are activated on the other event https://www.dropbox.com/s/7c7zfbqyksrdiv9/something%20works%20sorta.png?dl=0 is how the base of the event is for both yet one when it sets the switch off won’t hide the choice on the other event and then can overwrite it I am running on a bit sorry also this and large choices are the only plug ins and I have tried to switch the place in the plug in manager and it didn’t seem to change anything and using f9 I can see the switches are on sorry

  6. Deannomite says:

    Hi, Hime!

    I was trying to use this plugin for unlocking dialogue choices, i.e. the option to talk to an NPC about something if the player is friends with them. I tried to hide the option immediately upon running the event if the friendship variable isn’t high enough. However, it seems like the plugin hides the choice only after the event has run… Am I doing something wrong?

    Thank you for your time! 🙂

    • Hime says:

      The plugin is designed so that it will hide the choice when the plugin command or script call is made. These should be made before choices are shown.
      Try putting together a simple test event where you start by making a plugin command called “hide_choice 1” and then show two choices that say “Yes” and “No”. What should happen is only the “No” choice is shown.

      If that doesn’t work, try disabling other plugins first and then see if it works.

      • Deannomite says:

        Sorry for the late reply! I just wanted to confirm that it’s working now. 🙂 I tried it with the test and it worked perfectly. I had my original event running as a parallel process (which was silly and unnecessary for the event anyways) and switching it to an autorun fixed the problem.

        Thank you again!! 🙂

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