How do I put multiple choices on one page?

Alright, so in the choicescript wiki page about *choice, there’s a section about putting multiple choices on one page. (Multiple Choice section)

In that section the wiki gives a link to the old CS-IDE page and doesn’t explain how to do it yourself.

I’m stumped. Is there anybody here that can teach me, or perhaps tell me how exactly to use the newly recreated CS-IDE so that it can do that? @CJW?

3 Likes

I have an example I used in my competition game for @Lordirish’s CS Comp last year.

Here’s the code:

Two choices on one page

*choice Philosophy Outlook
  #I'm the conservative, law-bound sort.
    #I try to be charitable.
      *set alignment "Rule-Following Altruist"
      So you're a rule-following altruist. And you'd think they'd write something more charitable sounding on your Stat Sheet, but no. There it is, in black and white: "Rule-following Altruist".
      *goto onwardsever
    #I view life as a constant give-and-take, always in flux.
      *set alignment "Equitable Rule-Follower"
      You follow the rules, and you expect your friends and colleagues to invest as much in you as you do in them. Fascinatingly, the Sheet sums up your views as an "Equitable Rule-Follower".
      *goto onwardsever
    #All beings for themselves - and I prioritise my own needs and desires.
      *set alignment "Rule-Following Opportunist"
      And obviously, the best way to fulfil my desires is by keeping within the bounds of the law. Jails are not very desirable estates.
      
      The Statistics Determination Board has thus chosen to sum up your views as a "Rule-following Opportunist." Not exactly charming, but not exactly unfair either.
      *goto onwardsever
  #I consider myself flexible about such things.
    #I try to be charitable.
      *set alignment "Nonpartisan Altruist"
      You follow the laws when it seems reasonable to do so, but being kind or caring is much more of a priority for you. Your Statistics Sheet, thus, defines your views as a "Nonpartisan Altruist." Not a perfect definition, but it will have to do.
      *goto onwardsever
    #I view life as a constant give-and-take, always in flux.
      *set alignment "Equitable Nonpartisan"
      Community is all about compromise; your needs amongst the needs of others, your kingdom's needs amongst the world's. Rules aren't as relevant to all that as most people think they are.
      
      Fascinatingly, the Statistics Determination Board decided to sum up your views as a "Equitable Nonpartisan". Probably more dignified-sounding than it warrants, but there we are.
      *goto onwardsever
    #All beings for themselves - and I prioritise my own needs and desires.
      *set alignment "Nonpartisan Opportunist"
      Laws are laws; they can be useful, and you can break them when they're not. But as for your own needs - well, you should always take care of Number One. Who else will?
      
      The Statistics Determination Board has rather tritely summed up your perspective as a "Nonpartisan Opportunist." Who comes up with these things? Jeepers.
      *goto onwardsever
  #I believe we all should rule ourselves, without anyone telling us what to do.
    #I try to be charitable.
      *set alignment "Altruistic Anarchist"
      Rule by a monarch, or by the majority, only oppresses those who are not in power. No, all beings should rule themselves, and settle disagreements as a cooperative group. Besides, if everyone learns to consider one another, share, and even sacrifice, the number of conflicts would surely lessen.
      
      Rather fascinatingly, the Statistics Determination Board sums up your attitude as an "Altruistic Anarchist." Alliterative, if not terribly descriptive. The perils of bureaucracy at work, right there.
      *goto onwardsever
    #I view life as a constant give-and-take, always in flux.
      *set alignment "Equitable Anarchist"
      The people should rule themselves, learning to barter, trade, and protect one another.
      
      That's the only way society can really be equitable - if everyone gives and takes in equal portion and according to needs. And that's what I expect from myself, and my friends.
      
      The Statistics Determination Board has decided, according to their own weird logic, to call this view "Equitable Anarchist". Fair enough; it's not as if you can call them and argue the finer points of definition.
      *goto onwardsever
    #All beings for themselves - and I prioritise my own needs and desires.
      *set alignment "Anarchy-Inclined Opportunist"
      A truly selfish society, if wise, will figure out how to get along with one another for mutual protection, fulfilment, and survival. And really, all beings are intrinsically selfish. So why should one selfish person have more power than the other selfish people?
      
      No, if you take care of Number One, you'll make sure you have what you need. And it's up to everyone else to do the same. And the Statistics Determination Board, as is its wont, has summed up your viewpoint as an "Anarchy-Inclined Opportunist". Charming.
      *goto onwardsever
*label onwardsever

It looks like this on the page:

You can try it by plugging my code into the current version of CSIDE (just start a new, blank project, and be sure to put *temp alignment "" at the top of my code block so you have the variable you’ll need). If it’s still unclear, I could try to write up an explanation for you.

27 Likes

Bless you. May your life be healthy, happy and full of adorable animals of your choice.

12 Likes

Can you have more then two choices per page if desired?

2 Likes

Yes. Yes, you can indeed have more than two choices per page as desired. I’ve personally built choice structures with three choice groups on a single page. The problem is the complexity of the code required as you increase your choice group count. Two choice groups? No big deal. Three? Things start getting a little messy. Four? I’ve not yet had a reason to try. I’m not sure I even want to see what kind of mess that produces. I probably will satisfy my curiosity at some point. Not today, though.

Each one of the first choice’s options has to contain every option of the second choice’s options as well. And each of the second choice’s options must also contain every single option from the third choice, if a third choice exists.

I made a fairly simple example using hair length, texture, and color. I then gave one of the first-choice options a nested choice. With stat-setting, the end result is 453 lines long.
*choice length texture color
	#A bald head. If you still had hair, you'd have...
		#Straight,
			#Black hair.
				*set hair_length "bald"
				*set hair_texture "straight"
				*set hair_color "black"
				Is your head naturally bald or shaved?
				*choice
					#Shaved, of course.
						*goto next
					#Naturally, of course.
						*set naturally_bald true
						*goto next
				*goto next
			#Brown hair.
				*set hair_length "bald"
				*set hair_texture "straight"
				*set hair_color "brown"
				Is your head naturally bald or shaved?
				*choice
					#Shaved, of course.
						*goto next
					#Naturally, of course.
						*set naturally_bald true
						*goto next
				*goto next
			#Red hair.
				*set hair_length "bald"
				*set hair_texture "straight"
				*set hair_color "red"
				Is your head naturally bald or shaved?
				*choice
					#Shaved, of course.
						*goto next
					#Naturally, of course.
						*set naturally_bald true
						*goto next
				*goto next
			#Blonde hair.
				*set hair_length "bald"
				*set hair_texture "straight"
				*set hair_color "blonde"
				Is your head naturally bald or shaved?
				*choice
					#Shaved, of course.
						*goto next
					#Naturally, of course.
						*set naturally_bald true
						*goto next
				*goto next
		#Wavy,
			#Black hair.
				*set hair_length "bald"
				*set hair_texture "wavy"
				*set hair_color "black"
				Is your head naturally bald or shaved?
				*choice
					#Shaved, of course.
						*goto next
					#Naturally, of course.
						*set naturally_bald true
						*goto next
				*goto next
			#Brown hair.
				*set hair_length "bald"
				*set hair_texture "wavy"
				*set hair_color "brown"
				Is your head naturally bald or shaved?
				*choice
					#Shaved, of course.
						*goto next
					#Naturally, of course.
						*set naturally_bald true
						*goto next
				*goto next
			#Red hair.
				*set hair_length "bald"
				*set hair_texture "wavy"
				*set hair_color "red"
				Is your head naturally bald or shaved?
				*choice
					#Shaved, of course.
						*goto next
					#Naturally, of course.
						*set naturally_bald true
						*goto next
				*goto next
			#Blonde hair.
				*set hair_length "bald"
				*set hair_texture "wavy"
				*set hair_color "blonde"
				Is your head naturally bald or shaved?
				*choice
					#Shaved, of course.
						*goto next
					#Naturally, of course.
						*set naturally_bald true
						*goto next
				*goto next
		#Curly,
			#Black hair.
				*set hair_length "bald"
				*set hair_texture "curly"
				*set hair_color "black"
				Is your head naturally bald or shaved?
				*choice
					#Shaved, of course.
						*goto next
					#Naturally, of course.
						*set naturally_bald true
						*goto next
				*goto next
			#Brown hair.
				*set hair_length "bald"
				*set hair_texture "curly"
				*set hair_color "brown"
				Is your head naturally bald or shaved?
				*choice
					#Shaved, of course.
						*goto next
					#Naturally, of course.
						*set naturally_bald true
						*goto next
				*goto next
			#Red hair.
				*set hair_length "bald"
				*set hair_texture "curly"
				*set hair_color "red"
				Is your head naturally bald or shaved?
				*choice
					#Shaved, of course.
						*goto next
					#Naturally, of course.
						*set naturally_bald true
						*goto next
				*goto next
			#Blonde hair.
				*set hair_length "bald"
				*set hair_texture "curly"
				*set hair_color "blonde"
				Is your head naturally bald or shaved?
				*choice
					#Shaved, of course.
						*goto next
					#Naturally, of course.
						*set naturally_bald true
						*goto next
				*goto next
		#Coily (sometimes called "kinky",)
			#Black hair.
				*set hair_length "bald"
				*set hair_texture "coily"
				*set hair_color "black"
				Is your head naturally bald or shaved?
				*choice
					#Shaved, of course.
						*goto next
					#Naturally, of course.
						*set naturally_bald true
						*goto next
				*goto next
			#Brown hair.
				*set hair_length "bald"
				*set hair_texture "coily"
				*set hair_color "brown"
				Is your head naturally bald or shaved?
				*choice
					#Shaved, of course.
						*goto next
					#Naturally, of course.
						*set naturally_bald true
						*goto next
				*goto next
			#Red hair.
				*set hair_length "bald"
				*set hair_texture "coily"
				*set hair_color "red"
				Is your head naturally bald or shaved?
				*choice
					#Shaved, of course.
						*goto next
					#Naturally, of course.
						*set naturally_bald true
						*goto next
				*goto next
			#Blonde hair.
				*set hair_length "bald"
				*set hair_texture "coily"
				*set hair_color "blonde"
				Is your head naturally bald or shaved?
				*choice
					#Shaved, of course.
						*goto next
					#Naturally, of course.
						*set naturally_bald true
						*goto next
				*goto next
	#Short,
		#Straight,
			#Black hair.
				*set hair_length "short"
				*set hair_texture "straight"
				*set hair_color "black"
				*goto next
			#Brown hair.
				*set hair_length "short"
				*set hair_texture "straight"
				*set hair_color "brown"
				*goto next
			#Red hair.
				*set hair_length "short"
				*set hair_texture "straight"
				*set hair_color "red"
				*goto next
			#Blonde hair.
				*set hair_length "short"
				*set hair_texture "straight"
				*set hair_color "blonde"
				*goto next
		#Wavy,
			#Black hair.
				*set hair_length "short"
				*set hair_texture "wavy"
				*set hair_color "black"
				*goto next
			#Brown hair.
				*set hair_length "short"
				*set hair_texture "wavy"
				*set hair_color "brown"
				*goto next
			#Red hair.
				*set hair_length "short"
				*set hair_texture "wavy"
				*set hair_color "red"
				*goto next
			#Blonde hair.
				*set hair_length "short"
				*set hair_texture "wavy"
				*set hair_color "blonde"
				*goto next
		#Curly,
			#Black hair.
				*set hair_length "short"
				*set hair_texture "curly"
				*set hair_color "black"
				*goto next
			#Brown hair.
				*set hair_length "short"
				*set hair_texture "curly"
				*set hair_color "brown"
				*goto next
			#Red hair.
				*set hair_length "short"
				*set hair_texture "curly"
				*set hair_color "red"
				*goto next
			#Blonde hair.
				*set hair_length "short"
				*set hair_texture "curly"
				*set hair_color "blonde"
				*goto next
		#Coily (sometimes called "kinky",)
			#Black hair.
				*set hair_length "short"
				*set hair_texture "coily"
				*set hair_color "black"
				*goto next
			#Brown hair.
				*set hair_length "short"
				*set hair_texture "coily"
				*set hair_color "brown"
				*goto next
			#Red hair.
				*set hair_length "short"
				*set hair_texture "coily"
				*set hair_color "red"
				*goto next
			#Blonde hair.
				*set hair_length "short"
				*set hair_texture "coily"
				*set hair_color "blonde"
				*goto next
	#Medium-length,
		#Straight,
			#Black hair.
				*set hair_length "medium-length"
				*set hair_texture "straight"
				*set hair_color "black"
				*goto next
			#Brown hair.
				*set hair_length "medium-length"
				*set hair_texture "straight"
				*set hair_color "brown"
				*goto next
			#Red hair.
				*set hair_length "medium-length"
				*set hair_texture "straight"
				*set hair_color "red"
				*goto next
			#Blonde hair.
				*set hair_length "medium-length"
				*set hair_texture "straight"
				*set hair_color "blonde"
				*goto next
		#Wavy,
			#Black hair.
				*set hair_length "medium-length"
				*set hair_texture "wavy"
				*set hair_color "black"
				*goto next
			#Brown hair.
				*set hair_length "medium-length"
				*set hair_texture "wavy"
				*set hair_color "brown"
				*goto next
			#Red hair.
				*set hair_length "medium-length"
				*set hair_texture "wavy"
				*set hair_color "red"
				*goto next
			#Blonde hair.
				*set hair_length "medium-length"
				*set hair_texture "wavy"
				*set hair_color "blonde"
				*goto next
		#Curly,
			#Black hair.
				*set hair_length "medium-length"
				*set hair_texture "curly"
				*set hair_color "black"
				*goto next
			#Brown hair.
				*set hair_length "medium-length"
				*set hair_texture "curly"
				*set hair_color "brown"
				*goto next
			#Red hair.
				*set hair_length "medium-length"
				*set hair_texture "curly"
				*set hair_color "red"
				*goto next
			#Blonde hair.
				*set hair_length "medium-length"
				*set hair_texture "curly"
				*set hair_color "blonde"
				*goto next
		#Coily (sometimes called "kinky",)
			#Black hair.
				*set hair_length "medium-length"
				*set hair_texture "coily"
				*set hair_color "black"
				*goto next
			#Brown hair.
				*set hair_length "medium-length"
				*set hair_texture "coily"
				*set hair_color "brown"
				*goto next
			#Red hair.
				*set hair_length "medium-length"
				*set hair_texture "coily"
				*set hair_color "red"
				*goto next
			#Blonde hair.
				*set hair_length "medium-length"
				*set hair_texture "coily"
				*set hair_color "blonde"
				*goto next
	#Long,
		#Straight,
			#Black hair.
				*set hair_length "long"
				*set hair_texture "straight"
				*set hair_color "black"
				*goto next
			#Brown hair.
				*set hair_length "long"
				*set hair_texture "straight"
				*set hair_color "brown"
				*goto next
			#Red hair.
				*set hair_length "long"
				*set hair_texture "straight"
				*set hair_color "red"
				*goto next
			#Blonde hair.
				*set hair_length "long"
				*set hair_texture "straight"
				*set hair_color "blonde"
				*goto next
		#Wavy,
			#Black hair.
				*set hair_length "long"
				*set hair_texture "wavy"
				*set hair_color "black"
				*goto next
			#Brown hair.
				*set hair_length "long"
				*set hair_texture "wavy"
				*set hair_color "brown"
				*goto next
			#Red hair.
				*set hair_length "long"
				*set hair_texture "wavy"
				*set hair_color "red"
				*goto next
			#Blonde hair.
				*set hair_length "long"
				*set hair_texture "wavy"
				*set hair_color "blonde"
				*goto next
		#Curly,
			#Black hair.
				*set hair_length "long"
				*set hair_texture "curly"
				*set hair_color "black"
				*goto next
			#Brown hair.
				*set hair_length "long"
				*set hair_texture "curly"
				*set hair_color "brown"
				*goto next
			#Red hair.
				*set hair_length "long"
				*set hair_texture "curly"
				*set hair_color "red"
				*goto next
			#Blonde hair.
				*set hair_length "long"
				*set hair_texture "curly"
				*set hair_color "blonde"
				*goto next
		#Coily (sometimes called "kinky",)
			#Black hair.
				*set hair_length "long"
				*set hair_texture "coily"
				*set hair_color "black"
				*goto next
			#Brown hair.
				*set hair_length "long"
				*set hair_texture "coily"
				*set hair_color "brown"
				*goto next
			#Red hair.
				*set hair_length "long"
				*set hair_texture "coily"
				*set hair_color "red"
				*goto next
			#Blonde hair.
				*set hair_length "long"
				*set hair_texture "coily"
				*set hair_color "blonde"
				*goto next

It looks pretty awful as raw code, doesn’t it? It’s not quite as bad as it appears - it’s mostly copy-paste, with a little touchup to the *set commands each time you paste a block. That said, you can see how quickly the complexity multiplies.

It looks like this when played.

11 Likes

Is it possible to do this with a two-word option or multiple two word option? I’ve tried quotes and using a variable but it won’t accept ${variable} as a choice group name.

1 Like

No. The script requires single words or words_connected_by_underscore … the problem with that is the underscores show during gameplay.

3 Likes

: (

*whispers to the wind
I hope there’ll be an update to allow us to modify the choice group name

2 Likes

There are a couple of improvements that I hope will be made such as allowing proper sets per indentation. The code will need to become more used for it to be expanded upon though.

2 Likes

@Fiogan Challenge accepted.

Four choices, in only 4,800 lines of code.
Maybe I should add the hair options:

I’m kidding. I’m going to delete this. 5 thousand lines of code is way to much as it is.

11 Likes

Daem.
I’ll probably just go with basic 6 colors of rainbow.
:heart: :orange_heart: :yellow_heart: :green_heart: :blue_heart: :purple_heart:

  • :black_heart: :white_circle:
    (can’t find any white heart :slightly_frowning_face:)
3 Likes

Thank you for posting this! It’s been a really helpful template to work with, and although this is an older post, I appreciate your time spent copying and pasting so much.

2 Likes

I placed the temp alignment above the block of code like what was said but it’s giving me an error.

Is something supposed to go between the “”?

It’s running for me, I think you might be using wrong quotation mark.

No problem :slightly_smiling_face:

1 Like

…there are…wrong quotation marks. THERE ARE WRONG QUOTATION MARKS???

Thank you. Like seriously.

3 Likes