FANDOM


Text can be formatted and stylized very easily in ChoiceScript, which supports bold and italic text, as well as hyperlinks.

Stylizing text Edit

Italic text Edit

You can use italic text for any narrative text, *choice #Options text, and for such as section headers on your Stats screen. You can also use italic text for the specific text added to *page_break or *finish button commands.

Adding italic text in ChoiceScript is easy. All you have to do is add [i] before the text you wish to turn into italics, and a [/i] at the end of that section of text, so if you do this in a ChoiceScript file:

This is normal text, and [i]this is Italic text.[/i]

this will be the output:

This is normal text, and this is Italic text.


Example of italic text use within a *choice option:

*choice

  #Run away, as fast as my little legs can carry me.

    *goto flee_orc

  #CHAAAAAAARGE! [i]Attack the Orc Chieftain with all my might![/i]

    *goto attack_orc


Bold text Edit

Just as italic text, bold text can be used for any narrative text, *choice #Option text and the specific text used on such as *page_break or *finish buttons (though the text on the buttons already being bold, the difference is minimal). It is commonly used to create section headers on the Stats screen.

Adding bold text in ChoiceScript is easy. All you have to do is add [b] before the text you wish to bold, and a [/b] at the end of that section of text, so if you do this in a ChoiceScript file:

This is normal text, and [b]this is bold text.[/b]

this will be the output:

This is normal text, and this is bold text.


Example of bold text use within a *choice option:

*choice

  #Run away, as fast as my little legs can carry me.

    *goto flee_orc

  #[b]CHAAAAAAARGE![/b] Attack the Orc Chieftain with all my might!

    *goto attack_orc


Underline and strikethrough Edit

There is currently no way to underline or strikethrough text in ChoiceScript.


Hyperlinks Edit

Hyperlinks can be inserted anywhere through the use of the *link command, as follows:

*link http://www.choiceofgames.com/

this will show:

http://www.choiceofgames.com/

The *link command can also be used the following way to hyperlink text:

*link http://www.choiceofgames.com/ Choice of Games

which will make the link look like this:

Choice of Games

Note that the *link command will not work in combination with the *page_break and *finish commands.


Font, text and link color Edit

By default, the font used by the game will be Georgia, "Times New Roman". This can be changed by editing the style.css file, as can the overall color of the text.

Text placement Edit

Aligning text Edit

There is currently no way to control text placement in ChoiceScript, such as centering or aligning text to the right or left. Bear in mind that HTML tags such as <center> or <p style="text-align:right"> do not work in ChoiceScript.

Some have worked around this for chapter titles by using images (inserted with the *image command), that can be aligned to the center, left or right.


Carriage return Edit

The *line_break command can be used to force a carriage return, getting text to start on a new line instead of the same line. This is especially useful on the Stats screen, and with conditional text.

For example, if you just type the following in choicescript_stats.txt or any scene file:

Name: ${char_name}
Gender: ${char_gender}
Age: ${char_age}

It will actually display in-game all on one line as, e.g.

Name: Joe Bloggs Gender: Male Age: 21

Which is hardly the desired effect! However, using *line_break . . .

Name: ${char_name}
*line_break
Gender: ${char_gender}
*line_break
Age: ${char_age}
*line_break

you can force it to display as intended, so it actually looks like this:

Name: Joe Bloggs
Gender: Male
Age: 21 


"Next" and "Next Chapter" buttons Edit

The *page_break command is used to break up longer sections of narrative into two or more pages (thereby reducing the off-putting "wall of text" effect), or sometimes simply to heighten story suspense.

The *finish command moves the narrative to the next sequential scene.

By default, both of these commands display a button with the simple word "Next" (in the case of *page_break) or "Next Chapter" (in the case of *finish).

However, you can change the button wording to anything you like, simply by adding the required text to the command itself, as follows:

You sit for just a brief rest, knowing that you must push on before nightfall.

*page_break Three hours later . . .

A mournful howl startles you awake. Night has cloaked the forest in shadow.

*finish A Month later . . .

Chapter 2

Note that the button text can also be italic or bold text on these buttons.

The Next buttons can further be customized by editing the style.css file.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.