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

Closed Thread
Thread Tools
Old 06-01-14, 20:01   #1
Join Date: Dec 2011
Location: Hungary
Posts: 2,376
Default NGLE Encyclopedia

The encyclopedia is made for TRNG originally, and you can find it here:

The NGLE Encyclopedia


This addendum is based on the installation of the version of TRNG, that contains the 1.04.0192 version of NG Center.

Be careful, there are many beta versions on TRF site. What you need now is the final TRNG you can download from Paolone’s website!

The addendum contains only the new TRNG features because they are not mentioned in the original encyclopedia.

Only the chapters are mentioned that have some new information, compared to the original encyclopedia.

If the update contains a/more new constant(s) for a constant set (eg. new constants for IF constant set of Image Script command) but that set was not described in the original encyclopedia, then the addendum won’t mention that/those new constant(s) either.

6. Scripting on NG Center Script tab

Script directives:


The #INCLUDE directive is useful if you don’t want to edit a part of your Script amongst the other part of the Script. – For example you create a serious setup with many entries, which setup you’d like to separate from the other parts of the Script.
In this case save a new, empty TXT file in TRLE/Script folder. Name it as you want – eg it is Setup_of_XY.txt now.
Then type an #INCLUDE directive in the Script of your level, at the point where you wanted to type that serious setup. – The directive contains the name of that TXT file, in quotation-marks:

#INCLUDE “Setup_of_XY.txt”

Or use CTRL+F5 that will help you to type that entry and create that (empty) TXT. (Attention! If that TXT exists when you use CTRL+F5 then the contents of that origi-nal TXT will be cleared.)

Now put the cursor on that directive, and hit F5 – the empty TXT opens in the Script window, replacing the “real” Script.
Type that serious setup now – the way as you wanted to type that in the “real” Script, but, instead, type it in the TXT now.
Hitting F6 will leave this “sub” Script and reload the “real” Script in the Script window.

Clicking Save, Build or Reload button (either the “real” or a “sub” Script is just seen in the Script window), they will work as usual, affecting both the “real” and the “sub” Scripts.

Your “real” Script can have any “sub” Scripts. But you can’t attach a subscript to an-other subscript.


Usually F1 doesn’t work in the subscripts to give you the next free ID for a command. To solve the problem, use one or more #FIRST_ID directives in the top of the subscripts. – For example one of your subscripts contains these two #FIRST_ID directives:

#FIRST_ID TriggerGroup=15
#FIRST_ID GlobalTrigger=22

The first #FIRST_ID means you can use F1 in that subscript to give next free ID’s for TriggerGroup commands, and the first free ID will be 15.
The second #FIRST_ID means you can use F1 in that subscript to give next free ID’s for GlobalTrigger commands, and the first free ID will be 22.


#DEFINE directive is useful if you’d like to substitute some numeric/textual data in the Script.
Let’s see for example this part of the Script:

GlobalTrigger= 10, -1, GT_CONDITION_GROUP, -1, 25, 26, -1
GlobalTrigger= 11, -1, GT_LARA_HOLDS_ITEM, HOLD_SHOTGUN, -1, 27,-1
TriggerGroup= 25, $8000, 1, $23
TriggerGroup= 26, $2000, 355, $1400
TriggerGroup= 27, $2000, 355, $A04

What if you need another GlobalTrigger#10 and another TriggerGroup#25 in another setup of your level? Then you need to renumber GlobalTrigger#10, 11 and Trigger-Group#25, 26, 27 in this part. But if you make a mistake, then a wrong new number will make this part fail (eg. if you change that 27 in the GlobalTrigger into 28 but you forget to change 27 in the TriggerGroup itself).
A #DEFINE directive can help you to prevent that – for example this way:

GlobalTrigger= GT, -1, GT_CONDITION_GROUP, -1, TG, TG+1, -1
GlobalTrigger= GT+1, -1, GT_LARA_HOLDS_ITEM, HOLD_SHOTGUN, -1, TG+2, -1
TriggerGroup= TG, $8000, 1, $23
TriggerGroup= TG+1, $2000, 355, $1400
TriggerGroup= TG+2, $2000, 355, $A04

So the first #DEFINE says TG constant will be 25. The second #DEFINE says GT constant will be 10.
That’s why TG+1=26, TG+2=27, GT+1=11.
So, if you need 10 and 25 ID’s in another setup, then change the values in the #DE-FINE directives: TG into 26 and GT into 11.
That’s why the other values will change automatically: TG+1=27, TG+2=28, GT+1=12.

Use any constants in #DEFINE directives. TG sounds good for “TriggerGroup” and GT sounds good for “GlobalTrigger”, but that’s not a rule, I could use eg. A instead of TG and B instead of GT etc.

An example for a textual substitution:

There are a lot of WindowsFont commands. Some of them with WFF_LEFT_ALIGN+WFF_FORCE_FIXED_PITCH attribute, the other ones with WFF_BOLD+WFF_CENTER_ALIGN attribute. – Two #DEFINE directives could be useful now:


Type FONT1 instead of WFF_LEFT_ALIGN+WFF_FORCE_FIXED_PITCH in the commands and FONT2 instead of WFF_BOLD+WFF_CENTER_ALIGN in the com-mands, to substitute those long parts with those short constants.
So WindowsFont commands won’t be so long, but if you look at those #DEFINE di-rectives, then you will know easily what FONT1 or FONT2 means in the commands.

Notes about #DEFINE:

1. These directives work even wrapped in each other. – For example:


So GT will be 12, that’s why if TG is GT+15, that means TG is 12+15=27 now.
But be careful! You should type the directives now in this logical order, so you can’t type the second directive above the first one.

2. You can combine #FIRST_ID and #DEFINE. – For example:

#FIRST_ID TriggerGroup=X+10

So X is 30, that’s why if you hit F1 at the first new TriggerGroup of a subscript, then X+10=30+10=40 will be given as the next free ID.

8. Technical functions in Room Editor

A panel of buttons:

If you have a ButtonsWindows.txt file in TRLE main folder then a panel will pop up when you start the Room Editor. This panel contains a lot of buttons or other functions of the Room Editor. (If you close the panel on Tray or exit it then hit CTRL+0 – not 0 of the keypad - to reopen it.)
The purpose of this panel is you can customize its contents, placing the buttons and other functions you want on it. You need to create/edit that ButtonsWindows.txt to define the contents. – See more about it in help_ButtonsWindow.txt file in NG Center main folder.

10. Shortcuts for some main programs

When you click on Tomb4.exe, a message will come up to hit CTRL to open Tomb4 setup.
If you hit CTRL then the setup will open, but aborting the procedure of launching the game.

11. Project files and level conversion

Backup procedures in Room Editor:

Check “On (Exit and Play) save project with new filename” in Settings window, so each time when you click on Play/Exit&Play button, a backup project file will be automatically generated in the folder of the project file.

12. Exploring the map in Room Editor

Customizing old functions:

If you don’t want to adjust new spin/zoom values, but their low speed is annoying when Draw Doors is on, then check this option in NGLE Settings window: Hide objects on Draw Doors view. - If it is checked then you won’t see objects in Editor Window. (But you can select them in Plan View Grid.)

13. Triggers

The new contents of Set Trigger Type (STT) panel:

Export AnimCommand button has been enhanced. Now you can type -1 as “frame” so the exported trigger will be executed at each frame of the animation. (I.e. it works like an “if any object of X object slot is performing Y animation” CONDITION trigger for that executable trigger.)

The TriggerGroups:

- If the TriggerGroup ID is too large, so F118 can’t handle it then choose F371 (in single mode), F372 (in multiple mode) or F373 (in continuous mode) instead of F118.
- TGROUP_SINGLE_SHOT_RESUMED flag will work as if the trigger had a TGROUP_SINGLE_SHOT flag but then you activated an F345 to make the trigger activable again. – It is useful if your trigger is more squares sized, and you want Lara to activate that only on one (any) of the squares (because usually each square of the trigger zone is able to do the activation), but you want her to activate the trigger again, on one (any) of the squares, if she comes back later to the trigger zone. (HEAVY activations don’t work with this flag in each HEAVY cases!)

16. Room textures

TGA files:

- The TGA file of the project will open in the default TGA-editor program of your com-puter, if you hit CTRL+9. (Not 9 of the keypad.)
- ALT+T will refresh the TGA file of the project, re-loading it.

18. Light, fog, sink and special visual effects

Defining colors for triggers or Script commands:

ColorRGB is also useful for Parameters= PARAM_LIGHNTING, Parameters= PA-RAM_RECT or Customize= CUST_BACKGROUND Script commands now.

Lightning and thunder:

F359 was useless before but now you can use it to simulate lightning. It has nothing to do with the classic lightning/thunder effect of the sky, i.e. it is an electric arc that will be drawn between two parts of the level. – The point is you will have much more possibilities, as opposed to you’d use other electric arc setups such as Lightning Conductor, Flame_Emitter3, the pushblock setup of The Lost Library etc.
You need to define the lightning for a given F359 in a Parameters= PARAM_LIGHNTING Script command. (See LGTN constants for the lightning special attributes, OTYPE constants to define the lightning source/target as a Move-able/Static/nullmesh object.)
F362 is able to stop the endless lightning.

19. Texts, images, sprites and bars

Texts on the screen:

Now WindowsFont Script command can be used not only with the diary or new save-game panel any more:

- Type a WindowsFont command and a DefaultWindowsFont Script command in the Options block. Type the ID of this WindowsFont in that DefaultWindowsFont to con-nect them to each other. Now all the texts of the game (texts in menus, texts printed with FLIPEFFECTs, texts used by other TRNG features, Legend Script command etc.) will use the values of that WindowsFont, overwriting the values of any other tools (FONT_GRAPHICS object, TextFormat command). Except: the text color (ex-cluding the shadow color) and position are not affected by this WindowsFont.
It is useful if we want to use some old or new features of WindowsFont for those texts, which you cannot achieve with other tools. For example: underline a menu command or support native charactersets for a text printed by a TextFormat-formatted FLIPEFFECT etc.
Moreover DefaultWindowsFont has some special effects, if you use that command:

= You can decrease/increase the line space between menu entries.
= You can move upwards/downwards menu entries on the screen.
= DWF constants mentioned in NG Center/DefaultWindowsFont don’t exist now, they will perform effects only in the future.

- Parameters= PARAM_WTEXT Script command (not affected by DefaultWindows-Font) is a new method to print Independent Texts on the screen, using a given Win-dowsFont command. (Call this “C” type Independent Texts.)
To type Independent Texts, usually this was the rule so far: we use the simple “A” type or, if we want a special position for the text, then we use “B” type. But now here is this “C” type which we use if we want more specialties (eg. flying texts): the WTF constants will define them.
F363 will place “C” type Independent Texts on the screen. If they are placed there “forever”, then F364 will remove them.
- Customize= CUST_BINOCULARS (see below) uses a WindowsFont (not affected by DefaultWindowsFont) to print different values on the binoculars.


- Always type the WindowsFont command above (before) DefaultWindowsFont, Customize, Parameters in the Script!
- If some native character isn’t recognized even if you use a DefaultWindowsFont to force a WindowsFont command, then try this: print them with a technique that uses WindowsFont without forcing: diary, PARAM_WTEXT, CUST_BINOCULARS, choos-ing Default (ID1) characterset for WindowsFont. Or try some WFF constants for Uni-code or UTF8 type in WindowsFont.

Images on the screen:


- lets you change in-game images of the binoculars or the lasersight,
- places a static image behind the menus or at least clearing the background behind them (removing the “annoying strips”),
- uses an image file instead of LoadCamera images,
- covers the title flyby sequence with a static image. (If this image is not transparent at the proper places, then you won’t see the menu commands or the logo there. The solution: use DefaultWindowsFont to show the menu commands over the non-transparent image or skip the original logo-making procedure, making the logo as the part of the image file.)

See BKGDT constants for image types. See BKGDF constants for image attributes.
Don’t forget to place the attached Image command before (above) Customize= CUST_BACKGROUND in the Script!

Sprites on the screen:

F402 will suspend the animation of the given sprites. (Leaving the sprites on the screen.)
F403 will continue the animation of the suspended sprites.

Bars or the screen:

Now CUST_BAR constant is also useful for some customization of damage/cold bars.

20. Cameras

New camera effects:

F369 will simulate the black stripes of the flyby cameras (without cameras), for a given time.

21. Sound and audio

New audio features:

A new tool to convert WAV and MP3 files: see Audio Converter in NG Center/Tools3.

22. Special properties

F404 is useful if you’d like to export a secret trigger.

23. Moveable and Static objects

Common properties:

Moving/rotating the objects:

Additional information:
- If you move a Moveable with these methods, but without activating the object, then the object won’t be able to activate HEAVY triggers (though NEF_EASY_HEAVY_ENABLING is used) – unless you activate an A94 for the object. (Activate an A95 to make the object ignore HEAVY triggers again.)

Only for Moveable objects:

New effects on objects:

c, Effects about position:

- A93: use it if your object without AI (eg. an ANIMATING moving forwards) has left the actual room, so you have to refresh the new room for the object, or else you will have problems with the object in the new room.

d, Special effects:

- F398: forcing some special AI on Von Croy.

Customization for objects in Customize Script commands:

Customize= CUST_BINOCULARS will let you attach different tools (compass etc.) to the binoculars. (See BINF constants for the main properties, see BINT constants to define the tool display type, see Parameters= PARAM_RECT Script commands to define the position for the tools.)
Use BINF_SUPER_ZOOM flag or activate F365 so the binoculars will be to achieve even huge zoom.

Customize= CUST_FIX_BUGS is a general command to fix different bugs, including object bugs. (See BUGF constants for the bug types.)

Customize= CUST_SLOT_FLAGS will let you do different customizations for different slots. For example (and this is the only one feature so far) you can make possible for pushable blocks to be pushed/pulled over pickup items or flames. (See FFS constants for the customizations.)

New values to type in the OCB window:

MOTOR_BOAT/RUBBER_BOAT: 16 – no fuel, 32 – automatic fuel management, 64 – anchored, 128 – fuel shown in a bar.
(Local Long Delta variable can contain the actual fuel value in the case of the auto-matic management. You can use a usual variable trigger or the new F366 to adjust a fuel value in that variable.)


- F397: changing the single meshes of Von Croy.
- A92: it is useful if you want to show a mesh in “another status”, not swapping the mesh. (Eg. Von Croy’s hand with or without the knife.)


- A89 (works for Lara as well): use it and then the forced animation will start from a given frame.
- A90 will force the given State ID. (It is different than A39.)
- AnimationSlot Script command helps you to define the circumstances of a custom animation of the given Moveable object. – It works the similar way as the Animation Script command of Lara.
(The ASF constants NG Center mentions at AnimationSlot are unavailable for the time being.)


F370 will create ripples on the water surface when the enemy is moving in water.

24. Timing techniques

If the Organizer ID is too large, so F290 can’t handle it then choose F376 (restart with the first command), F377 (restart immediately with the next command) or F378 (re-start after the given time with the next command) instead of F290.

25. Conditions

CONDITION triggers:

1. If the value of the “Trigger” window is OBJECT:

New triggers:

- C82: the given mesh of the given Moveable object touches Lara. (The precision of the collision detection is depends on the mesh shape this time.)
- C83: the given mesh of Lara touches the given Moveable object. (The precision of the collision detection is depends on the mesh shape this time.)
- C84: the given Moveable object can see Lara in a given angle.
- C92: to use PAD condition for Lara or other Moveable objects. (Use it only GlobalTriggers.)

2. If the value of the “Trigger” window is PARAMETER:

g, other conditions:

Old trigger:

- C20 is fixed, now higher/lower shows the proper value.

New triggers:

- C85: the given sound is just being played.
- C86, C87: the demo (cutscene) reaches a given frame.
- C88-C91: the position of the leading actor in the demo (cutscene), compared to floor/ceiling.


If the GlobalTrigger ID is too large, so F109 can’t handle it then choose F374 (to en-able) or F375 (to disable) instead of F109.

26. Lara

General customization for Lara in Customize Script commands:

Customize= CUST_DISABLE_PUSH_AWAY_ANIMATION will disable Lara’s 125, 126, 127, 128 animations to push him away, so she will “slide away a bit”, when she is being pushed.

28. Cutscenes and FMV’s


- F367 will create a fully black screen. After a given time, it will be separated into two thick horizontal black stripes in the middle of the screen. The stripes will start decreasing towards the screen horizontal edges – as if a curtain were being “drawn away”.
If the time is “infinite” then use F368 “to draw the curtain”.
- F405 is useful if you want to export a trigger to start an FMV.

You can use a Demo Script command to play a cutscene in the level or if you want a good old “demo in title” (see eg. TR2) type demo. (See DEMF constants for more features.) – See Paolone’s related demo project about making demos.
If this demo is technically a cutscene (because eg. you have speaking people in it) then a FO_DEMO_ORGANIZER type Organizer will control the events of the cutscene.
Also use Parameters= PARAM_ACTOR_SPEECH command to control the speaking actors of the cutscene. (See SPCF, SPC and DEMO constants for more details.) – A91 trigger will start the given Parameters= PARAM_ACTOR_SPEECH on the given actor.
The demo can be started in several ways: see Demo Script command or place an F379 trigger.

Other triggers that are useful to make these cutscenes:

- F380: interrupting the demo.
- A86, A87: you can define the actors of the cutscene here. (Many objects can be presented in these cutscenes but only the actors can have special properties such as a moving mouth. You have three actors in a cutscene: Lara and two others Moveable object. Lara doesn’t need to be controlled by these ACTION triggers.)
- A88: adding/removing the actor’s collision to floor/walls.
- Cameras:

= F381-F383: showing Lara or the other actors from a given distance/given angle.
= F384: aborting cutscene cameras.
= F385-F390: moving/zooming/rotating with F381-F383 cameras.
= F391: stopping following actor for a given time. F392: continuing following.
= F395: showing Lara from the actor’s POV.
= F396: showing the actor from Lara’s POV.
= F399/F400/F401: forming the text color/position, printed by SPC_TEXT constant, customized for Lara/leading actor/extra actor. (Other parameters can be customized with DefaultWindowsFont.)

- F394: removing the main cutscene adjustments at the end of the cutscene.

Parameters= PARAM_SWAP_ANIMATIONS are useful mostly in demo cutscenes but even in other situations if you want Lara or another actor do something in a different way then usual. For example, “if Lara is falling then she usually is doing that in that way but in the present cutscene she will do it in this way”.
That’s why you will define the animations for the new situation in a Parameters= PA-RAM_SWAP_ANIMATIONS, and then you will use an F393 to swap those animations. – If you want to swap them back then use the same F393 or another F393, for the same Parameters= PARAM_SWAP_ANIMATIONS command.

30. Technical tools

Technical settings for the game:

SET_SOFT_FULL_SCREEN constant of Settings Script command has been re-named into SET_FORCE_SOFT_FULL_SCREEN, because the “force” word is important, i.e. that constant will force its effect everyway. – Even if you used the new part of the Tomb4 setup (“Emergency Settings”) to adjust the proper value for that effect.

31. Variables

The triggers used for variables:

Special triggers:

F297 is not buggy any more. It will show the given room tomb index in Current Value.

32. Memory Zones

Triggers for Memory Zones:

Triggers to force values between Memory Zones and other numbers:

- Triggers to force memory zone field values into variables:

= F339 has been fixed.

The list of memory zone fields:

Savegame Memory Zone:

Old fields:

- “Lara. Hands. Weapon in the hand” field: it is renamed into "WeaponAnim. Index of fake item with animations for current weapon (only big weapons)". (See more about in GT_CREATED_NEW_ITEM in NG Center/Reference.)
- "Lara. Rope. Speed sliding on the rope" renamed into "Lara. Horizontal position on the rope".
- "Lara. Test. Lara is placing the weapon on the back (1 = yes)" renamed into "Lara. Test. Lara is aiming at the enemy automatically (1 = yes)".
- "Lara. Test. Throw out item from the Hands (1 = lara is throwing out item)" renamed into "Lara. Torch status in Lara's hand".
- "System. Disable special keys (15 disable inventory pause f5)” renamed into "Lara. Time in death".
- "System. Fog Bulb Color" renamed into "System. Fog Color".
- "System. Unknown (Item chosen from Inventory?" renamed into "System. Inventory closed at item".

New fields:

- “TRNG Index. Index of last item to have enabled a trigger”: the tomb index of the item will be stored here that just activates a HEAVY trigger.
- “WeaponAnim. Current animation of torch-flare-weapon animation”: you can identify here the actual animation of the actual ANIM object slot.
- “WeaponAnim. Current animation of weapon animation”: you can identify here the actual animation of the actual weapon ANIM object slot.
- “WeaponAnim. Current frame of torch-flare-weapon animation”: you can identify here the actual animation frame of the actual ANIM object slot.
- “WeaponAnim. Current frame of weapon animation”: you can identify here the ac-tual animation frame of the actual weapon ANIM object slot.

Item Memory Zone:

Old fields:

- "Custom Flags (Different flags in according with object type)" renamed into "Object status. Five buttons + One Shot button".
- "Facing Rotation (Only for Lara)" renamed into “Facing Rotation".
- "Object buttons. Five buttons + invisible button" renamed into "Object buttons. Five buttons + Clear Body button (only for read)".
- "Unknown (Light_A)" renamed into "Light on object. Red ambience".
- "Unknown (Light_B)" renamed into "Light on object. Green ambience".
- "Unknown (Light_C)" renamed into "Light on object. Blue ambience".
- "Unknown (Light_D)" renamed into "Light on object. RedGreenBlue ambience".
- "Unknown (Light_E)" renamed into "Light on object. Red ambience difference".
- "Unknown (Light_F)" renamed into "Light on object. Green ambience difference".
- "Unknown (Light_G)" renamed into "Light on object. Blue ambience difference".
- "Unknown (Light_H)" renamed into "Light on object. Ambience changing degrees".
- "Unknown (Pheraps accelleration on falling)" renamed into "State ID (at AI objects)".
- "Unknown Countdown (Some counter, not yet discovered)" renamed into "Object timer".

Code Memory Zone:

Old field:

- "Earthquake vertical movement (negative values)" renamed into "Earthquake inten-sity".

New field:

- “Index of current vehicle or -1 if lara's not using a vehicle” field: Lara’s status about being in a vehicle.

Slot Memory Zone:

Old fields:

- "Explosion Mask. (Each bit a type of weapon able to do explode it" renamed into "Shatterable meshes".
- "Unknown1 (Pheraps distance to enable the MIP version)" renamed into "Distance to enable the MIP version".
- "Unknown2 (Usually it has value 50)" renamed into "Distance to detect Lara".

Inventory Memory Zone:

Old field:

- "View Flags. (2 = turn endless, $4000 = usable?)” renamed into "View Flags.(2 = turn endless)".

Last edited by Titak; 09-09-15 at 16:33. Reason: Link to ngleencyclopedia.zip updated
AkyV is offline  
Closed Thread


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

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