# Since you use \*create in the startup scene, isn't the choicescript\_stats file now void?

**URL:** <https://forum.choiceofgames.com/t/since-you-use-create-in-the-startup-scene-isnt-the-choicescript-stats-file-now-void/1675>\
**Category:** ChoiceScript Help\
**Created:** [September 12, 2013, 12:56pm UTC](https://forum.choiceofgames.com/t/since-you-use-create-in-the-startup-scene-isnt-the-choicescript-stats-file-now-void/1675 "2013-09-12T12:56:13Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![DJ\_CUTY](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/dj_cuty/32/940_2.png) [@DJ\_CUTY](https://forum.choiceofgames.com/u/DJ_CUTY)\
**Post date:** [September 12, 2013, 12:56pm UTC](https://forum.choiceofgames.com/t/since-you-use-create-in-the-startup-scene-isnt-the-choicescript-stats-file-now-void/1675/1 "2013-09-12T12:56:13Z")

</div>

Can anyone help me with this?

---

<div class="post-metadata">

**Author:** ![Havenstone](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/havenstone/32/198451_2.png) [@Havenstone](https://forum.choiceofgames.com/u/Havenstone)\
**Post date:** [September 12, 2013, 12:58pm UTC](https://forum.choiceofgames.com/t/since-you-use-create-in-the-startup-scene-isnt-the-choicescript-stats-file-now-void/1675/2 "2013-09-12T12:58:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![DJ\_CUTY](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/dj_cuty/32/940_2.png) [@DJ\_CUTY](https://forum.choiceofgames.com/u/DJ_CUTY)\
**Post date:** [September 12, 2013, 1:11pm UTC](https://forum.choiceofgames.com/t/since-you-use-create-in-the-startup-scene-isnt-the-choicescript-stats-file-now-void/1675/3 "2013-09-12T13:11:17Z")

</div>

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 

```

---

<div class="post-metadata">

**Author:** ![Havenstone](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/havenstone/32/198451_2.png) [@Havenstone](https://forum.choiceofgames.com/u/Havenstone)\
**Post date:** [September 12, 2013, 1:21pm UTC](https://forum.choiceofgames.com/t/since-you-use-create-in-the-startup-scene-isnt-the-choicescript-stats-file-now-void/1675/4 "2013-09-12T13:21:40Z")

</div>

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 "??"

```

etc,

and in your choicescript\_stats.txt file, have

```

*stat_chart
  text name
  text gender
  text b_trans Beckham's Transformations

```

etc.

You can have a look at mine, for reference:

[https://dl.dropboxusercontent.com/u/88501596/CoRTest/web/mygame/scenes/startup.txt](https://dl.dropboxusercontent.com/u/88501596/CoRTest/web/mygame/scenes/startup.txt)

[https://dl.dropboxusercontent.com/u/88501596/CoRTest/web/mygame/scenes/choicescript\_stats.txt](https://dl.dropboxusercontent.com/u/88501596/CoRTest/web/mygame/scenes/choicescript_stats.txt)

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.

```

*stat_chart
  percent intelligence

```

---

<div class="post-metadata">

**Author:** ![DJ\_CUTY](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/dj_cuty/32/940_2.png) [@DJ\_CUTY](https://forum.choiceofgames.com/u/DJ_CUTY)\
**Post date:** [September 12, 2013, 1:30pm UTC](https://forum.choiceofgames.com/t/since-you-use-create-in-the-startup-scene-isnt-the-choicescript-stats-file-now-void/1675/5 "2013-09-12T13:30:36Z")

</div>

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

b\_trans

code do?

---

<div class="post-metadata">

**Author:** ![Havenstone](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/havenstone/32/198451_2.png) [@Havenstone](https://forum.choiceofgames.com/u/Havenstone)\
**Post date:** [September 12, 2013, 1:41pm UTC](https://forum.choiceofgames.com/t/since-you-use-create-in-the-startup-scene-isnt-the-choicescript-stats-file-now-void/1675/6 "2013-09-12T13:41:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![DJ\_CUTY](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/dj_cuty/32/940_2.png) [@DJ\_CUTY](https://forum.choiceofgames.com/u/DJ_CUTY)\
**Post date:** [September 12, 2013, 1:41pm UTC](https://forum.choiceofgames.com/t/since-you-use-create-in-the-startup-scene-isnt-the-choicescript-stats-file-now-void/1675/7 "2013-09-12T13:41:47Z")

</div>

@Havenstone  
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.

---

<div class="post-metadata">

**Author:** ![Havenstone](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/havenstone/32/198451_2.png) [@Havenstone](https://forum.choiceofgames.com/u/Havenstone)\
**Post date:** [September 12, 2013, 1:44pm UTC](https://forum.choiceofgames.com/t/since-you-use-create-in-the-startup-scene-isnt-the-choicescript-stats-file-now-void/1675/8 "2013-09-12T13:44:28Z")

</div>

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

```

*stat_chart
  text b_health Beckham's Health

```

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

---

<div class="post-metadata">

**Author:** ![DJ\_CUTY](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/dj_cuty/32/940_2.png) [@DJ\_CUTY](https://forum.choiceofgames.com/u/DJ_CUTY)\
**Post date:** [September 12, 2013, 1:45pm UTC](https://forum.choiceofgames.com/t/since-you-use-create-in-the-startup-scene-isnt-the-choicescript-stats-file-now-void/1675/9 "2013-09-12T13:45:55Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Havenstone](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/havenstone/32/198451_2.png) [@Havenstone](https://forum.choiceofgames.com/u/Havenstone)\
**Post date:** [September 12, 2013, 4:51pm UTC](https://forum.choiceofgames.com/t/since-you-use-create-in-the-startup-scene-isnt-the-choicescript-stats-file-now-void/1675/10 "2013-09-12T16:51:04Z")

</div>

Bingo.
