- Part 1: Playing “My First ChoiceScript Game”
- Part 2: Choice, Finish, and Ending
- Part 3: Scenes
- Part 4: Using Variables
- Part 5: Text Formatting and Images
- Part 6: Fairmath
- Part 7: Inputs
- Part 8: Labels and Subrountines
- Part 9: Meta Commands
- Part 10: Customizing the Stat Screen
ChoiceScript is a scripting language from Choice of Games LLC for creating choose-you-own-adventure games.
Optional: Installing and Using ChoiceScript IDE
While ChoiceScript can be written in any text editor, it is often more convenient to use use a dedicated development environment when working on a game. To that end, installing ChoiceScript IDE (CSIDE) is a good recommendation.
As introduced in Part 1, ChoiceScript uses commands (keywords proceeded by the star, *, symbol) to change settings like the title and name of the author. Choice is another one of theses.
Central to ChoiceScript is this command, choice. In order to make decisions, users interact with choice blocks. These start with the command *choice and, for each internal option, is indented with a single hash, #, marking how it should appear. On a new line and indented underneath the options are its outcomes; these blocks will be shown if the choice is made.
However, when *choice is used without two other keywords, *finish or *ending, ChoiceScript will get confused. After making a choice, something else should happen.
The command *finish signals the end of a scene. If another scene is after the current one, ChoiceScript will transition to the next one. Otherwise, the game will end.
The command *ending works similar to *finish. However, instead of ending the scene, it ends the game. Using the command *ending means that play should end immediately. (Using either *finish or *ending in a single scene game have the same outcome.)
A scene need not contain only one choice. The result of making a decision in a scene can lead to more choices. Until ChoiceScript encounters a *finish or *ending, the scene continues.