Changing choices with variables.

Is it possible to change choices with variables? I'll explain: i made an event where you can insert passwords and another event where, if you used password before, you can change costumes. i made event like this:
If variable x1 = y1
Choices: Change to Alt 1
Change to basic costume
Don't change costume
If variable x2 = y2
Choices: Change to Alt 2
Change to basic costume
Don't change costume
If variable x1 = y1
If variable x2 = y2
Choices: Change to Alt 1
Change to Alt 2
Change to basic costume
Don't change costume

Problem is that all of this activates in sequence. How can i do it so that if i have both pass inputed only the 3rd event activates?
You can use Else branches (Event Processing when Condition is Not Met) and nest multiple Conditionals inside each other, for example:

If Var x1 == y1
....If Var x2 = y2
........(Content)
....Else
........(Content)
....End
Else
....If Var x2 = y2
........(Content)
....Else
........(Content)
....End
End

Alternatively, you can use Hime's Hidden Choice Conditions plugin to determine which Choices are visible and available. This is really good when you have several different conditions that each require a variable to be (or not be) available.
Thank you! I'll try as soon as i can
You can also use my Conditional Choices plugin, it has a simpler syntax and no plugin commands or script calls required, everything is done inside the choices.

This is an example of how you would set up that event. The Alt1 and Alt2 options show if variable #1 is more than zero and/or variable #2 is more than zero.
upload_2019-3-10_16-35-26.png
It's actually possible to store most types of values, including object, in the game variables. I've heard you aren't supposed to, but you have the option to click script while setting variable values so...
Anyway, what I'm saying is that you can store the text for the choice in a variable.
For example, variables 1 -5 could be reserved for choices 1-5.

Instead of writing out the different possible choices for the choice modules, just use
\V[#], where # is the ID of the game variable.
So if the text for choice 1 is \V[1],
It will show whatever is in variable 1 as the text.

Now as far as handling the choice results, there are a bunch of ways you could approach this. I'll give one way that isn't the shortest or simplest, but one of the easier ones to grasp.

Set a Common Event called Choice Results. Every choice in the game will call this common event for every single choice result.

Set a game variable aside to hold a number that will correspond to the specific events for a specific choice.

Have a continuing series of Conditional Branches every time a choice result is added in the game. The branches are there to check the value of
the reserved game variable.

For example, the first choice in the game has 3 possible results.
I add 3 conditional branches to my common event.
The first will trigger if the reserved variable is equal to 0.
The second if equal to 1, the third if equal to 2.

In the event that actually calls that choice, I do the following.
-I set game variable 1 to "This is my first choice text"
-I set game variable 2 to "This is the second"
-I set game variable 3 to "Don't forget you can add strings to game variables"

I call a choice module, and set the choices to the following
-Choice 1: \V[1]
-Choice 2: \V[2]
-Choice 3: \V[3]

The result of each choice will be to set the reserved game variable to the corresponding value, and then call the common event.

If any of that doesn't make sense, don't hesitate to ask for further help, clarification or a working example.


*EDIT
I forgot to include the whole point that would help with your specific question.
Doing a method like the one above makes the logic of doing things 'conditionally' a lot easier, because the regular option is coming up with a choice module for every possible combination of choices.

I've used a couple of condition related plugins, including ones mentioned here, and I find that you wind up doing so much setup and it gives you just a taste of variability.

The best way is to do something homegrown, like the method above that will allow you to custom tailor it to your project.
Thanks to everyone for the help. In the end @Aloe Guvner plug in was my choice and it is working really well. Thanks again!

Original thread: https://forums.rpgmakerweb.com/threads/changing-choices-with-variables.106658/