A downloadable asset pack

Download NowName your own price

If you like this plugin, you can buy me a Ko-Fi! You can also find all the pay plugins for a cheaper subscription!


This plugin let you disable or hide choices in the Show Choice window of RPG Maker based on your conditions!

You can tell the plugin to check for Switches, Variables, Actors, Items and Gold, he will do the rest!

From version 2.0 you can also decide to display a different text when a choice is enabled or disabled


Terms of use

Please refer to the Terms of Use. By using this plugin you accept WinterDream terms

Version, bugs and further development

 VERSION 1.1:

  •  Fixed the height of the Show Choice Window

 VERSION 1.2:

  •  Removed the HIDE functionality due to big indexing problems
  •  Now using the "escape choice" functionality doesn't ovverride the plugin
  • Using the action button while there is no choice selected no longer cause to skip the Show Choice event
  • Trimming of the <<[ and ]>> tags are now limited to the Show Choice box

 VERSION 2.0:

  • 100% rework of the code, it has been rebuilt from scratch
  • Kept retro-compatibility with previous versions
  • Return of the HIDE funtionality, now perfectly working (use (([ and ])) for hide conditions.
  • Plugin now support more conditions check! (Actors in party, Items in inventory, gold carried)
  • Added plugin parameters to personalize buzzer sound and handle default selection in case it falls on an hidden choice.
  • Added the possibility to change the text of a disabled choice

 VERSION 2.1:

  • Changed the rules check mechanism from string reader to RegEx
  • Fixed a bug that wouldn't retrieve armors data
  • Fixed a bug that prevents the correct execution of the rule if a negative number was used  (Thanks to alistor1213 for the report)
  • Now it allows to use items quantity as second operator
  • Added Error Handling option for wrong or broken formulas

 VERSION 2.1.1:

  • Hotfix for v2.1, the rule check were giving the oppostire result (Thanks again to alistor1213)

VERSION 2.2:

  • Added the possibility to check if ANY of the condition is true to validate the hide/disable condition. To do so, instead of separating the conditions with "," separate them with ";".  Don't mix the two or the plugin will work as usual (EVERY condition)

VERSION 2.3:

  • Thanks to Jndev9 for the report! The plugin was not checking equipped weapons and armors when running those conditions, now it does (for both has/hasn't and count)! Also the Armor check throw a fatal error due to a typo in the code, this is also fixed.


At the moment no known bug are under investigation but feel free to report them to me!

Join Discord!

StatusReleased
CategoryAssets
Rating
Rated 5.0 out of 5 stars
(5 total ratings)
AuthorWinterDream Games Creator
Tagschoice, dialogue, mz, plugin, RPG Maker, RPG Maker MZ

Download

Download NowName your own price

Click download now to get access to the following files:

WD_ConditionalChoice.js 29 kB

Development log

Comments

Log in with itch.io to leave a comment.

hello dear developer, this plugin does not work for me for some reason and I ask you to help, I will be glad to answer

this is a plaguns which i use

What is happening? The text doesn't get processed at all?


Btw, you are using it the wrong way, it should be <<[!i [5]]>> because the choice is disabled if you DON'T have item 5 (at least I presume item 5 are the flowers)

(1 edit)

I fixed the code, but unfortunately it doesn't work in any case, maybe my plugins are interfering or the problem is different?

Yes, it's not working at all, I'll try to look into those plugins if I find them, meanwhile, try to put my plugin above the others so it has the priority over choices

(2 edits)

do I need to write some kind of script before choosing and not in it? ,I honestly have no idea why it doesn't work, I hope to get your advice (suddenly I turned something on incorrectly) and i am using mz version

(3 edits)

So when i make the conditions the condition requirements are not hidden in game.

The only other plugins im using are yours and a text image one.

Hi, you are missing a part of the code

Opening brackets are <<[

then the condition: i[48]

Then the closing brackets ]>>

For example choice 1 is <<[i[48]]>>


Let me know if you need further assistance :)

Odd its working now, when i tried those brackets the first time the choices wouldn't be active

Hello! I was using your plugin when I ran into some issues when trying to check for weapons and armor. 
The weapon check gives different results when the weapon is equipped, since in the plugin help it says it checks both I'm figuring that either I'm not doing it properly or something isn't working correctly. I tried both hide and disable with the same result.
This is how I have it written:


The issue with the armor check is worse since it doesn't work at all, as soon as I access the choice i get the following error:


And this is how it's written:


I also tried the plugin on a brand new project and everything remained the same so I don't think it's a compatibility thing. Also I'm very new to rpg maker so if it's something i'm doing wrong i apologize in advance for the time waste.
Thank you

Everything seem correct so it must be a plugin bug, I'll look into it, thanks for the report ☺️

Thanks again for the report, the bug you reported is solved!

https://winterdreamgamescreator.itch.io/rpg-maker-mz-script-hide-or-disable-choi...

Oh wow thanks so much for the fast response! Will try it immediately, thanks again.

Hello! I was trying to use  the plugin, but I don't know how to have multiple different switches to each  gatekeep the same option.

my situation is, there is a skill trainer in town and i want to gatekeep skill learning choices.        basically, if you learn skill 1 you can't learn skill two, and if you learned skill 1  you also can't learn skill 1 again. How do I implement this using your plugin? I typed in as the image, 

...And got this as a result

Hi there!

To have multiple switches checked you can do everything in the same tag, just separate them with a comma

For example if you want to check s[17] and s[18] write (([s[17],s[18]]))


Hope it helps :D

Thanks for replying!!

But I feel sorry to sound needy, but what I was trying to find out how to make it so they check EITHER  s[17] or s[18]. 

Oh I see, I fear that for the moment there isn't the possibility to have an OR condition, I could add it to the ToDo list but for now it's not possible :(

Oh ok! thanks for replying! please update me if it's ever added!

Hi! I was trying to test out this plugin and it wasn't quite working for me. Do you think you could offer some advice?

I made 5 choices, with choices 1-4 I wanted hidden unless the specific switch was turned on and choice 5 being a default "cancel" choice with no conditions attached.  This is what my choices look like in game, and what my code looks like. I wanted it set so they would check if the switch is OFF, that way they would be hidden until it is on.Can you let me know what I am inputting incorrectly ^^'?


Hi there!

You are missing the square brackets, instead of ((!s[1])) you need to write (([!s[1]]))

It's ((["code"])) for hide and <<["code"]>> for disable 😁

That should do trick, enjoy 🤗

Thanks so much for responding!

Unfortunately that didn't seem to really work quite well ^^'

I added the brackets and tried every combination here to see if there was an error in any specific one (the beetle was there so I could toggle the different switches on and off, but this didn't change anything). I checked my plugin manager and the plugin is turned on alright.

Here is what comes up. I'm so sorry if I'm missing something obvious, I'm not particularly good with coding but I really appreciate the help!


That's quite strange, the plugin should remove the tags regardless of the outcome of the check

Are you using any other plugin that might cahnge the message/choice list behaviour?

Hi! Yep,  that's the issue. Unfortunately I found that this cannot work with VisuStella's Message Core plugin :,(

When I turned that one off, it was able to work well!
I appreciate all of the help and the quick responses!

Sadly the VS Core plugins touch a lot of things, I've them downloaded for debugging those problems, I'll see if there is a way around!

Back again!

I tried the plugin with Visustella Core plugins activated (didn't change the settings tho) and it works!

Do you have only Visustella Plugins?