Multiple choice questions with values that leads to specific outcomes?

Heyo! I'm very new to RPGmaker MZ, and I was wondering if there's an easier way to do what I have in mind. What I'd like to do; is essentially add some sort of value system to multiple choice questions, so when you start the game, a person will ask you 3-4 questions, and depending on what you choose you will be given a starter like in Pokemon Mystery Dungeon.

However, so far I'm doing a "show choices" format within the event, where I have to take into account every single question pathing towards either one of the 3 starters, and go back and forth between the "yes, no" answers which eventually lands on a specific starter. If I have more than 2 answers per question it quickly becomes hard to keep track of.

Is there an easiler way of doing this, like some sort of point/value system that marks an answer with a number (or other things?) in order to come to the conclusion of the starter if questions were answered like "AABCA" and starter 2 if you go "CCABB" etc?
Depends on what you wanna go for. You could give each answer a numeric value and save that in a variable with "Control variable X + Y" and at the end of your questionaire, you could have a couple conditional branches:

If X > Y = Do this
If X < Y = Do that
and so on.

You could also use switches.
If player picks Answer 1 on question one, turn on a switch, if they pick B, turn on a different switch, or do nothing.

At the end you'd have a couple conditional branches to check which switches are on and do whatever you need to accordingly. There isn't really an easier way.
Depends on what you wanna go for. You could give each answer a numeric value and save that in a variable with "Control variable X + Y" and at the end of your questionaire, you could have a couple conditional branches:

If X > Y = Do this
If X < Y = Do that
and so on.

You could also use switches.
If player picks Answer 1 on question one, turn on a switch, if they pick B, turn on a different switch, or do nothing.

At the end you'd have a couple conditional branches to check which switches are on and do whatever you need to accordingly. There isn't really an easier way.
Ohh I think I see what you mean! I haven't used any switches so far, barely understand how they work but I think I can manage this. Thank you so much!
A switch is just a boolean. It says Yes or No. You can then go and use conditional branches to check whether or not a switch is on/off and do things according to that. Variables can save all kinds of things, not just numbers, but ultimately it will depend on how you want your questionaire to "calculate" which outcome will occur.

You can make it real simple, or real complex, and depending on that, your event will get real long, or it doesn't xD
A switch is just a boolean. It says Yes or No. You can then go and use conditional branches to check whether or not a switch is on/off and do things according to that. Variables can save all kinds of things, not just numbers, but ultimately it will depend on how you want your questionaire to "calculate" which outcome will occur.

You can make it real simple, or real complex, and depending on that, your event will get real long, or it doesn't xD

I'll make a new game test to see if I can figure them out, sounds like a lot of fun things can be implemented with a switch once I know exactly how to use them. Thanks again!
I'll make a new game test to see if I can figure them out, sounds like a lot of fun things can be implemented with a switch once I know exactly how to use them. Thanks again!
just as a note, the program has built in tutorials under help in the main menu
1749342161611.png
In terms of Eventing, why not have a single Variable that is your "tracker" for each decision?

let's say you start with the "Tracker" Variable at 10, there is room to go up to 20 and down to 0, of course if you need higher numbers you simply start with 50 or with 100. Write down all choices and then do some Math in order to get to that value.

there are multiple ways to achieve the same solution.
just as a note, the program has built in tutorials under help in the main menu
View attachment 342412
OH yes that helps haha I'll look at these as well!

In terms of Eventing, why not have a single Variable that is your "tracker" for each decision?

let's say you start with the "Tracker" Variable at 10, there is room to go up to 20 and down to 0, of course if you need higher numbers you simply start with 50 or with 100. Write down all choices and then do some Math in order to get to that value.

there are multiple ways to achieve the same solution.

I think I see what you mean, I so I assign the answers with values like 10, -10 20 etc to accumulate points towards A, B or C in the end for the starters? So if starter A needs the highest values and it's picked, it overrides the others in maths and gets chosen?
I'll go with a 3 way decision with this example as you seem to understand it pretty well!

we decide on a value for each result:
Starter A: 10 or higher
Starter B: 5 or higher
Starter C: 0 or lower than 5

we ask one question: What's your favorite drink?
- a Soda (adds 2)
- a sparkling water (adds 1)
- a tea (adds -1)
- a coffee (adds 3)

we ask the second question: what's your favorite fruit?
- an apple (adds 3)
- a pear (adds -3)
- a clementine (adds 8)
- a banana (adds 1)

we set the starting value of our Tracking variable to 0 and add all the values into our choices.

some If statements for each starter being picked and there you go

OH yes that helps haha I'll look at these as well!



I think I see what you mean, I so I assign the answers with values like 10, -10 20 etc to accumulate points towards A, B or C in the end for the starters? So if starter A needs the highest values and it's picked, it overrides the others in maths and gets chosen?
I'll go with a 3 way decision with this example as you seem to understand it pretty well!

we decide on a value for each result:
Starter A: 10 or higher
Starter B: 5 or higher
Starter C: 0 or lower than 5

we ask one question: What's your favorite drink?
- a Soda (adds 2)
- a sparkling water (adds 1)
- a tea (adds -1)
- a coffee (adds 3)

we ask the second question: what's your favorite fruit?
- an apple (adds 3)
- a pear (adds -3)
- a clementine (adds 8)
- a banana (adds 1)

we set the starting value of our Tracking variable to 0 and add all the values into our choices.

some If statements for each starter being picked and there you go
Here is what I have right now:

5 questions for 3 personalities
A-30 -150 max/ 130-150 = A
B-20 - 100 max/ 90-120 = B
C-10 - 50 max/ 50-80 = C
(90% chance my math is off, it was my worst subject in school. Also, should I have a fourth question to remove points for a higher chance of the personality result to be more even?)

So I have all these questions written down with each Add Value + 30,20 or 10 for ABC. However, I cannot figure out how to calculate it in the end, I do not have the option to do "If range value 130-150 = A" in the branches, and I have no clue how to properly fix it since I have zero javascript knowledge on how things connect hehe. I feel I'm getting a bit closer though!
"If range value 130-150 = A" in the branches, and I have no clue how to properly fix it since I have zero javascript knowledge on how things connect hehe. I feel I'm getting a bit closer though!
you can do ranges by using greater / less than comparisons. use the conditional branches to check if the value is above/below one of your thresholds and then you can use else blocks to specify to only continue if the first condition was false

Code:
◆If:Variable ≥ 130
  ◆Text:None, Window, Bottom
  :    :Personality A
  ◆
:Else
  ◆If:Variable ≥ 90
    ◆Text:None, Window, Bottom
    :    :Personality B
    ◆
  :Else
    ◆If:Variable ≥ 50
      ◆Text:None, Window, Bottom
      :    :Personality C
      ◆
    :Else
      ◆Text:None, Window, Bottom
      :    :Something else
    :End
    ◆
  :End
  ◆
:End
you can do ranges by using greater / less than comparisons. use the conditional branches to check if the value is above/below one of your thresholds and then you can use else blocks to specify to only continue if the first condition was false

Code:
◆If:Variable ≥ 130
  ◆Text:None, Window, Bottom
  :    :Personality A
  ◆
:Else
  ◆If:Variable ≥ 90
    ◆Text:None, Window, Bottom
    :    :Personality B
    ◆
  :Else
    ◆If:Variable ≥ 50
      ◆Text:None, Window, Bottom
      :    :Personality C
      ◆
    :Else
      ◆Text:None, Window, Bottom
      :    :Something else
    :End
    ◆
  :End
  ◆
:End
Oh this is very useful! However I keep getting "syntax error invalid or unexpected token" so I probably put it somewhere wrong. I finished the first question strain, so if I choose the top answers that chain should be complete, and I put the code at the end of each answer, if that's what I was supposed to do.
Oh this is very useful! However I keep getting "syntax error invalid or unexpected token" so I probably put it somewhere wrong.
its not a script. its just how the event commands look like. i put it in a code tag because you wouldnt be able to see the indents if i didnt
1749388288918.png


once you have your questions set up, you'd just run your nested conditions at the end to handle the outcome
its not a script. its just how the event commands look like. i put it in a code tag because you wouldnt be able to see the indents if i didnt
View attachment 342439

once you have your questions set up, you'd just run your nested conditions at the end to handle the outcome
Hmm I think I put them in the wrong place again. Here's what one chain looks like:

◆Comment:Q1
◆Text:Mysterious Voice, None, Window, Bottom
: :Are you brave?
◆Show Choices:Yes., I do not feel brave., Only during exceptional times of need. (Window, Right, #1, #2)
:When Yes.
◆Control Variables:#0001 A += 30
◆Text:Mysterious Voice, None, Window, Bottom
: :How would you protect others?
◆Show Choices:With an array of techniques. , Jump in front of them., I prefer other methods. (Window, Right, #1, #2)
:When With an array of techniques.
◆Control Variables:#0001 A += 10
◆Text:Mysterious Voice, None, Window, Bottom
: :Do you harbor hate?
◆Show Choices:Only for my enemies., Hate drains me. , Within reason, preferrably none. (Window, Right, #1, #2)
:When Only for my enemies.
◆Control Variables:#0001 A += 30
◆Text:Mysterious Voice, None, Window, Bottom
: :What speaks to you?
◆Show Choices:A familiar smell., A strong taste., A vivid experience. (Window, Right, #1, #2)
:When A familiar smell.
◆Control Variables:#0001 A += 10
◆Text:Mysterious voice, None, Window, Bottom
: :Why have you come here?
◆Show Choices:To train., To explore., To collect. (Window, Right, #1, #2)
:When To train.
◆Control Variables:#0001 A += 30
◆If:A ≥ 130
◆Text:Mysterious Voice, None, Window, Bottom
: :Ah! I see your vessel forming..
: :You appear to be a bit rash, direct but prepared.
◆
:Else
◆If:B ≥ 90
◆Text:Mysterious voice, None, Window, Bottom
: :Aha, I see..
: :You appear to be Apprehensive, Driven & Caring
◆If:C ≥ 50
◆Text:Mysterious Voice, None, Window, Bottom
: :Mm..Now it makes sense.
: :You seem to be a bit Tense, Enthusiastic & Generous
◆
:Else
◆
:End
◆
:End
◆
:End
◆
I can complete the question chain for the top answers, but once I do nothing happens after. No errors this time though haha. Am I supposed to put the calculations on their own at the bottom of the event and not copy paste them on each final answer per question chain? Sorry, I'm very new at this and trying to understand how the language works!

Edit: The mysterious voice character never tells you the outcome!
Here's what one chain looks like:
the case above is the example why i used the code tags. you lose your indents if you dont use them and any kind of logical flow becomes harder to follow if theres multiple layers

do share a screenshot instead though just to make sure that all the event settings look fine
I cannot take full screenshots of the event editor, the screen size is very small and the text extends further out but here's 2 screenshots that I grafted and lined up together that shows the first chain:
E1.png

the case above is the example why i used the code tags. you lose your indents if you dont use them and any kind of logical flow becomes harder to follow if theres multiple layers

do share a screenshot instead though just to make sure that all the event settings look fine
you dont have to chain the questions like that. unless you want each question to result in their own follow up questions (which is going to be pretty extensive), you want to keep them all on the same level.
1749392985846.png

once youve asked all 5 questions, you use the nested conditional branches to get the result

as of right now, youd only get a result if you chose the first answer to all 5
you dont have to chain the questions like that. unless you want each question to result in their own follow up questions (which is going to be pretty extensive), you want to keep them all on the same level.
View attachment 342448
once youve asked all 5 questions, you use the nested conditional branches to get the result
Ah makes sense. I'll try this later on and get back to you if I cannot make it work again, thank you so far!
you dont have to chain the questions like that. unless you want each question to result in their own follow up questions (which is going to be pretty extensive), you want to keep them all on the same level.
View attachment 342448
once youve asked all 5 questions, you use the nested conditional branches to get the result

as of right now, youd only get a result if you chose the first answer to all 5
Ok I redid the questions to be on their own like in your screenshot, with the "If" statements separate as well all the way on the bottom of the questionaire. However I have the same outcome, it doesn't seem to calculate it and I don't get the starter reveals.
and to clarify, youve tested out all 3 outcomes? from what you shared so far, the highest possible value variable A can have is 110, which feeds into one of your issues if you havent already changed it

theres 2 things with your conditional branches.

if Variable A is the only variable youve used for this, your second and third branches will never be used because they check variables B and C, not A. theyre all supposed to check the same variable, variable 1 (A). and unless youve added at least one other +30 choice, you cant get that first branch to activate
Spoiler
1749401312829.png

1749401367661.png
then your second condition doesnt have an else, which means once all the branches check the same variable, you can get the results of both of the last two branches simultaneously now that their conditions can overlap.
you need to add an else for the second branch to stop that. the last branch doesnt need an else branch (or technically has to be a conditional branch since it can just be the else for the 2nd branch)
Spoiler
1749401931044.png

Original thread: https://forums.rpgmakerweb.com/threads/multiple-choice-questions-with-values-that-leads-to-specific-outcomes.178171/