ChoiceScript language preview
1. Startup stats
*create variables and a *stat_chart, as seen in startup.txt
horizon-dark
*create leadership 40
*create honesty 50
*stat_chart
percent leadership Leadership
percent honesty Honesty atom-one-dark
*create leadership 40
*create honesty 50
*stat_chart
percent leadership Leadership
percent honesty Honesty github-dark
*create leadership 40
*create honesty 50
*stat_chart
percent leadership Leadership
percent honesty Honesty dracula
*create leadership 40
*create honesty 50
*stat_chart
percent leadership Leadership
percent honesty Honesty nord
*create leadership 40
*create honesty 50
*stat_chart
percent leadership Leadership
percent honesty Honesty github
*create leadership 40
*create honesty 50
*stat_chart
percent leadership Leadership
percent honesty Honesty 2. A branching choice
*label, *choice, #options, and *goto
horizon-dark
*label crossroads
You reach a fork in the road.
*choice
#Go left.
*goto left_path
#Go right.
*goto right_path atom-one-dark
*label crossroads
You reach a fork in the road.
*choice
#Go left.
*goto left_path
#Go right.
*goto right_path github-dark
*label crossroads
You reach a fork in the road.
*choice
#Go left.
*goto left_path
#Go right.
*goto right_path dracula
*label crossroads
You reach a fork in the road.
*choice
#Go left.
*goto left_path
#Go right.
*goto right_path nord
*label crossroads
You reach a fork in the road.
*choice
#Go left.
*goto left_path
#Go right.
*goto right_path github
*label crossroads
You reach a fork in the road.
*choice
#Go left.
*goto left_path
#Go right.
*goto right_path 3. Conditional narration
*if/*elseif/*else with *set and variable interpolation
horizon-dark
*if (leadership > 50)
*set honesty +10
The crowd cheers your decisive leadership.
*elseif (leadership > 20)
The crowd offers polite applause.
*else
The crowd murmurs uncertainly.
Your honesty is now ${honesty}. atom-one-dark
*if (leadership > 50)
*set honesty +10
The crowd cheers your decisive leadership.
*elseif (leadership > 20)
The crowd offers polite applause.
*else
The crowd murmurs uncertainly.
Your honesty is now ${honesty}. github-dark
*if (leadership > 50)
*set honesty +10
The crowd cheers your decisive leadership.
*elseif (leadership > 20)
The crowd offers polite applause.
*else
The crowd murmurs uncertainly.
Your honesty is now ${honesty}. dracula
*if (leadership > 50)
*set honesty +10
The crowd cheers your decisive leadership.
*elseif (leadership > 20)
The crowd offers polite applause.
*else
The crowd murmurs uncertainly.
Your honesty is now ${honesty}. nord
*if (leadership > 50)
*set honesty +10
The crowd cheers your decisive leadership.
*elseif (leadership > 20)
The crowd offers polite applause.
*else
The crowd murmurs uncertainly.
Your honesty is now ${honesty}. github
*if (leadership > 50)
*set honesty +10
The crowd cheers your decisive leadership.
*elseif (leadership > 20)
The crowd offers polite applause.
*else
The crowd murmurs uncertainly.
Your honesty is now ${honesty}.