Optional/Binary Choice Help

Hello! I am posting my first ever thread wanting to inquire about some help with coding.

In particular, is it possible to include a binary if-then choice within a list that is otherwise always available? I ask because over the course of the story I am writing the player/reader may uncover certain things that can alter or change their path forward. This can change both options through the main story as well as add helpful materials to reference in the Stats page in a little ‘mini menu’ I’m setting up in there.

Would it be possible to completely hide those choices until the binary value is correct?

For instance I would like it ideally to look something like.

  • if macguffin = 0
    • choice
      • Choice 1
      • Choice 2
      • Choice 3

Which would become . . .

  • if macguffin = 1
    • choice
      • Choice 1
      • Choice 2
      • Macguffin Choice
      • Choice 3

What sort of coding or format would you recommend? I’ve been looking through the Basic and Advanced tutorials and couldn’t seem to find the answers I was looking for.

Yes, it’s possible. I’d recommend something like this:

*choice
    #Choice 1.
    #Choice 2.
    *if (macguffin = 1)
        #MacGuffin choice.
    #Choice 3.

If you ever want the Macguffin choice to be visible but not selectable, you can also do it thusly:

*choice
    #Choice 1.
    #Choice 2.
    *selectable_if (macguffin = 1) #MacGuffin Choice.
    #Choice 3.
5 Likes

That works out splendidly. Thank you so much for the help!

1 Like

McDonalds should sell egg MacGuffins for breakfast.

Here’s another simple way to divide those choices:

*label item_no
*choice
 #Choice 1.
 #Choice 2.
 #Choice 3.

*label item_yes
*choice
 #Choice 1.
 #Choice 2.
 #Choice 3.
 #MacGuffin choice.

This way, you can go to a different label based on an *if statement. It may work better or worse given a particular situation. :slight_smile:

2 Likes

I’m hungry.
Damn you.

1 Like

A lot less code-efficient.

2 Likes

That’s a bit code-heavy for my purposes. Without giving away too many details, part of this has to do with a list in the stats page. Essentially its an option which becomes available once the player reaches a certain point in the story. Its used to help act as a reference for various people and notes that the player may want to reference. As well as just the good ol’ fashioned flavor and immersion into the universe.

1 Like