- WiPSquare brackets '[' and ']' are BAD (and good)
- WiPAccepted syntax
Square brackets
Using square brackets ('[' and ']') in a message, such as ship/station name or otherwise used to outline something - will render the message empty! Sent from "unknown".
This because these brackets are supposed to contain codes. When the code is unrecognized, a.k.a "[My Awesome Buster]", the message will be fubar - since that was hardly a recognizable code.
In X3TC versions prior to v3.1, colors with escape codes acted in the same manner, but this has been remedied.
Accepted Message Syntax
If you wish to send a message, you must know where to include the right set of codes, and where not to.
Keep in mind that escape codes (ESC=\033) must be read from T file.
For incoming message:
Code: Select all
send incoming message <var/string> to player: display it= <bool>
- xColor escape codes (\033<ColorChar>...\033X)
- Color bracket codes [<ColorName>]...[/<ColorName>]
- xOther bracket codes
For subtitle:
Code: Select all
display subtitle text: text=<Var/String> duration=<Var/Number> ms
Only escape colors will work with subtitles.
For menus:
- Use escape codes only.
For player logbook:
Code: Select all
write to player logbook <Value>
write to player logbook: printf: fmt=<Var/String>, <Value>, <Value>, <Value>, <Value>, <Value>
write to player logbook: printf: pageid=<Var/Number> textid=<Var
<RefObj> -> write to logbook <Value>
For external log:
Obviously, there's little in the way of colors in a pure .txt file. Brackets end up as brackets and escape codes end up as ESC + whatever character you used.