Help with stats and choices

So the problem I’m having is this: for one of the choices the player is asked about how school is going and they can pick either it’s going great or it’s going ok, which will take them to one of two options, the person they are talking too then asks about classes they are enjoying, depending on the first choice will depend on what amount the stats will be affected and which ones by picking which classes are their favourites. Now the question is I have used the same 5 class options for both choices and used the label and goto commands but I want the player to only choose two options and the code below is how I laid it out and was hoping there was a way that I didn’t have to write out the options for all of them. I hope that makes sense

Thanks for the help

*label history 
"Why is that your favourite?"
*choice	
	#I love learning about the past
		"It's so interesting to learn about the way people used to live and how what we take for granted 					 now came into existence." You say. "That's good, hopefully it will continue to be enjoyable." 						 Your father says.
		*if going great 
		*goto favourite2
		*if ok 
		*goto classquestion2
	#It's interesting
		"Why is it interesting?" Your father asks. "Learning about new things and a different way of 						living, the entire course so far is just very interesting." You answer
		*if going great 
		*goto favourite2
		*if ok 
		*goto classquestion2
	#It's exciting learning about the past
		"It's so interesting to learn about the way people used to live and how what we take for granted 					now came into existance." You say. "That's good, hopefully it will continue to be enjoyable." 						Your father says.
		*if going great *goto favourite2
		*if ok *goto classquestion2
	#My teacher this year is great
		"Why is your teacher great?" Your father asks. "Well, they are making it really enjoyable to 						learn about the subject and they're not making it boring."
		*if going great 
		*goto favourite2
		*if ok 
		*goto classquestion2

Just right off the bat, I think your indentation is off. :slight_smile: Anything following an *if statement should be indented past the *if–so the *gotofavorute2 after *if going great and et al should be indented more!

Secondly, I think your *if statements themselves are off? I’m assuming “going great” is a variable, but variables can’t have spaces between the words. So it should be *if goinggreat, not *if going great!

I’m not totally sure what you’re asking about the choices though, you might need to include more of your code under the *classquestion2/*favorite2 labels?

1 Like

Basically I want to know how to set up the choices using the label and goto commands while having it know that the going great and going ok options are two separate options so when I put in the code to go to a specific option it knows that it will be going to the great or ok (as the amount the stats increases is different for each one). As well as having it that the player will be able to pick two different classes they like but making sure that the game doesn’t go in a loop and then ends after the they pick two. I also posted the code (I know it’s long) I hope that makes more snese.

*choice
	#It's going great
		"That's good what subject are you enjoying?" Your father asks
		*goto greatanswer
	#It's going ok
		"Why is it going ok?" Your father asks
		*goto okanswer
*label okanswer

*choice
	#My teachers are ok this year
		*goto classquestion
	#My friends are in different classes than me so it's not as much fun
		*goto classquestion
	#There's more homework and expectations on us this year
		*goto classquestion

*label greatanswer

Pick a favourite subject
*choice
	#History 
		*set booksmart +20 
		*goto history
	#Science 
		*set inventiveness +20 
		*goto science
	#Gym 
		*set fitness +20 
		*goto gym
	#Math 
		*set numbers +20 
		*goto math
	#English 
		*set analysis +20 
		*goto english
*label history 
"Why is that your favourite?"
*choice	
	#I love learning about the past
		"It's so interesting to learn about the way people used to live and how what we take for granted 					 now came into existance." You say. "That's good, hopefully it will continue to be enjoyable." 						 Your father says.
		*if going great 
		*goto favourite2
		*if ok 
		*goto classquestion2
	#It's interesting
		"Why is it interesting?" Your father asks. "Learning about new things and a different way of 						living, the entire course so far is just very interesting." You answer
		*if going great 
		*goto favourite2
		*if ok 
		*goto classquestion2
	#It's exciting learning about the past
		"It's so interesting to learn about the way people used to live and how what we take for granted 					now came into existance." You say. "That's good, hopefully it will continue to be enjoyable." 						Your father says.
		*if going great *goto favourite2
		*if ok *goto classquestion2
	#My teacher this year is great
		"Why is your teacher great?" Your father asks. "Well, they are making it really enjoyable to 						learn about the subject and they're not making it boring."
		*if going great 
		*goto favourite2
		*if ok 
		*goto classquestion2

*label science
"Why is that your favourite?"	
*choice
	#I love learning about how things work
		"That's good I'm glad you're enjoying your science class." Your father says
		*if going great 
		*goto favourite2
		*if ok 
		*goto classquestion2
	#I like learning about the steps
		"What do you mean?" Your father asks. "Well, the steps that are  in the various scientific 						processes." you answer.
		*if going great 
		*goto favourite2
		*if ok 
		*goto classquestion2
	#I like figuring out how things work
		"Well, I guess we might have an inventor in our midst." Your father says. "Possibly." You 						answer.
		*if going great 
		*goto favourite2
		*if ok 
		*goto classquestion2
	#My teacher this year is great
		"Why is your teacher great?" Your father asks. "Well, they are making it really enjoyable to 				 		learn about the subject and they're not making it boring."
		*if going great 
		*goto favourite2
		*if ok 
		*goto classquestion2

*label gym
"Why is that your favourite?"
*choice	
	#I love learning about the various sports
		"Do you have a favourite?" Your father asks. "That's a hard question to answer as I like so many 					of them I don't think I could pick just one or even a top five." You answer.
		*if going great 
		*goto favourite2
		*if ok 
		*goto classquestion2
	#I like being physically active
		"It's really fun doing various sports." you say "That's good, I'm glad you're enjoying your gym 					 class." Your father says.
		*if going great 
		*goto favourite2
		*if ok 
		*goto classquestion2
	#My teacher this year is great
		"Why is your teacher great?" Your father asks. "Well, they are making it really enjoyable to 						learn about the subject and they're not making it boring."
		*if going great 
		*goto favourite2
		*if ok 
		*goto classquestion2
		*if picked two 
		*goto chapteroneend

*label math
"Why is that your favourite?"
*choice
	#I like learning about the steps and the logic of math
		Well, that's good I'm glad you are enjoying your math class. You've always been a very logical 				 		person"  Your father says.
		*if going great 
		*goto favourite2
		*if ok 
		*goto classquestion2
	#I like the logical flow and using the formulas
		"You've always been a very logical person. But why do you like using the formulas?" Your father 				 	asks. "I enjoy being able to put the various numbers into the forumla and then being able to 						figure out the right answer." You answer
		*if going great 
		*goto favourite2
		*if ok 
		*goto classquestion2
	#I like that math is everywhere and something that will always be used
		"That's very true, there's no getting away from using some form of math everyday." Your father says. 
		*if going great 
		*goto favourite2
		*if ok 
		*goto classquestion2
	#My teacher this year is great
		"Why is your teacher great?" Your father asks. "Well, they are making it really enjoyable to learn about 				the subject and they're not making it boring."
		*if going great 
		*goto favourite2
		*if ok 
		*goto classquestion2

*label english
"Why is that your favourite?"
*choice
	#I like reading the various books 
		"Do you have a favourite that you have read so far?" Your father asks. "I don't know I can't 				 		 really pick a favourite or a top five even since I've enjoyed reading the various books." You 						 answer. "That's very true." Your father replies.
		*if going great 
		*goto favourite2
		*if ok 
		*goto classquestion2
	#I like analyzing various books and short stories
		"I've really enjoyed learning the different meaning behind what the author has written." You say 				 	"Is there always a meaning behind what the author says?" Your father asks. "In some cases yes, 						in some cases no, but sometimes we can interrpurt what the author said and put our own meaning 						behind it." You answer.
		*if going great 
		*goto favourite2
		*if ok 
		*goto classquestion2
	#I like writing my own essays and stories
		"I just like being creative and it's a different way to show my creativity." You say. "That's 						 good." Your father answers.
		*if going great 
		*goto favourite2
		*if ok 
		*goto classquestion2
	#My teacher this year is great
		"Why is your teacher great?" Your father asks. "Well, they are making it really enjoyable to 						learn about the subject and they're not making it boring."
		*if going great 
		*goto favourite2
		*if ok 
		*goto classquestion2
*label favourite2
"That's good, but you must enjoy other courses what's another class that you enjoy?"
Pick another class you enjoy
*choice
	*disable_reuse #History 
		*set booksmart +20 
		*goto history
	*disable_reuse #Science 
		*set inventevness +20 
		*goto science
	*disable_reuse #Gym
		*set fitness +20 
		*goto gym
	*disable_reuse #Math 
		*set numbers +20 
		*goto math
	*disable_reuse #English 
		*set analysis +20 
		*goto english

*label classquestion

"That maybe true but there must be some classes that you like?"
You are enjoying some classes pick a favourite.
*choice
	#History 
		*set booksmart +10 
		*goto history
	#Science 
		*set inventevness +10 
		*goto science
	#Gym 
		*set fitness +10
		*goto gym
	#Math 
		*set numbers +10 
		*goto math
	#English 
		*set analysis +10 
		*goto english
*label classquestion2	
"That's cool but what about any other classes?"
Pick another favourite
*choice
	*disable_reuse #History 
		*set booksmart +10 
		*goto history
	*disable_reuse #Science
		*set inventevness +10 
		*goto science 
	*disable_reuse #Gym 
		*set fitness +10 
		*goto gym
	*disable_reuse #Math 
		*set numbers +10 
		*goto math
	*disable_reuse #English 
		*set analysis +10 
		*goto english

Like @rinari mentioned, you cannot use *if going great or *if ok.

If I’m not wrong, you must first create a variable in the startup file. For example:
*create howitsgoing ""

So in your scene, it will look like this
*choice
	#It's going great
        *set howitsgoing "great"
		"That's good. What subject are you enjoying?" Your father asks.
		*goto greatanswer
	#It's going ok
        *set howitsgoing "ok"
		"Why is it going ok?" Your father asks.
		*goto okanswer

Then later on, you will use something like:

*if (howitsgoing = "great")
   *goto favourite
*else 
   *goto classquestions

EDIT
There’s a way for you to shorten your code too, so you don’t have too many duplicates of selecting subjects. You can do this by inserting something like

*create subjectcount 0
in the startup file.

So this will be your code. I only added the details in the *label history scene, as the other subjects will look the same:

*choice
	#It's going great
        *set howitsgoing "great"
		"That's good. What subject are you enjoying?" Your father asks.
		*goto answers
	#It's going ok
        *set howitsgoing "ok"
		"Why is it going ok?" Your father asks.
		*goto okanswer

*label okanswer
*choice
	#My teachers are ok this year.
		*goto answers
	#My friends are in different classes than me so it's not as much fun.
		*goto answers
	#There's more homework and expectations on us this year.
		*goto answers

*label answers
*if (howitsgoing = “great”)
	Pick a favourite subject.
	*goto checkcount
*else 
	"That maybe true but there must be some classes that you like?"
	You are enjoying some classes pick a favourite.
	*goto checkcount

*label checkcount
*if subjectcount =0
	*goto subjectchoices
*if subjectcount =1
	"That's good, but you must enjoy other courses. What's another class that you enjoy?"
	*goto subjectchoices
*else 
	*goto nextscene 

*label subjectchoices
*choice
	*disable_reuse #History 
		*set subjectcount +1
		*if (howitsgoing = “great”)
			*set booksmart +20 
			*goto history
		*else
			*set booksmart +10
			*goto history
	*disable_reuse #Science 
		*set subjectcount +1
		*if (howitsgoing = “great”)
			*set inventiveness +20 
			*goto science
		*else
			*set inventiveness +10
			*goto science
	*disable_reuse #Gym 
		*set subjectcount +1
		*if (howitsgoing = “great”)
			*set fitness +20 
			*goto gym
		*else
			*set fitness +10
			*goto gym
	*disable_reuse #Math 
		*set subjectcount +1
		*if (howitsgoing = “great”)
			*set numbers +20 
			*goto math
		*else
			*set math +10
			*goto math
	*disable_reuse #English 
		*set subjectcount +1
		*if (howitsgoing = “great”)
			*set analysis +20 
			*goto English
		*else
			*set analysis +10
			*goto english

*label history 
"Why is that your favourite?"
*choice	
	#I love learning about the past
		"It's so interesting to learn about the way people used to live and how what we take for granted  now came into existence." You say. 
        "That's good, hopefully it will continue to be enjoyable." Your father says.
		*goto checkcount
	#It's interesting
		"Why is it interesting?" Your father asks. 
        "Learning about new things and a different way of living, the entire course so far is just very interesting." You answer
		*goto checkcount
	#It's exciting learning about the past
		"It's so interesting to learn about the way people used to live and how what we take for granted now came into existence." You say. 
        "That's good, hopefully it will continue to be enjoyable." 						Your father says.
		*goto checkcount
	#My teacher this year is great
		"Why is your teacher great?" Your father asks. 
        "Well, they are making it really enjoyable to earn about the subject and they're not making it boring."
		*goto checkcount

*label nextscene
This is what comes after choosing subjects.
1 Like

Note that *if can only work with boolean true/false; in order to use strings or numbers you need to calculate a boolean value based on them, which is what = does; it computes true when the two things are the same and false otherwise.

Here you could instead have a boolean goinggreat variable which you create like this:

*create goinggreat false

No quotes, “false” is a word and will be treated like any other word.
Then you can set it like this:

*set goinggreat true

Then when you need to check if it is going great you can do this:

*if (goinggreat)

I would generally advise doing this if a variable is only meant to have two values and be a yes/no; it’s both easier to read and impossible to accidentally set to a third value.

Just to add a tiny bit more:

 *if (goinggreat)

will definitely work–but so will

 *if goinggreat

You don’t need the parentheses.

1 Like

Wiki says they’re absolutely mandatory. I guess maybe you need them when there’s something after the variable on the same line?

They are mandatory when using a “not.”

*if not (awesome)

But you can totally do

*if awesome

I did that all over Midsummer and Tally Ho, so I am pretty confident it works.

1 Like

Can you do:

*if awesome #display this

I wouldn’t generally suggest doing that but it’s the sort of thing I’d expect to make otherwise optional parenthesis mandatory.

1 Like

For that case you need

*if (awesome) #display this
2 Likes

And to prevent stubborn quicktest/randomtest bug,

*if awesome
   #display this

is preferrable.

1 Like