Being assigned Classes based on answers [RPG Maker MZ]

Hello everyone.

I am making a game as my school project in this engine and I was given the suggestion of a system that goes like this:

An NPC asks you a certain amount of questions and based on your responses, let's say
"Yes", "No" or "Maybe", it would give your character a specific class.

Now, a system like this exists in the Pokemon Mystery Dungeon games and it's something I really like about it. I really wanted ti implement this in my game so if anyone has any idea how to do it with either a script or through events I'd appreciate it.

Thanks 🙂
It's really not difficult to do, using nested Show Choices (maybe with conditional branches). Unless you're going to ask half a dozen questions and want to cover every combination.

What have you tried so far, and where are you having troubles?
It's really not difficult to do, using nested Show Choices (maybe with conditional branches). Unless you're going to ask half a dozen questions and want to cover every combination.

What have you tried so far, and where are you having troubles?


Wow thanks for the quick reply!

I have tried a concept idea on asking a couple questions and then the NPC would give you the class. But the problem is that it would always loop and give the same.

I wanted to do something that would estimate the best class for your character based on the answers given, though I wanted let's say 5 questions and depending on your answer, you get a certain class
However I want to have a rare instance where you are given 2 classes with the same percentage and you are given a choice of having either one or another.
Looping is probably because you set the event up as a parallel process or autorun, and didn't add a command to end it once the choice had been made. This is usually done by transferring to a different map (as long as you have nothing else to do on this map for the rest of the game), or by turning on a self switch then adding a second event page with no commands and an action button trigger, conditioned by that self switch.
Looping is probably because you set the event up as a parallel process or autorun, and didn't add a command to end it once the choice had been made. This is usually done by transferring to a different map (as long as you have nothing else to do on this map for the rest of the game), or by turning on a self switch then adding a second event page with no commands and an action button trigger, conditioned by that self switch.

That's the thing. I used Action Trigger. And I also tried to use the control switches but it always resets. And if I leave the map, it goes back to the beginning as if nothing changed
Then please show screenshots of your events. Something has gone wrong somewhere and we need to see what you've done to help you fix it. Using Alt+PrintScreen will capture the whole event window without cropping stuff out that we need to see.
Then please show screenshots of your events. Something has gone wrong somewhere and we need to see what you've done to help you fix it. Using Alt+PrintScreen will capture the whole event window without cropping stuff out that we need to see.
I would have to create it again, since I removed the NPC by accident. i will try
If you have to create it again, maybe get some paper first and draw a kind of flow chart or branching diagram. This might help you with your logic, so choices, responses and loops go in the right places.

Re-reading your last reply, if your second page was an action button trigger and no event commands, but the selecting stuff was still looping, then it sounds like you didn't correctly activate the second page - you didn't turn on the right switch or self switch.
If you have to create it again, maybe get some paper first and draw a kind of flow chart or branching diagram. This might help you with your logic, so choices, responses and loops go in the right places.

Re-reading your last reply, if your second page was an action button trigger and no event commands, but the selecting stuff was still looping, then it sounds like you didn't correctly activate the second page - you didn't turn on the right switch or self switch.


I will create the page again and pay close attention.

But is there any way to do something like the PMD character creation system where you become a certain pokemon based on your answers?
Well, the way to do this would be to just make a few Show Text commands with Show Choices commands and the answers would increase the values of variables that represented the suitability of the player for the class. In the end, the variables would be evaluated and compared with each other and then things would happen differently depending on the result, which could be done with conditional branches for example.

Like, let's say you have 4 classes, Warrior, Ranger, Rogue and Mage. So you use 4 variables called "Warrior Points" etc. to store the amount of points towards that specific class.

Then have questions like:

"Which one out of these activities is your favorite?"

Exercising (+1 Warrior)

Going on long walks in nature (+1 Ranger)

Playing Hide-and-Seek (+1 Rogue)

Reading books (+1 Wizard)


"You need to cross a bridge, but there's a giant troll standing in your way, how will you get past him?"

Fight him! (+1 Warrior, +1 Ranger)

Trick him! (+1 Rogue, +1 Mage)
Well, the way to do this would be to just make a few Show Text commands with Show Choices commands and the answers would increase the values of variables that represented the suitability of the player for the class. In the end, the variables would be evaluated and compared with each other and then things would happen differently depending on the result, which could be done with conditional branches for example.

Like, let's say you have 4 classes, Warrior, Ranger, Rogue and Mage. So you use 4 variables called "Warrior Points" etc. to store the amount of points towards that specific class.

Then have questions like:

"Which one out of these activities is your favorite?"

Exercising (+1 Warrior)

Going on long walks in nature (+1 Ranger)

Playing Hide-and-Seek (+1 Rogue)

Reading books (+1 Wizard)


"You need to cross a bridge, but there's a giant troll standing in your way, how will you get past him?"

Fight him! (+1 Warrior, +1 Ranger)

Trick him! (+1 Rogue, +1 Mage)


Yeah that's something I want to do, though I gotta ask if I would need Common Events for that? I'm still new to RPG Maker and only about a month ago I started working with Javascript
Yeah that's something I want to do, though I gotta ask if I would need Common Events for that? I'm still new to RPG Maker and only about a month ago I started working with Javascript

You don't need a common event if you want it to happen 1 time and it can be contained to a single map.
You don't need a common event if you want it to happen 1 time and it can be contained to a single map.

Well, I actually want people to repeat the quiz, but at a cost. That I know I can do with Self-Switches. The problem is adding points to a certain class. That I don't know how to do.
Well, I actually want people to repeat the quiz, but at a cost. That I know I can do with Self-Switches. The problem is adding points to a certain class. That I don't know how to do.

I think it would be best if you described how exactly you want this to work, in detail.

Also, you can just use Variables for class points and use Control Variables to increase them based on the answer.
I think it would be best if you described how exactly you want this to work, in detail.

Also, you can just use Variables for class points and use Control Variables to increase them based on the answer.

It is a quiz much like Pokémon Mystery Dungeon Games and Morrowind. Based on how you respond to the questions, in the end you have the choice to choose the class the game has for you based on your answers or you can decline a choose another class to your liking.
Yeah, but how do you want it to work. Do you want it to be like when you start the game some text pops up and you start answering questions? Do you want to have a character walk up to an NPC and they ask those questions? When you mean you want this to be able to repeat the quiz, how exactly is that supposed to work? Is it only before they finally get their class or any time after? That's what you need to decide.
Yeah, but how do you want it to work. Do you want it to be like when you start the game some text pops up and you start answering questions? Do you want to have a character walk up to an NPC and they ask those questions? When you mean you want this to be able to repeat the quiz, how exactly is that supposed to work? Is it only before they finally get their class or any time after? That's what you need to decide.

I want the player to walk up to the NPC and be able to select the quiz. That part is done. The first time is free but the next times will have a cost on Gold.
I have something similar in my game which determines your starting actor. When you answer a question it increases the Starter variable by different amounts. 0, 1 ,2, 3. I have three answers so a max of 9 points total. At the end of the questioning I have a conditional branch that says if equal to or less than 1 = this, else equal to or less than 3, 6 and then equal to or greater than 7. And of course each one would give you a different actor.
I have something similar in my game which determines your starting actor. When you answer a question it increases the Starter variable by different amounts. 0, 1 ,2, 3. I have three answers so a max of 9 points total. At the end of the questioning I have a conditional branch that says if equal to or less than 1 = this, else equal to or less than 3, 6 and then equal to or greater than 7. And of course each one would give you a different actor.


If only I knew how to do that properly. While this ain't solved I am working on a small cutscene but it seems that I must be doing something wrong or there is a bug, since at the end of the cutscene I can't do anything. Player doesn't move and all but I'll fix it.

Meanwhile, if you could help me I'd appreciate it greatly
To do the points thing, in each branch of the Conditional Branch, assign points as appropriate by increasing a certain Variable. For example?
Show Message: "Do the ends justify the means?"
Show Choices: Yes, No, Sometimes
If Yes:
....Control Variables: Increase Variable #1 "Paladin" by 1
....Control Variables: Increase Variable #2 "Zealot" by 5
....Control Variables: Increase Variable #3 "Priest" by 3
End Branch
If No:
....Control Variables: Increase Variable #1 "Paladin" by 5
....Control Variables: Increase Variable #2 "Zealot" by 1
....Control Variables: Increase Variable #3 "Priest" by 3
End Branch
If Sometimes:
....Control Variables: Increase Variable #1 "Paladin" by 2
....Control Variables: Increase Variable #2 "Zealot" by 2
....Control Variables: Increase Variable #3 "Priest" by 4
End Branch

Then, at the end of all the questions, compare all the variables to each other. As long as one class has more points than all the others, give the player that class.
Conditional Branch: Variable #1 is Greater than or Equal to Variable #2
....Conditional Branch: Variable #1 is Greater than or Equal to Variable #3 (note: by nesting one inside the other, this branch will only run when #1 is greater than or equal to #2 AND #3)
........Show Message: "You are now a Paladin!"
........Change Actor Class: Hero, to Paladin
....Exit Event Processing (note: this will stop further classes from being awarded in the case of ties)
....End Branch
End Branch
Conditional Branch: Variable #2 is Greater than or Equal to Variable #1
....Conditional Branch: Variable #2 is Greater than or Equal to Variable #3
........Show Message: "You are now a Zealot!"
........Change Actor Class: Hero, to Zealot
....Exit Event Processing
....End Branch
End Branch
Conditional Branch: Variable #3 is Greater than or Equal to Variable #1
....Conditional Branch: Variable #3 is Greater than or Equal to Variable #2
........Show Message: "You are now a Priest!"
........Change Actor Class: Hero, to Priest
....Exit Event Processing
....End Branch
End Branch

Original thread: https://forums.rpgmakerweb.com/threads/being-assigned-classes-based-on-answers-rpg-maker-mz.131869/