Learning ChoiceScript: Part 5: Text Formatting and Images

Learning ChoiceScript

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


Text Formatting

Through tag-like commands, ChoiceScript supports formatting text in different ways.

Bold

Screenshot 2018-08-23 12.06.44

To bold text, put the opening bold tag, [b], before the text and end it with the closing tag, [/b].

Screenshot 2018-08-23 12.08.36

Italics

Screenshot 2018-08-23 12.11.43

Like using bold tags, italics works the same way but with the [i], opening, and [/i], closing tags.

Screenshot 2018-08-23 12.12.41

Line Breaks

Screenshot 2018-08-23 12.19.03

Because ChoiceScript will read text as run-together, the command *line_break can be used to break text into multiple lines.

Screenshot 2018-08-23 12.20.55

Images

ChoiceScript supports more than just text. Images can be used through the *image command.

Screenshot 2018-08-23 12.34.07

When included images will fill the available space and will have default alignment of “none”.

Screenshot 2018-08-23 12.35.51

Other alignments can be set using the keywords “left”, “right”, or, the default, “none”.

Note: Images must be in the same folder as the other files during development. When using the ChoiceScript IDE, go to Project –> Open folder in Finder (on Mac) to easily find and open the folder.

Screenshot 2018-08-23 12.42.44

 

GitHub Gist Version:


*title Example
*author Dan Cox
*scene_list
startup
house
*create choices 0
(You've currently made ${choices} choices.)
[b]Where will we visit?[/b]
*choice
#The woods
*image woods.jpg
We went into the woods!
It was a dark and scary place, but with our lantern, we were able to make our way deeper.
Deep in the woods, we came across a river. [b]Did we try to cross it?[/b]
*set choices +1
*choice
#Cross river
We did not make it across the river and were swept downstream to our doom!
*goto_scene badendings
#Did not cross river.
We didn't bother with the river and made our way along the path deeper and deeper into the woods.
*set choices +1
*finish
#The mountains
We went into the mountains
*set choices +1
*finish
#The lake
We went to the lake
*set choices +1
*finish

view raw

startup.txt

hosted with ❤ by GitHub