EnglishGermanFrenchRussianPolishItalianSpanish
Log inRegister
 
How to add color and formating to text
Post new topic Reply to topic Goto page 1, 2  Next
View previous topic :: View next topic
Author Message
AalaarDB





Joined: 29 Jan 2004
Posts: 2279 on topic

Thank you for registering your game
modified
PostPosted: Tue, 21. Feb 06, 09:33    Post subject: How to add color and formating to text Reply with quote Print

In conventient ready to copy and paste form.
Add colors by placing this in a text file:
Code:
Yellow:
[b]TextHere[/b]
[yellow]TextHere[/yellow]
\033YTextHere\033X

Blue:
[blue][/blue]
\033B\033X

Red:
[red][/red]
\033R\033X

Green:
[green][/green]
\033G\033X

Cyan (light blue):
\033C\033X

Magenta (purple):
\033M\033X

Grey (gray):
\033A\033X

White (uh white):
\033W\033X

Black (MSCI only):
0TextHereX


Add formatting by placing this in a text file:
Code:
New Line:
\n

Underline:
[u][/u]

Italics:
[i][/i]

Center:
[center][/center]

Title:
[title][/title]

Justify:
[justify][/justify]

Text:
[text][/text]
[text cols='2'][/text]

Author (for messages):
[author][/author]

Button (for questions):
[select value="youGetThisAsInputToTellWhichButton"]Button label here, player sees this[/select]



_________________
My Scripts


Last edited by AalaarDB on Tue, 13. May 08, 21:33; edited 3 times in total
Back to top
View user's profile Send private message Send e-mail
A dJ



MEDALMEDAL

Joined: 18 Dec 2003
Posts: 168 on topic
Location: The Netherlands
Thank you for registering your game
PostPosted: Tue, 21. Feb 06, 09:43    Post subject: Reply with quote Print

Code:
Center:
[center][/center]

Title:
[title][/title]

Justify:
[justify][/justify]

Text:
[text][/text]
[text cols='2'][/text]



_________________
X3:R Scripts:
Advanced Mineral Scanner v1.31
God Mode v1.1 Addon 1v2
Shield to Drive Booster v1.01
Back to top
View user's profile Send private message MSN Messenger
AalaarDB





Joined: 29 Jan 2004
Posts: 2279 on topic

Thank you for registering your game
PostPosted: Tue, 21. Feb 06, 09:47    Post subject: Reply with quote Print

In the [text cols=] part, do you need the single quotes ' ' ? I copied and pasted straight from your code into my code... and they're gone!


_________________
My Scripts
Back to top
View user's profile Send private message Send e-mail
A dJ



MEDALMEDAL

Joined: 18 Dec 2003
Posts: 168 on topic
Location: The Netherlands
Thank you for registering your game
PostPosted: Tue, 21. Feb 06, 09:48    Post subject: Reply with quote Print

I guess so, note that I edited my previous post twice Smile


_________________
X3:R Scripts:
Advanced Mineral Scanner v1.31
God Mode v1.1 Addon 1v2
Shield to Drive Booster v1.01
Back to top
View user's profile Send private message MSN Messenger
A dJ



MEDALMEDAL

Joined: 18 Dec 2003
Posts: 168 on topic
Location: The Netherlands
Thank you for registering your game
modified
PostPosted: Tue, 21. Feb 06, 18:38    Post subject: Reply with quote Print

Code:
Text:
[text colwidth='xxx'][/text]    (xxx=number)
[text minlines='xxx'][/text]    (xxx=number)
[text cols='xxx' colwidth='xxx' minlines='xxx'][/text]    (xxx=numbers)

Button (for questions):
[select][/select]   (i.e. "Cancel" or "End Transmission")

Other:
%s, %d, %sd
{xxx,yyy}   (xxx=textpage, yyy=t id)
$xxx$   (xxx=value)

These I found somewhere within xx0001.pck(cat04)
[Headline], [Intro], [Quote], [Report], [Byline], [Melodrama A], [Melodrama B], [Fear], [Joy]
(ADDED)(/ADDED)
@ANSA, @ANAN, @AND
[br/], [article/]
[ranking type='fight' title='$FIGHTRANK$'/]
[VK_xxx]   (xxx=keyname i.e. EJECT or JUMPDRIVE)
[IF xxx][ENDIF xxx]   (xxx=variable)

I've seen Cycrow use
::xxx::   (xxx=value)


I have no idea what some of these do.

Oh and it seems it's possible to have messages made up of HEX values entirely.

Code:
BC BA D6 92 15 5B 3A $TargetStation$ 1F $TargetSector$ F8 FF B3 $TimeString$ D2 D6 BA $Credits$ CC CF FF

[select value='go']01[/select]


Edit: Added one + changed post a bit (23-02-06)


_________________
X3:R Scripts:
Advanced Mineral Scanner v1.31
God Mode v1.1 Addon 1v2
Shield to Drive Booster v1.01


Last edited by A dJ on Thu, 23. Feb 06, 18:25; edited 2 times in total
Back to top
View user's profile Send private message MSN Messenger
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)



Joined: 15 Nov 2004
Posts: 19851 on topic
Location: London
Thank you for registering your game
PostPosted: Tue, 21. Feb 06, 18:47    Post subject: Reply with quote Print

the ::xxx:: format that i use is actaully not standard for the game, i use a script to parse these tags to fill in the correct data Wink

the other stuff line [Headline] [Intro] $xxx$ etc, are used to format BBS articles and you have to define them urself elsewhere in the t file


_________________
My Scripts | MY X3TC Scripts | X3 Plugin Manager | Custom Gui
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
s9ilent





Joined: 29 Jun 2005
Posts: 1993 on topic
Location: Galactic Sector ZZ9-Plural Z alpha +10 GMT
Thank you for registering your game
PostPosted: Mon, 16. Apr 07, 06:55    Post subject: Reply with quote Print

Is there a way to insert the a new line whislt in the script editor (ie \n)
It adds the actual charachters \n when you type it in

Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ChemODun





Joined: 12 Feb 2007
Posts: 320 on topic
Location: Kyiv, Ukraine
Thank you for registering your game
PostPosted: Mon, 16. Apr 07, 09:26    Post subject: Reply with quote Print

s9ilent wrote:
Is there a way to insert the a new line whislt in the script editor (ie \n)
It adds the actual charachters \n when you type it in

It possible do only via text files, not ScE


_________________
Multiply entropy by absolute zero

Ñâîáîäà ñðåäè çâåçä / Freedom in space
Back to top
View user's profile Send private message Send e-mail
max274bm





Joined: 02 Apr 2007



PostPosted: Mon, 16. Apr 07, 16:03    Post subject: Reply with quote Print

Back in X2 there was a script that allowed you to change the text colour of player owned ships and stations. I used this to quickly identify my various ship classes i.e. my fighting ships (blue) from my trading ships (yellow).
Can this info here be used for this app?
If it can how do you do it please Thinking
I'm no modder and although I know what a text file is, where would you put the above script to be able to make this work?
Thanks for any advice

Back to top
View user's profile Send private message
UniTrader



MEDAL

Joined: 20 Nov 2005
Posts: 8085 on topic
Location: Sol-System - Erde - 48°07' N 11°37' E
Thank you for registering your game
PostPosted: Mon, 16. Apr 07, 16:34    Post subject: Reply with quote Print

the above information is useful for the Scripters, but not for the User Wink

I know two Scrits which can make colored names, the first is mine, but is only avible with a german readme (im too lazy to translate it Rolling Eyes) and the other one is by Klyith, look here Wink


_________________
X - Rebirth wird kommen.. irgendwann.. und jedes mal wenn jemand frägt wann genau eine Woche später.

Aktuelles Releasedatum (wenn das ursprüngliche Release Neujahr 2013 KW4 2013 gewesen wäre): KW28 2013

danke an: Mairemix, Schrimschrim, ubuntufreakdragon, Sevion, Einheit 101, Trascher, AndyAndy, Eö, Nessus1234, Asteria5, caddman, mich selbst Very Happy, TrInAdE, sniper777, Unbekanntes Feindschiff, Moncada
Back to top
View user's profile Send private message Visit poster's website
max274bm





Joined: 02 Apr 2007



PostPosted: Mon, 16. Apr 07, 23:59    Post subject: Reply with quote Print

Thanks UniTrader your a gem Smile

Back to top
View user's profile Send private message
Thraxwhirl





Joined: 17 Feb 2006
Posts: 680 on topic

Thank you for registering your game
PostPosted: Mon, 24. Sep 07, 14:43    Post subject: Reply with quote Print

Is it possible to use colour in Script Editor commands?

For example, in General Object Commands, you might want to:

001 ship->change name to "The Enterprise"(or whatever)...

...but with it in yellow?

Back to top
View user's profile Send private message
B-O'F





Joined: 21 Feb 2004
Posts: 719 on topic

Thank you for registering your game
PostPosted: Mon, 24. Sep 07, 15:57    Post subject: Reply with quote Print

Hi Thraxwhirl,

Yes you can do this in the editor.
The easiest method of using the control strings (such as \033Y and \033X) is to have them in the t-file, and then use them as required in your script.

$yellow = = sprintf: pageid=<Var/Number> textid=<Var/Number>,<Value>,<Value>,<Value>,<Value>,<Value>

Where pageid points to your t-file and textid points to the text \033Y

Same sort of thing for any other colours, and one to point to the colour ending - \033X

Then you can have -

$name = $yellow + 'The Enterprise' + $endcolour

which is : \033YThe Enterprise\033X

If you only intend to have the one named and coloured ship, then have the complete name in the t-file -- \033YThe Enterprise\033X.

As a bit extra - if you want all your stations and ships to have coloured names and/or your company name, then copy page id="1706" from 440001.xml to your t-file. Then you can edit it in Notepad to change all the 'Your xxx ' to '\033W My company name xxx \033x' to give your company name in front of the station, all in bright white (in this example) and the game will automatically name all your ships and stations for you.... plenty of scope for colours and names...

Boron - Ol Fh'art


_________________
Public Service announcement

Growing old is not a disease - it is a delayed symptom of birth trauma.
Back to top
View user's profile Send private message
Thraxwhirl





Joined: 17 Feb 2006
Posts: 680 on topic

Thank you for registering your game
PostPosted: Mon, 24. Sep 07, 16:54    Post subject: Reply with quote Print

Ah, I think I get you, B-O-F.

I'll have a play-around later(though I've other scripting stuff to sort first), and see if I can master that.

Thanks. Smile

Back to top
View user's profile Send private message
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)



Joined: 15 Nov 2004
Posts: 19851 on topic
Location: London
Thank you for registering your game
PostPosted: Mon, 24. Sep 07, 22:21    Post subject: Reply with quote Print

in a few of my scripts my set coloured names for some ships and use the entry

Code:

\033B%s\033X


then u can set any ship name to blue, or have a few entries for different colours, etc


_________________
My Scripts | MY X3TC Scripts | X3 Plugin Manager | Custom Gui
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic Reply to topic Goto page 1, 2  Next
 
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, 22. May 13, 15:30

All times are GMT + 2 Hours


Board Security

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