I need some help to get started


#1

Hey everyone, I’m not new to writing multiple choice games/stories, but I am new to using anything other than HTML or CSS.

I’ve figured out how to open and edit the file provided on the Introduction page. I have my story and the structure of the game already because I want to convert one of my old multiple choice stories to ChoiceScript. But I need help with how to make the player’s choices stick and carry through the game.

For example, I want the player to be able to chose a first name for the PC, gender and a class, as well as being able to decide if she/he has an already established relationship with one of the other characters. How do I write this in ChoiceScript?

Any help, or finger pointing me in the right direction is most welcome.


#2

Most people start with this:

It should give you everything you need to know about the basics at least.

Also, regarding your first question, you will need to establish the character’s name as a variable, then reference that variable throughout the text.

So when you try to make a choice for the character to choose their name, there is an option to open a text box and type your preferred name in. For example:

*choice
#My Name is Jack
*set name “Jack”
#My Name is John
*set name “John”
#I’ll choose my own.
*input_text name


#3

Thank you so much. I appreciate it. :smile:


#4

You know what, the wiki can tell it better, this is the specific article on naming characters:


#5

This is perfect. Thank you so much for your kind help, Moreau.


#6

Although the wiki is fine, I learned to code by using the explanation on the choice of games site. (it might be what you meant by introduction page, but there are multiple pages, include one that explain how to edit names etc.) You might not need it, but it can’t hurt to look.

On the page customizing-the-choicescript-stats-screen you can find some coding from a few games, which really helped me to find out how to keep stat hidden etc.


#7

I’m sure you’ll see it in the links provided, but a quick note:

Any permanent variables/switches need to be created in the startup.txt file before any text the player sees.

So . . .

*create name “”

*create money 0

*create engineer false

*temp switches/variables, for just the current scene, are okay to be created in the relevant scene.

Edit: Oh . . . on the relationship thing.

Are you in a relationship?

*choice

  #Yes.

    *set in_relationship true
    *goto relationship

  #No.

    *set in_relationship false
    *goto relationship

*label relationship

*if in_relationship = true
  I'm in a relationship.
*if in_relationship = false
  I'm not in a relationship
*ending

I only separated the *if statements from the choices, putting them into their own label, just to illustrate more simply how you can adjust the text on the fly based on previous choices.

Should be enough to get you going. Hope it helps.


#8

You guys are angels. Now I feel a lot more confident about being able to pull this project off. Thank you so much! :smile: Okay, time to start coding…


#9

You’re welcome. Feel free to ask anything else.