*if (Parts >= 15)
#I'll sell a lot of parts.
*set Parts -15
*set Credits +75
*goto GenShop
*if (Parts >= 10)
#I'll sell a moderate amount of parts.
*set Parts +10
*set Credits +50
*goto GenShop
*if (Parts >= 5)
#I can't sell many parts, but some.
*set Parts -5
*set Credits +25
*goto GenShop
Since the NPC’s response (vocally) to all of these options is identical, could I do this instead…
*if (Parts >= 15)
#I'll sell a lot of parts.
*set Parts -15
*set Credits +75
*if (Parts >= 10)
#I'll sell a moderate amount of parts.
*set Parts +10
*set Credits +50
*if (Parts >= 5)
#I can't sell many parts, but some.
*set Parts -5
*set Credits +25
*goto GenShop
… to get it to go to GenShop without having it under each option like I did before? I don’t mind copy/pasting the dialogue, but I’m also not sure where to place it to get it to go for all paths.
If you’ve turned on ICF or use a *fake_choice (grumble grumble) here, you don’t need to use a *goto at all. (Unless the *label GenShop where the story continues is somewhere other than right after the choice. If so, then you should indent the *goto at the same level as the *choice or *fake_choice, not the level of the *ifs or the #options. The single *goto in that case is where you want the code to go after all the detailed choice stuff is dealt with; so don’t put it at the level of the choice details, put it at the level of the story pre-choice, which should be the same indent level as your *choice/*fake_choice command.)
Otherwise, with a regular *choice, each #option needs its own *goto. Pretty sure QT will throw an error otherwise.
The *GenShop label is above this choice set in a loop with the other shop options (so that players won’t automatically exit the shop if they need to purchase more than one thing or purchase and sell some items and so forth). The biggest thing I’m stuck on is…
*if (Parts >= 15)
#I'll sell a lot of parts.
TEXT HERE
*set Parts -15
*set Credits +75
*if (Parts >= 10)
#I'll sell a moderate amount of parts.
TEXT HERE
*set Parts +10
*set Credits +50
*if (Parts >= 5)
#I can't sell many parts, but some.
TEXT HERE
*set Parts -5
*set Credits +25
*goto GenShop
… getting the “text here” parts to be the same text without having to repeat the text three times.
*if (Parts >= 15)
#I'll sell a lot of parts.
*set Parts -15
*set Credits +75
*label parts_text
TEXT HERE
*goto GenShop
*if (Parts >= 10)
#I'll sell a moderate amount of parts.
*set Parts +10
*set Credits +50
*goto parts_text
*if (Parts >= 5)
#I can't sell many parts, but some.
*set Parts -5
*set Credits +25
*goto parts_text