Syntax - Editor - Message Syntax

This forum serves as MSCI Reference at EGOSOFT. It's Read-Only for non MSCI Group members.

Moderators: Scripting / Modding Moderators, MSCI Moderators

Post Reply
Orfevs
Posts: 183
Joined: Thu, 22. Jan 09, 23:03
x3tc

Syntax - Editor - Message Syntax

Post by Orfevs »

Messages in-game are versatile, but there are a few things to take note of if actually want them to display:
  • 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>
Incoming messages takes both escape and bracket codes. Which is why you should not use (square) brackets for other than codes.

For subtitle:

Code: Select all

display subtitle text: text=<Var/String> duration=<Var/Number> ms
This changed with TC v3.1: Previously, you could could use bracket codes, while escape colors wouldn't do at all. Now it's the other way around.

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>
- Same as incoming message



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.
Post Reply

Return to “MSCI Reference”