www.tombraiderforums.com

Go Back   www.tombraiderforums.com > Tomb Raider Modding > Tomb Raider Level Editor > Tomb Raider Level Editor Tutorials

Closed Thread
 
Thread Tools
Old 27-02-14, 20:50   #1
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 2,376
Default TRNG – Text tutorial

If you want to choose or customize fonts or print texts in the proper way, that seems a bit chaotic in TRNG.
I created an Excel tutorial to clear every detail, but it still seemed a bit chaotic.
That is why I created an updated version of my tutorial. I edited the contents into a “FAQ form”, I hope it will be easier to understand it now.

The chapters are:

1. Basic questions
2. Editing text strings – basic questions
3. General text features
4. Choosing a font type
5. Customizing methods for text types
6. Customization with TextFormat Script command
7. Customization with “Text. Set” FLIPEFFECT triggers
8. Customization with Customize= CUST_SET_TEXT_COLOR Script command
9. Customization with DefaultWindowsFont Script command
10. Customization with WindowsFont Script command
11. Customization with Parameters= PARAM_PRINT_TEXT Script command
12. Customization with Parameters= PARAM_WTEXT Script command
13. Customization with Customize= CUST_SHOW_AMMO_COUNTER Script command
14. Customization with “Cutscene... Text” FLIPEFFECT triggers
15. Game language

Last edited by AkyV; 29-02-16 at 14:14.
AkyV is offline  
Old 29-02-16, 13:57   #2
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 2,376
Default

1. Basic questions

Q: where do I need to type the texts I want to print in the game?
A: in the so-called text strings. Shortly we call it “strings”. It is a table where text strings are stored. Each text string is a single text (eg. the name of a key item) that will be printed on the screen.
Some texts should be also typed in the scripted commands of the game. Shortly we call it “script”. These texts are:

- level names in Level commands,
- key/puzzle/pickup/their combo/examine item names in Key, Puzzle, Pickup, KeyCombo, PuzzleCombo, PickupCombo, Examine commands,
- text that automatically will be shown for some moments when the level starts, in Legend commands,
- some TRNG features can also use some texts what you also need to type in the command that belongs to that feature (see eg. StandBy command).

See more about these TRNG commands in NG Center/Reference.

Q: how can I print/remove a text on/off the screen?
A: there are different methodes:

Texts from TRLR/TRLE:

- The classic TRLR/TRLE menus (main menu, inventory etc.)
- Statistics menu in TRNG can be activated even with a trigger (F223).
- The text in Legend Script command will show up and disappear automatically, when the level starts.
- The so-called screen timer (what you could see in TRLR when Lara and Von Croy were racing in Angkor) needs a Timer= ENABLED Script command at the level, plus an F86 trigger to start/show the timer. You also need another F86 to stop/remove the timer.
- You can present even the end credits of TRLR. All you need to do is a “Customize= CUST_SET_CREDITS_LEVEL, A” Script command, at the title or at the last level of your game. A is X+1, in which X is the level amount in your game.

TRNG setups where texts are important:

- To see the ammo amount of Lara’s actual weapon, just in her hand, in real game time (so not in the inventory), you need a Customize= CUST_SHOW_AMMO_COUNTER Script command at the level (to use it for that level) or at the tiltle (to use it for the whole game).
- Select your diary item in the inventory or activate an F222 trigger to open the diary. See the description of Diary Script command in NG Center and Paolone’s diary tutorial project for more details about the setup.
- If you want a TRNG type savegame list instead of the classic one then you need a SavegamePanel Script command. See the description of the Script command in NG Center and Paolone’s savegame panel tutorial project for more details about the setup.

- Textpad (with Parameters= PARAM_INPUT_BOX Script command).
- When building your level, then the messages of diagnostics could be useful on the screen. See the description of Diagnostic, DiagnosticType and LogItem Script commands in NG Center.
- You can print any texts, any time, with several FLIPEFFECT triggers.

The triggers are:

A, When you don’t need Parameters commands to define the text parameters:

a, F65 prints a [Strings] string. It will be removed if the timer expires or with F67.
b, F149 prints a [Strings] string and freezes the game. Hit ESC to quit and remove the text.
c, F64 prints an [ExtraNG] string. It will be removed if the timer expires or with F67 or F204.
d, F360 prints an [ExtraNG] string. It will be removed with F67 or F204.
e, F148 prints an [ExtraNG] string and freezes the game. Hit ESC to quit and remove the text.
f, F201 prints an [ExtraNG] string, scrolling it vertically, from beneath upwards. The text will be rolled out of the screen or will be removed with F202.

B, When you need a Parameters= PARAM_PRINT_TEXT Script command to define the text parameters:

a, F207 prints a [PSXStrings] string. It will be removed if the timer expires or with F67.
b, F208 prints a [PCStrings] string. It will be removed if the timer expires or with F67.
c, F209 prints a [PCStrings] string and freezes the game. Hit ESC to quit and remove the text.
d, F203 prints an [ExtraNG] string. It will be removed if the timer expires or with F67 or F204.
e, F210 prints an [ExtraNG] string and freezes the game. Hit ESC to quit and remove the text.
f, F206 prints an [ExtraNG] string, scrolling it horizontally, from right to left. The text will be rolled out of the screen.
g, F205 prints an [ExtraNG] string, scrolling it vertically, from beneath upwards. The text will be rolled out of the screen or will be removed with F202.

C, When you need a Parameters= PARAM_WTEXT Script command to define the text parameters:

F363 prints an [ExtraNG] string. It will be removed if the timer expires or with F364.

Notes for the FLIPEFFECTs:
- Texts without Parameters commands can be timed in the triggers. Texts with Parameters commands can be timed in the commands.
- Except the timer, the difference between F64 and F360 is if a string ID is above 255 then F64 is unable to print that sometimes.
So F64 is recommended below string ID 256, if you want a timed print for an [ExtraNG] string.
And F360 is recommended if you want to print any [ExtraNG] string, moving them with triggers.
- You can choose "Abs" or "Prop" values in F201 triggers. In “Abs” cases the roll will be smooth, but the real fps will depend on the resolution now. In “Prop” cases the fps will be constant, but perhaps the roll will lag more or less now
- GT_VSCROLL type GlobalTriggers could be useful if you want to control something in the game, based on the [non] presence of the vertically rolled text on the screen. - See Paolone's font tutorial project for more details.

TRNG setups where texts are additional:

- A52 trigger is used to print the actual time of the timer if a Moveable object is timed for activation/deactivation.
- You can add names to the customized bars or damage room bars or cold water bars. See the description of the CUST_BAR Script constant or Damage Script command in NG Center.
- You can use a customized binoculars graphics instead of the classic one. In that case texts can also be printed on the graphics (to show the actual zooming degree or such). See the description of CUST_BACKGROUND, CUST_BINOCULARS and BKGDT_BINOCULAR Script constants in NG Center and Paolone’s binoculars tutorial project for more details about the setup. (Note: the Image command for the customized graphics must be typed before – i.e. above - CUST_BACKGROUND.)
- Detectors also show some technical information. Like “14 m” means the item Lara’s searching for is 14m to her. See the description of Detector Script command in NG Center and Paolone’s detector tutorial project for more details about the setup.
- As you definitely remember, there were demos in the titles of older Tomb Raider games. You can do the same in TRNG, with Demo Script command. In that case, you can print technical messages on the title screen for the player, like “the demo starts in 3 seconds” or “hit ESC to abort the demo”. See the description of the Script command in NG Center and Paolone’s demo tutorial project for more details about the setup.
- There is a professional way to create a cutscene, if you use a Demo Script command. In that case the sentences talked by people in the cutscene can be also printed on the screen at the same time. It is controlled with a Parameters= PARAM_ACTOR_SPEECH Script command. Each person in a cutscene needs a command like that for his/her part of the discussion, referring with an A91 trigger for the proper command. See the description of the Script commands in NG Center and Paolone’s demo tutorial project for more details about the setup.
- You can show the turns Lara has done so far on a so-called parallel bar. See the description of PB_SHOW_CHARGE_COUNTER Script constant in NG Center and Paolone’s parallel bars tutorial project for more details about the setup.
- Texts that will be printed when a so-called standby camera is shooting. See the description of StandBy Script command in NG Center and Paolone’s stabdby tutorial project for more details about the setup.

Q: I would like to print a text with a FLIPEFFECT. Which method should I choose?
(Because there is the method without Parameters command, the method with Parameters= PARAM_PRINT_TEXT command and the method with Parameters= PARAM_WTEXT command.)
A: mostly it doesn’t matter what you choose, I mean, FLIPEFFECTs like that are mostly used to print some sentences what a person say, or to print some information for the player on the screen etc. These sentences, information etc. are not used for TRLR/TRLE, so you probably type it in [ExtraNG], which is for TRNG texts – and, well, [ExtraNG] strings can be typed with any method.

However, you can choose any method, any time, in any level, even choosing this one now, or that one later, it doesn’t matter, there won’t be some malfunction, even if you use all the three of them within a level.

If you need to choose, then sometimes the answer is easy. I mean, for example, the only way to print a [Strings] string when you choose the method without Parameters, so you need to choose that method if you want to print a [Strings] string.
But, for example, which method should you choose, if you want a vertically scrolled text? Because you have a FLIPEFFECT for that both without Parameters and with PARAM_PRINT_TEXT.

In a nutshell, I suggest this:

- Choose the one without Parameters command (Method A), if you hardly need some customization (maximum for some basic preset font color or such).
- Choose the one with Parameters= PARAM_PRINT_TEXT (Method B), if you need more special customized values. (Eg. timed texts for many more seconds, defining a pixel-precise position for the text.)
- Choose the one with Parameters= PARAM_WTEXT (Method C), if you need some fancy customization or some troubleshooting. (Eg. pulsing font size, or printing texts over images etc.)

If you need a detailed answer, then I say this:

- You can choose for each FLIPEFFECT the font you use (instead of the general font you use in the level): C
- You can use a font even if that is not presented in the actual font set of the player’s Windows*: A, B

- You can print an ExtraNG string even over ID255: A
- Customized (not preset) change of the size of the font you use**: C
- Customized (not preset) change of the color of the font you use: C
- Pixel-precise position for the text: B (only for the bottom left coordinate of the text), C (a whole text box)
- Print text over images**: C
- Customize for each FLIPEFFECT to print text or not over non-pop images: C
- Choose to see text over lasersight or binoculars graphics: C
- See texts on static camera screens***: A, B
- Choose not to see text over flyby camera screens****: C
- Choose to see text over menu screens: C
- Time the text for more than 127 seconds: B, C
- Timer counted in tick frames (not seconds): C
- Type texts vertically: C
- Vertically rolled text: A (with center alignment), B (with left alignment)
- Trying to force a native characterset**: C
- Customize for each FLIPEFFECT to try to force a native characterset or not: C
- Underlined, bold or Italic characters**: C, (A or B, without DefaultWindowsFont – only if you add these features to the font you used, with some font editor)
- Choosing underlined, bold or Italic characters for each FLIPEFFECT: C
- Shadowed characters and shadow color**: C, (A or B, without DefaultWindowsFont – only if you add these features to the font you used, with some font editor)
- Choosing shadowed characters or not/shadow color for each FLIPEFFECT: C
- Blinking text (i.e switching it rhythmically on/off): A, B
- Growing text size (i.e. the text starts growing when activated, to reach the required size): C
- Pulsing text size (i.e. when the text size is rhythmically changing forth and back): C
- Pulsing color (i.e. changing rhythmically between the colors): C (between the letter and the shadow color), A or B (only between white and dark grey)
- Removing spaces between the characters*: A, B
- Customize the vertical space between the text lines*****: A, B
- Some minor customizations° (Ultra Bold or very slim characters, the same character width, printing from right to left)**: C

*: only if you don’t use DefaultWindowsFont Script command.
**: these features will also work for Method A and B if you use DefaultWindowsFont. But, in that case, this value will everyway be used for Method A, Method B, and also for some other print, which is not Method C, not diary text, not new savegame table text, not binoculars text.
For example, if you use DefaultWindowsFont, then you can have a customized (not preset) font size for Method A and B (and for some other text types), but that size will be the same, for all those text types, for all the prints, in the whole game.
***: there is a Script constant to prevent this bug for Method C (WTF_OVER_FIXCAMERA) but that doesn't seem working.
****: yes, for me, it seems you don’t need CUST_TEXT_ON_FLY_SCREEN any more, you will always see the text on flyby screens. Except with Method C, in that case you can control this with another Script constant (WTF_OVER_FLYCAMERA).
*****: only if you use DefaultWindowsFont Script command.
°: honestly, I didn’t really do successful tests with these features.

Notes:
- Be careful! Using TextFormat Script command or “Text. Set” FLIPEFFECT triggers to customize the texts without Parameters command, then that may affect even some further prints (eg. the text of Legend Script command).
- Don’t misunderstand: when I say “text over menu screens” and such, then that is only about texts printed with FLIPEFFECTs, it doesn’t refer for other prints like menu text or such.
- Pro and con for or against a method is not always so clear. I mean, perhaps you can try some tricks to accomplish that feature even when usually that is not possible. For example, blinking text is possible even with Method C, if you try a loop Organizer, to put/remove the text on/off the screen. - Eg. try this in that loop: after 1 second, F363 puts the text on the screen, and after another 1 second, F364 removes it off the screen.

Last edited by AkyV; 04-12-16 at 23:44.
AkyV is offline  
Old 29-02-16, 13:59   #3
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 2,376
Default

2. Editing text strings – basic questions

Q: do I need to do anything with my older strings contents?
A: see “Convert texts to new format” button on NG Center/Tool tab: it will convert your old strings into ANSI character set, because that is what TRNG supports.

Q: where are the strings stored in TRNG?
A: just like in TRLE, the strings are stored in English.txt. The game will use the DAT version of this file (English.dat). That TXT file can be found in NG Center folder, its DAT file can be found in the folder of the editor.

Note: I can say the same about the script. I mean, the scripts are stored in Script.txt (in NG Center folder), the game will use its DAT version, Script.dat (in editor folder).

Q: what tool can I edit strings in TRNG with?
A: if you have used TRLE before, then you edited the strings directly in English.txt. It is not recommended in TRNG. Instead, you should use NG Center, a program which is part of TRNG. You can edit the strings in Strings tab of NG Center.

Q: I forgot to edit strings in NG Center, I edited it in the TXT. What do I do?
A: if you forgot that and you edited your strings directly in English.txt, then it is not a problem, choose Script tab of NG Center, then click on Reload button. It will refresh the contents of English.txt in NG Center.

Note:
If you use TRNG, then Script should also be edited in NG Center. If you edited Script.txt directly, just like in TRLE, then clicking on Reload will also refresh the contents of Script.txt in NG Center.

Q: how can I edit the contents of a string?
A: if you want to update the contents of a string, then, first, select that string. After that, type the new contents in the lower window, overwriting the old contents (if there are old contents). After that, click on Update button, to refresh the contents of the string.
Now you need to go to the Script tab. Click on Build button, to update English.dat.

Notes:
- Build button will also save Script.txt, and update Script.dat.
- Save button is useless now. You saved English.txt when you clicked on Update. Save button is used only to save Script.txt.

Q: what is [Strings], [PSXStrings], [PCStrings], [ExtraNG], what does “section” mean in NG Center Strings tab?
A: there are four string sections in NG Center:

[Strings]
[PSXStrings]
[PCStrings]
[ExtraNG]

The first three string sections (Strings, PSXStrings and PCStrings) are the original strings of the TRLE. It was Paolone who divided them into three sections for TRNG, for some reason (which is not really important), also giving the strings ID numbers. (Key item names, level names and similar usual TRLE stuff can be found in the Strings section. PSXStrings an PCStrings are hardly useful, you can use them only for some specific purposes.)
The fourth, ExtraNG section is made for TRNG. It hosts the strings that are used only for the text types that are made for TRNG.

Q: can I add/remove a new string or I can only re-edit an already existing string?
A: you cannot change the amount of strings in the original TRLE sections (Strings, PSXStrings and PCStrings).
You can increase/decrease the amount of strings only in ExtraNG section. All you need to do is click on "Add new Extra String" or "Remove Extra String" button.
(The selected string is which can be removed. I recommend never removing a string if that is not the last string. If you don't want a string which is not the last string then just clear its contents.)

Q: I can see special contents (like “\x14 Combine” and such) in strings. What do they mean?
A: honestly, I don’t really know it. I suggest leaving them alone. Perhaps you should try to modify them to see its effect in the game. But I don’t know if there will be any error ever if you do that.

Q: which string used for which purpose?
A: I distinguish three main type of the strings:

Type 1. You can type the text only in a particular string. For example, always [Strings]74 is used for the name of the small medipack. If you don’t use it (eg. if your game has no small medipack), then you can use that string freely for anything, as if it were a Type3 text.
Type 2. As I said above, I don’t know what you are allowed to do with some text types (like \x14 Combine), so you’d better leave them alone. Use them freely for anything, as if it were a Type3 text, if you experience there will not be error if you modify the contents of this string.
Type 3. Some texts can be typed in any string (which is not reserved for Type 1 or 2 texts).

Whatever is your decison to choose a string for a Type 3 text, you also need to mind this:

- in the case of level names or Legend Script command texts, use only any [Strings] or, maximum to string ID255, [PSXStrings],
- in the case of Key/Puzzle/Pickup/Examine/Combo names you cannot use [ExtraNG] strings,
- in the case of texts made for TRNG, they should always be typed in [ExtraNG]. Probably [Strings] is also useful for them, but not always, and sometimes it seems buggy. Maybe you can also try [PSXStrings] or [PCStrings].

The list is – Type1 texts are in Italic style now, and I don’t mention the strings where I suspect Type 2 texts:

[Strings]
0-1: usually used for Legend Script commands
2-38: usually used for level names

39: unlimited amount in the inventory or for CUST_SHOW_AMMO_COUNTER
40-48: inventory commands
53-60: weapon names in inventory (even with lasersight attached)*
61-71: ammo names in inventory or for CUST_SHOW_AMMO_COUNTER*
72: solo lasersight name in inventory*
73-74: medipack names in inventory*
75: binoculars name in inventory*
76: flare pack name in inventory*
78-79: memcard names in inventory*
80-89: waterskin names in inventory*
90: crowbar name in inventory*
91-96: quest item names in inventory*
97-99: mechanical scarab names in inventory*

100-170: usually used for key, puzzle, pickup, examine item or their combo names

173: Load Game (menu title, main menu command, title of TRNG savegame panel)
174: New Game (main menu command)
175: Paused (menu title)
179: Save Game (menu title and title of TRNG savegame panel)
180: Exit to Title (Paused menu command)
183: Statistics (menu title and Paused menu command)
184: Distance Travelled (in Statistics menu)
185: Ammo Used (in Statistics menu)
186: Secrets Found (in Statistics menu)
188: Health Packs Used (in Statistics menu)
189: Time Taken (in Statistics menu)
192-200: some key commands for Control Configuration menu
201: the upper half of examined text of Examine2 item
202: the lower half of examined text of Examine2 item
203: the examined text of Examine3 item

*: if you want to change the name of these items, then type the new name in a Type 3 [Strings] field, and then activate an F335 to name the proper item, and then an F337 to put the ID of that string in “string index” field. (For example, if you use the crossbow slot as a crossbow first, and then, in the next level, as a harpoon gun.)

[PSXStrings]
220: TRNG overwrites the default TRLE text here. TRNG uses it for counting the turns Lara has already done, rotating on a so-called parallel bar, the default TRNG text is: Turns %02d
246-259: some tasks in the classic TR4 end credits
260-299: people’s names in the classic TR4 end credits (effectless if you edit them!)

[PCStrings]
300-302: some tasks in the classic TR4 end credits
304: Options (menu title, main menu command, Paused menu command)
305: Empty Slot (in Save Game/Load Game menu and in TRNG savegame panel)
306: Music Volume (Options menu command)
307: SFX Volume (Options menu command)
308: Sound Quality (Options menu command)
309-311: Sound Quality values
312: Targeting (Options menu command)
313-314: Targeting values
336: Exit (main menu command)
337: Control Configuration (Options menu command)
338-339: some key commands for Control Configuration menu
341-344: some Control Configuration values
347-348: some key commands for Control Configuration menu
355: Select Level (menu title)

[ExtraNG]
any: usually used for any texts made for TRNG,
except:

301: the name of BAR_CUSTOM1 for CUST_BAR
302: the name of BAR_CUSTOM2 for CUST_BAR
303: the name of BAR_CUSTOM3 for CUST_BAR
304: the name of BAR_CUSTOM4 for CUST_BAR
666: for textpad special keys (see RIB_ADD_SCANCODE_LIST Script constant)


Q: when updating the DAT file, NG Center says the build failed. How can I fix it?
A: in the Script tab of NG Center you can find a green window below. The error is described here. Hit Show Errors button above the green window, so the problematic entry will be highlighted. Fix it – in different ways, it depends on the error type.
If the problem is in an entry with some text, then the error is probably you didn’t also type that text in strings, or you type it, but in a bad way (eg. if you want to see Jeep Key name of a key item in the inventory in two lines, then it should look like this way in the strings: Jeep\nKey. In that case, the key name in the Script must be exactly the same, Jeep\nKey, instead of Jeep Key).

Note:
Maybe you have more than one error to fix. So hit Show Errors button again and again, to show further errors (if they exist).

Q: when updating the DAT file, NG Center says the build failed. I used the decimal code (-1) of IGNORE in a textual field of a new, TRNG Script command (eg. StandBy command), because I don’t want to print anything on the screen with that command, but NG Center says it is an error. Why?
A: you can’t use -1 in textual fields. Instead, use the asterisk sign (*) now.

Q: when updating the DAT file, NG Center doesn’t say the build failed. However, there are messages in the green window of Script tab. What do I need to do?
A: those messages are not errors, just warnings (about some unnecesarry thing or such). You can fix them (in different ways, it depends), but you don’t need to.

Q: the game crashes when I launch it. Why?
A: a possible reason is the latest Build has failed.
A failed Build of the script will remove the English.dat, the game cannot be launched. You need another, successful Build to fix it.

Last edited by AkyV; 05-12-16 at 00:49.
AkyV is offline  
Old 29-02-16, 14:00   #4
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 2,376
Default

3. General text features

I call it “general” because it doesn’t depend on the text type you want to print (usually).
Customization (see below) usually depends on the text type.

Q: do I always need to type the whole contents of the string into a Script command, if a field of the command (see eg. Key or StandBy commands) contains some text?
A: No. If that textual field refers to an [ExtraNG] string, then you can type Sign !+string ID instead of typing the string text itself there.
For example, !12 in the textual field means: "the contents of [ExtraNG] #12".

Q: what do I need to do to see the text on the screen printed in two or more lines?
A: when you type the contents in the lower window of NG Center/Strings, then hit ENTER to separate the text into two lines. For example, if you want to see Jeep Key name of a key item in the inventory in two lines, then hit ENTER after typing Jeep Key, to see this:

Jeep
Key

It will look this way in the main (upper) window of the strings:

Jeep\nKey

So \n means a new line.

Notes:
- Not all the text types are able to take this \n method.
- You will experience: some techniques to print a text will split the text into more lines automatically, if the text line is too long or the font is too big, so the game can't print that text line whole.
- Or you can try this: you use a FLIPEFFECT to print a string (eg. Jeep), and then you use another FLIPEFFECT to print another string (eg. Key) just below that – all you need are add the proper text position parameters to the FLIPEFFECTs.

Q: what do I need to do if I need some tabulation for my text?
A: \t means one empty character left or right.
See the previous example, Jeep Key in two lines, but this time you also want to move “Jeep” word rightwards with five characters, and “Key” word leftwards with five characters. When you type the contents in the lower window, then you need to type this:

\t\t\t\t\tJeep
Key\t\t\t\t\t

It will look this way in the main (upper) window of the strings:

\t\t\t\t\tJeep\nKey\t\t\t\t\t

Notes:
- Not all the text types are able to take this \t method.
- Be careful: the size of the tabulation will probably change if you use DefaultWindowsFont.

Q: my text is complicated (because it contains special commands to control the contents of the diary or the new type savegame panel) or too long, so it would be complicated to type it in the lower window in NG Center/Strings. Is there an alternative solution?
A: Yes, there is – if it is an [ExtraNG] string.
Mostly just type the text in a TXT file in the way as you want to see it on the screen. (But you should use \t signs if you need some tabulations.)
Save the TXT in the Script folder of Level Editor main folder. Then type the name of the TXT file, with Sign @, into a string. For example the contents of the string is only this: @MyText.txt. - If you want to print that string, then the contents of that TXT will be printed on the screen.
If you want to edit/see that TXT, then just select that string and then click on the Open button in the Strings tab to open the TXT.

Notes:
- You don't need to add this TXT to your game pack, because the contents of the TXT was saved in English.dat.
- Some TRNG Script fields contain strings with TRNG contents, so you need to type that @MyText.txt in that field, instead of typing the TXT contents, if you use this @ method.
- See more about the contents of a TXT for the diary or the new type savegame panel in the description of their Script commands (Diary, SavegamePanel) in NG Center/Reference or in their tutorial projects on Paolone’s website.

Q: I want to print some changing text on the screen. I mean, the text will look this way under certain circumstances, but it will look that whay under other circumstances. What do I need to do?
A: see the “Variable Placefolders” list in NG Center\Reference. You can see the ID’s of the variables here. For example, the ID of Local Long Alfa numeric variable is #0070. Type that #0070 in a string, then activate a FLIPEFFECT that prints that string. The actual value of the variable will be printed on the screen. For example, if the variable value is 5, then 5 will be printed, if 6, then 6 will be printed.
Or see this example: #0020 is Text1 variable. There is a string with this text: “A #0020 is just attacking Lara!”. The value of the variables could be: hawk, tiger, warrior. If the actual variable value is "tiger" when you print that string on the screen, then this is what will be printed on the screen: “A tiger is just attacking Lara!” If it is “warrior”, then this: “A warrior is just attacking Lara!”

Note:
This feature only works with the text types made for TRNG. So you can’t use it in classic, TRLE texts, like inventory or such.
You need DefaultWindowsFont everyway if you want this feature with classic texts.
AkyV is offline  
Old 29-02-16, 14:01   #5
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 2,376
Default

4. Choosing a font type

Q: how can I choose the font I want to use?
A: you can choose amongst three methods:

- Font.pc method. This is the classic, TRLE method. The font is stored in Font.pc file which is in graphics/wads subfolder of your level editor main folder. Use this method only if you want to use the classic tomb4 font.
It doesn’t mean you can’t edit this font, the most of people use Leikkuri for that.
- FONT_GRAPHICS method. This is the major font method of TRNG. The font is stored in a FONT_GRAPHICS object (get it from Paolone’s font tutorial project). Use this method usually.
You can edit the font in Tools tab of NG Center, see NG Font Editor there.
- DefaultWindowsFont method. This is a rare font method of TRNG. You can choose the font with a WindowsFont Script command. A DefaultWindowsFont Script command will make it to be the font of your game. Use this method only if you need some fancy customization for your game texts, like, move the menu entries vertically.
You can use any non-Tomb Raider related font editor to edit the font. I bet you can google several font editors, like FontStruct or FontCreator etc.
(Note: so you typed a font name in a Script command. Each text of the Script must be typed in the strings, even if that is not printed on the screen, so don’t forget to type the font name also in the strings!)

You can choose this way:

- If you want Font.pc for your game, then you can’t have a DefaultWindowsFont in your Script, AND you can’t have a FONT_GRAPHICS object in the WAD of the level, in which level you want to use Font.pc.
- If you want FONT_GRAPHICS for a level (or title), then put a FONT_GRAPHICS in that WAD, AND you can’t have a DefaultWindowsFont in your Script.
- If you want DefaultWindowsFont for your game, then place a WindowsFont and a DefaultWindowsFont command in the [Title] section of your Script. DefaultWindowsFont need to refer for this WindowsFont.

If you still don’t know which one to choose, then I’ll help more:

- Each level (or the title) can have its own font type, instead of using the same font for the whole game: FONT_GRAPHICS
- A very useful and effective font editor (NG Font Editor) because it is made for TRNG: FONT_GRAPHICS
- It is easy to choose a font type of your Windows font set, including its size, bold or Italic style: FONT_GRAPHICS, DefaultWindowsFont
- It is easy to choose underlined style or (colored) shadow for the font: DefaultWindowsFont
- There won’t be an error if you use a font which is not installed on the player’s computer*: Font.pc, FONT_GRAPHICS
- The easiest way to use the classic tomb4 font: Font.pc
- The character sizes on the screen can be changed, not using the same font size in the whole game everyway: Font.pc, FONT_GRAPHICS
- Print text over images**: DefaultWindowsFont (with other methods it works only over sprites or over the transparent part of images)
- Trying to force native charactersets: DefaultWindowsFont
- Customize the vertical space between the text lines: DefaultWindowsFont
- Move the menu entries vertically: DefaultWindowsFont
- Using ammo or weapon pictographs for the CUST_SHOW_AMMO_COUNTER feature: FONT_GRAPHICS
- You can use variable ID’s (#0070 and such) to print the actual value of the variable when it is typed in a classic, TRLE text (like inventory or such): DefaultWindowsFont
- Printing texts on fix camera screens: Font.pc, FONT_GRAPHICS
- No some flickering problem: Font.pc, FONT_GRAPHICS.

*: DefaultWindowsFont are unable to use some font types even if that is installed on the computer: non-True type fonts, non-Open type fonts or if the font doesn’t contain an alphabet.
**: if you use BKGDT_INVENTORY for menu backgrounds, then you can use any method to see menus over the background image. It doesn’t true with the main menu, in that case you need BKGDT_TITLE and DefaultWindowsFont.

Notes:

- Whatever method you choose, that won’t be applied for Parameters= PARAM_WTEXT texts, for the diary, for the TRNG savegame table and for the texts on binoculars.
- If you choose the DefaultWindowsFont method, then the command order in the Script is important:

= first you need to type the ColorRGB command(s) for the font color(s),
= then you need to type the WindowsFont command to which the ColorRGB is attached,
= then you need to type the Script command to which the WindowsFont is attached (like DefaultWindowsFont).

- DefaultWindowsFont command is also useful for some customization if you choose the DefaultWindowsFont method. But if you choose that method, then you don’t need any customization in that command, if you don’t want. In that case you need the command only to lay down that you use the DefaultWindowsFont method – which means all you will do is define the WindowsFont command, that is used for DefaultWindowsFont, all the further fields of DefaultWindowsFont can be ignored, like this:

DefaultWindowsFont= 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1

In this example you use only the first field, saying you use WindowsFont with ID1 for DefaultWindowsFont.

Q: Sometimes I will be asked to name one or more fonts of the Windows in a WindowsFont Script command, even if it is not a DefaultWindowsFont setup. Why? I mean, I have already chosen my font with Font.pc or FONT_GRAPHICS or DefaultWindowsFont.
A: the texts of Parameters= PARAM_WTEXT, the diary texts, the TRNG savegame table texts and the texts on binoculars are “outlaws”, none of the Font.pc, FONT_GRAPHICS or DefaultWindowsFont will work on them.
So you have the possibility to use their own fonts for these prints, whatever font you use for the other prints of the level:

- Each single FLIPEFFECT that prints a text with Parameters= PARAM_WTEXT on the screen
- General diary titles of a particular diary (if another font is not adjusted for a required diary page) (see: Diary Script command)
- General diary contents of a particular diary (if another font is not adjusted for a required diary page) (see: Diary Script command)
- Diary title on a required page of a particular diary (see: #TITLE_FONT# command for a diary page)
- Diary contents on a required page of a particular diary (see: #TEXT_FONT# command for a diary page)
- Title on TRNG savegame table of that level/main menu (see: SavegamePanel Script command)
- Savegame slot on TRNG savegame table of that level/main menu (see: SavegamePanel Script command)
- Statistics information on TRNG savegame table of that level/main menu (see: SavegamePanel Script command)
- Texts typed on the binoculars of that level (see: Customize= CUST_BINOCULARS Script command)
- Texts typed with the textpad (see: Parameters= PARAM_INPUT_BOX Script command)

Don’t forget: the chosen font must be there on the player’s computer! And you can’t use non-True type fonts, non-Open type fonts or if the font doesn’t contain an alphabet.
If you chose a special font then perhaps you should add it to your game pack so the players will install it in their computers.

Last edited by AkyV; 04-12-16 at 23:47.
AkyV is offline  
Old 29-02-16, 14:02   #6
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 2,376
Default

5. Customizing methods for text types

Q: how can I customize the old, TRLR/TRLE texts (menus,Legend Script command text, screen timer, TRLR end credits)?
A:
- TextFormat Script command – for font size*
- “Text. Set” FLIPEFFECT triggers – in the game: only for Legend text font size*
- Customize= CUST_SET_TEXT_COLOR Script command – for font color
- If you use DefaultWindowsFont, then in DefaultWindowsFont Script command – for customizing the space between the text lines, menu entry vertical positions
- If you use DefaultWindowsFont, then in WindowsFont Script command – for font size, underlined/bold/Italic characters, letter shadow and its color, supporting native characters**

Q: how can I customize the texts printed by FLIPEFFECTs, without Parameters commands?
A:
- TextFormat Script command – for font size* and color, position, blinks, removing spaces between the characters*
- “Text. Set” FLIPEFFECT triggers – in the game: for font size* and color, position, blinks
- If you use DefaultWindowsFont, then in DefaultWindowsFont Script command – for customizing the space between the text lines
- If you use DefaultWindowsFont, then in WindowsFont Script command – for font size, underlined/bold/Italic characters, letter shadow and its color, supporting native characters**

Q: how can I customize the texts printed by FLIPEFFECTs, with Parameters= PARAM_PRINT_TEXT commands?
A:
- Parameters= PARAM_PRINT_TEXT Script command – for font size* and color, position, timer, blinks, removing spaces between the characters*
- If you use DefaultWindowsFont, then in DefaultWindowsFont Script command – for customizing the space between the text lines
- If you use DefaultWindowsFont, then in WindowsFont Script command – for font size, underlined/bold/Italic characters, letter shadow and its color, supporting native characters

Q: how can I customize the texts printed by FLIPEFFECTs, with Parameters= PARAM_WTEXT commands?
A:
- Parameters= PARAM_WTEXT Script command – for textbox position, timer, pulsing (for color or size), growing size, texts on camera screens and under other special circumstances
- WindowsFont Script command – for font size and color, text alignment, underlined/bold/Italic characters, letter shadow and its color, vertical typing, supporting native characters**

Q: how can I customize the texts on binoculars, diary, the TRNG savegame table?
A:
- WindowsFont Script command – for font size and color, position, underlined/bold/Italic characters, letter shadow and its color, supporting native characters**

Q: how can I customize the textpad?
A:
- WindowsFont Script command – for font size and color, text alignment****, underlined/bold/Italic characters**
- Image Script command (for the textpad background) – for textbox position*****. (I don't detail it in this tutorial. See how you define of the image position usually with exact coordinates in Image commands.)
- Parameters= PARAM_RECT command – for all the parameters of the text that is added to the textpad. (I don't detail it in this tutorial. See in NG Center how this command works.) – So it is the text what the player doesn’t need to type.

Q: how can I customize the ammo texts?
A:
- Customize= CUST_SHOW_AMMO_COUNTER Script command – for font size* and color, position, blinks, removing spaces between the characters*, type (showing ammo graphics etc.)
- If you use DefaultWindowsFont, then in DefaultWindowsFont Script command – for customizing the space between the text lines
- If you use DefaultWindowsFont, then in WindowsFont Script command – for font size, underlined/bold/Italic characters, letter shadow and its color, supporting native characters**

Q: how can I customize the texts of the discussion in the cutscenes made by Demo Script commands?
A:
- “Cutscene... Text” FLIPEFFECT triggers – for font color, position
- TextFormat Script command – for font size* and color***, position***, blinks, removing spaces between the characters*
- “Text. Set” FLIPEFFECT triggers – in the game: for font size* and color***, position***, blinks
- If you use DefaultWindowsFont, then in DefaultWindowsFont Script command – for customizing the space between the text lines
- If you use DefaultWindowsFont, then in WindowsFont Script command – for font size, underlined/bold/Italic characters, letter shadow and its color, supporting native characters**

Q: how can I customize any other (so-called “unimportant”) TRNG texts? (Like texts for Diagnostics, timer printed by A52 trigger, texts used in StandBy command etc.)
A:
- TextFormat Script command – for font size* and color, position, blinks, removing spaces between the characters*
- “Text. Set” FLIPEFFECT triggers – in the game: for font size* and color, position, blinks
- If you use DefaultWindowsFont, then in DefaultWindowsFont Script command – for customizing the space between the text lines
- If you use DefaultWindowsFont, then in WindowsFont Script command – for font size, underlined/bold/Italic characters, letter shadow and its color, supporting native characters**

Note:
I experienced that some unimportant text types cannot be customized, they will always use the default position, size, color values, not accepting any special customizations either.

*: ignored if you use DefaultWindowsFont.
**: I didn’t mention some minor features of WindowsFont (Ultra Bold or very slim characters, the same character width, printing from right to left), because I didn’t really have successful tests with them.
***: using actors for a Demo cutscene, there is an “unofficial” cathegory, not only Lara, leading actor or extra actor. I called it “bonus actor”.
Bonus actors will be created this way:

- If there are both the leading and the extra actors, then A86, activating an actor, will activate “bonus” actors.
- For example, you have a leading and extra actor already when you turn an inactive (“invisible”) creature with A87 into a new leading actor. Now the extra actor will remain the same, the previous leading actor will turn into a bonus actor.

Bonus actors are not really useable, but they are useable. For example, they are not really useful for a Parameters= PARAM_ACTOR_SPEECH, because some features of this command don’t work for them. For example, you can’t form their text color and position in the “official” way (using “Cutscene... Text” triggers), only with TextFormat command or “Text. Set” FLIPEFFECT triggers (which are not useable for other actors).

****: only theoretically? I don’t think it has a real effect now. Instead, try RIB_ALIGN_CENTER in the Parameters= PARAM_INPUT_BOX command of that keypad, for a central alignment.
*****: see in NG Center how the position will be modified with RIB_INPUT_BELOW_BIG_TEXT.

Last edited by AkyV; 05-12-16 at 11:08.
AkyV is offline  
Old 29-02-16, 14:03   #7
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 2,376
Default

6. Customization with TextFormat Script command

Q: what can I customize with TextFormat commands?
A:
- old, TRLR/TRLE texts – for font size
- FLIPEFFECT without Parameters - for font size and color, position, blinks, removing spaces between the characters
- Demo cutscene discussions – for font size, blinks, removing spaces between the characters
- Demo cutscene discussions, only for bonus actors – for font color, position
- unimportant TRNG texts - for font size and color, position, blinks, removing spaces between the characters

Q: which is the validity of a TextFormat command?
A: you can have only one TextFormat command per title/level in the Script to customize the texts:

In [Title] section of Script:
- If you want the customization for the unimportant texts, FLIPEFFECTs (without Parameters) and actor discussions printed in the title.
- If you want to customize the old texts for the whole game. (It will be ignored in levels having a TextFormat command.)

In a [Level] section of Script:
If you want the customization for the unimportant texts, FLIPEFFECTs (without Parameters), actor discussions and old texts that printed in that level.

Syntax:
TextFormat=Color (CL_...), FormatFlags (FT_...) , BlinkTime, SizeCharacterMenu (SC_...)

The command effect for color, position and blinks and (except in the case of old texts if they are not a Legend command) for the size won’t always be valid in the whole title/level, it will stop if a “Text. Set” FLIPEFFECT trigger in the game will adjust another value for the required property, or if an F76 trigger will turn the values of these properties back to the default.

Q: how to customize the font color with a TextFormat command?
A: type a constant in Color field of the command:

CL_BLINKING_WHITE: pulsing between white and dark grey.
CL_BLUE: blue.
CL_DARKMETAL: dark grey.
CL_GOLD: gold.
CL_METAL: light grey.
CL_RED: red.
CL_WHITE: white. (Practically I don’t think you’ll ever use it because it is the default color.)
CL_YELLOW: yellow.

Type IGNORE if you don’t want to change anything with this field, keeping the default values.

This constant will affect all the FLIPEFFECTs (without Parameters), unimportant TRNG texts and bonus actor discussions in this title/level.
The effect of CL constants will end if you use an F66 trigger in the game to customize colors or F76 to turn all the parameters back to default.

Note:
You can draw even colored (non-white) characters in font editors.
However, those colored characters will be ugly if the game engine will also color them. That’s why, if you have colored characters made by font editors, then customize white color now with CL_WHITE.

Q: how to customize the text position with a TextFormat command?
A: type a constant in FormatFlags field of the command:

- Each line of the text will be aligned to the center of the screen:

FT_BOTTOM_CENTER: position in the bottom of the screen.
FT_CENTER_CENTER: position in the middle of the screen.
FT_TOP_CENTER: position in the top of the screen.

- Each line of the text will be aligned to the left edge of the screen:

FT_BOTTOM_LEFT: position in the bottom of the screen.
FT_TOP_LEFT: position in the top of the screen.
FT_UNDER_LEFT_BARS: position in the top of the screen, a bit below (due to the default bars on the top)

- Each line of the text will be aligned to the right edge of the screen:

FT_BOTTOM_RIGHT: position in the bottom of the screen.
FT_TOP_RIGHT: position in the top of the screen.
FT_UNDER_RIGHT_BARS: position in the top of the screen, a bit below (due to the default bars on the top)

This constant will affect all the FLIPEFFECTs (without Parameters), unimportant TRNG texts and bonus actor discussions in this title/level.
The effect of FT position constants will end if you use an F66 trigger in the game to customize positions or F76 to turn all the parameters back to default. Right away (for unimportant texts being written) or for the next prints (unimportant texts, FLIPEFFECTs without Parameters, bonus actor discussions).

Notes:
- If you edit the position, using the “wide-screen effect” (i.e. the black stripes), then the top of the screen is the bottom edge of the upper stripe, the bottom of the screen is the upper edge of the bottom stripe.
- If it is a vertically rolled text (see: F201 trigger), then position constants will always be ignored: this text always has a center alignment when rolling through the whole screen.
- Be careful, right alignments could be chaotic now. For example, here are two problems I detected when using DefaultWindowsFont:

= In the case of the right alignments now, not the right but the left side of the text is aligned to the screen. That is why BOTTOM/TOP customizations are useless, the text is "on the right side of the right edge of the screen", out of the screen.
= The left side of the text is aligned to the left side of the bars now in RIGHT_BARS case. So if the text is long or have big letters, then the game will split it into more lines (even that is ugly or not), so the text will have enough place to be printed between the left side of the bars and the right side of the screen.

But that doesn't mean you can't have similar problems with right alignments if you don't use DefaultWindowsFont.
- This field can be used for other customizations as well (see below). I experienced that the default position may change unintentionally if you use this field for customization, but not customizing the position.

Q: how to customize the font size with a TextFormat command?
A: in the case of old texts, type a constant in SizeCharacterMenu field of the command:

SC_DOUBLE_HEIGHT: characters with double height*
SC_DOUBLE_SIZE: characters with double height and width*
SC_DOUBLE_WIDTH: characters with double width*
SC_HALF_HEIGHT: characters with half height*
SC_HALF_SIZE: characters with half height and width*
SC_HALF_WIDTH: characters with half width*
SC_NORMAL: default character size. (However, if you want default sizes then naturally you don’t really need this.)

Type IGNORE if you don’t want to change anything with this field, keeping the default values.

The constant will affect all the old texts of the game (except: Legend Script command), if you print it in the [Title] section. This [Title] field will be ignored at a level if you have a TextFormat command at that level.
The constant will affect all the old texts of the level (except: Legend Script command), if you print it in a [Level] section.
The field will be ignored if you use DefaultWindowsFont.

In other cases type a constant in FormatFlags field of the command:

FT_SIZE_ATOMIC_CHAR: possibly the smallest well-seeable size
FT_SIZE_DOUBLE_CHAR: characters with double height and width*
FT_SIZE_DOUBLE_HEIGHT: characters with double height*
FT_SIZE_DOUBLE_WIDTH: characters with double width*
FT_SIZE_HALF_CHAR: characters with half height and width*
FT_SIZE_HALF_HEIGHT: characters with half height*
FT_SIZE_HALF_WIDTH: characters with half width*
FT_SIZE_MICRO_CHAR: a bit bigger than Atomic Characters

This constant will affect all the FLIPEFFECTs (without Parameters), unimportant TRNG texts, any actor discussions and Legend Script command text in this title/level. (Except: Legend doesn’t work for title.)
The effect of FT size constants will end if you use an F81 trigger in the game to customize sizes or F76 to turn all the parameters back to default. Right away (for unimportant texts or Legend texts being written) or for the next prints (unimportant texts, Legend texts, FLIPEFFECTs without Parameters, any actor discussions).
FT size constants will be ignored if you use DefaultWindowsFont.

*: of the default size of Font.pc or FONT_GRAPHICS font you use.

Note:
You can use more customizations in FormatFlags field, if you use Sign + between the constants. Eg. position and size customization: FT_BOTTOM_LEFT+FT_SIZE_HALF_HEIGHT.

Q: how to customize blinks with a TextFormat command?
A: type FT_BLINK_CHARS constant in FormatFlags field of the command, if you want the text to be blinking (i.e. switching rhythmically on/off).

This constant will affect all the FLIPEFFECTs (without Parameters), unimportant TRNG texts and any actor discussions in this title/level.

And type a number in BlinkTime field, which is the power of 2 (1, 2, 4, 8, 16, 32, 64, 128).
That will be the rhythm of the blink. (1 – the fastest, 128 – the slowest.)
Type IGNORE here if you don’t use FT_BLINK_CHARS or if you want the default rhythm.

The effect of FT blinking constant will end if you use an F75 trigger in the game to customize blinking or F76 to turn all the parameters back to default. Right away (for unimportant texts being written) or for the next prints (unimportant texts, FLIPEFFECTs without Parameters, any actor discussions).

Q: how to customize the spaces between the characters with a TextFormat command?
A: type FT_NARROW_CHARS constant in FormatFlags field of the command, if you want to remove the spaces.

This constant will affect all the FLIPEFFECTs (without Parameters), unimportant TRNG texts and any actor discussions in this title/level.
FT space-moving constant will be ignored if you use DefaultWindowsFont.

Q: TextFormat seems so complicated. Would you tell some examples?
A:
- In [Title]:
TextFormat= IGNORE, IGNORE, IGNORE, SC_DOUBLE_WIDTH

Now you want to customize all the old texts of the game (except: Legend), so type IGNORE in the first three fields, that are for other text types.

TextFormat= CL_RED, FT_BOTTOM_LEFT+FT_SIZE_HALF_HEIGHT, IGNORE, SC_DOUBLE_WIDTH

Now the customization tells this:
The unimportant texts, FLIPEFFECT texts without Parameters command and bonus actor discussions of the title will be red, printed on the bottom on the screen, aligned left, plus they and Legend texts and any actor discussions as well will have half height.
And all the old texts of the game (except: Legend) will have double width.

- In a [Level]:
TextFormat= CL_RED, FT_BOTTOM_LEFT+FT_SIZE_HALF_HEIGHT+FT_BLINK_CHARS, 64, IGNORE

Now you want to customize the unimportant texts, FLIPEFFECT texts without Parameters command, actor discussions an Legend text of that level, so type IGNORE in the fourth field, that is only for old texts.
AkyV is offline  
Old 29-02-16, 14:04   #8
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 2,376
Default

7. Customization with “Text. Set” FLIPEFFECT triggers

Q: what can I customize with “Text. Set” triggers?
A:
- Legend Script command – for font size
- FLIPEFFECT without Parameters - for font size and color, position, blinks
- Demo cutscene discussions – for font size, blinks
- Demo cutscene discussions, only for bonus actors – for font color, position
- unimportant TRNG texts - for font size and color, position, blinks

Q: which is the validity of a “Text. Set” trigger?
A: the “Text. Set” triggers are F66, F75 and F81.
The triggers will change these values:

- default text parameters used so far (i.e. if you didn’t use TextFormat and if you didn’t use other F66, F75, F81 before),
- text parameters used so far, defined in the Script by a TextFormat command (i.e. if you didn’t use other F66, F75, F81 before),
- text parameters used so far, defined in the game by previous F66, F75, F81 triggers.

When an F66, F75, F81 trigger had been activated then its value will be valid:

- for all the unimportant texts and Legend texts that are just written or will be written, and
- for all the FLIPEFFECT texts (without Parameters) or actor discussions that will be written.

The validity ends:

- if other F66, F75, F81 triggers overwrite the parameters,
- if an F76 trigger turns all the text parameters back to the default ones:

= for all the unimportant texts or Legend texts that are just written or will be written, and
= for all the FLIPEFFECT texts (without Parameters) or actor discussions that will be written,

- naturally, if the level ends.

Q: how to customize the font color with a “Text. Set” trigger?
A: choose a color in an F66 trigger:

Blinking White: pulsing between white and dark grey.
Blue: blue.
Dark Metal (Dark Gray + Light Gray): dark grey.
Gold (White + Yellow): gold.
Metal (White + Gray): light grey.
Red: red.
White: white.
Yellow: yellow.

This trigger will affect all the texts which are just written (in the case of unimportant TRNG texts) or the texts which will be written (in the case of FLIPEFFECTs without Parameters, unimportant TRNG texts and bonus actor discussions), in this title/level.
The effect of the trigger will end if you use another F66 trigger in the game to customize colors or F76 to turn all the parameters back to default.

Note:
You can draw even colored (non-white) characters in font editors.
However, those colored characters will be ugly if the game engine will also color them. That’s why, if you have colored characters made by font editors, then customize white color now.

Q: how to customize the text position with a “Text. Set” trigger?
A: choose a position in an F66 trigger:

- Each line of the text will be aligned to the center of the screen:

Bottom line, central alignment: position in the bottom of the screen.
Central line, central aligment: position in the middle of the screen.
Top line, central alignment: position in the top of the screen.

- Each line of the text will be aligned to the left edge of the screen:

Bottom line, left aligment: position in the bottom of the screen.
Top line, left aligmnet: position in the top of the screen.
Under left default bars: position in the top of the screen, a bit below (due to the default bars on the top)

- Each line of the text will be aligned to the right edge of the screen:

Bottom line, right aligment: position in the bottom of the screen.
Top line, right aligment: position in the top of the screen.
Under right default bars: position in the top of the screen, a bit below (due to the default bars on the top)

This trigger will affect all the texts which are just written (in the case of unimportant TRNG texts) or the texts which will be written (in the case of FLIPEFFECTs without Parameters, unimportant TRNG texts and bonus actor discussions), in this title/level.
The effect of the trigger will end if you use another F66 trigger in the game to customize positions or F76 to turn all the parameters back to default.

Notes:
- If you edit the position, using the “wide-screen effect” (i.e. the black stripes), then the top of the screen is the bottom edge of the upper stripe, the bottom of the screen is the upper edge of the bottom stripe.
- If it is a vertically rolled text (see: F201 trigger), then positions in the trigger will always be ignored: this text always has a center alignment when rolling through the whole screen.
- Be careful, right alignments could be chaotic now. For example, here are two problems I detected when using DefaultWindowsFont:

= In the case of the right alignments now, not the right but the left side of the text is aligned to the screen. That is why BOTTOM/TOP customizations are useless, the text is "on the right side of the right edge of the screen", out of the screen.
= The left side of the text is aligned to the left side of the bars now in RIGHT_BARS case. So if the text is long or have big letters, then the game will split it into more lines (even that is ugly or not), so the text will have enough place to be printed between the left side of the bars and the right side of the screen.

But that doesn't mean you can't have similar problems with right alignments if you don't use DefaultWindowsFont.

Q: how to customize the font size with a “Text. Set” trigger?
A: choose a size in an F81 trigger:

Atomic Characters, the littles available characters: possibly the smallest well-seeable size
Double Height: characters with double height*
Double Width: characters with double width*
Double Width and Height: characters with double height and width*
Half Height: characters with half height*
Half Width: characters with half width*
Half Width and Height: characters with half height and width*
Half Width and Height and no borders: (obsolete).
Micro Characters: a bit bigger than Atomic Characters.
Standard Size: the default size of Font.pc or FONT_GRAPHICS font you use.

This trigger will affect all the texts which are just written (in the case of unimportant TRNG texts and Legend texts) or the texts which will be written (in the case of FLIPEFFECTs without Parameters, unimportant TRNG texts, any actor discussions and Legend texts), in this title/level. (Except: Legend doesn’t work for title.)
The effect of the trigger will end if you use another F81 trigger in the game to customize sizes or F76 to turn all the parameters back to default.
The trigger will be ignored if you use DefaultWindowsFont.

*: of the default size of Font.pc or FONT_GRAPHICS font you use.

Q: how to customize blinks with a “Text. Set” trigger?
A: choose the required values in an F75 trigger:

- to start or stop blinking,
- the speed of blinking (which is unimportant for a “stop” trigger).

This trigger will affect all the texts which are just written (in the case of unimportant TRNG texts) or the texts which will be written (in the case of FLIPEFFECTs without Parameters, unimportant TRNG texts and any actor discussions), in this title/level.

The effect of the trigger will end if you use another F75 trigger in the game to customize blinking or F76 to turn all the parameters back to default.

Last edited by AkyV; 24-11-16 at 16:49.
AkyV is offline  
Old 29-02-16, 14:05   #9
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 2,376
Default

8. Customization with Customize= CUST_SET_TEXT_COLOR Script command

Q: what can I customize with Customize= CUST_SET_TEXT_COLOR commands?
A: old, TRLR/TRLE texts – for font color.

Q: which is the validity of a Customize= CUST_SET_TEXT_COLOR command?
A: you can have more Customize= CUST_SET_TEXT_COLOR commands per title/level in the Script.
Each command is only for one subtype!

In [Title] section of Script:
- If an old text subtype is shown in the levels, then the customized color will be valid for all the levels. (Except if that level has its own command.)
- If an old text subtype is shown in the title, then the customized color will be valid for the title.

In a [Level] section of Script:
The customization will be valid only for this level.

Subtypes are like “New Game menu title” or “screen timer” etc.

Syntax:
Customize=CUST_SET_TEXT_COLOR, Text Type (TT_ ...), Color for Text (CL_ ...)

Q: how to choose the required subtype for a Customize= CUST_SET_TEXT_COLOR command?
A: type a constant in Text Type field of the command:

TT_ACTION_INVENTORY_MENU_OFF: the inventory items have different commands (Use, Combine, Equip, Choose Ammo etc.). If an item has only one command then that command is always highlighted. But if an item has more than one command then you can use up/down arrows to highlight the required command. This constant is used for the non-highlighted commands. (Default: light grey).
(When you choose the ammo for shotgun, crossbow or grenade gun, those texts are also considered as commands.)
TT_ACTION_INVENTORY_MENU_ON: the highlighted inventory commands. (Default: pulsing between white and dark grey.)
TT_AMMO: the ammo amount and ammo name at the weapons in the inventory. (Default: yellow.)
TT_CAMERA_VIEW: the LoadCamera data (showing by F1). (Default: gold.)
TT_CREDITS: the names in the classic TRLR credits. (Default: white.)
(Note: there is no TT constant for the tasks that are linked to the names in the classic TRLR credits, that will always be default – gold.)
TT_EXAMINE1_BOTTOM: the bottom part of Examine2 text ([Strings] 202). (Default: white grey.)
TT_EXAMINE1_TOP: the upper part of Examine2 text ([Strings] 201). (Default: white grey.)
TT_EXAMINE3: the Examine3 text. (Default: yellow.)
TT_ITEM_NAME: the inventory item names (and the possible item amount next to the name), including the item names below at “combine with” commands. (Default: yellow.)
TT_LEGEND: the classic Legend Script command text. (Default: white.)
TT_LEVEL_NAME_OFF: if you open New Game menu from the main menu then you can use up/down arrows to highlight a level name. This constant is used for the non-highlighted level names. (Default: white).
TT_LEVEL_NAME_ON: the highlighted level names in New Game menu. (Default: pulsing between white and dark grey.)
TT_MAIN_MENU_OFF: if you see the main menu then you can use up/down arrows to highlight the required menu command. This constant is used for the non-highlighted commands. (Default: white).
TT_MAIN_MENU_ON: the highlighted main menu commands. (Default: pulsing between white and dark grey.)
TT_NEW_LEVEL_ARROWS: the arrows at the bottom of New Game menu. (Default: gold.)
TT_OPTION_DESCRIPTIONS: if you see the Options menu (or its Control Configuration sub-menu) then you can use up/down arrows to highlight the required menu command. This constant is used for the non-highlighted commands. (Default: white).
(Note: the default color of the highlighted Options/Control Configuration commands is pulsing between white and dark grey. This color depends on the color of TT_OPTION_DESCRIPTIONS, so if you change the color of the non-highlighted commands, then the color of the highlighted commands will change for something else, automatically.)
TT_OPTION_VALUES: if you see the Options menu (or its Control Configuration sub-menu) then you can use up/down arrows to highlight the required menu command. This constant is used for the menu title and the value that belongs to a non-highlighted command. (Default: gold).
(Note: the default color of the values of the highlighted Options/Control Configuration commands is pulsing between white and dark grey. This color depends on the color of TT_OPTION_VALUES, so if you change the color of the non-highlighted command values, then the color of the highlighted command values will change for something else, automatically.)
TT_PAUSED_MENU_ITEMS: if you see the Paused menu then you can use up/down arrows to highlight the required menu command. This constant is used for the non-highlighted commands. (Default: white).
(Note: the default color of the highlighted Paused commands is pulsing between white and dark grey. This color depends on the color of TT_PAUSED_MENU_ITEMS, so if you change the color of the non-highlighted commands, then the color of the highlighted commands will change for something else, automatically.)
TT_PAUSED_MENU_TITLE: the Paused menu title.
TT_SAVEGAME_DESCRIPTION_OFF: if the classic Load Game/Save Game list is open, then you can use up/down arrows to highlight the required savegame slot. This constant is used for the non-highlighted slots. (Default: white).
(Note: the constant doesn’t work for the color of the non-highlighted empty slots, that will always be default.)
TT_SAVEGAME_DESCRIPTION_ON: the highlighted savegame slots in the classic Load Game/Save Game lists. (Default: pulsing between white and dark grey.)
(Note: the constant doesn’t work for the color of the highlighted empty slots, that will always be default.)
TT_SAVEGAME_PANEL_TITLE: the classic Load Game/Save Game list titles. (Default: gold.)
TT_SCREEN_TIMER: the screen timer. (Default: white.)
TT_SELECT_LEVEL: the New Game menu title (“Select Level”). (Default: gold.)
TT_STATISTICS_DESCRIPTIONS: the information names and the level name in Statistics menu. (Default: white.)
TT_STATISTICS_VALUES: the information values and the menu title in Statistics menu. (Default: gold.)

Q: how to customize the font color with a Customize= CUST_SET_TEXT_COLOR command?
A: type a constant in Color for Text field of the command:

CL_BLINKING_WHITE: pulsing between white and dark grey.
CL_BLUE: blue.
CL_DARKMETAL: dark grey.
CL_GOLD: gold.
CL_METAL: light grey.
CL_RED: red.
CL_WHITE: white.
CL_YELLOW: yellow.

Note: you can draw even colored (non-white) characters in font editors.
However, those colored characters will be ugly if the game engine will also color them. That’s why, if you have colored characters made by font editors, then customize white color now with CL_WHITE.
AkyV is offline  
Old 29-02-16, 14:06   #10
AkyV
Moderator
 
Join Date: Dec 2011
Location: Hungary
Posts: 2,376
Default

9. Customization with DefaultWindowsFont Script command

Q: what can I customize with the DefaultWindowsFont command?
A:
- old, TRLR/TRLE texts – for customizing the space between the text lines, menu entry vertical positions
- FLIPEFFECT without Parameters - for customizing the space between the text lines
- FLIPEFFECT with Parameters= PARAM_PRINT_TEXT - for customizing the space between the text lines
- ammo text - for customizing the space between the text lines
- Demo cutscene discussions – for customizing the space between the text lines
- unimportant TRNG texts – for customizing the space between the text lines

Q: which is the validity of the DefaultWindowsFont command?
A: there can be only one DefaultWindowsFont command in the Script, only in [Title] section, to customize all the old, FLIPEFFECT (without Parameters or with Parameters= PARAM_PRINT_TEXT), ammo, actor discussion and unimportant texts of the game.

Syntax:
DefaultWindowsFont= IdWindowsFont, FLAGS (DWF_...), LineSpacing, MainMenuOffsets, NewGameTitle, LoadGameTitle, NewGameList, LoadGameList, OptionSettings, OptionCmdList, PauseScreen, StatList, InventoryItemName, ExamineText

IdWindowsFont field is not for the customization, this is where you define the WindowsFont command you use for DefaultWindowsFont.
FLAGS field is totally unused for the time being, always type IGNORE here.

Remember, if you use the DefaultWindowsFont Script command, then these things will be ignored:

- The font you chose with Font.pc or FONT_GRAPHICS.
- Size customization or the removed space between the characters, that you did with TextFormat or Customize= CUST_SHOW_AMMO_COUNTER or Parameters= PARAM_PRINT_TEXT Script commands, or “Text. Set” FLIPEFFECT triggers,

Q: how to customize the space between the text lines with the DefaultWindowsFont command?
A: type a value in LineSpacing field of the command.
100 means 100 %, so eg. if you type 120 then that means "+20% to the default space" or if you type 50 then that means "half size of the default space" etc.
Type IGNORE if you don't want to change the default space.

Notes:
- If a text has more lines because you used \n in the strings, that doesn't matter now, the spaces between them won't change. This feature is really useful mostly in the menus where the menu entries are under each other, but it also has the effect for texts printed with different actions. Eg. if you have two FLIPEFFECTs to type texts, and you want to customize the space between the two texts.
- The vertical space between the text and the top ledge of the screen also matters now. So either the text is one-lined or multi-lined, its vertical position will change if you modify the vertical space. But probably not with all the texts. However, on the other hand it seems this feature will also affect the vertical position of some bars.

Q: how to customize the menu entry vertical positions with the DefaultWindowsFont command?
A:
- Type a negative number and the text will be moved upwards with that amount of pixels.
- Type a positive number and the text will be moved downwards with that amount of pixels.
- Type IGNORE if you don't want to move that menu entry vertically.

MainMenuOffsets field: for main menu entries
NewGameTitle field: for Select Level title
LoadGameTitle field: for the classic Load Game and Save Game list titles
NewGameList: for the level list in Select Level
LoadGameList: for savegame slots in the classic Load Game/Save Game list
OptionSettings: for Options menu entries (except menu title and the bars)
OptionCmdList: for Control Configuration menu entries
PauseScreen: for Pause menu entries (including menu title)
StatList: for Statistics menu entries (except menu title)
InventoryItemName: for the item name just chosen in the inventory
ExamineText: for the text of Examine item just examined in the inventory

Notes:
- The pixel values are counted for 1024×768 resolution.
- I don't recommend moving an entry with too many pixels, or else the operation may fail.
- If you want to move the menu entries horizontally then see what I wrote about tabulation above.
AkyV is offline  
Closed Thread

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 03:09.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.