How to use gains while branching out? How to put in several episodes?

I’m creating a story and have figured out there are going to be eight endings. I want the choices to span over a few episodes. Is it okay to directly start an episode with an “If, elif, else” command? Because there are eight endings, there are 28 major choices that I will need to use gains. Is it also possible to have a choice within a choice (which will be needed)? The MC will have a choice of two jobs, and then he will have to find an item or not be able to find an item. These choices would be for both jobs. Would it look like something like this?

choice
“Janitor”{
#scene
gain janitor

#scene

choice
“Find item”{
#scene
gain janitor_found_item
}
“Did not find item”{
#scene
gain janitor_not_find_item
}
}
“Kitchen”{
#scene
gain kitchen

#scene

choice
“Find item”{
#scene
gain kitchen_found_item
“Did not find item”
#scene
gain kitchen_did_not_find_item
}
}

If I wanted to end an episode, how would I start the next one? I want to start at the last gain. Would the start of the next episode be something like this?

if (janitor_found_item){
#scene
choice
“choice1”{
#scene
gain choice1
}
“choice2”{
#scene
gain choice2
}
}elif(janitor_not_find_item){
#scene
choice
“choice1”{
#scene
gain choice1
}
“choice2”{
#scene
gain choice2
}
}elif(kitchen_found_item){
#scene
choice
“choice1”{
#scene
gain choice1
}
“choice2”{
#scene
gain choice2
}
}else{
#scene
choice
“choice1”{
#scene
gain choice1
}
“choice2”{
#scene
gain choice2
}
}

I’m sorry if this is confusing. This isn’t the actual names (except for the Janitor and Kitchen). Would the “else” be the gain “kitchen_did_not_find_item”? Thanks to anyone who can help! It’s going to be a lot of work, but I want to be sure how to do this.

All of your code is perfectly correct! The only thing I’m unsure about is whether you can put a choice within a choice. So this is how I would do the first part of the code to avoid that:

choice

“Janitor”{

#scene

gain janitor

}

“Kitchen”{

#scene

gain kitchen

}

if (janitor) {

#janitor scene

choice

“Find item”{

#scene

gain janitor_found_item

}

“Did not find item”{

#scene

gain janitor_not_find_item

}

} else {

#kitchen scene

choice

“Find item”{

#scene

gain kitchen_found_item

}“Did not find item”{

#scene

gain kitchen_did_not_find_item

}

}

And yes, the else is where you would put the kitchen_did_not_find_item! Good luck with your story :grin:

2 Likes

Is this supposed to be a bunch of choices in a row made by readers? Or are they a bunch of branches from past choices? If they’re supposed to be brances, they’re coded incorrectly.

1 Like

yeah, you can have choices in choices, also called nested choices. you can also have some if, elif, else to determine the paths. you can make labels for specific chunks in the story if its basically multiple different stories. i’m not sure what this means because i’m a bit… unobservant, but i think that’s what you mean. if the points are gains, i think you’d just do

if(gainname){

}elif(gainname){

}else{

}

or if its done with points instead of gains, which are those things where you give points to characters by doing @charactername +1/-1 or whatever and then doing if(charactername =/</> number)

then just use labels to create that branching out, like making a label in a specific section like

label name

and having somewhere else, like in the if/elif/else, a goto, where it brings the code to there.

goto name

this post sounds absolutely convoluted… i feel like you’re not gonna gain anything from this lol… :sweat_smile:

What? I know about nested choices, I use them all the time. That isn’t what I was talking about. And if you look, this person didn’t use any dialogue before the choices, which you always need before choices. If you also read the choices they have, they don’t exactly look like choices readers would make, they look like branches from previous choices written out in the erong way. That’s why I asked what their intention was. I’m not sure where the nested choices thing came from.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.