Variable and Question Randomization help

ncognito

Veteran
Veteran
Joined
Jul 7, 2013
Messages
157
Reaction score
4
First Language
English
Primarily Uses
Ok so im making a game with natures (bold, hasty, quiet,...ect). At the start of the game the player is asked 8(or more if needed) random questions out of 65 questions(yes i know thats alot of questions). When answering a question certain answers will give +1 or +2 points to a certain nature(will be controlled by a variable ofcourse). Then at the end of the questioning you will be asked if your a boy or girl, Every question Minus the "boy or girl" question will give you points towards certain natures. At the end of the questions i want it to pick the highest variable to base the character on. 

So it will look something like this

Question 1:

Would you jump at the chance to save someone from danger?

Answer:

Yes  [Control variable: Brave +2]

No    [Control variable:Timid + 1]

Question 2:

Are you a boy or girl?


Answer:

Boy

Girl

Nature  | Boy       | Girl

Brave   | Char1    | Char1fem    

Timid    | Char2    | Char2fem

But i have a frew problems.

1: How to make it say"ok brave is the highest variable and the character is a boy so pick char1"?

2. Also. Is there a way to make sure that the player dosent get any of the previous questions again in following questions?

3. How to make it ask 1 more question if 2 or more Natures have the same amount on their variables?

Any help would be greatly appreciated

Edit:

Problem 2 fixed -  I decided to just make 8 common events and put 8 different questions in each common event. 
 
Last edited by a moderator:

Berylstone

Veteran
Veteran
Joined
Jun 3, 2013
Messages
642
Reaction score
62
First Language
English
Primarily Uses
Ok so im making a game with natures (bold, hasty, quiet,...ect). At the start of the game the player is asked 8(or more if needed) random questions out of 65 questions(yes i know thats alot of questions). When answering a question certain answers will give +1 or +2 points to a certain nature(will be controlled by a variable ofcourse). Then at the end of the questioning you will be asked if your a boy or girl, Every question Minus the "boy or girl" question will give you points towards certain natures. At the end of the questions i want it to pick the highest variable to base the character on. 

So it will look something like this

Question 1:

Would you jump at the chance to save someone from danger?

Answer:

Yes  [Control variable: Brave +2]

No    [Control variable:Timid + 1]

Question 2:

Are you a boy or girl?

Answer:

Boy

Girl

Nature  | Boy       | Girl

Brave   | Char1    | Char1fem    

Timid    | Char2    | Char2fem

But i have a frew problems.

1: How to make it say"ok brave is the highest variable and the character is a boy so pick char1"?

2. Also. Is there a way to make sure that the player dosent get any of the previous questions again in following questions?

3. How to make it ask 1 more question if 2 or more Natures have the same amount on their variables?

Any help would be greatly appreciated

Edit:

Problem 2 fixed -  I decided to just make 8 common events and put 8 different questions in each common event. 
1.  You could write a condition like this:

     Conditional Branch: Variable: [brave] > Variable: [Timid]

     Change Party Member: Add [Char1]

     Branch End

3. Conditional Branch: Variable: [brave] == Variable: [Timid]

     Show Choices: Ask more Questions

     Branch End
 

ncognito

Veteran
Veteran
Joined
Jul 7, 2013
Messages
157
Reaction score
4
First Language
English
Primarily Uses
there is more natures than just brave and timid. was only using those two as examples there are a total of 16 different natures
 
Last edited by a moderator:

Berylstone

Veteran
Veteran
Joined
Jun 3, 2013
Messages
642
Reaction score
62
First Language
English
Primarily Uses
there is more natures than just brave and timid. was only using those two as examples there are a total of 16 different natures
I would think you could use the same process.  Just compare your [brave] and [Timid] variables with the rest of your variables. 

For example: even if you have 16 natures, if you wanted Character1 to be selected if [brave] was the highest variable, just write something like this

Conditional Branch: Variable: [brave] > Variable: [Timid]

Conditional Branch: Variable: [brave] > Variable: [Nature2]

Conditional Branch: Variable: [brave] > Variable: [Nature3]

Conditional Branch: Variable: [brave] > Variable: [Nature4]

Conditional Branch: Variable: [brave] > Variable: [Nature5] and so on....

It would end up being a lot of conditions since you are juggling so many different variables at once.  If that's what is a problem maybe you could try splitting your variables up and only having certain ones affect certain outcomes.  That way you wouldn't have to compare them with so many different ones.  Or perhaps you could keep track of how many times the person selects an answer and use that number to cut down on conditional branches. 
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
there is more natures than just brave and timid. was only using those two as examples there are a total of 16 different natures
you still have to use the conditional branches like Berylstone explained, because there is no other command available in eventing for this.

Yes, that will require a lot of branches and you'll end up with a rather complex event, with one branch for every combination.

The only other solution would be to move that logic into a script.

That would have the advantage of being able to use case structures and compare several variables at the same time, but it would also require scripting knowledge and script calls from your events.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,049
Members
137,570
Latest member
fgfhdfg
Top