This is an old revision of the document!


text.dat file

Much of the text and color that the BBS Terminal Server displays is stored in the file ctrl/text.dat file. The syntax of this file is VERY specific and extreme caution should be taken when editing it. Knowledge of the C language would be very helpful in producing the desired results. If all you want to do is change colors of a certain text line, take care not to disturb the arrangement of the other characters on the line. Ctrl-A codes can be preceded by an embedded actually Ctrl-A (ASCII 0x01) character or by a '\1' (the printf() equivalent of Ctrl-A).

The syntax of the characters between the double quotations is identical to the C language printf() format string with one exception: \xxx where x are digits (0-9) represents a decimal number, not an octal number. The range is 0 to 255. If you wish to set a background color using \1 for the Ctrl-A code, you may need to pad the attribute number with zeroes. For example; to set the background to blue, you might try to use the sequence “\14” which won't work. You could either embed the actual ctrl-a character (which is preferred) or use “\0014”.

Some of the strings have characters preceded by a tilde ('~'). These strings are referred to as mnemonics. The tilde precedes a character that is to be highlighted for users supporting ANSI and enclosed in parenthesis for non-ANSI users. Usually used for prompt strings that contain the valid key commands. The colors to use for the highlighted characters, normal characters, and the command character are specified in the ctrl/attr.cfg file.

The order of the % specifiers (if they exist) in a text.dat line cannot be altered. The display of %s specifiers can be suppressed by changing the “%s” to “%.0s”. Another way to suppress the display of specifiers is to enclose them between Ctrl-A( and Ctrl-A). Any text between Ctrl-A( and Ctrl-A) would only be displayed to users of level 90 or higher. To suppress the display to all users, put the text/specifiers between Ctrl-ACtrl-Z and Ctrl-A) (assuming that the Z flag from flag set #1 is not set on any user accounts).

You can suppress the display of an entire text.dat line by simply setting the text to a blank string (“”)1).

WARNING Make a backup of the text.dat file before you edit it. If you damage the file syntax when editing it, Synchronet may execute erroneously or even fail to initialize.

See Also

1)
In Synchronet v3.15b and later
custom/text.dat.1320389777.txt · Last modified: 2011/11/03 23:56 by digitalman
Back to top
CC Attribution 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0