If and Fake Choices

Where do you want the dialogue? You should be able to just add it on a per choice basis this way?
Unless ofcourse you mean the Group X thing.
Or am I misunderstanding what you want?

This is how the indents work on a fake_choice:

*fake_choice
  #Choice 1
    Ch1 specific Blah Blah Blah
  #Choice 2
    Ch2 specific Brah Brah Brah
  #Choice 3
    Ch3 specific Blah Blah Blah
The Blah Blah everyone sees regardless of choice (and the game continues from here).

The reason it told you “expecting indent 0 was 3” was that with your indentation, the *fake_choice is over at Blah Blah Blah – it had one option, and ChoiceScript expects the game to keep flowing from Blah Blah Blah, at the same 0 indent level as *fake_choice and Blah Blah Blah.

Instead, there’s a triple indent (before “#Choice 2”), which gets CS all flustered, because it doesn’t recognize that as part of the *fake_choice.

Edit: does this tweak on m3ales’ code do what you want, in terms of dialogue appearing after each choice? I’ve suggested disable_reuse because you said Choice 1 “cannot be reselected” rather than “disappears”.

*diasble_reuse
*label loopStart
*choice
    #Choice 1
        Blah Blah Blah.
        *goto loopStart
    #Choice 2
        Brah Brah Brah.
        *goto loopStart
    #Choice 3
        Bwah Bwah Bwah.
        *goto loopStart
    #Choice 4
        Bleccch!
        *goto loopStart
    #Stop Choosing
        *goto continue
*label continue
2 Likes
*fake_choice
 #Choice 1 
  Blah Blah Blah
 #Choice 2
  Brah Brah Brah
 #Choice 3
  Blah Blah Blah
  *goto todo
  

You have a few options once as @m3ales shows but add in the hide_reuse

*hide_reuse
*label loopStart
*choice
 *hide_reuse #Choice 1
  *goto loopStart
 *hide_reuse #Choice 2
  *goto loopStart
 *hide_reuse #Choice 3
  *goto loopStart
 *hide_reuse #Choice 4
  *goto loopStart
 *hide_reuse #Stop Choosing
  *goto continue
  
*label continue
*finish

Of course you can go for something like this to if you are using true/false

*temp var_name1 0
*temp var_name2 0
*temp var_name3 0
*temp var_name4 0
*temp var_count 0
*temp results ""


 *hide_reuse
*label loopStart

*choice 
 *if (var_name1) #Choice 1
  *set results "head."
  *set var_name1 false
  *set var_count +1
  *goto loopStart
 *if (var_name2) #Choice 2
  *set results "left arm."
  *set var_name2 false
  *set var_count +1
  *goto loopStart
 *if (var_name3) #Choice 3
  *set results "right arm."
  *set var_name3 false
  *set var_count +1
  *goto loopStart
 *if (var_name4) #Choice 4
  *set results "foot."
  *set var_name4 false
  *set var_count +1
  *goto loopStart
 *if (var _count>=4) #Stop Choosing
  *goto continue
  
*label continue
You decided to shoot him in the ${results}
*finish

There a lot of different ways you can approach this just depends on what you are going for. I like the true/false as it can be reused often through the code, but that is just me. :stuck_out_tongue: Plus i love to long code all to often lol

3 Likes

Well expressed, I only code using fake_choices and they basically works like choice without having to put a goto everywhere. Hide comand selectable_if command if variables all work together properly in fake .

1 Like

If you want *hide_reuse functionality with fake_choices.

*temp fakeChoice1 false
*temp fakeChoice2 false
*temp fakeChoice3 false
*temp fakeChoice4 false
*label loopStart
Pick a choice, if you dare...
*fake_choice
    *selectable_if(not(fakeChoice1)) #Choice 1
        Selected Choice 1
        *set fakeChoice1 true
    *selectable_if(not(fakeChoice2)) #Choice 2
        Selected Choice 2
        *set fakeChoice2 true
    *selectable_if(not(fakeChoice3)) #Choice 3
        Selected Choice 3
        *set fakeChoice3 true
    *selectable_if(not(fakeChoice4)) #Choice 4
        Selected Choice 4
        *set fakeChoice4 true
Text that is shown everytime, but should probably be at the top.
*if ( (((not(fakeChoice1)) or (not(fakeChoice2))) or (not(fakeChoice3))) or (not(fakeChoice4)) )
    *goto loopStart
No more choices left. D:

EDIT: Talk about timing xD
Also I meant disable_reuse not hide, which is why there are selectable_ifs

2 Likes

There is no need of that tons of code at all. Just use a if comand

*temp hide false 
*fake_choice
    *if hide
        #Choice1
    #Choice2

Your right I just learned this style when I first started back in the day and fake_choice did nothing and was not used for much. I still look at fake_choice with a cringe lol.

*Edit I have never used a fake_choice and to stubborn for my own good to start now. :stuck_out_tongue:

1 Like

Once again the forum is my savior.

*disable_reuse *label loopStart *choice #Choice 1 Blah Blah Blah. *goto loopStart #Choice 2 Brah Brah Brah. *goto loopStart #Choice 3 Bwah Bwah Bwah. *goto loopStart #Choice 4 Bleccch! *goto loopStart #Stop Choosing *goto continue

worked just fine for me

If coding in a phone has any advantage, it is there is no literally space in the screen to make redundant code at all. I can’t do lines and lines of giant code lines so I have to go to the point. That of mixture spaces and lost any idea of the where variable starts.

1 Like

I originally wrote like half the if statements in c#, but then choice script was like: nope, you cant just chain ifs like that!
So it went from this

if(!fakeChoice1 || !fakeChoice2 || !fakeChoice3 || !fakeChoice4)

To the mess it is now xD. I actually hate cs sometimes because of this.

@Gavorn good to hear it worked :slight_smile:

@Lordirish I’m sure hide_reuse is global so you don’t need to redefine it for each choice?

2 Likes

I did not know that hide_reuse had changed, learn something new everyday. :slight_smile:

*Edit Nice went and tested it and that makes hide_reuse really easier to use, thanks for pointing that out. :smile:

1 Like

Yeah, it is global now. I really would love if someone could put in the forum a pinned thread where technical changes in Cs with updates are just write. So if whatever command has changed everyone knows

2 Likes

Another day another problem with ifs

This time I’m trying to create a branching stat chart, where if you have friends it shows their name, if you don’t it shows “unknown”


text Relationships

*if (friends = false)
 *stat_chart
   percent amalia Unknown
   percent carloman Unknown
*if (friends = true)
 *stat_chart
   percent amalia Amalia
   percent carloman Carloman

nothing, the stat page just shows the stats above Relationships and doesn’t even show the word “Relationships”

on the startup I have

*create amalia 50
*create carloman 50
*create friends false

After a quick test seems to work for me. Of course not sure how you have your var setup so I ran it as

*create friends false

*create amalia 0
*create carloman 0


text Relationships
*if (friends = false)
 *stat_chart
   percent amalia Unknown
   percent carloman Unknown
*if (friends = true)
 *stat_chart
   percent amalia Amalia
   percent carloman Carloman

False showed Unknown and true gave their names
See your the var will retest
still worked fine for me.

*stat_chart

  text fullname Name
  text title Title
  text fame Fame
  text nata Nata
  text age Age
  text gender Gender
  text sign Sign
  text background Background
  text allegiance Allegiance
  text appearance Appearance
  opposed_pair Taboo
    Mundane
  opposed_pair Destruction
    Creation
  opposed_pair Cynicism
    Idealism
  opposed_pair Rebellious
    Respectful
  percent strength Strength
  percent agility Agility
  percent intelligence Intelligence
  percent charm Charm
  percent prowess Prowess

text Relationships

*if (friends = false)
 *stat_chart
   percent amalia Unknown
   percent carloman Unknown
*if (friends = true)
 *stat_chart
   percent amalia Amalia
   percent carloman Carloman

Gets me

Ok stepping through it and seeing if I spot any problems
Would save sometime if you list your var at the startup. Thanks

I had a similar error when I was formatting the earliest version of my stat screen. Sometimes CS gets mad at you if you don’t put lines between things.

Have you tried

`*stat_chart
  text fullname Name
  text title Title
  text fame Fame
  text nata Nata
  text age Age
  text gender Gender
  text sign Sign
  text background Background
  text allegiance Allegiance
  text appearance Appearance
  opposed_pair Taboo
    Mundane
  opposed_pair Destruction
    Creation
  opposed_pair Cynicism
    Idealism
  opposed_pair Rebellious
    Respectful
  percent strength Strength
  percent agility Agility
  percent intelligence Intelligence
  percent charm Charm
  percent prowess Prowess

text Relationships

*if (friends = false)
 *stat_chart
   percent amalia Unknown
   percent carloman Unknown

*if (friends = true)
 *stat_chart
   percent amalia Amalia
   percent carloman Carloman`

It might not fix it, but sometimes something as simple as that does.

It didn’t work sadly, I have no idea what’s causing this in the slightest.

Hrmm…make a backup of your save and see if the relationship stats work by themselves?

I’m honestly stumped right now. I’m sorry :frowning:

Ok after creating the var myself I have the following that works.

*create friends true

*create amalia 50
*create carloman 50
*create fullname "None"
*create title "Lordirish"
*create fame 0
*create nata 0
*create age 0
*create gender "Male"
*create sign "Leo"
*create background "Blah Blah"
*create allegiance "CoG"
*create appearance "Royal in hiding, looks like a truck driver"
*create taboo 50
*create mundane 50
*create destruction 30
*create creation 80
*create cynicism 10
*create idealism 90
*create rebellious 10
*create respectful 90
*create strength 90
*create agility 99
*create intelligence 55
*create charm 70
*create prowess 99




*stat_chart
  text fullname Name
  text title Title
  text fame Fame
  text nata Nata
  text age Age
  text gender Gender
  text sign Sign
  text background Background
  text allegiance Allegiance
  text appearance Appearance
*stat_chart	
  opposed_pair Taboo
    Mundane
  opposed_pair Destruction
    Creation
  opposed_pair Cynicism
    Idealism
  opposed_pair Rebellious
    Respectful
*stat_chart
  percent strength Strength
  percent agility Agility
  percent intelligence Intelligence
  percent charm Charm
  percent prowess Prowess	
text Relationships
*if (friends = false)
 *stat_chart
   percent amalia Unknown
   percent carloman Unknown
*if (friends = true)
 *stat_chart
  percent amalia Amalia
  percent carloman Carloman
1 Like