I need help with setting skills (Resolved)

I am very new at ChoiceScript and I’m trying make my own interactive story. I’ve had coding classes before so not all of this was too difficult but I’m stuck now trying to set skills. I 've created the stats and the stat screen and I’m on the screen where I’m having the character choose their skills. I’m trying to make so after choosing two skills that will increase your stats the third choice is what your good at, much like in Choice of Broadsides and Choice of Romance. But I have it set for it to just keep going back to the same label and hide_reuse.

*choice
    *hide_reuse #I have a deep knowledge in my history of Vividia and literature and politics. The library is like a home to me and I've fallen asleep many times before with my face in a book.
        *set Knowledge %+15
        *goto skills
    *hide_reuse #I have almost mastered the basic spells and incantations and have started learning the more advanced teaching. My father says I will be a powerful wizard when I grow up.
        *set Knowledge %+5
        *set Charm %+25
        *goto skills
    *hide_reuse #Spending most of time with my father in court I have learned how to read the people around me and how to manipulate those around me with ver little effort.
        *set Knowledge %+10
        *set Sense %+25
        *goto skills
    *hide_reuse #I have a little bit of a gambling problem. Late at night I sneak to the tavern and play Stix nearly all night. I've become quite lucky lately.
        *set Luck %+25
        *set Sense %+5
        *goto skills

Is there anyway you guys can help me around this? I just need help letting the character choose two skills and then an anti skill and then just get on wit the rest of the story

*Edit
One way of handling it might be

*create count 4
*create read true
*create spell true
*create court true
*create gambling true
*choice
    *if ((count>=3) and (read)) #I have a deep knowledge in my history of Vividia and literature and politics. The library is like a home to me and I've fallen asleep many times before with my face in a book.
        *set count -1
        *set read false
        *set Knowledge %+15
        *goto skills
    *if ((count>=3) and (spell)) #I have almost mastered the basic spells and incantations and have started learning the more advanced teaching. My father says I will be a powerful wizard when I grow up.
        *set count -1
        *set spell false
        *set Knowledge %+5
        *set Charm %+25
        *goto skills
    *if ((count>=3) and (court)) #Spending most of time with my father in court I have learned how to read the people around me and how to manipulate those around me with ver little effort.
        *set count -1
        *set court false
        *set Knowledge %+10
        *set Sense %+25
        *goto skills
    *if ((count>=3) and (gambling))  #I have a little bit of a gambling problem. Late at night I sneak to the tavern and play Stix nearly all night. I've become quite lucky lately.
        *set count -1
        *set gambling false
        *set Luck %+25
        *set Sense %+5
        *goto skills
    *if (count<3) #Skill complete
      *goto where_ever

**Edit Have tested and works fine fixed any errors I had in the above code

2 Likes

Thank you so much for the solution! I’ve been trying to learn this new coding on my own but besides the wiki and a few forums. Thanks though!

1 Like

Always happy to lend a hand when I can :smile:

2 Likes

Updated your title unless you need more help. :wink:

1 Like

Actually I need another favor. Instead of the *if(count<3) #Skill Complate I’m trying to get a new page to show up so I can enter:

We've covered what you're good at but what are you not good at? Surely with all of your skills you must be bad at something. Please, do tell.
*choice
    #I couldn't be bothered to study my history and I've hardly lifted a book in my life. I can never remember the names of important royals and I'm terrible in math and literature.
        *set Knowledge %-25
            That doesn't really matter, does it?
                *finish
    #Magic was always scary to me and I never really took it upon myself to learn anymore than the bare requirements. I can use the basic charms but even after that I'm drained.
        *set Charm %-25
            That doesn't really matter, does it?
                *finish
    #I always stayed home instead of going with my father to court and never really learned any politics, let alone how to even spell it.
        *set Sense %-15
        *set Knowledge %-5
            That doesn't really matter, does it?
                *finish
    #Nothing's really really ever gone my way, luck has never been on my side. You could say I'm pretty unlucky.
        *set Luck %-25
        *set Sense %-15
            That doesn't really matter, does it?
                *finish

1 Like
 *if (count<3) #We've covered what you're good at but what are you not good at? Surely with all of your skills you must be bad at something. Please, do tell.
      *goto not_good


*label not_good
*choice
    #I couldn't be bothered to study my history and I've hardly lifted a book in my life. I can never remember the names of important royals and I'm terrible in math and literature.
        *set Knowledge %-25
            That doesn't really matter, does it?
                *finish
    #Magic was always scary to me and I never really took it upon myself to learn anymore than the bare requirements. I can use the basic charms but even after that I'm drained.
        *set Charm %-25
            That doesn't really matter, does it?
                *finish
    #I always stayed home instead of going with my father to court and never really learned any politics, let alone how to even spell it.
        *set Sense %-15
        *set Knowledge %-5
            That doesn't really matter, does it?
                *finish
    #Nothing's really really ever gone my way, luck has never been on my side. You could say I'm pretty unlucky.
        *set Luck %-25
        *set Sense %-15
            That doesn't really matter, does it?
                *finish
3 Likes

Once again your help is much appreciated! I think I’m finally finished my startup.txt

1 Like

I might suggest adding if true to the last part to reflect against what they are ready have chosen.

*label not_good
*choice
    *if (read) #I couldn't be bothered to study my history and I've hardly lifted a book in my life. I can never remember the names of important royals and I'm terrible in math and literature.
        *set Knowledge %-25
            That doesn't really matter, does it?
                *finish
    *if (spell) #Magic was always scary to me and I never really took it upon myself to learn anymore than the bare requirements. I can use the basic charms but even after that I'm drained.
        *set Charm %-25
            That doesn't really matter, does it?
                *finish
    *if (court) #I always stayed home instead of going with my father to court and never really learned any politics, let alone how to even spell it.
        *set Sense %-15
        *set Knowledge %-5
            That doesn't really matter, does it?
                *finish
    *if (gambling) #Nothing's really really ever gone my way, luck has never been on my side. You could say I'm pretty unlucky.
        *set Luck %-25
        *set Sense %-15
            That doesn't really matter, does it?
                *finish
1 Like

I forgot to mention that I have

And what are good at ${xmaster} ${Name}? You must be skilled in something.
You have been taught well in your home the basics: your mother has taught 
you how to dance well and your father trained you how to make polite conversation. 
In your free time you have taught yourself how to hunt on both horseback and foot
and you can even play music quite well. But what would you say you are strong at?

right as *label skills starts and right before the *choice selection you helped with me above. I can deal with it being there but would it be possible for it to disappear or something when it’s time to choose the not_good page?

I don’t want to feel like I’m having you finish the startup.txt for me I just can’t find anything to help me with what I’m trying to finish.

1 Like

Can you post the whole code?

Here you go

*title Choice of Magic
*author Samuel Moos
*scene_list
    startup
    prologue
    chapter01
    chapter02
    chapter03
    variables
    end
    
*create Vitality 50
*create Knowledge 50
*create Charm 50
*create Sense 50
*create Luck 50
*create gender "Male"
*create gender "Female"
*create Name "Wilmer"
*create Surname "Lennox"
*create xhim 0
*create xhis 0
*create xhe 0
*create xmaster 0
*create count 4
*create read true
*create spell true
*create court true
*create gambling true

Your story starts with you sitting in a dark room with no windows or doors. A bright light floats around lazily near the ceiling. It seems to be the only source of light for you to see. You look at yourself to see you are dressed in dirty rags for clothing and are covered in dirt and bruises. [i]Why am I here?[/i] you ask yourself. You try and try but not a single memory appears. Not how you got here. Not what you might have done.

You hear voices outside your cell. They are muffled and you can't make out what is being said but you can tell they voices are male. And by the tone they are not happy. But why?

*page_break

Let's answer some questions while we still have time. You are the eldest child of three but tell, are you the eldest son or daughter?
*choice
    #A boy
        *set gender "Male"
        *set xmaster "Master"
        *goto gender
    #A girl
        *set gender "Female"
        *set xmaster "Lady"
        *goto gender

*label gender
Ah, of course you are. And what do they call you? You must have a name, don't you?
*choice
    *if (gender = "Male")
        #Wilmer
            *set Name "Wilmer"
            *set xhim "him"
            *set xhis "his"
            *set xhe "he"
            *goto lastname
        #Pearce
            *set Name "Pearce"
            *set xhim "him"
            *set xhis "his"
            *set xhe "he"
            *goto lastname
        #Seward
            *set Name "Seward"
            *set xhim "him"
            *set xhis "his"
            *set xhe "he"
            *goto lastname
        #Milford
            *set Name "Wilford"
            *set xhim "him"
            *set xhis "his"
            *set xhe "he"
            *goto lastname
        #Let me choose my name
            *set xhim "him"
            *set xhis "his"
            *set xhe "he"
            *goto changename
    *if (gender = "Female")
        #Juniper
            *set Name "Juniper"
            *set xhim "her"
            *set xhis "hers"
            *set xhe "she"
            *goto lastname
        #Eloise
            *set Name "Eloise"
            *set xhim "her"
            *set xhis "hers"
            *set xhe "she"
            *goto lastname
        #Alma
            *set Name "Alma"
            *set xhim "her"
            *set xhis "hers"
            *set xhe "she"
            *goto lastname
        #Cicely
            *set Name "Cicely"
            *set xhim "her"
            *set xhis "hers"
            *set xhe "she"
            *goto lastname
        #Let me choose my name
            *set xhim "her"
            *set xhis "hers"
            *set xhe "she"
            *goto changename
            
*label changename
Your name is
*input_text Name
*goto lastname

*label lastname
And your family name, ${Name}?
*choice
    #Helman
        *set Surname "Helman"
        *goto skills
    #Ofstald
        *set Surname "Ofstald"
        *goto skills
    #Trawic
        *set Surname "Trawic"
        *goto skills
    #Bayford
        *set Surname "Bayford"
        *goto skills
    #None of these
        *goto surname
        
*label surname
Your family name is
*input_text Surname
*goto skills

*label skills
And what are good at ${xmaster} ${Name}? You must be skilled in something. You have been taught well in your home the basics: your mother has taught you how to dance well and your father trained you how to make polite conversation. In your free time you have taught yourself how to hunt on both horseback and foot and you can even play music quite well. But what would you say you are strong at?
*choice
    *if ((count>=2) and (read)) #I have a deep knowledge in my history of Vividia and literature and politics. The library is like a home to me and I've fallen asleep many times before with my face in a book.
        *set count -1
        *set read false
        *set Knowledge %+15
        *goto skills
    *if ((count>=3) and (spell)) #I have almost mastered the basic spells and incantations and have started learning the more advanced teaching. My father says I will be a powerful wizard when I grow up.
        *set count -1
        *set spell false
        *set Knowledge %+5
        *set Charm %+25
        *goto skills
    *if ((count>=3) and (court)) #Spending most of time with my father in court I have learned how to read the people around me and how to manipulate those around me with ver little effort.
        *set count -1
        *set court false
        *set Knowledge %+10
        *set Sense %+25
        *goto skills
    *if ((count>=3) and (gambling))  #I have a little bit of a gambling problem. Late at night I sneak to the tavern and play Stix nearly all night. I've become quite lucky lately.
        *set count-1
        *set gambling false
        *set Luck %+25
        *set Sense %+5
        *goto skills
    *if (count<3) #We've covered what you're good at but what are you not good at? Surely with all of your skills you must be bad at something. Please, do tell.
        *goto not_good
        
*label not_good
*choice
    *if (read) #I couldn't be bothered to study my history and I've hardly lifted a book in my life. I can never remember the names of important royals and I'm terrible in math and literature.
        *set Knowledge %-25
        That doesn't really matter, does it?
        *finish    
    *if (spell) #Magic was always scary to me and I never really took it upon myself to learn anymore than the bare requirements. I can use the basic charms but even after that I'm drained.
        *set Charm %-25
        That doesn't really matter, does it?
        *finish
    *if (court) #I always stayed home instead of going with my father to court and never really learned any politics, let alone how to even spell it.
        *set Sense %-15
        *set Knowledge %-5
        That doesn't really matter, does it?
        *finish
    *if (gambling) #Nothing's really really ever gone my way, luck has never been on my side. You could say I'm pretty unlucky.
        *set Luck %-25
        *set Sense %-15
        That doesn't really matter, does it?
        *finish

Running the code and looking through it may take me a few

Ok I might suggest something like this:

*label lastname
And your family name, ${Name}?
*choice
    #Helman
        *set Surname "Helman"
        *goto intro
    #Ofstald
        *set Surname "Ofstald"
        *goto intro
    #Trawic
        *set Surname "Trawic"
        *goto sintro
    #Bayford
        *set Surname "Bayford"
        *goto intro
    #None of these
        *goto surname
        
*label surname
Your family name is
*input_text Surname
*goto intro

*label intro
And what are you good at ${xmaster} ${Name}? You must be skilled in something. 

You have been taught well in your home the basics: your mother has taught you how to dance well and your father trained you how to make polite conversation. In your free time you have taught yourself how to hunt on both horseback and foot and you can even play music quite well. 
*page_break But what would you say you are strong at?
*label skills
*choice
    *if ((count>=2) and (read)) #I have a deep knowledge in my history of Vividia and literature and politics. The library is like a home to me and I've fallen asleep many times before with my face in a book.
        *set count -1
        *set read false
        *set Knowledge %+15
        *goto skills
And what are you good at ${xmaster} ${Name}? You must be skilled in something. 

You have been taught well in your home the basics: your mother has taught you how to dance well and your father trained you how to make polite conversation. In your free time you have taught yourself how to hunt on both horseback and foot and you can even play music quite well. 
*page_break But what would you say your strongest at?
*label skills
*choice
    *if ((count>=2) and (read)) #I have a deep knowledge in my history of Vividia and literature and politics. The library is like a home to me and I've fallen asleep many times before with my face in a book.
        *set count -1
        *set read false
        *set Knowledge %+15
        *goto skills
    *if ((count>=3) and (spell)) #I have almost mastered the basic spells and incantations and have started learning the more advanced teaching. My father says I will be a powerful wizard when I grow up.
        *set count -1
        *set spell false
        *set Knowledge %+5
        *set Charm %+25
        *goto skills
    *if ((count>=3) and (court)) #Spending most of time with my father in court I have learned how to read the people around me and how to manipulate those around me with ver little effort.
        *set count -1
        *set court false
        *set Knowledge %+10
        *set Sense %+25
        *goto skills
    *if ((count>=3) and (gambling))  #I have a little bit of a gambling problem. Late at night I sneak to the tavern and play Stix nearly all night. I've become quite lucky lately.
        *set count-1
        *set gambling false
        *set Luck %+25
        *set Sense %+5
        *goto skills
    *if (count<3) #We've covered what you're good at but what are you not good at? Surely with all of your skills you must be bad at something. Please, do tell.
        *goto not_good
        
*label not_good
*choice
    *if (read) #I couldn't be bothered to study my history and I've hardly lifted a book in my life. I can never remember the names of important royals and I'm terrible in math and literature.
        *set Knowledge %-25
        That doesn't really matter, does it?
        *finish    
    *if (spell) #Magic was always scary to me and I never really took it upon myself to learn anymore than the bare requirements. I can use the basic charms but even after that I'm drained.
        *set Charm %-25
        That doesn't really matter, does it?
        *finish
    *if (court) #I always stayed home instead of going with my father to court and never really learned any politics, let alone how to even spell it.
        *set Sense %-15
        *set Knowledge %-5
        That doesn't really matter, does it?
        *finish
    *if (gambling) #Nothing's really really ever gone my way, luck has never been on my side. You could say I'm pretty unlucky.
        *set Luck %-25
        *set Sense %-15
        That doesn't really matter, does it?
        *finish

opps one sec / ok now seems to be fine

*Edit sorry missed the link in the code above have updated the code above

2 Likes

This is unrelated to your original question, @Lordirish did a great job answering that, but I want to point out some things I noticed in your code.

Repeating *set xhim, xhis etc after each name choice is a little redundant. Why don’t you just set the pronouns when you set the gender? Also, you have two variables called “gender” you only need one that you change depending on the gender choice.

It’s simpler to write it like this:

*create gender "Male"
*create Name "Wilmer"
*create Surname "Lennox"
*create xhim "him"
*create xhis "his"
*create xhe "he"
*create xmaster "Master"
[...]

Your story starts [...] You are the eldest child of three but tell, are you the eldest son or daughter?
*choice
    #A boy
        *goto gender [nothing to change here since we set male pronouns by default above]
    #A girl
        *set gender "Female"
        *set xmaster "Lady"
        *set xhim "her"
        *set xhis "hers"
        *set xhe "she"
        *goto gender

*label gender
Ah, of course you are. And what do they call you? You must have a name, don't you?
*choice
    *if (gender = "Male")
        #Wilmer
            *set Name "Wilmer"
            *goto lastname
[...]
    *if (gender = "Female")
        #Juniper
            *set Name "Juniper"
            *goto lastname
[etc]

And that’s it. Makes the code easier to read and troubleshoot when you’re more concise. (Also gives typos less of a chance to crop up, and it’s easier to hunt them down later on.)

2 Likes

It all works now, thank you very much!

1 Like

@Sithwist Thanks for the tip!

2 Likes