Formatting text for SatCom messagesThe files containing official Colobot Help texts and instructions shown in the
SatCom are located in the
help\ folder. These texts contain special formatting commands which begin with a back slash
"\" and end by a semicolon
";". A paragraph is delimited by an end of line
"¶".
Here is an example of a source text:
\b;Objective¶
Program the \l;grabber bot\u object\botgr; to change the \l;power cell\u object\power; of the \l;winged shooter\u object\botfj;. The winged shooter can then shoot the spiders.¶
¶
\t;Procedure¶
1) Program the \l;grabber bot\u object\botgr;. ¶
2) Execute the program with the arrow button \button 21;. ¶
The \l;winged shooter\u object\botfj; is already programmed, it will do its job as soon as it has got a new power cell.¶
¶
\t;Program¶
You will need the following instructions:¶
\c;¶
\s;grab();\n;¶
\n;Takes whatever there is in front of the bot.¶
\c;¶
\b;Big title with brown background. This command must be at the beginning of the line and ends automatically at the end of the line.
\t;Subtitle with brown background. This command must be at the beginning of the line and ends automatically at the end of the line.
\s;Subtitle with yellow background. This command must be at the beginning of the line and ends automatically at the end of the line. It is mostly used for displaying CBOT programs.
\tab;Table with orange background, used for satellite reports. This command must be at the beginning of the line and it ends automatically at the end of the line.
\l;hypertext\u file;Hypertext link. The word surrounded by
\l; and
\u; is the link name that is displayed. The
\u; command indicates the file to which the link points. For example,
\u object\botgr; points to the standard file
help\object\botgr.txt. Another example:
\u %user%\mlink; points to the user level specific file
user\sample01\mlink.txt.
\c;Use the Courier fixed pitch font, used for CBOT programs.
\n;Use the normal Colobot font.
\image %user%\filename dx dy;Show a
.bmp image contained in the user mission specific folder. If the
%user%\ is omitted, image will be fetched from the general folder
diagram\.
Example:
\image %user%\sample01 8 8; displays
user\sample01\sample01.bmp.
Example:
\image sniff1 12 12; displays diagram\sniff1.bmp.
dx is width in characters, and
dy is height in characters. The image is stretched to fit into the specified size. The values 12 12 used here result in a square image.
\token;Use an orange background. Used generally for instructions of the CBOT language. The command
\norm; returns to standard background.
\type;Use a green background. Used generally for variable types of the CBOT language (for example
int,
float,
point, etc.). The command
\norm; returns to the standard background.
\const;Use a red background. Used generally for CBOT language constants. The command
\norm; returns to the standard background.
\key;Use a grey background. Used generally for key names as F1, F2. The command
\norm; returns to the standard background.
\norm;Return to the standard background after following commands:
\token;,
\type;,
\const;,
\key;.
\key name;Display a key name. For example
\key help; shows the name of the key which activates the
SatCom, generally
F1. But if the user has modified the key mapping in the Colobot options, the new name will be shown. Never to write
F1 directly but rather use
\key help; instead.
As keys are generally shown with a gray background, you should use the combination of following commands to indicate a key name :
\key;\key help;\norm;