Printable strings are the primary mechanism for displaying text in the user interface of the game when an NPC is being looked at or talked to. The basic format for a printable string is:
[text to display]The text to display is wrapped between an open and close square bracket symbols - [ and ]. The compiler doesn't do any trimming of the text contents between the ends so, for example, any trailing spaces before the ] character will be included in the output unchanged.
There are several characters that can't be included in a printable string without a backslash \ character to indiacte that the following is a special character. These are [, ], and Newline. So [ and ] are represented as \[ and \], whilst Newline (a special character to cause a new line to be started in the output), is represented by \n. There are also several characters that are treated specially by the engine. The following table lists these:
Characters | Meaning |
@ | Specifies that the following word should be displayed in bold. This is used in a conversation to highlight words that the player can ask the NPC about. The user will still need to follow the convention by also providing a Keywords handler for the specific word. |
<..> | Specifies that any text between the < and > should be displayed as Brittanian text rather than normal. This only modifies any alphabetic characters - all other characters remain as is |
# and $ | Specifies that following is a field whose contents should be printed, # for integer fields, and $ for string fields. What follows can either be the number of the field, or a variable name, which the compiler will internally replace with the appropriate field number |
* | Causes the interpreter to pause until a key is pressed. This is the same as if the string were stopped, and a wait() method call used. |