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
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?
____*set strength +25
____You are a strong person.
____*set strength -25
____You are a weak person.
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:
The big hairy ogre approaches you with his club.
Will you fight or run?
____*if strength >60
______You kill the ogre and laugh manically as his blood dribbles out around you.
______*set heroism +10
______With one swing, the ogre knocks you to the ground. He then kills you. Oh dear.
____You run away. You may be a coward, but you live to fight another day.
____*set heroism -5
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:
Every time you click on stats, it will display the strength and heroism of your hero.
Hope this helps!
also how do I include a make your own name option
In the Stat Chart:
@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.
thank you that really helped me out
@AlexCosarca Here (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.
@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.
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:
*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:
how do i solve and expected choice body error
*Choice #Yes You said yes <- This is a choice body #No You said no <- This is a choice body
how do i create permanent varibles and stats without mygame.js and please help explaining varibles
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.
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.
It’s deprecated, so I strongly advise against using it, there shouldn’t however, be much difference in performance.
Here’s a link that explains what sceneNavigator does, and how to define scenes in it:
The first part of the page is about it ^^
im still not sure
What do you mean? If you want to define scenes in the sceneNavigator, that’s how you do it…