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?
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:
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!