Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: StarCraft Text Formatting
StarCraft Text Formatting
Mar 11 2018, 7:27 am
By: DarkenedFantasies  

Mar 11 2018, 7:27 am DarkenedFantasies Post #1

Roy's Secret Service

Here is a list I have created of all the control characters and color tags, for those who want an up-to-date reference. People still occasionally ask for such a list, and existing lists are outdated/misleading. So I thought I'd make a public version of my own ref sheet, with descriptions of the control characters and matching colors.

CONTROL CHARACTERS
<01> : Mimic
Duplicates the second-last used color on current line/string. Otherwise, duplicates last color on previous line/string.
<0C> : Page break
Invisible in briefing room, line break in-game. Can be used for compact formatting when using many line breaks in the string
editor, as it isn't displayed as a new line in it.

<0D> : Carriage return
Used in conjunction with <0A> to denote a line break, which produces the same result as simply pressing the enter key.
Treated as a zero-width character in the map editor and in the game, but otherwise does nothing; makes it a compact option
for increasing the on-screen time of display texts (see footnote).

<12> : Right align
Aligns all subsequent text to the right side of the screen, and overrides subsequent center align tags, until new line.
<13> : Center align
Aligns all subsequent text to the center of the screen until new line.
<14> : Invisible
Renders text as such. Overrides all subsequent color tags on the string in the briefing room, or until new line in-game.
IN-GAME TEXT COLORS
<02> : Periwinkle (Default text color.)
<03> : Yellow
<04> : White
<05> : Grey (Overrides all subsequent color tags until new line.)
<06> : Red
<07> : Lime
<08> : Red (Player 1)
<0E> : Blue (Player 2)
<0F> : Teal (Player 3)
<10> : Purple (Player 4)
<11> : Orange (Player 5)
<15> : Brown (Player 6)
<16> : White (Player 7)
<17> : Yellow (Player 8)
<18> : Green (Player 9)
<19> : Lemon (Player 10)
<1B> : Peach (Player 11)
<1C> : Royal Blue (Player 12)
<1D> : Asparagus (Player 13)
<1E> : Deep Periwinkle (Player 14)
<1F> : Cyan (Player 15)
BRIEFING ROOM TEXT COLORS
<02> : Periwinkle (Default text color.)
<03> : Lime-Green
<04> : Yellow-Green
<05> : Grey (Overrides all subsequent color tags on the string.)
<06> : White
<07> : Red
(Other colors yield unpredictable results.)
USELESS/REDUNDANT
<00> : End string
Null character; automatically changes to <01>.
<09> : Tab
Can also be inserted by pressing CTRL+Tab or CTRL+I.
<0A> : Newline
Marks a line break. Treated as a zero-width character in the map editor text area, but displays a new line in the game.
Same as simply pressing the enter key.

<0B> : Invisible
Identical to <14>.
<1A> : End of file
Treated as a zero-width character in the game, but otherwise does nothing.
<20> : Space
Same as simply pressing the spacebar.
<7F> : Delete character
Displays a character with various appearances in briefing & in-game, as well as between SD and HD graphics.
Can also be inserted by pressing CTRL+Backspace.
Display text messages 80 characters or shorter remain 4 seconds on screen, +50 milliseconds per additional character when longer.

:facts:

Post has been edited 6 time(s), last time on Jan 14 2019, 4:08 pm by DarkenedFantasies.




Mar 11 2018, 11:05 am Lanthanide Post #2



Thanks, this is very useful. A while ago I was trying to do mission briefing text colours and scmdraft just doesn't have a reference for that. Had to hunt around on the net for quite a while before I found something that actually stated the colour codes for briefings.

I have some relevant information from my recent experiments in playing with text in SCR. In both SD and HD graphics, unicode characters are now supported Unicode characters let you do things like Korean text, but also they offer a bunch of new whitespace alignment options. Heinermann has a posthere http://www.staredit.net/368329/, which links to a pastebin and a imgur showing the different lengths of the characters in pixels, with screenshtos: One annoying quirk is that many of these whitespace characters are different pixel size depending if you're in SD or HD graphics, there are a couple that appear to be the same size in both resolutions though.

If your map has any EUDs present (even if they're in a Never condition and not executed), then the extended whitespace characters above won't be available to you, and they'll just be replaced with standard spaces instead. The presence of EUDs don't break Korean characters though so I'm not sure what the precise limitations are when you have EUDs present.

More gotchas:
- When aligning your text on the screen in SCR, unfortunately the character sizes are very different between SD and HD graphics, so if you want to get perfect alignment in both graphics systems, expect to spend a lot of time flipping back and forth. This is further complication by all of the possible combinations: Starting a game in HD and swapping to SD, will present you different alignment than if you started the game in SD to begin with! Also HD can be letterboxed, if the player selects Pillarbox or Window mode, so the width of the screen isn't even consistent in HD itself.
- You can enter unicode characters using UTF-8 byte codes. Many tools (scmdraft, chkdraft, Farty's stat_txt editor) don't support unicode and when you paste it into them, they replace it with ? characters, but they do support UTF-8 hex codes although it can be a real hassle translating the characters 1 by 1 (I couldn't find any online tools that would translate unicode and leave english alone). I found a fast workaround however - TrigEditPlus plugin for scmdraft will allow you to paste unicode characters into trigger comment strings, and upon compiling, if you then view the text trigger in regular TrigEdit the unicode will now be in a different representation (ANSI?) that you can freely copy and paste into any tool that was initially confused by the unicode.



None.

Mar 11 2018, 12:53 pm Suicidal Insanity Post #3

I see you !

Main reason I don't have a reference for briefing colors is I haven't tracked down the palette I need to render the preview.


As I told you in the shoutbox, EUDs disable UTF-8 support, instead the game assumes the map uses Korean encoding.




Mar 11 2018, 5:25 pm DarkenedFantasies Post #4

Roy's Secret Service

Quote from Lanthanide
- When aligning your text on the screen in SCR, unfortunately the character sizes are very different between SD and HD graphics, so if you want to get perfect alignment in both graphics systems, expect to spend a lot of time flipping back and forth. This is further complication by all of the possible combinations: Starting a game in HD and swapping to SD, will present you different alignment than if you started the game in SD to begin with! Also HD can be letterboxed, if the player selects Pillarbox or Window mode, so the width of the screen isn't even consistent in HD itself.
One solution to circumvent the issue of inconsistent screen sizes is to align the text using Center Align; the center of the screen is always at the center. :P Tabs seem fairly consistent to me between SD and HD when they're used on either end of the string/line.
Main reason I don't have a reference for briefing colors is I haven't tracked down the palette I need to render the preview.
I believe the palette is stored inside glue\palcs\tfont.pcx. At least that's the only thing I can find that contains all of the briefing text colors.




Mar 11 2018, 9:34 pm Suicidal Insanity Post #5

I see you !

That file is on the game CDs, not just the default install. It also has to be in stardat.mpq somewhere :/

E: Found a bunch in stardat glue folder
palmm, palnl - no idea
palrp, palrt, palrz - r protoss, r terran, r zerg?

palpd, palpv - protoss defeat and victory?
palpt, paltv - terran defeat and victory?
palzd, palzv - zerg defeat and victory?

I very vaguely remember it being in the briefing room UI settings somewhere? I'll try to figure it out tommarow, maybe I just need to load the palette from the background image and then use the corresponding font remapping.


E: I think its working, so I guess the string for the briefing rooms can see the light of day after all - its been unused in the code for who knows how many years :D

Post has been edited 8 time(s), last time on Mar 11 2018, 10:20 pm by Suicidal Insanity.




Mar 12 2018, 12:32 am Lanthanide Post #6



One solution to circumvent the issue of inconsistent screen sizes is to align the text using Center Align; the center of the screen is always at the center. :P Tabs seem fairly consistent to me between SD and HD when they're used on either end of the string/line.
I haven't tried to use tabs for alignment much, but perhaps doing them in isolation (not around other text) at the start/end of a line may work better.

Anyway, as my post said, the actual width of the screen changes: SD is always 4:3, and HD can be 16:9 or 4:3 depending what mode they have it in. The text rendering size of space characters also differs if you start the game in HD and swap to SD, compared to starting it in SD to start with. So centering the text and working outwards from the center of the screen is the best available solution, but even that won't work in all cases, when limited to only ASCII characters. I can speak from experience (I spent about 4 hours fiddling with this and came up with a "best acceptable" solution, that wasn't as good as my 1.16.1 alignment).



None.

Mar 17 2019, 9:57 am Finally91 Post #7



Is there an RGB or hex for colors like 'deep periwinkle'? Can't find them.

Post has been edited 1 time(s), last time on Mar 17 2019, 10:18 am by Finally91.



None.

Mar 17 2019, 9:52 pm DarkenedFantasies Post #8

Roy's Secret Service

In-Game:
Periwinkle : #B8B8E8
Yellow : #DCDC3C
White : #FFFFFF
Grey : #847474
Red : #C81818
Lime : #10FC18
Red (P1) : #F40404
Blue (P2) : #0C48CC
Teal (P3) : #2CB494
Purple (P4) : #88409C
Orange (P5) : #F88C14
Brown (P6) : #703014
White (P7) : #CCE0D0
Yellow (P8) : #FCFC38
Green (P9) : #088008
Lemon (P10) : #FCFC7C
Peach (P11) : #ECC4B0
Royal Blue (P12) : #4068D4
Asparagus (P13) : #74A47C
Deep Periwinkle (P14) : #9090B8
Cyan (P15) : #00E4FC

Briefing:
Periwinkle : #A4B4F8
Lime-Green : #54BC2C
Yellow-Green : #9CE464
Grey : #585858
White : #FFFFFF
Red : #F40404




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
[2024-4-17. : 1:52 am]
Vrael -- hah do you think I was born yesterday?
[2024-4-17. : 1:08 am]
O)FaRTy1billion[MM] -- i'll trade you mineral counts
[2024-4-16. : 5:05 pm]
Vrael -- Its simple, just send all minerals to Vrael until you have 0 minerals then your account is gone
[2024-4-16. : 4:31 pm]
Zoan -- where's the option to delete my account
[2024-4-16. : 4:30 pm]
Zoan -- goodbye forever
Please log in to shout.


Members Online: Vrael, Roy