Learning ChoiceScript: Part 10: Customizing the Stat Screen

Learning ChoiceScript

ChoiceScript is a scripting language from Choice of Games LLC for creating choose-you-own-adventure games.


Customizing the Stat Screen

When playing a ChoiceScript game, there is a button label “Show Stats” that shows values associated with the game. This “stat screen” has an exclusive command not available in other files: *stat_chart.

Screenshot 2018-08-27 10.56.53

Like other scenes, the Stat screen allows for using text formatting and other styling. However, the use of the *stat_screen is limited to three types of value displays: percent, text, and opposed_pairs.

Screenshot 2018-08-27 10.58.28


When used with the *stat_chart command, percent shows the value as a percentage with a default horizontal bar.


When used with the *stat_chart command, text shows the value as a string, either showing the number, characters, or other combinations of the two.

Opposed Pairs

Screenshot 2018-08-27 11.02.43

The command *opposed_pairs computes a total percentage based on the values of two values and creates a horizontal bar with both values shown within it.

Screenshot 2018-08-27 11.03.54


While values can be used with the different types of percenttext, and opposed_pairs, labels can also be given to the variables.

Screenshot 2018-08-27 11.07.14

The label for the values follows after the value and type to show.

Screenshot 2018-08-27 11.08.03

Value Opposed to Itself

Screenshot 2018-08-27 11.10.21

When written with a single value, the opposed_pair type can also show percentages with values for its percentage up to a value of 100.

Multiple uses of *stat_chart

Screenshot 2018-08-27 11.14.49

The command *stat_chart can be used multiple times on the Stat screen, allowing for labels for sections or additional descriptions between statistic sections.

Screenshot 2018-08-27 11.15.52