Tomb Raider Forums  

Go Back   Tomb Raider Forums > Tomb Raider Level Editor and Modding > Tomb Raider Level Editor > Tutorials and Resources

Closed Thread
 
Thread Tools
Old 26-09-16, 15:37   #1
AkyV
Moderator
 
Joined: Dec 2011
Posts: 4,881
Default TRNG – For beginners: introducing the main level building tasks, to motivate you

Made using TRNG 1.2.2.7+

If you have already used TRLE, and you are only the beginner of TRNG, not TRLE, then perhaps you can skip the parts in the tutorial that are about the TRLE features implanted into TRNG. (TRLE features won’t be lost in TRNG, all the useable TRLE features are implanted into TRNG. TRNG is a developed version of TRLE.)
If you have never used TRLE and TRNG, and you install them now or you only plan that (so if you build Playable Tutorial Level of TRLE manual, using TRNG, which is possible, because the level editors of TRLE and TRNG are almost the same), then all the parts of the tutorial is recommended being read.

Whichever your situation is, don’t forget: TRNG never works without TRLE. First you need to install TRLE, before you install TRNG in TRLE main folder. The TRLE parts that aren’t used by TRNG are removed when you install TRNG.

1. The difficulty of level building

When you just start building your level, then this is all what you have:


Illustration#1

But the final solution should look this way, more or less:


Illustration#2

As you can see, you need a huge effort clearly to build a level. Sure, a useable level can be made even during one or two weeks – but then perhaps you don’t find anybody to play an undemanding work like that.
So, you should be prepared: if you would like to build a level which is useable and demanding, having several players, then you need to spend more weeks or months at least with that – and don’t forget: several games have more than one level.

So, before you start building levels, you should ask yourself:
  • Will I have spare time enough?
  • Will I be motivated enough? Will I be interested in this after months or even years?
  • Do I have a really nice idea, as a base of the adventures?
  • Am I creative enough to find out or plan even the tiniest details?
  • Is it clear what programs I need? Can I get them?
  • Will I know the programs so much which is enough to do a real work with them? Will I have a manual to look through? Will there be people to be asked?
I don’t recommend starting level building seriously, till you say “no” for any of the questions.

But you should not give up even if you have started building already, but things went wrong in the meantime. Because, for example, if you get bored with level building, then you don’t need to throw the project away everyway. Probably you need to relax one or more weeks, doing something completely different, and then continue it with fresh energy.

2. What is a “level”, after all?

Look around in the room, where you just are. That has four walls, one floor, one ceiling. It looks like as if you were in a regular, brick-shaped box, right? And what if you step out through the room door into the hallway? Apparently you will also see walls, floor, ceiling there.
Tomb Raider levels work in the same way. I mean, each site is a box-shaped room, the whole game plays inside them, and connecting the sites to each other (i.e. connecting the rooms to each other with holes which are named as “doors”) composes the level.

So your tasks are “only” these, after all:
  • Create the rooms, connect them to each other.
  • Form the rooms so they will look the ways you want.
  • Find out how the level will be controlled. For example, to get from one room to the other one, the gate between them must be open.
Each of the “raw” rooms looks like as you can see in Illustration#1: they are huge, aren’t formed at all, they are empty.

Let’s see a very-very easy example, where only three little rooms compose the level:

Lara is in a room with wooden floor when the level starts. She starts walking in a little hallway. A gate opens just in front of her, so she can get outside.

Now we have these three rooms:

Room with wooden floor:
Floor: wooden lath
Walls: ornamental painting
Ceiling: fresco

Hallway:
Floor: little stones
Walls: hieroglyphics carved on stone
Ceiling: flat stone plates

Outdoor area:
Floor: grass, tiny hills
Walls: the horizon and the edges of dirt hills, plus (around the connection of the hallway) the hieroglyphics carved on stone which means the mouth of the hallway
Ceiling: sky

The topview of the rooms (from left to right: room, hallway, outdoor):


Illustration#3

And their sideview:


Illustration#4

On the left side we can see the room view in the level editor, on the right side we can see the room view in the game:

1. Room with wooden floor (that strange figure means the position where Lara will start the level, the white hole is where the next room connects to this room):


Illustration#5/a and Illustration#5/b

2. Hallway (on left and right the two white ends of the room marks the lack of the walls, because those are where the room connects to the other rooms), the game view already has the gate opened:


Illustration#6/a and Illustration#6/b

3. Outdoor area – with Lara turned to the mouth of the hallway (yes, you see well, the horizon of the belt of mountains and the sky is never seeable in the level editor):


Illustration#7/a and Illustration#7/b

To clearly see the difficulty of the task, let’s see how should look the topview of a totally finished, useable and demanding level (now ignore the color codes):


Illustration#8

3. Forming tasks on the whole room

Creating a room is only a mouse click, after all. Usually you get a huge and featurless room now, like you can see in Illustration#1.

When your room is created, you can execute forming tasks on it, even right away, that has effects on the whole room, not on room parts.

Resizing rooms:

The huge room in Illustration#1 is a room that has the biggest groundplace which is possible. So resizing it means decreasing the groundplace.
On the other hand, the room height (which is also huge) can be either smaller or – theoretically even to extreme sizes – bigger as well.

In the illustrations below you can see (on the left) we selected a part of a huge room with red. On the right side you can see the solution after the forming: the area selected has become the new groundplace of the room, and the huge height has also been decreased:


Illustration#9/a and Illustration#9/b

Room coordinates:

We can move the rooms along x-y-z axes either horizontally or verically.

In the illustrations below you can see the same (red) room in two different positions in the level:


Illustration#10/a and Illustration#10/b

The ambience light of the room:

Adjusting lights means adjusting the primary colors. Each primary color has a scale with 256 grades, the ratio you get here between red, green and blue primary colors will define the color of the light.

Now you can see the room of Illustration#5/a, with two different ambience light this time:


Illustration#11/a and Illustration#11/b

(I said “ambience” light, because we can modify the room light color with concentrated lights – see below.)

Room status:

Mostly only a mouse click to turn a status on or off in a room: to place water in a room, so Lara can swim there, or to see the sun disk there, or to snow there etc.

The room of Illustration#7/b has a rain status this time, so it heavily rains there (that is why the ambience light is darker):


Illustration#12

Connection between rooms:

Like you can see even in Illustration#3, rooms placed tightly to each other can be connected to each other. Now the room part that touches the part of another room will be vanished, both of the rooms will be “holed” there, and a door (like you can see for example in Illustration#5/a as a white hole) will be created.

Further forming tasks on the whole room:

Now I’d like to introduce only one task, as an example – let’s see the room below rotated in two different directions (for which we used the rotating tool, apparently):


Illustration#13/a and Illustration#13/b

4. Forming the room surface

Let’s see a few examples for forming room surfaces:

a, a raised block in the middle on the room (which Lara can climb on, to get the medipack there), and the ledge around the room, and the dome ceiling:


Illustration#14

b, the humpy floor of Illustration#7/a (I removed the grass so you can see the humps better):


Illustration#15

Notice in the illustration above that some squares of the floor grid are “broken” into two triangles, which is also a nice tool to make some special surface forming.


Illustration#16

As you can see in Illustration#16, some of those triangles can be part of the “white holes”, i.e. the doors between the rooms. The red color means you can move through the triangle – so, as you can see, in the corner of the U-shaped door there is a nicer solution this time instead of the corner of 90 degrees.

c, steps:


Illustration#17

d, slope:


Illustration#18

e, a ledge between rooms:


Illustration#19

f, arched room:


Illustration#20

g, cone shaped room:


Illustration#21

5. Areas with special properties

In the illustrations above the floor and the ceiling are usually blue, the walls are usually green. If you can see some other color there, that means the area has some special property there.

Let’s see some examples:
In the illustration below the green floor (under the pushable “sitting statue”) means there is a “ladder” there, i.e. you can climb the wall there. Over the area in apricot color Lara can grab the handholds of the ceiling, to swing along like a monkey. No enemies are allowed into the grey area, only Lara is.
The green walls in the middle of the room are also special. I mean, you need to create them manually, because usually walls are only around the rooms.


Illustration#22

You need only a mouse click to set those properties on areas you selected.

6. Texture tiles

Naturally you will not see blue, green etc. plane figures in the game, whatever you can see eg. in Illustration#22. I mean, texture tiles will show up on the plane figures. It is you who choose a tile and then place it on a figure.

Now you can see the room of Illustration#22 with texture tiles placed:


Illustration#23

Each level has its own tile set. You can choose tiles from the tile set of your level (choosing not a whole tile everyway, but perhaps only a part).
A tile set, for example – the red-green square is the cursor to choose a tile:


Illustration#24

Theoretically you can use even texture sets that are already made (see eg. the texture files in maps folder of TRLE), but first of all you need to compose your own set – because naturally you need the proper tiles for your “Egyptian ruins” or “space base” level.

Wall sections:

In some of the illustrations above you can see that some surface elements are separated into parts. For example, in Illustration#22 the wall panels are separated into sections. (That is why they have different green colors.) This is needed for the proper look of the room, which is well explained eg. in Illustration#7/a and #15: the lower part of the walls will have “dirt” texture, the upper part will have “invisible” texture (that is why you can see the white background behind them), which is needed for the horizon.
It is you who need to make sections like that.

Texturing doors:


Illustration#25

In the illustration above the rooms connected are shown at the same time this time, so you can’t see white holes in the doors. You can see in a few positions that a grating stands in Lara’s way between the rooms. No, this time it is not a grated gate (that you can see in Illustration#6/a), but a texture tile placed.
But how can we texture a door? I mean, that is only a hole, there are no green, blue etc. plane figures on it to be textured.
Well, we can solve the problem with placing a “fake” figure on the holes like that, so now we can place texture tiles on them.

Animated textures:

On some green, blue etc. plane figures the tile is not motionless sometimes, but “moving”, animated, because we need that for the proper effect.

Let’s see an example:
I mentioned in Chapter#3 how to make water. But the connection between the open pool and the “airy” room above it must be nice, so the water surface must have “wave” texture tiles (see Illustration#26), and – since the waves are moving, of course – the wave tiles must be animated.


Illustration#26

To make texture tiles animated, you need to connect some tiles (see the green frame) in the panel of animated ranges:


Illustration#27

As you can see, texture tiles connected are all “wave” tiles, but each tile is a bit different, comparing to other wave tiles. You can place any of them on any part of the water surface, because the game will swap them for each other fast, so it looks as if the waves were really moving.

Texture sounds:

Lara’s usual step sounds need to be changed under some circumstances. For example, if the floor has “snow” texture tile then naturally you’d like to hear something else instead of shoe clattering.
The panel of texture sounds is pretty similar to the panel of animated ranges. This is where we can adjust this special step sound for a texture tile.

Bump mapping:

The bump mapping could be useful if you want a cooler 3D effect for the texture tiles placed.
You can adjust the bump map effect for a tile on the texture sound panel.

Sky and horizon:

You can see in Illustration#7/a and #7/b: if you’d like to see sky and horizon in some parts of the room, then – as I said above – all you need is invisible texture placed there, sky or horizon graphics won’t be seen in the level editor. So you need other operations to draw the graphics of the sky and the horizon. For example, the graphics of the sky must be drawn in a RAW file, which is attached to your level.

7. Concentrated lights and effects

All you need is a mouse click to create a “marker” of a concentrated light or effect. And now you can place them in the room.
Let’s see for example Illustration#26, where you can see several “markers” like that. The “electric bulb” shaped markers are to change the room ambience light in the positions where those markers are placed. The markers with red lines are cameras, to show the gameplay for a while, instead of the usual camera view.

These lights and effects are “concentrated”, because they emit their effects from a point (i.e. the marker):
  • Lights: they have different types. For example, one of them works like a headlight of a car, another one will compose shadow etc.
  • Camera: to show the gameplay with a motionless or moving, unusual camera view.
  • Fog: composes a little foggy spot.
  • Sink: composes a sink in the water, which will draw Lara to itself.
  • Sound: emits a looped noise - you chose - around itself. The farther Lara is from the marker the quieter the sound is. (Good idea eg. to use a “waterfall” loop sound next to “waterfall” animated textures on a wall, for the proper illusion of the falling water.)
Examples:

Area with a red light in the dark room, using a concentrated light:


Illustration#28

We can see Lara from an unusual camera view, using a camera marker:


Illustration#29

8. Draw distance and distance fog

The “draw distance” defines the maximal size of the area Lara can see. In the illustrations below you can see the same part of a level, using low or high draw distance. As you can see, the farther parts of the level won’t be drawn if you use a low draw distance. However, too high draw distance isn’t recommended, because that maybe overload the engine, eg. slowing it down.


Illustration#30/a and Illustration#30/b

The basic function of the distance fog is covering the non-drawn farther parts with some beneficial darkness, so they won’t be so ugly (see Illustration#31/a). But (see Illustration#31/b) the distance fog could have even a decorative function: eg. if it is colored, and expanded very much, so it will cover even the level parts which are closer to Lara.


Illustration#31/a and Illustration#31/b

9. Objects

There are smaller or bigger objects you need to place in the rooms:
  • Creatures (Lara, humans, animals, fantasy creatures, enemies, friends): they will be spawned where they are placed. Except Lara (who is controlled by the player), their artificial intelligence will decide which of their animations (shooting, running, jumping etc.) will be just executed.
  • Further moving objects with a clear function: gates, traps, pushblocks, switches, vehicles etc.
  • Decorations. Sometimes they are moving (see eg. the water plant moved by the sink in Coastal Ruins), but mostly they are motionless (vases, statues, columns etc.).
  • Inventory items which Lara can pick up: ammunition, weapon, medipack, crowbar, key etc.
  • Symbolic objects: they look like “red pyramids” in the level editor. But in the game they will be flames, ropes dangling from the ceiling, earthquake-emitters etc.
  • Special objects. See eg. PISTOLS_ANIM object, which must be amongst the object of your level, but which is not allowed to place anywhere in the level. Because its only purpose is to store Lara’s animations to use pistols, plus, it stores the “Lara’s hand with a pistol” meshes (meshes=object parts), which will be automatically swapped in the game for the “Lara’s empty hand” meshes, when Lara extracts the pistols.
An example - the „red pyramid” on the “torch-holder” decoration object will be a flame in the game:


Illustration#32

Each level has its own object set. You can choose objects from the object set of your level.
As I said with the texture tile sets, theoretically you can use even object sets that are already made, but first of all you need to compose your own object set. – See more about object sets below.

Moveable or Static objects:

The so-called “Moveable” objects aren’t moving everyway, they can be even motionless decorations, but their function mostly is to be moved, using their animations.
On the other hand the so-called “Static” objects are always motionless decorations.

There can be pros and cons for an object, even if that is a Moveable or a Static. Now I’d like to emphasize the feature that room lights affect only Moveable objects, Static objects have their own lights.

In the illustration below you can clearly see that the harsh green ambience light of the room affects only the Moveable statue, but the Static vase has its own harsh red light:


Illustration#33

Dropped items:

You can place inventory items under some creature objects (mostly only human enemies, naturally). You won’t see the item in the game where you placed it. The creature will “carry it”, and drop it when he dies – now Lara can pick it up.
For example: a baddy has an Uzi, so he shoots with it. Probably it is worth to place some Uzi ammo under the guy, so he drops Uzi ammo where he dies, so Lara can pick it up there.

OCB settings:

Each object has its own so-called Object Code Bit panel (OCB), where you can adjust some special property of the object – eg. to change the size of the flame.

TRNG objects:

TRLE is based on the engine of The Last Revelation, but some level builders were smart enough to make objects work in TRLE which are not supported by that engine originally (like tigers).

In TRNG, several of those objects became the supported part of the engine, like the motor boat of TR2, the diver of TR3 or the electric keypad of TR5. Etc.

Plus, TRNG supports some extra object properties you could have never seen in any Core Design classics, like: the Static object explodes if Lara touches it, or the flaming Lara will be extinguished without jumping into water etc.

Collisions:

“Collision” means if Lara bumps into something or steps on something (like room wall or floor), then she won’t get through that as if that were made of air.

But the collision with objects is easeless:
  • The object is wrapped in an invisible cube, called “collision box”. Lara can’t get inside this box. This could be disturbing eg. if we want Lara to touch the parts of the object which are clearly inside the box. (See an example for a collision box in Illustration#48/b.)
  • Lara can’t use collision boxes. For example, Lara can climb on the the top of the block in Illustration#14, but she can’t climb on the top of the collision box of the table, for the illusion of “she climbs on the top of the table”.
You can solve those problems eg. in these ways:
  • Remove the collision box, and place thin invisible objects having their own collision boxes where Lara needs to bump the original object. Now she can reach the object part she needs to touch.
    In the illustration below we can see Lara standing on a balcony. I mean, “she stands in the balcony object which doesn’t have a collision box”. As you can see, the collision was solved with placing black (invisible in the game) collision objects where she needs to be stopped, so she won’t fall down off the balcony.

Illustration#34 (source: http://trlevelmanager.net/ng.htm)
  • Remove the collision box, then simulate room surface forming there.
    In the illustration below you can see how the collision was simulated in the positions of two statues and a sarcophagus. For example, you can see that Lara can climb on the block simulated in the position of the sarcophagus as if she were standing on the top of the sarcophagus. - Naturally only Picture A shows the real situation. Picture B was created only to understand how it works, so any real surface forming didn’t happen there this time.
    (But eg. you can also see that the simulated slope in the position of the lion statue is a bit incorrect, it simulates the form of the lion not really successfully.)

Illustration#35 (source: http://trlevelmanager.net/ng.htm)

10. Flipmaps

We use a flipmap if we want two different looks for a room. For example, if we have an earthquake, and the room will be ruined during the quakes. Now one of the looks is the harmless look before the quakes, and the other look is the ruined look after the quakes.
A flipmap always stores the “alternative” look of the room.

An example:
Two different looks of a room in the level editor – as you can see, the sand hills are gone (as the gameplay says: because they fall down through the gratings on the floor):


Illustration#36/a and Illustration#36/b

The black background indicates now we can see the flipmap look.

11. Audio and sound

Whatever you can hear under playing the game, that must be stored in WAV files (or perhaps in some other sound file format) in the subfolders of the game.

Those files can be:
  • Tracks playing in the whole level (mostly), for the basic atmosphere of the level. For example, if the level is a grassy plain at the sea shore, then the “wind noise plus seagull sound” loop track seems a nice idea. – Mostly they are defined in the script (see below).
  • Audio tracks, shorter or longer. They can emphasize the atmosphere in the actual rooms. For example, if Lara need to fight in some rooms, it is worth starting a harsh, longer track, with snappy rhytm, for some moments or minutes. – Triggers (see below) start them.
  • Loop sounds used by sound effect markers (see Chapter#7).
  • Simple sounds, like: the noise when an enemy is wielding a sword, the growl of a wild animal, Lara’s footsteps, a scream etc. – They are started (mostly) by animation commands (see below).
12. Texts

You can print any text on the scream, using several customizations, like font type, font size etc.
Moreover, you can change the look even the classic texts (like menus).


Illustration#37

Each text which will ever be printed on the screen, must be also typed in the so-called “strings”:


Illustration#38

13. Images

BMP files or still pictures of sprites can be placed on the screen:


Illustration#39

Some of the images has a special function – this is the way eg. to make your diary:


Illustration#40

14. Movies and cutscenes

There is a possibility to play AVI, WMV or MPG video files, not only in the game, but even in title.

Cutscenes play in the level, but the actors aren’t controlled by the player or the artificial intelligence, like usually in the game, but, after all, you need to adjust and then record their movements, words etc. “frame by frame”. The recorded cutscene will be played later in the game.

An example – a moment in the very first cutscene of The Last Revelation:


Illustration#41 (source: http://skribblerz.com)

15. Triggers

Without triggers, nothing would happen in your level, after all. Lara moves by the player, the water is waving, you can hear some loop track in the background for the basic atmosphere of the level, and Lara’s hair is moved by the wind in outside areas. But, after all, that’s all, for every other action you need triggers.
Like their name says, triggers are always trigger, allow, activate an event. It is you who places the triggers in the level, defining the position where the event can be activated – which could be eg. spawning a baddy, filling an empty pool with water, playing a harsh audio file etc.
In some of the illustrations above you can see magenta patches on the floor. These are triggers. Usually they work this way: if Lara is running, walking, crawling, jumping, swimming etc. over a patch like that, then the event will be activated. – Of course, they can work in other ways sometimes. Eg. Lara needs to touch that patch, or she needs to use a switch at the patch, or perhaps not Lara but an enemy needs to move over the patch etc.
Moreover, you can create special circumstances, where two or more triggers need to be activated in different positions of the level, to activate the event.

The events need to be adjusted in the triggers before placing them – after that, all you need to do is a mouse click on the required position of the floor, to place the trigger there, to make the floor magenta there.
In the illustration below you can see the Set Trigger Type panel (STT), which is needed to adjust the event. In this STT this event is adjusted: activate an object (OBJECT), which is a flame (FLAME_EMITTER – see the ID which identifies which flame is this), for 10 seconds (so the flame will be put out after that, automatically), but only if Lara touches the trigger patch (PAD).


Illustration#42

At the start of this tutorial I mentioned that TRNG is a development of TRLE. One of the main attractions of TRNG is you can adjust several new triggers, so you can create much more events than it was possible in The Last Revelation. Which means the basic events can be executed with TRLE triggers implanted into TRNG, you don’t need to search amongst TRNG triggers, if you look for a trigger for the basic control of the game, I mean, if it is not an extraordinary TRNG event what you want to activate.

These are the TRLE triggers implanted into TRNG:
  • Activating objects (spawning a baddy, making a trap move, opening a door, igniting a flame, making an invisible object visible etc.).
  • Deactivating objects (making a trap stop, closing a door, putting a flame out etc.).
  • Controlling camera markers, perhaps adjusting other target for them, not Lara.
  • Starting another audio track or changing the background loop track.
  • Jumping to another level.
  • Some special effect (you can find them like “OldFlip” FLIPEFFECT triggers in TRNG): playing “flooding water” sound, changing the color of fog bulbs etc.
  • Turning flipmaps on or off.
  • Defining secret places.
  • Controlling sinks.
Triggers made for TRNG can be found mostly with ACTION or FLIPEFFECT name. ACTION triggers are mostly to control Moveable objects, FLIPEFFECT triggers for other events.
Let’s see some examples for the events in triggers created for TRNG:
  • Adding an effect (flame, glowing light etc.) to the object, that moves with the object when that is moving.
  • Moving an elevator.
  • Changing OCB settings.
  • Forcing the required animation.
  • Transporting objects from one position of the level into another one.
  • Moving, turning objects without using their animations.
  • A developed control of audio and sound.
  • Special camera effects.
  • Playing video files.
  • Changing inventory contents without Lara picking up an item or using it.
  • Making Lara invulnerable for a while.
  • Placing texts or images on the screen, or taking them off the screen.
  • Changing the intensity of rain or snow.
Moreover, TRNG can add new conditions for an event. So eg. if it is not enough if Lara is over a trigger patch, but one of these conditions also must be true:
  • Lara touches the required object, or
  • a creature is performing the required animation, or
  • the required item is in the inventory, or
  • the player hits the required key, or
  • Lara has the required weapon in the hand. Etc.
Note:
These new conditions must be adjusted as triggers in STT, and then they also need to be placed as triggers, overlapped with the trigger of the event.
If you used TRLE before then you will surely understand why. I mean, for example, “SWITCH trigger” of TRLE is also not a real trigger but a condition, which means “if Lara uses this switch”.

16. The script

In the script we define special data with texts to a level or perhaps for the whole game, because we can’t define them in the level editor.

[Level]
Name= Temple Of Karnak
Horizon= ENABLED
Layer1= 128,96,64,7
Puzzle= 2,Canopic Jar 1, $0001,$0320,$0000,$0000,$0000,$0002
Puzzle= 3,Canopic Jar 2, $0001,$0320,$0000,$0000,$0000,$0002
Puzzle= 1,Sun Talisman, $0000,$0500,$0000,$0000,$0000,$0002
PuzzleCombo= 1,1,Sun Disk, $0000,$0180,$0000,$0000,$0000,$0002
PuzzleCombo= 1,2,Sun Goddess, $0000,$04b0,$0000,$0000,$0000,$0002
Puzzle= 5,Golden Vraeus, $0003,$0300,$0000,$0000,$0000,$0002
Puzzle= 7,Guardian Key, $0009,$0300,$0000,$0000,$0000,$0002
Key= 2,Hypostyle Key, $0000,$0400,$0000,$c000,$0000,$0002
LoadCamera= 89366,-258,48077,88372,-1300,45701,0
Level= DATA\KARNAK,110

The text above is the whole script of Karnak level in TRLE. This script uses some script commands to define this:
  • The name of the level.
  • The horizon will be seeable.
  • The color for sky layer. (We see the sky graphics of the RAW file through this layer.)
  • The names and inventory coordinates of the key and puzzle items Lara can pick up.
  • The screenshot coordinate of the loading screen - the still picture what you can see for a moment if you leave this level.
  • The name of the TR4 file – this is what will be loaded as a level for this level name.
  • The loop soundtrack for the atmosphere that starts when the level starts.
There are further TRLE script commands implanted into TRNG as well, I won’t introduce them now. Let’s see some examples for script commands made for TRNG:
  • Defining a customized item combination, which is similar to the classic key combo1+key combo2=key combination.
  • Customizing the properties of weapons or ammo.
  • Commands to control cutscenes.
  • Forming diaries, adding their basic contents.
These three script commands made for TRNG are very special, but important:

TriggerGroup command:

Triggers made for TRNG can be exported into script. Which means when you adjusted the trigger on STT panel, then you click on a button to define the export data of the trigger – like this:

; Set Trigger Type - FLIPEFFECT 91
; Exporting: TRIGGER(532:0) for FLIPEFFECT(91)
; <#> : Lara. (Health) Lara invulnerable for <&>time with (E)effect
; <&> : 20 seconds
; (E) : Blinking transparency - fast
; Values to add in script command: $2000, 91, $214

You need to copy or tpye $2000, 91, $214 code into a TriggerGroup command of the Script.

An exported trigger is useful, because you can create complicated trigger combinations in TriggerGroup commands – even like this:

“If any of Condition1 or Condition2 is true, then Trigger1 and Trigger2 will be executed. If none of them is true, then Condition3 will be studied. If it is true, then Trigger3 will be executed. If it is not, then Condition4 and Condition5 will be studied. If Condition4 is true but Condition5 is not, then Trigger4, Trigger5 and Trigger6 will be executed”.

These combinations can be started mostly with a magenta trigger patch, that trigger refers to the ID of this TriggerGroup.

Other main function of TriggerGroups is this is the only way for further script commands (see eg. Organizer and GlobalTrigger below) to refer to events (triggers).

Note:
Yes, conditions also can be exported, because, as I said above, technically they also work like triggers.

Organizer command:

Organizers are able to time any events, even in complicated ways. Which is important, because basically if you want to time something, then all you can do is place classic timed triggers to time objects.

Two examples:
  • A trigger starts the Organizer. After some moments, a flame will be ignited, then, after some further moments, another one as well.
  • A trigger starts the Organizer. A flipmap will be activated right away, changing the look of the room. After some moments, a flipmap will be deactivated, the room look changes back.
In both Organizers each event must be defined in its own TriggerGroup. So, for example, in the first Organizer the trigger to activate the first flame is in a TriggerGroup, and the trigger to activate is the second flame is in another TriggerGroup.

Note:
I said above that TRLE triggers implanted TRNG (like triggers to activate objects) cannot be exported, only triggers made for TRNG. But yes, triggers to activate flames can be exported into TriggerGroups, because the most of TRLE triggers also has a version made for TRNG.

GlobalTrigger command:

GlobalTrigger commands control events that cannot have an exact position in the level.
I mean, if a condition goes true, anywhere in the level (but you can define the required area, if you want), then a GlobalTrigger will activate the event.
So each GlobalTrigger defines a “global” condition, and also refers to a TriggerGroup ID in which TriggerGroup that event is defined.

17. Variables

Variables are made to store texts or numbers. Nowadays the knowledge of variables means the most professional grade of TRNG, because the work with them is complicated, but we can accomplish so extraordinary events with them, like showing the health bar of an enemy on the screen, or using a “Lara gets tired if she grabbing the edge too long” situation of Angel of Darkness, or customizing the time gap between shooting two grenades from an enemy jeep etc.

Variables usually are used for these purposes:
  • The variable defines the value of a parameter. For example, the parameter is which weapon is just adjusted to Lara. (So that will be extracted if you hit SPACE now.) This is eg. 2 for the revolver, 3 for the Uzis, 4 for the shotgun. So, if we adjust 4 in a variable, and then we force that variable value for that parameter, then the weapon adjusted will be the shotgun, whatever weapon was the latest choice of the player in the inventory.
  • The actual value of the parameter will be put in the variable. So, if it is eg. 4 now, then we will now that the weapon adjusted is the shotgun. – This a good information as a condition for triggers or GlobalTriggers.
Let’s see a simple example for using a variable:

If you start this TriggerGroup#1 at the game start, then Lara’s weapon will be the Uzis when she starts the game, not the pistols:

TriggerGroup= 1, $2000, 96, $1, $2000, 48, $5E, $2000, 50, $785F, $2000, 232, $352, $2000, 245, $752, $2000, 100, $E10

The triggers are:

$2000, 96, $1 – removing pistols (and their ammo) from the inventory
$2000, 48, $5E – placing Uzis in the inventory
$2000, 50, $785F – placing some Uzi ammo in the inventory
$2000, 232, $352 – adjusting the Uzi value (3) in a numeric variable
$2000, 245, $752 – forcing the value of the variable (3) into the “weapon adjusted” parameter
$2000, 100, $E10 – swapping pistols meshes in the holsters for Uzi meshes

18. Cheats

With cheats you have simple tools to test your level. TRLE has only one “official” cheat: the flycheat (flying with Lara around the level), but in TRNG further cheats were made. (The not “official” cheats naturally are the bugs that speedrunners use.)

The flycheat:


Illustration#43

19. Customizing the level editor

You have the possibility eg. to change some texts into your native language, or creating a customized button table like this (having the format and editor buttons you want):


Illustration#44

20. Some examples – programs you probably need to use TRNG

TRNG is useable even without these programs, but for some purposes (like using your own object set etc.), you need one or more of them everyway.

TBuilder:

In Chapter#6 I mentioned you need to compose your own texture set. This program is a nice tool for that.

On the left side you can see the source from which you can choose the tiles for your set. On the right side is your tile set that you are just composing:


Illustration#45

WADMerger:

Several things with objects can be executed only here. For example, this is the program to compose your own object set (in so-called WAD files) that I mentioned in Chapter#9.

On the left side you can see the WAD file that you are just composing. On the right side is the source from which you can choose the objects for your set. On the image below is the object you are just working with:


Illustration#46

One of the most important part of WADMerger is the Animation Editor, where you can work with the animations of the Moveable objects:


Illustration#47

An animation is composed by the so-called “frames”. Playing a range of these frames in the game, you get the animation itself. Each frame can have different properties. It is mostly the look of the object in that moment, but eg. you can add so-called “animation commands” to the frames.
The “animcommands” store events, so they are similar to triggers, but they will execute their events when their frame just plays. This is the way to add events to frames, like playing a sound (like, the sound of the enemy in that moment), or (if the frame just shows a monster putting his huge foot on the ground) the short quake made by a heavy footstep. Etc.

WADMerger has not only its own animcommands. I mean, since animcomands work like triggers after all, as I said, triggers adjusted in STT can be exported not only into the script, but – as animcommands – even into WADMerger Animation Editor.
I talked above the trigger with $2000, 91, $214 script code. That trigger looks this way, saying you want to export it into WADMerger, playing it at Frame#5 of the animation:

Add a SetPosition anim command with following values:

Set Position [-24571] [91] [532]

Infos about exported trigger
-------------------------------------------------------------------------------
Set Trigger Type - FLIPEFFECT 91
Exporting: TRIGGER(532:0) for FLIPEFFECT(91)
<#> : Lara. (Health) Lara invulnerable for <&>time with (E)effect
<&> : 20 seconds
(E) : Blinking transparency - fast

AnimCommand: Frame=5
-------------------------------------------------------------------------------

The code of the trigger this time is [-24571] [91] [532], what you need to type in Animation Editor.

StrPix:

This is also used for objects.
Let’s see for example the texturing. You need to texture not only the blue, green plane figures of the room, but the objects as well, since naturally objects also have their own look. StrPix is a nice tool to texture objects.

On the left side you can see a part of the object texture set of the WAD. On the right is the object you are just working with:


Illustration#48/a and Illustration#48/b

Metasequoia:

You can find several objects in TRLE WAD files, in trsearch.org, or even anywhere else on the internet, to compose your own WAD. But if you want to create your own objects for your WAD, then you can try it eg. with this program.


Illustration#49

Meta2TR:

This program is a nice tool eg. to make your room look more realistic:


Illustration#50 (source: www.aspidetr.com)

FLEP:

Probably you have already heard about TREP, which helps you to accomplish some special effects in TRLE.
FLEP is the TRNG-compatible version of TREP, after all. TRNG has several new effects, comparing to TRLE. However, several nice effects are still unknown for TRNG, you need FLEP if you want to see them in your level.


Illustration#51

Last edited by AkyV; 24-10-16 at 10:24.
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 19:09.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Tomb Raider Forums is not owned or operated by CDE Entertainment Ltd.
Lara Croft and Tomb Raider are trademarks of CDE Entertainment Ltd.