I need a script that can call a set of choices based on the top four personality profiles a person has. I've tried creating a psudocode, but my mind seems to blank on the integral things.
Basics:
-- 16 personality profiles
-- When a choice is made from that profile, +1 is added to that profile's score
-- Only four profiles with the highest score have choices shown
-- Choices come from a dialogue list
-- Something in the dialoge indicates a positive, negative, or neutral response
So, as an example (Only with two choices instead of four, and 4 profiles instead of 16):
Lisa says: Are you looking forward to English this year?
Some code here says that this is conversation 6, choice 2
The scores for the profiles so far are:
P == 16
M == 12
E == 18
S == 17
The dialogue list looks something like this:
(Previous dialogues here)
Conversation 6
. . Choice 1
. . . . (Choice listing)
. . Choice 2
. . . . PersonalityP - I wish I didn't have to take it. => I dunno... I really wish I didn't have to take the class. It's boring.
. . . . PersonalityM + I can't wait! => I'm really excited! I've been thinking of new ways to write my essays!
. . . . PersonalityE + I can't wait! => I can't wait! I heard there's a new book on the literature list and it's supposed to be a romance!
. . . . PersonalityS n I'm waiting to see how it is. => I'm not sure yet. I'm waiting to see what the teacher is like first.
. . Choice 3
. . . . (Choice listing)
. . Choice 4
. . . . (Choice listing)
. . Choice 5
. . . . (Choice listing)
The game sees that E and S are the highest scores, so looks for the choices under Conversation 6, Choice 2 and prints them.
Choice:
- I can't wait!
- I'm waiting to see how it is.
Let's say user picks the second choice. It increases the variable that holds the personality's score, enters a number into a database variable dependant on if it's positive, negative, or neutral, and displays the corresponding dialogue.
You: I'm not sure yet. I'm waiting to see what the teacher is like, first.
After that should all be the author's doing, including having branch statements for the database variable. The reponse to a positive, negative, or neutral choice, and another choice after that, if necessary.
As you can see, I have a good deal of it figured out. I don't know how to get it to look up the choices and everything, though. I'm figuring that there's something going on with arrays and/or hashes, I'm just still trying to figure out how it all works together. I'm also not sure how to get the choices displayed.
If this script (or ANY variant thereof) is used in a commercial game of mine, royalties will be awarded appropriately. Right now I mostly want it for an experimental dating sim I'm working on, but my in-laws offered to help me if I wanted to try and create and sell a commercial game, and it would most certainly use this.
Edit: Just thought I'd mention... + - and n aren't necessary, they just seemed better examples than 0, 1, 2 without someone knowing just what they are
Basics:
-- 16 personality profiles
-- When a choice is made from that profile, +1 is added to that profile's score
-- Only four profiles with the highest score have choices shown
-- Choices come from a dialogue list
-- Something in the dialoge indicates a positive, negative, or neutral response
So, as an example (Only with two choices instead of four, and 4 profiles instead of 16):
Lisa says: Are you looking forward to English this year?
Some code here says that this is conversation 6, choice 2
The scores for the profiles so far are:
P == 16
M == 12
E == 18
S == 17
The dialogue list looks something like this:
(Previous dialogues here)
Conversation 6
. . Choice 1
. . . . (Choice listing)
. . Choice 2
. . . . PersonalityP - I wish I didn't have to take it. => I dunno... I really wish I didn't have to take the class. It's boring.
. . . . PersonalityM + I can't wait! => I'm really excited! I've been thinking of new ways to write my essays!
. . . . PersonalityE + I can't wait! => I can't wait! I heard there's a new book on the literature list and it's supposed to be a romance!
. . . . PersonalityS n I'm waiting to see how it is. => I'm not sure yet. I'm waiting to see what the teacher is like first.
. . Choice 3
. . . . (Choice listing)
. . Choice 4
. . . . (Choice listing)
. . Choice 5
. . . . (Choice listing)
The game sees that E and S are the highest scores, so looks for the choices under Conversation 6, Choice 2 and prints them.
Choice:
- I can't wait!
- I'm waiting to see how it is.
Let's say user picks the second choice. It increases the variable that holds the personality's score, enters a number into a database variable dependant on if it's positive, negative, or neutral, and displays the corresponding dialogue.
You: I'm not sure yet. I'm waiting to see what the teacher is like, first.
After that should all be the author's doing, including having branch statements for the database variable. The reponse to a positive, negative, or neutral choice, and another choice after that, if necessary.
As you can see, I have a good deal of it figured out. I don't know how to get it to look up the choices and everything, though. I'm figuring that there's something going on with arrays and/or hashes, I'm just still trying to figure out how it all works together. I'm also not sure how to get the choices displayed.
If this script (or ANY variant thereof) is used in a commercial game of mine, royalties will be awarded appropriately. Right now I mostly want it for an experimental dating sim I'm working on, but my in-laws offered to help me if I wanted to try and create and sell a commercial game, and it would most certainly use this.
Edit: Just thought I'd mention... + - and n aren't necessary, they just seemed better examples than 0, 1, 2 without someone knowing just what they are