# Choicescript help pllz

**URL:** <https://forum.choiceofgames.com/t/choicescript-help-pllz/644>\
**Category:** ChoiceScript Help\
**Created:** [July 22, 2012, 9:20pm UTC](https://forum.choiceofgames.com/t/choicescript-help-pllz/644 "2012-07-22T21:20:48Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![zane](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/zane/32/550_2.png) [@zane](https://forum.choiceofgames.com/u/zane)\
**Post date:** [July 22, 2012, 9:20pm UTC](https://forum.choiceofgames.com/t/choicescript-help-pllz/644/1 "2012-07-22T21:20:48Z")

</div>

I am co-creating a new Cog but know the basics I’m talking choice and reaction I really need help my first question is how to make stats in advance I would like to say thanks for the help

---

<div class="post-metadata">

**Author:** ![andymwhy](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/andymwhy/32/34396_2.png) [@andymwhy](https://forum.choiceofgames.com/u/andymwhy)\
**Post date:** [July 22, 2012, 11:36pm UTC](https://forum.choiceofgames.com/t/choicescript-help-pllz/644/2 "2012-07-22T23:36:26Z")

</div>

First, to be taken seriously as a writer, it’s better to write out full words rather than using cellphone abbreviations.

To make variables, you should open your mygame.js file in a text editor and add all the variables you need to the list. For example, if you want a stat for strength, add a variable called strength. Give it a value, similar to those already listed (the variables used in the example program). Let’s put 50 for now.

Next, you need to have that variable count in your game. To do this, you will need a question or choice that determines your strength. For example:

Are you strong or weak?  
\*choice  
\_\_#Strong  
\_\_\_\_\*set strength +25  
\_\_\_\_You are a strong person.  
\_\_\_\_\*goto fight  
\_\_#Weak  
\_\_\_\_\*set strength -25  
\_\_\_\_You are a weak person.  
\_\_\_\_\*goto fight

Now you have split the strength variable. Some people will be strong. Some will be weak. This is a very basic example. Yours can be more complex and you could end up with many different levels of strength, anywhere from 1-100 (or more or less, but I’d recommend limiting to these boundaries for the stats page, later).

Okay, let’s see the strength check in action:

\*label fight  
The big hairy ogre approaches you with his club.  
Will you fight or run?  
\*choice  
\_\_#Fight  
\_\_\_\_\*if strength \>60  
\_\_\_\_\_\_You kill the ogre and laugh manically as his blood dribbles out around you.  
\_\_\_\_\_\_\*set heroism +10  
\_\_\_\_\_\_\*goto next\_scene  
\_\_\_\_\*else  
\_\_\_\_\_\_With one swing, the ogre knocks you to the ground. He then kills you. Oh dear.  
\_\_\_\_\_\_\*goto\_scene game\_over  
\_\_#Run  
\_\_\_\_You run away. You may be a coward, but you live to fight another day.  
\_\_\_\_\*set heroism -5  
\_\_\_\_\*goto next\_scene

Here, the hero has two choices. He can fight or run. If he runs, regardless of his strength, he will lose heroism, another stat we can create in the same way as strength.

If he fights, then the outcome is determined by his strength. If he is strong, he will win and gain herosim. If he is weak, he will die and that’s that.

Note: Here, there is always a way for the hero to survive.

Finally, showing your stat value would be done through the choicescript\_stats.txt file.  
Open in up and add a statchart like this:

\*stat\_chart  
\_\_percent Strength  
\_\_percent Heroism

Every time you click on stats, it will display the strength and heroism of your hero.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![zane](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/zane/32/550_2.png) [@zane](https://forum.choiceofgames.com/u/zane)\
**Post date:** [July 22, 2012, 11:47pm UTC](https://forum.choiceofgames.com/t/choicescript-help-pllz/644/3 "2012-07-22T23:47:43Z")

</div>

@andymwhy thanks for the writing advance and the stats

---

<div class="post-metadata">

**Author:** ![zane](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/zane/32/550_2.png) [@zane](https://forum.choiceofgames.com/u/zane)\
**Post date:** [August 5, 2012, 12:18pm UTC](https://forum.choiceofgames.com/t/choicescript-help-pllz/644/4 "2012-08-05T12:18:58Z")

</div>

also how do I include a make your own name option

---

<div class="post-metadata">

**Author:** ![Daisuke](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/daisuke/32/673_2.png) [@Daisuke](https://forum.choiceofgames.com/u/Daisuke)\
**Post date:** [August 5, 2012, 12:23pm UTC](https://forum.choiceofgames.com/t/choicescript-help-pllz/644/5 "2012-08-05T12:23:29Z")

</div>

\*input\_text name

* * *

In the Stat Chart:

text Name

---

<div class="post-metadata">

**Author:** ![AlexCosarca](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/alexcosarca/32/68977_2.png) [@AlexCosarca](https://forum.choiceofgames.com/u/AlexCosarca)\
**Post date:** [August 5, 2012, 2:19pm UTC](https://forum.choiceofgames.com/t/choicescript-help-pllz/644/6 "2012-08-05T14:19:49Z")

</div>

@Daisuke, in the Stat Chart it’s more like  
text name Name (variable type - variable name - variable name that displays)

Or am I again missing the fact that ChoiceScript changed and you just write the variable’s name…?

Also, don’t use uppercase variables, ALWAYS make them lowercase (instead of Strength, use strength), just so you don’t get any errors.

---

<div class="post-metadata">

**Author:** ![zane](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/zane/32/550_2.png) [@zane](https://forum.choiceofgames.com/u/zane)\
**Post date:** [August 5, 2012, 5:07pm UTC](https://forum.choiceofgames.com/t/choicescript-help-pllz/644/7 "2012-08-05T17:07:30Z")

</div>

thank you that really helped me out

---

<div class="post-metadata">

**Author:** ![RETowers](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/retowers/32/21477_2.png) [@RETowers](https://forum.choiceofgames.com/u/RETowers)\
**Post date:** [August 5, 2012, 5:52pm UTC](https://forum.choiceofgames.com/t/choicescript-help-pllz/644/8 "2012-08-05T17:52:43Z")

</div>

@AlexCosarca Here ([http://www.choiceofgames.com/make-your-own-games/customizing-the-choicescript-stats-screen/](http://www.choiceofgames.com/make-your-own-games/customizing-the-choicescript-stats-screen/)). Look for “Label the Stats Poetically” (IIRC this page of documentation isn’t actually included in the master zip from Github.) The first example is how to capitalize stats.

---

<div class="post-metadata">

**Author:** ![AlexCosarca](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/alexcosarca/32/68977_2.png) [@AlexCosarca](https://forum.choiceofgames.com/u/AlexCosarca)\
**Post date:** [August 5, 2012, 5:55pm UTC](https://forum.choiceofgames.com/t/choicescript-help-pllz/644/9 "2012-08-05T17:55:58Z")

</div>

@Reaperoa, I can’t believe I’ve read through all that and missed it when I learned ChoiceScript…oh, well, thanks for pointing that out anyways.

---

<div class="post-metadata">

**Author:** ![Daisuke](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/daisuke/32/673_2.png) [@Daisuke](https://forum.choiceofgames.com/u/Daisuke)\
**Post date:** [August 5, 2012, 8:46pm UTC](https://forum.choiceofgames.com/t/choicescript-help-pllz/644/10 "2012-08-05T20:46:57Z")

</div>

I was rushing, and missed a few things.  
For one, doing text then the name of the varible uppercased makes the stat have an uppercase letter, if you make it lowercased, it shows as a lowercased letter.  
I’m going to show you how to do it in the scene files, not the mygame.js, this will be an althrough explanation of \*input text name.  
First, in the scene files:  
\*create name  
\*set name “Unknown (or something else like this)”

and then where you want the person to define their name:  
\*input text name  
No \*page\_break is needed.

and finally, in the stats chart:  
text Name

---

<div class="post-metadata">

**Author:** ![zane](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/zane/32/550_2.png) [@zane](https://forum.choiceofgames.com/u/zane)\
**Post date:** [September 18, 2012, 5:42pm UTC](https://forum.choiceofgames.com/t/choicescript-help-pllz/644/11 "2012-09-18T17:42:28Z")

</div>

how do i solve and expected choice body error

---

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [September 18, 2012, 6:18pm UTC](https://forum.choiceofgames.com/t/choicescript-help-pllz/644/12 "2012-09-18T18:18:52Z")

</div>

```

*Choice
     #Yes
       You said yes <- This is a choice body

     #No
       You said no <- This is a choice body

```

---

<div class="post-metadata">

**Author:** ![zane](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/zane/32/550_2.png) [@zane](https://forum.choiceofgames.com/u/zane)\
**Post date:** [September 19, 2012, 9:08pm UTC](https://forum.choiceofgames.com/t/choicescript-help-pllz/644/13 "2012-09-19T21:08:17Z")

</div>

how do i create permanent varibles and stats without mygame.js and please help explaining varibles

---

<div class="post-metadata">

**Author:** ![Farside](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/farside/32/781_2.png) [@Farside](https://forum.choiceofgames.com/u/Farside)\
**Post date:** [September 19, 2012, 9:18pm UTC](https://forum.choiceofgames.com/t/choicescript-help-pllz/644/14 "2012-09-19T21:18:30Z")

</div>

You can’t create permanent variables without mygame.js. You MAY try to the \*create command, but I don’t encourage it. It’s much easier to have your permanent variables all in one place.

Try studying a little basic programming to get the idea of what a variable is. It’s a lot to explain.

---

<div class="post-metadata">

**Author:** ![eposic](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/eposic/32/198508_2.png) [@eposic](https://forum.choiceofgames.com/u/eposic)\
**Post date:** [September 20, 2012, 2:37am UTC](https://forum.choiceofgames.com/t/choicescript-help-pllz/644/15 "2012-09-20T02:37:15Z")

</div>

You could put all of your \*create commands at the beginning of your first scene file instead of using mygame.js, and that would serve to keep them all in one place. I don’t know if there are any performance issues with doing it that way.

---

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [September 20, 2012, 4:20am UTC](https://forum.choiceofgames.com/t/choicescript-help-pllz/644/16 "2012-09-20T04:20:26Z")

</div>

It’s deprecated, so I strongly advise against using it, there shouldn’t however, be much difference in performance.

---

<div class="post-metadata">

**Author:** ![zane](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/zane/32/550_2.png) [@zane](https://forum.choiceofgames.com/u/zane)\
**Post date:** [September 22, 2012, 11:58am UTC](https://forum.choiceofgames.com/t/choicescript-help-pllz/644/17 "2012-09-22T11:58:58Z")

</div>

thank you @CJW @Farside and @eposic for your help but does anyone know how to define scene navigator in the mygame.js file

---

<div class="post-metadata">

**Author:** ![AlexCosarca](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/alexcosarca/32/68977_2.png) [@AlexCosarca](https://forum.choiceofgames.com/u/AlexCosarca)\
**Post date:** [September 22, 2012, 12:02pm UTC](https://forum.choiceofgames.com/t/choicescript-help-pllz/644/18 "2012-09-22T12:02:13Z")

</div>

Here’s a link that explains what sceneNavigator does, and how to define scenes in it:

> **[Mygame.js](https://choicescriptdev.fandom.com/wiki/Mygame.js)**
>
> This article is aimed at beginners to ChoiceScript. However, if you have not already done so then the best place to start would be with the very first article in this Introduction To ChoiceScript Game Development series of linked articles: A Basic...

  
The first part of the page is about it ^^

---

<div class="post-metadata">

**Author:** ![zane](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/zane/32/550_2.png) [@zane](https://forum.choiceofgames.com/u/zane)\
**Post date:** [September 22, 2012, 12:42pm UTC](https://forum.choiceofgames.com/t/choicescript-help-pllz/644/19 "2012-09-22T12:42:51Z")

</div>

im still not sure

---

<div class="post-metadata">

**Author:** ![AlexCosarca](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/alexcosarca/32/68977_2.png) [@AlexCosarca](https://forum.choiceofgames.com/u/AlexCosarca)\
**Post date:** [September 22, 2012, 12:58pm UTC](https://forum.choiceofgames.com/t/choicescript-help-pllz/644/20 "2012-09-22T12:58:49Z")

</div>

What do you mean? If you want to define scenes in the sceneNavigator, that’s how you do it…

[Next page](https://forum.choiceofgames.com/t/choicescript-help-pllz/644.md?page=2)
