EnglishGermanFrenchRussianPolishItalianSpanish
Log inRegister
 
Syntax - Editor - Message Syntax
Post new topic Reply to topic
View previous topic :: View next topic
Author Message
Orfevs





Joined: 23 Jan 2009
Posts: 179 on topic

Thank you for registering your game
PostPosted: Fri, 13. Apr 12, 16:00    Post subject: Syntax - Editor - Message Syntax Reply with quote Print

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:
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:
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:
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.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic Reply to topic
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Control Panel
Login Data
The time now is Wed, 20. Sep 17, 16:31

All times are GMT + 2 Hours


Board Security

Copyright © EGOSOFT 1989-2017
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.24202 seconds, sql queries = 15