# Custom stat system in ChoiceScript game - Emmanuel Katto

**URL:** <https://forum.choiceofgames.com/t/custom-stat-system-in-choicescript-game-emmanuel-katto/159901>\
**Category:** ChoiceScript Help\
**Created:** [October 4, 2024, 6:40am UTC](https://forum.choiceofgames.com/t/custom-stat-system-in-choicescript-game-emmanuel-katto/159901 "2024-10-04T06:40:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![emmanuelkatto](https://avatars.discourse-cdn.com/v4/letter/e/ba8739/32.png) [@emmanuelkatto](https://forum.choiceofgames.com/u/emmanuelkatto)\
**Post date:** [October 4, 2024, 6:40am UTC](https://forum.choiceofgames.com/t/custom-stat-system-in-choicescript-game-emmanuel-katto/159901/1 "2024-10-04T06:40:17Z")

</div>

Hello everyone, My name is Emmanuel Katto. I’m trying to implement a custom stat system in my ChoiceScript game, but I’m having trouble with the syntax. Can someone provide a simple example of how to create and modify stats throughout the story?

Looking forward to your assistance!

Thanks,  
Emmanuel Katto

---

<div class="post-metadata">

**Author:** ![Loudbeat](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/loudbeat/32/115975_2.png) [@Loudbeat](https://forum.choiceofgames.com/u/Loudbeat)\
**Post date:** [October 4, 2024, 11:14am UTC](https://forum.choiceofgames.com/t/custom-stat-system-in-choicescript-game-emmanuel-katto/159901/2 "2024-10-04T11:14:32Z")

</div>

I don’t know what you mean by a custom stat system, but for creating and modifying stats try looking for beginner guides.

> [@Master List: Links for Beginners](https://forum.choiceofgames.com/t/master-list-links-for-beginners/21872):
>
> Since this gets asked a lot I thought I’d try and create a master list of links for beginners. If anyone wants to add links to the list please feel free to since I’m making this wiki format. [Start here for newcomers](https://www.choiceofgames.com/make-your-own-games/choicescript-intro/)[The Wiki](http://choicescriptdev.wikia.com)[ChoiceScript Basic Tutorial](http://choicescriptdev.wikia.com/wiki/A_Basic_Tutorial) on wiki [RETowers’ Tutorial](https://forum.choiceofgames.com/t/the-beginners-guide-to-choicescript/9866) by @RETowers[Lglasser’s Tutorial](https://forum.choiceofgames.com/t/choicescript-full-tutorial-finished/16130) by @Lglasser Dedicated ChoiceScript Development Tools You do not need to download or update ChoiceScript when using either of these tools. [Chronicler](https://forum.choiceofgames.com/t/tool-chronicler-choicescript-visual-code-editor/6811) Visual Code Editor by @Ben…

> [@The Beginners Guide to ChoiceScript](https://forum.choiceofgames.com/t/the-beginners-guide-to-choicescript/9866):
>
> So, any long time member may know that I made a ChoiceScript Guide. Well after so long and so many iterations, I’m closing in on completing it. My intentions with this guide is to create something that, no matter your level of skill or computer knowledge, it can teach you the basics of ChoiceScript. For me to consider it truly ‘done’ though, I want to make sure it includes every thing that any aspiring ChoiceScript writer may want. So if you don’t know what to do with ChoiceScript, try checking …

---

<div class="post-metadata">

**Author:** ![levviathan](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/levviathan/32/226545_2.png) [@levviathan](https://forum.choiceofgames.com/u/levviathan)\
**Post date:** [October 4, 2024, 1:59pm UTC](https://forum.choiceofgames.com/t/custom-stat-system-in-choicescript-game-emmanuel-katto/159901/3 "2024-10-04T13:59:41Z")

</div>

In addition to loudbeat’s suggestion, here are some specific pages within the beginner guides that will help you:

[variable types](https://choicescriptdev.fandom.com/wiki/Variable_types)  
[data types](https://choicescriptdev.fandom.com/wiki/Data_types)  
[displaying variables](https://choicescriptdev.fandom.com/wiki/Displaying_variables)  
[stats screen](https://choicescriptdev.fandom.com/wiki/Choicescript_stats.txt?so=search)

It would be useful to know what exactly you mean by custom stats, but your stats are pretty much always going to be variables that you \*create in the startup file and \*set during the game.

\*create name " " (string)  
\*create clues 0 (numeric)  
\*create honest 50 (numeric, typically for opposed pairs)  
\*create strength 0 (numeric)  
\*create has\_map false (bool)

Then, during the game, maybe the character tells a lie, finds a clue, and invests a point in strength.  
\*set name “Ben”  
\*set clues + 1  
\*set honest - 10 (or %- 10, if you decide to go with fairmath)  
\*set strength + 1  
\*set has\_map true

Then, on your stats screen, you display your variables:

```choicescript
Name: ${name}
Clues: ${clues}

*stat_chart 
    text Integrity
    opposed_pair honest
    Honest
    Liar

or

*stat_chart 
    text Integrity
    percent honest

*if (has_map)
    You have a map!

```
