Since you use *create in the startup scene, isn't the choicescript_stats file now void?


Can anyone help me with this?


No, it’s not void. The choicescript_stats file was never supposed to be where you created stats (that was mygame.js, which is now essentially void – at any rate, not a file that authors ever need to worry about editing).

Rather, the choicescript_stats file is where the game takes you when you click on the “Stats” button. It determines how the stats are displayed – not what they are. So still 100% relevant, as long as your game uses a Stats Screen.


Ohhh…well what exactly should be in the choicescript_stats file? I have this in there

// Specify the default starting stats here

Stats = {
    Name: ??
    ,Gender: ??

    ,Beckham's Transformations: ??
    ,Health: 15
    ,Beckham's Health: 10
    ,Beckham's Manna: 8

    ,Relationship With Beckham: 50%
    ,Intelligence: 50%
    ,Courage: 50%
    ,Morality: 50%
    ,Stealth: 50%

    ,Inventory: Demon Book of Names, master key, 8/8 iron shavings, 2/2 salt, chemical instilled staff, flint and metal, blue candles, food, water

// or just use defaults 
// debugStats = stats 


What you’ve got there (stat creation copied from the old mygame.js) should make for an error message when you click on your game’s Stats button.

Instead, you want to (1) make sure you’re working from the latest version of ChoiceScript (go to GitHub and download a fresh copy if you’re not sure), then (2) translate all that stuff into your startup.txt file like so:

*create name "??"
*create gender "??"
*create b_trans "??"


and in your choicescript_stats.txt file, have

  text name
  text gender
  text b_trans Beckham's Transformations


You can have a look at mine, for reference:

Having an inventory, as you’d like, is a lot more complicated – there’s a thread on it somewhere, probably written by @CJW like all such clever coding.

Edits: note that if you want Beckham’s Transformations to be a number, like his Health and Manna, you should create it as a number from the beginning: *create b_trans 0, not *create b_trans “??”

And when you create percentage stats, you create them as numbers, too: so *create intelligence 50, not *create intelligence 50%. You only display them as percentages, e.g.

  percent intelligence


I took a look at yours, and to me it looks like you have a *stat_chart seperating each type of stats? Do you have to do that instead of just leaving an empty spaced between them? and just out of curiosity, what does the


code do?


It’s been a while since I played with my Stats Screen, but when I first did, I recall that separating blocks of stats in the display worked by adding a new *stat_chart command and not by just adding an empty space. Don’t know if that’s still the case.

I suggested you use b_trans as a variable instead of “Beckham’s Transformations” on two grounds:
(1) you can’t have a space in a variable
(2) you’ll get really sick of typing out “beckhams_transformations” every time you want to code it.

You can still have “Beckham’s Transformations” as the way the variable is displayed in your stats screen – see my example above on how to do that. The player won’t see “b_trans” anywhere. But it’ll be a lot easier for you to type.


Beckham’s transformations are actually going to a description so they’re textual. And what if the stat is a number but not a percentage? and I’ll try to find the thread on making an inventory.


If the stat’s a number you display it with “text” e.g.

  text b_health Beckham's Health

See e.g. Charisma and Wealth in my game.


Oh ok! and the b_health is just a shortened version? Like in your code where you used int instead of intelligence and cha instead of charisma?