special charachters in text output commands

The place to discuss scripting and game modifications for X²: The Threat.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

Torzi
Posts: 25
Joined: Thu, 29. Apr 04, 21:44
x2

special charachters in text output commands

Post by Torzi »

Does anyone know if there is a way to access special charachters for text output (i.e. symbols and newline), or if they're even defined ?
adam00
Posts: 333
Joined: Sun, 9. May 04, 12:03
x4

Post by adam00 »

You can put your texts to "language" files in "t" directory. Many scripts use this technic, just look around for example.
Torzi
Posts: 25
Joined: Thu, 29. Apr 04, 21:44
x2

Post by Torzi »

that was it.... thanks

Code: Select all

t\440044.xml

<?xml version="1.0" encoding="UTF-8" ?>
<language id="44">
<page id="12345" title="ASCII Special charachters and symbols (selected)" descr=" ">
 <t id="10">\n</t>
 <t id="35">#</t> 
 <t id="36">$</t>
 <t id="38">&</t>
 <t id="40">(</t>
 <t id="41">)</t>
 <t id="42">*</t>
 <t id="64">@</t>
 <t id="94">^</t> 
</page>
in a different init script I have the command
load text: id=44

Code: Select all

001   
002   $line1 = 'line 1'
003   $line2 = 'line 2'
004   
005   $NEWLINE =  read text: page=12345 id=10
006   $POUND =  read text: page=12345 id=35
007   $DOLLAR =  read text: page=12345 id=36
008   $AND =  read text: page=12345 id=38
009   $LPAREN =  read text: page=12345 id=40
010   $RPAREN =  read text: page=12345 id=41
011   $STAR =  read text: page=12345 id=42
012   $QUESTION =  read text: page=12345 id=63
013   $AT =  read text: page=12345 id=64
014   $HAT =  read text: page=12345 id=94
015   
016   $Message = $DOLLAR + $LPAREN + $line1 + $RPAREN + $QUESTION + $NEWLINE
017   $Message = $Message + $STAR + $POUND + $AND + $AT + $HAT + $NEWLINE
018   $Message = $Message + 'Did it work' + $QUESTION
019   send incoming message $Message to player: display it=[TRUE]
020   
021   return null
The answer was yes, it did.
User avatar
JustHere4Coffee
Posts: 1075
Joined: Wed, 6. Nov 02, 20:31
x2

Post by JustHere4Coffee »

ooh, cool - and very useful!

well researched that lifeform

Return to “X²: The Threat - Scripts and Modding”