Help with Choicescript


#1

I have downloaded the ChoiceScript Source. But I have no idea how to start.

  1. Which files do I have to edit?
  2. Do I write all the code in a single file or different for different scenes.
  3. I know about stats page, but how do I create one and how do i create a separate column for relations in that page.
  4. There are various choices in the game with which your relation with another person varies. Is there any sort of action with which I can check whether the relation is good enough. For eg. if the relation is less than 50, a character named Rhea will kill you but if it is more than 50, she will leave you. How to check this

#2
  1. if you go to web -> mygame -> scenes, in there will be the files you need. You edit the startup file (don’t rename it) and choicescript_stats (also don’t rename) while you’re in that folder you can also add other files that act as chapters (which can be named as you want)

  2. You can write all the code in one file. Though, it might seem cluttered, and if get a milestone in your game, go ahead and put it in the next file.

  3. The choicescript_stats is what you need to put in stats, for example, here is (part of) one I’m working on at the moment (dashes - denote indents)

Stats!

*stat_chart
-text Name
-text Gender
-text Sex Sexual Orientation
-text Hair Hair Color
-text Eyes Eye Color
-text Body Body Type
-text Relationship Relationship Status

*stat_chart
–text PName Pet Name
–text Pets

*stat_chart
-percent Joseph

*stat_chart
-percent Nico

*stat_chart
-percent Quinn

When you set variables such as name you’ll type it in startup as

*create Name “”

and when you set it, your stats page will show it. (also, just so you know, if you put a second word, it will describe it. Like Sex Sexual Orientation. You put in the variable for Sex (Such as “Straight”) and it will show up Sexual Orientation: Straight

  1. Best as I can explain as with an example-
    *choice
    -#Be nice to Rhea
    -You were nice to Rhea.
    –*set Rhea +5
    –*if (Rhea > 50)
    ===*goto RheaKillScene
    –*else
    ===*goto RheaLeaveScene
    -#Be mean to Rhea
    -You were rude to Rhea.
    –*set Rhea -25
    –*if (Rhea > 50)
    ===*goto RheaKillScene
    –*else
    ===*goto RheaLeaveScene

Though, be aware that you would need to set the variable Rhea “0” (or “5” or whatever you want her to start at) at the top of startup.


#3

Have you read the links here

  1. You just need to deal with files in the scenes folder.

  2. You can do either. You just need to tell one scene to *goto_scene to another scene if you’re using multiple files. Or list the order you want the scenes to go in startup

  3. Have a look at how Choice of Deathless does it.
    Stats are created here https://www.choiceofgames.com/deathless/scenes/startup.txt (the scenelist is there too)
    And they’re displayed on the stat page here https://www.choiceofgames.com/deathless/scenes/choicescript_stats.txt

  4. Yes. Using if. So if you’ve created a stat called rhea you do


*if rhea < 50
    Rhea kills you.
    *goto dead
*if Rhea >49
    Rhea leaves you alone
    *goto alive


#4

@Babisko & @FairyGodfeather : Thank you very much. You’ve given me the help I wanted.

I have a few other querries:-

(i) When initializing the variables for stats, do they need to be initialized in choicescript_stats or startup

(ii) When I need to input names, I’ll give the option of a few predefined options and an option to input any other name given by the user. How should I change the value of text name as the name selected by the player.

(iii) How should I use the name selected by the user in later parts of the game.


#5
  1. You
    *create VARIABLE in startup.
    choice_Script stats is just everything you want to show up on the stats screen. You don’t need to put any variables there other than the ones you want the players to read.

  2. Have a look at how choice of Romance does things here https://www.choiceofgames.com/romance/scenes/OpeningScene.txt

  3. ${name} will display whatever information is held by the name variable.

Hmm actually I have a kind of tutorial about this, not finished though and it doesn’t delve into doing all the creates.


#6

@FairyGodFeather Oh thank you very much…that helped a lot. That tutorial is very informative. Thanks.