When you write *choice, you’re telling Choicescript to look for a bunch of choices one indent deeper than the *choice command. So it shouldn’t be:
*choice
#Glance...
but
*choice
#Glance...
Then you need to make sure that all the options under the choices are indented to the same level. Right now, you’ve got the option that appears if prowess is less than 15 (“Glance at the blah blah blah”) indented much deeper than the others.
Each option will start either with a #Something
(if you want it to be visible under all circumstances) or with an *if, *elseif,
or *else
, (if you want it to be invisible under some circumstances) or *selectable_if
(if you want it to be grayed out under some circumstances). The # or the * needs to be indented to the same depth for every option.
If you cut out “#Glance at the blah blah blah” and make sure you’ve got the initial indent right, your code should work fine, with three always-visible options starting in #:
*choice
#Glance at the red book, with frayed edges and a cracked spine?
*goto todo
#Glance at the green book, with padded covers?
*goto todo
#Glance at the book in the bag under the table, with a flesh toned leathery cover.
*if (prowess >= 15)
*goto todo
*elseif (prowess >=10)
*goto test
The last option can take you to two different blocks of text, depending on your prowess, but the choice would be the same. Like you said a couple of posts up, “you could choose a choice regardless of your ability, but you wanted different outcomes based on it.”
But maybe you want a couple of the choices to only be visible if the character has high prowess:
*choice
#Glance at the red book, with frayed edges and a cracked spine?
*goto todo
#Glance at the green book, with padded covers?
*goto todo
*if (prowess >= 15) #Glance at the book in the bag under the table, with a flesh toned leathery cover.
*goto todo
*if (prowess >= 10) #Glance at the book that's slightly less noticeable somewhere else.
*goto todo
With this code, a character with 10 prowess will see three choices, a character with 15 prowess will see four.
You could use elseifs…
*choice
#Glance at the red book, with frayed edges and a cracked spine?
*goto todo
#Glance at the green book, with padded covers?
*goto todo
*if (prowess >= 15) #Glance at the book in the bag under the table, with a flesh toned leathery cover.
*goto todo
*elseif (prowess >= 10) #Glance at the book that only moderately observant people can see.
*goto todo
…but this will have the odd effect that a 15 prowess character will never see the fourth book (or whatever option you had in mind for “blah blah blah”), when it seems like a high-prowess character should be able to take in all the possibilities.
The *elseif could be useful if you wanted to drop a hint:
*choice
#Glance at the red book, with frayed edges and a cracked spine?
*goto todo
#Glance at the green book, with padded covers?
*goto todo
*if (prowess >= 15) #Glance at the book in the bag under the table, with a flesh toned leathery cover.
*goto todo
*elseif (prowess >= 10) #I feel like there's another book somewhere around here. If only my prowess were higher...
*goto todo
Which is what people generally use *selectable_if for. In this example, it will tantalize the low-prowess reader with the knowledge that a book exists that she can’t actually see.
*choice
#Glance at the red book, with frayed edges and a cracked spine?
*goto todo
#Glance at the green book, with padded covers?
*goto todo
*selectable_if (prowess >= 15) #Glance at the book in the bag under the table, with a flesh toned leathery cover.
*goto todo
Is that at all helpful?
To see how *if/*elseif*else
work in coding choices, plug the whimsical code below into CSIDE, change the value of monkey to 4 and 10, and see which choices pop up. You’ll never see more than 2 choices.
*create monkey 0
Do you want a monkey?
*choice
#Monkey!
*goto monkey
*if monkey > 5
#Lots of monkey!
*goto monkey
*elseif monkey > 3
#More monkey!
*goto monkey
*else
#No monkey.
*goto monkey2
*label monkey
You have a monkey.
*finish
*label monkey2
You have no monkey.
*finish