How to make a personality quiz?

Hi. How do you make a personality quiz in rpg maker mz? Im trying to make one similar to pokemon mystery dungeon where each answer adds points into one of 12 variables. then i need it to read the variable with the highest amount so that personality is announced to the player. but i have no idea how to go about doing it. any help?
What part are you confused about? How to add to the variables or how to compare them?
I think you pretty much summed it up yourself!
Whatever personalities you have as options, just give those 1 variable each, and as you have the player make choices for those variables, simple "Add" a +1 to each of those choices made. After the quiz is over, just use conditional branches for the highest variable the player happened to get.



As for the actual personality quiz....well, that depends on what exactly your game contains. Is it going to ask things like their favorite (thing(s))? What-if scenarios? It's up to you really...
Thanks but how would i be able to get the conditional branch to search all of the variables?
A bunch of greater than checks.
ok well ill give it a try. thank you everyone!
I'd considered one of these myself lately, but the big hangup for me is what happens if there's a tie for variables. What could be the tiebreaker, and how much of a pain would that be to integrate?
Thanks but how would i be able to get the conditional branch to search all of the variables?

I think all you would need to do is this:

At the end of the quiz, you will need to make it to where like...there are a bunch of conditional things that need to be checked at once. (Check 1 condition, then the next nested code checks for more conditions)
Let's say you have 4 personalities. A, B, C, and D.

Let's say at the end of the 5-question quiz, the player makes the choices to where they obtain personality A where A = 3, B = 1, C = 1, and D = 0.
The game needs to know personality A is the player's route.
So....

======
If Variable A > Variable B
{ (If Variable A > Variable C)
{ (If Variable A > Variable D)
(Text: "Based on your quiz, you are (personality A)!")
}
}
=======

In this example, since Variable A was indeed the greatest number (3), all of those conditions will be satisfied, and the personality A will be chosen.

So with this kind of format, you would need to nest this kind of If statement many times, for all 4 personalities. Remember, the moment ONE of those If branches gets violated, the rest of the nested code won't execute, which is what you want.

You will need to follow this format:
======
If Variable A > Variable B
(If Variable A > Variable C)
(If Variable A > Variable D)
(Text: "Based on your quiz, you are (personality A)!")

If Variable B > Variable A
(If Variable B > Variable C)
(If Variable B > Variable D)
(Text: "Based on your quiz, you are (personality 😎!")

....(etc).
=========


Also to note, make sure the amount of personality questions is ODD! You don't want to have instances of ties...that makes things more complicated than it needs to be.
Also to note, make sure the amount of personality questions is ODD! You don't want to have instances of ties...that makes things more complicated than it needs to be.
In addition to this also make sure the number of outcomes is always smaller then the number of questions.

If they are equal (5 questions and 5 personalities) you still Risk a tie of all getting 1. Of the number of questions is 5 and the number of personalities is 4 be however there Will be no chance of this.
Here is the script that i modified:

Screenshot_14.png


And here at the small box, it didn't show up:
Screenshot_15.png


im sorry but help me
How can i make states show up and make it to the right angle.
Thank you
Uh, wrong thread?
Uh, wrong thread?
Sorry my guy but none of this thread is replying but help me at https://forums.rpgmakerweb.com/inde...i-show-my-states-in-mog_battle_hud_ex.139243/ in the rpg maker vx ace

@ksaOfficial Do not hijack someone else's thread with your question. You have your own thread, please be patient.

Moderator note: @ksaOfficial Do not hijack someone else's thread with your question. You have your own thread, please be patient.
Yes Sir, i won't hijacking someone's thread.
Ill give it a try and the whole thing on having it have more questions is a good point. i never thought of that. ill have to map it out on paper first.
Having an odd number of questions only helps if you have just 2 possible personality types. And I'm not sure how keeping the number of types lower than the number of questions helps, as you could have 5 questions and 4 personalities, with 2 personalities tying for 1st place with 2 votes

Only jumping in here because I'm curious about an efficient solution for this haha
Having an odd number of questions only helps if you have just 2 possible personality types. And I'm not sure how keeping the number of types lower than the number of questions helps, as you could have 5 questions and 4 personalities, with 2 personalities tying for 1st place with 2 votes

Only jumping in here because I'm curious about an efficient solution for this haha

Ohhhh yeah you're right! I didn't consider this previously. When OP said personality quiz, I instantly thought about one of those long, 10-20 question "quizzes" you find on buzzfeed lol. My bad.

In my mind, it sounded like they wanted more questions, but you've got a bigger picture.
Why don't you try to use a sort algorithm for the variables?
Yeah, I know that it kind of sounds stupid but I remember a Spanish developer once using a sort algorithm in rm2k3 to find where a certain character was in the map. Unfortunately I lost the code for that.

So, how can you approach this? First, I would suggest that you understand what and how a sort algorithm works, but the very basic thing is about comparing two values within a loop and substitue the values as you go about the loop of variables. However, since you will like to know which one is the one that has the highter value, you probably could just use the loop to get the highter value in another variable.

It should look something like this.

Loop variables x = 1 to 10 then
If x != 10 then
Loop variables y = x +1 to 10 then
if x > y then
assign variable z = x
else then
assign variable z = y
end
end
end
end

It's very crude and I know it my have issues, but it's only to get to the point. This however does not take into account if they are the same, I suggest that in the event of variables having the same value, each type also has a certain presedence, like a certain initial value just to avoid ties.
Jade010
Did you ever figure it out? Because, if so, I would love to know what you did! I'm thinking about doing something like Pokemon Dungeon too.
Did you ever figure it out?
What needs figuring out?

You Show Text for questions, Show Choices for the possible answers, and inside the different choices use Control Variables to add points into whichever personality.

Then at the bottom you use Conditional Branches to see which wins.

To get any more specific answers, you'd have to show what your event already looks like and explain what you can't figure out how to do.
Necro-post notice: @rainbowgems


If OP still needs the thread, they can request it to be reopened.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-a-personality-quiz.139246/