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 20-07-24, 12:57   #1
AkyV
Moderator
 
Joined: Dec 2011
Posts: 5,074
Default TEN - Nodes

Made using Tomb Editor 1.7.1. pack (including Tomb Engine 1.4.)
Last update to TE/TEN: 1.7.2./1.5.


Just like TRNG, TEN is also able to use local triggers and global triggers:
  • Local triggers are placed in the map, so they can be activated only at a specific location of the level.
    For many reasons, TEN is able to use even the classic local trigger system (except TRNG ones). However, TEN prefers its own local trigger system.
    The big difference between the classic and TEN local trigger system is that TEN local triggers are not stuck to the floor grid any more. TEN local trigger zones are exact 3D shapes (called "volumes") which you can place anywhere between floor and ceiling, and between walls.
  • Global triggers are not placed in the map, they will be activated any time during the gameplay, if their condition has just become true.
    So TEN global triggers work very similarly like TRNG GlobalTriggers - however technically they are organized very differently.
TEN local and global trigger system do not use classic trigger contents any more. TEN triggers define their happenings in another form, called "events".
So the events are built from another data base, not from the classic trigger data base. Thankfully the events could be even very complex and detailed, which is why the TEN events are as exciting (or even more) as TRNG triggers - which, as I said, are fully missing from TEN.

TEN events can be defined in two ways:
  • with the so-called "nodes". This means you will use a graphical interface, where nodes are easily understandable little panels, in which all you need is to choose the proper happening from a list, and typing/choosing some parameter values for it. - So nodes are the proper choice for beginner TEN builders.
    Or
  • with scripting. It is not like in TRNG, to type values and constants in command fields. It is more complicated - but just like the result. That is why if you want to create some really complex setup, then you should choose making events by scripting. - However, as you can see, scripting is not really recommended for beginner TEN builders.
In this tutorial now we'll concentrate on the details of making TEN events by nodes. (I mean, we'll deal with the detailed techniques of making nodes, i.e. "details" don't mean discussing specific setups now.)

When a TEN local or global trigger executes something then it could execute even more than one events at the same time - so events are organized in the form of "event sets".
There is an event set editor for local triggers, and there is another event set editor for global triggers. The local event set editor could be opened in two forms: the one where you edit the local event set list and contents of the event sets for the whole level, and the other one where you add an event set to a volume. (Event set list and event set contents can be also edited in the form which is used at volumes.)

Open any of the event set editors, to edit local or global events, and see the upper part of the editor panel where you can see two options. We want to edit events with nodes now, so "Node editor" option should be ticked there. - If you want to edit events with scripts, then you should tick the other option ("Level script functions") instead.

If you still don't know the basics about volumes, global and local events, event sets, event set editors or nodes, then first you should read this tutorial.

CONTENTS:

1. Adding a node to an event set
2. Adjusting node events and parameters
3. The position of a node
4. Node conditions
5. Further connection examples between nodes
----------

Notes:
  • As the title says, it is “only” a Tomb Engine (TEN) tutorial. Many aspects you need to know for this tutorial are specific Tomb Editor (TE), TombIDE (TIDE), WadTool (WT) etc. features.
    So non-TEN features are only referred now, if it is necessary. And as much as I found it necessary. You need to also meet these features in other tutorials, for further details about them.
  • Some related TEN features are only mentioned, but not discussed in this tutorial, because they belong better to (an)other tutorial(s).
    Find another info source or be patient till those other tutorials are made.
  • Some options or commands can be executed in several ways. I may not introduce all of the ways in the tutorial. (Using default keys are presumed.)
  • The screenshots in this tutorial are made using the general form (i.e. which is not opened at volumes) of the local event set editor. But it doesn't matter at all, the same things could be done the same way even in the other form of the local event set editor or in the global event set editor.
  • Perhaps you understand this better in a form of another tutorial.

Last edited by AkyV; 04-11-24 at 19:23.
AkyV is online now  
Old 21-07-24, 11:19   #2
AkyV
Moderator
 
Joined: Dec 2011
Posts: 5,074
Default

1. Adding a node to an event set

So the (local or global) event set editor is open, and you are about to add a node (i.e. an event) to an event set. - But before that:
  • In the left big window of the editor panel, select the event set, to which you want to add this node. (Or create it first if it still doesn't exist.)
    Also rename that event set, if its current name won't refer properly to what this event set will do.
  • If it is a global event set, then adjust the game phase when the event set will be executed: loop, start/end, save/load.
  • If it is a local (volume) event set, then adjust the trigger phase when the event set will be executed: enter, inside, leave.
  • Other settings - which could be done even later (but everyway before using this event set first in the game):

    • Call count.
    • Enable option is ticked or unticked at a phase. (You cannot see this option in the screenshots of this tutorial, because they are made with a previous version of TE. It is next to Call count window.)
    • If it is a local event set: trigger activator(s).
    • If it is a local event set, edited at a volume: disabling volume temporarily (or not), setting that the volume (if also being in the adjacent room) should be also detected in the adjacent room or not.
We won't discuss the details for these, because they are already discussed in the basic tutorial I linked in the previous post. - However, don't forget that:
  • All the phases of the event set will be executed (at least the ones to which you added events), even if you can see and edit only one phase in the right big window of the editor at the same time.
    However, naturally each phase work only for itself, i.e. there are no connections between the phases of an event set. So eg. only the events of the "Enter" phase of a volume will be executed when the activator enters the trigger zone, and only the events of the "Inside" phase of the same volume will be executed when the activator is inside the trigger zone.
  • You can edit events for a phase either with nodes or with scripts, at the same event set, changing during the editing that which option is ticked at the top of the editor panel.
    However, keep in mind that only the way (node or script) will be accepted for all the phases of that event set, which way is just chosen when you close the editor panel with OK button.
  • If it is the local event set editor, edited at the volume, then the event set will be executed at that volume which event set is just selected when you close the editor panel with OK button.
If you have already done all of these settings and these things are all clear for you, then you are ready to add a node to an event set. - There are two ways to do that:
  • Double-click or right-click on the right big window of the editor panel, to open the node menu. The groups - you can see in the menu - name different happenings.
    If you are know (or suspect) that the event you want is in which group, then click on the little arrow at the group name to open the contents of that group.
    But if you don't know that, then use the searching window at the top of the menu panel.

    • The events which will be executed are marked with a blue circle, with an exclamation mark in it. They are called "actions".
    • The events which are conditions for the executable events are marked with a green circle, with a question mark in it. They are called "conditions".

    When an event is selected, then you can see a little helping description for it, at the bottom of the menu panel.

    Click image for larger version

Name:	75.jpg
Views:	57
Size:	62.3 KB
ID:	6874

    Double-click on the selected event - the menu panel closes now, and a node panel appears in the right big window. (Blue-framed if it is an action node, or green-framed if it is a conditon node. Around either the blue or the green frame there is another blue frame, indicating that that node is just selected - just like any node which has just been added.)
    The contents of this node is naturally the event you have just selected.

    Click image for larger version

Name:	77.jpg
Views:	44
Size:	37.6 KB
ID:	6876
  • There are Action and Condition buttons below the right big window. Click on any of them to make a node panel appear in the right big window.
    If you clicked on Action button, then this node shows some action event. Later you will be able to choose the proper action event in this node.
    If you clicked on Condition button, then this node shows some condition event. Later you will be able to choose the proper condition event in this node.
Add more than one nodes to an event set phase (with any contents), to exercise a bit. (Some nodes will be connected to each other by lines automatically. Later in the tutorial I will explain it, now ignore the lines.)

Click on a node to select it. (You can click now on any frame part around the node - or around any windows of the node.)
Also hold key CTRL down, to have more than one nodes selected with the clicks - or select them with drawing the mouse, also holding down the left mouse button.

While you are adding nodes, you can realize that:
  • The nodes will be placed on the grid of the right big window. You can move the grid with keeping the right mouse button held down, or with the mouse wheel.

    Click image for larger version

Name:	78.jpg
Views:	44
Size:	88.2 KB
ID:	6886
  • The upper left corner of the node menu panel will show up where you click on the grid.
    I say that because when you have just selected the event to close the menu panel, then the upper left corner of the node will show up on the grid where the upper left corner of the menu panel was seeable.
  • Using Action or Condition button, the node will be mostly placed just a bit below where the latest node before this node is placed.
So you can find a proper place for the nodes on the grid. It is important not only because the grid looks nicely if the nods are not placed on the same spot of the grid. It is also important because - as you will see a bit later in the tutorial - when the game executes the events of the event set, then the order of the execution depends on where a node is placed on the grid.
And this place of the node doesn't need to be its final place. I mean, select a node, then grab its frame by the left mouse button, to move it where you like. (Not all the parts of the frame are useable to grab the node. These "bad parts" are used to draw manually the lines what I mentioned above - but we will discuss it a bit later in the tutorial. - The best is if you grab the node now at the thick left edge.)

----------

Notes:
  • If you want to move more than one nodes selected at the same time, then keep SHIFT held down, while pulling the mouse.
  • See Tools\Editor Options dropdown menu in TE, the Node editor page: here you can do some customizations for the event set editors (mostly for the node editor). (Using default parameter values are presumed in this tutorial.)
  • Let's see the further buttons below the right big window (each button seems useable only when its function is available):

    • Always useable buttons:

      • "X" ("Clear all nodes"): it deletes all the nodes which are just seeable on this page (i.e. all the nodes of the current game/trigger phase of the current event set).
      • "Pages" ("Export Lua script to clipboard"): this does something similar when you exported a TRNG trigger into the script. (I.e. there can be connections making events by nodes or by scripting - but we won't discuss it in this tutorial.)

    • Only useable if at least one node is selected:

      • They will be discussed in the next chapter:

        • "Pencil" ("Rename last selected node").
        • "Lock" ("Lock selected nodes from modifying").

      • "Palette" ("Change color for last selected node"): you can set a customized frame color for the selected node, instead of "action blue" or "condition green". (It doesn't work for multiple selected nodes.)

        Click image for larger version

Name:	80.jpg
Views:	36
Size:	41.7 KB
ID:	6893
      • "Bin" ("Delete selected nodes"): it deletes only the selected nodes, not all the ones of the page.

    • Only useable if at least two nodes are selected:
      "Two little arrows" ("Link selected nodes, if possible"): it will be discussed later in the tutorial.

Last edited by AkyV; 04-11-24 at 19:22.
AkyV is online now  
Old 21-07-24, 11:20   #3
AkyV
Moderator
 
Joined: Dec 2011
Posts: 5,074
Default

2. Adjusting node events and parameters

If the event that the node shows is not the event you want for that node, then simply click on the little arrow next to the event name window, to open the whole event list, then choose the proper event name from the list. (Nodes showing an action event will show you only the list of action events, and nodes showing a condition event will show you only the list of condition events.)

Click image for larger version

Name:	76.jpg
Views:	43
Size:	64.1 KB
ID:	6891

Or just move the cursor over the event name window, and roll the mouse wheel, to roll the event names only in the window, without opening the list.
Or naturally you can also use the searching function next to the event name window, to find the proper event name for that node.

If you have just chosen the proper event for a node, then naturally you should adjust its parameter values.
Unlike classic triggers, node events aren't so uniformed. I mean, classic triggers has the Param window for a parameter, some of them also use the Timer window for a further parameter, and TRNG triggers even have an Extra window if the trigger needs a third parameter. (Moreover, if a TRNG trigger needs even more parameters than three, then one of these windows refer to a script command, in which you can define numerous further parameters.)
On the other hand, each node event has exactly as much windows for its parameters as that node event needs. If a node event needs only one parameter, then that node will have only one parameter window, but if a node event needs several parameters, then that node will have several parameter windows. (Some node events don't need a parameter at all, they naturally don't have parameter windows.)
That is why node parameter windows don't have a uniformed name, like Param, Timer or Extra. Instead, move the cursor over that window, so TE will show you a little information panel about what that parameter window is for. (This information panel is also available for the event name window, anyway.)

Click image for larger version

Name:	79.jpg
Views:	30
Size:	31.0 KB
ID:	6892

Node parameter windows can also have several methods to adjust their values: chosen from a list, mouse wheel, searching function, typing a value, ticking an option etc. - it depends on how the developers coded that window.

----------

Notes:
  • You don't need to select a node to edit its contents.
  • Each node has a specific name, so you identify them more easily.
    The name is auto-generated when a node has just been created. The initial name of condition nodes are "If" plus an ID, the initial name of action nodes are "Action" plus an ID. This ID depends on how many nodes of the same type are currently placed on the current grid. - So eg. if it is the first action placed there, then the name will be Action 1, but if there are already two conditions placed there, then the name will be Condition 3. (Sometimes it can be messed, though. I mean, eg. if there are Action 1, 2, 3 placed and you delete Action 2, then it seems logical that the next action node placed will be Action 2, filling the missing ID. But that is not guaranteed.)
    However, the node name doesn't matter at all. It is just a little information to you. Whatever the name is, the node will work as it should. - That is why feel free to select a node (but not more), and then click on the Pencil button at the bottom of the event set editor panel, to rename that node, as you wish.

    Click image for larger version

Name:	81.jpg
Views:	30
Size:	9.0 KB
ID:	6894
  • If you don't want accidentally to edit one or more nodes (which could easily happen wanting to use the mouse wheel for something else), then select them, and then click on the Lock button at the bottom of the event set editor panel. Now the text in the nodes will be grey (indicating that these nodes are just inactive to be edited), and the node frames will have little lines in them. (These nodes cannot be moved either.)
    Use the button again, to make the selected nodes editable again.

    Click image for larger version

Name:	82.jpg
Views:	34
Size:	90.1 KB
ID:	6895
  • Many parameters have the value of "volume activator". It is always that thing which is currently activating that trigger. (I.e. this value is not a good idea for global events, which don't have activators.)
  • When you can see a "cross hairs" button next to a parameter window, then the value of that window is something which can be placed in the map.
    Click on the button, and TE will select the current thing of that window in the map.
  • If a Moveable or a Static object (placed in a map) is an action node parameter, then grab it in the map, and pull it with the mouse on the grid of the event set editor. Now an action event will be added there, having this object as a parameter value. (Naturally you need to adjust the proper event name and other event parameters after that, in this node.)
    Naturally this won't change the object position in the map, or won't remove it from the map.
    Or: add an action or a condition node, which has a Moveable or Static object as a parameter. Grab an object like that placed in the map, and pull it with the mouse into this node, to make this object a parameter of the node.

Last edited by AkyV; 04-11-24 at 18:35.
AkyV is online now  
Old 23-07-24, 18:35   #4
AkyV
Moderator
 
Joined: Dec 2011
Posts: 5,074
Default

3. The position of a node

As I said above, the position of a node is important on the grid, because when the game executes the events of the event set, then the order of the execution depends on where a node is placed on the grid.

Click image for larger version

Name:	83.jpg
Views:	47
Size:	57.7 KB
ID:	6902

Let's see the example in the image above. These things will happen when Lara, the activator enters the volume, following the nodes from top to bottom (their distance from each other or if they are on the left or the right side, those are not important):
  1. When Lara enters the volume, then the game wants to flash a blue light on the screen, but...
  2. ...in the next moment the game wants to flash a red light on the screen. The game is able to make only one screen color light at the same time, so the current red light will be flashed, the previous blue one will be ignored.
  3. In the next moment the door will open.
  4. In the next moment the flame will be ignited.
All of these happen very fast, so you won't realize the time gap between the events. - Instead, this is what you will realize, at the same time:
When Lara enters the volume, then some red light will flash on the screen, the door will open and the flame will be ignited.

Last edited by AkyV; 25-07-24 at 11:40.
AkyV is online now  
Old 23-07-24, 19:31   #5
AkyV
Moderator
 
Joined: Dec 2011
Posts: 5,074
Default

4. Node conditions

A condition event always should be the condition of a given executable (action) event, that is why naturally the condition event is the event which should happen first of them.
I mean, if an action event has a condition, then you should connect them to each other mostly this way:

"If the condition is true, then the action event will be executed".

Which means that the condition must be in the upper position, and the action must be in the lower one.

Click image for larger version

Name:	84.jpg
Views:	48
Size:	89.4 KB
ID:	6934

Let's see the example in the image above. There are three actions below the "If Lara is on a vehicle" condition, to enable a flame, a door and a bear. Does it mean that the three objects will be enabled only when Lara, the activator, goes in a vehicle into the volume?
No. See that line we were already talking about. The line connects the condition only to one action node: which ignites the flame. So the other two actions have no conditions - which is why the door will open and the bear will be spawned everyway, i.e. either Lara is going into the volume in a vehicle or in any other way (running, jumping etc.).

Let's draw two more lines between these events:

Click image for larger version

Name:	85.jpg
Views:	42
Size:	88.1 KB
ID:	6935

The meaning of this event set phase has been changed:
  • when Lara enters the volume in a vehicle, then the flame will be ignited and the bear will be spawned, but
  • when Lara enters the volume in any other way, then the door will open.
The reasons of the changes:
  • Look more carefully at the condition node. There are two tags at its bottom: "then" and "else". Which means that is not always true that the connection between the condition and its action is "if the condition is true, then the action event will be executed". So sometimes the connection is "if the condition is false, then the action event will be executed":

    • if an action is linked with the line at the "then" tag to the node, then the action will be executed only for a true condition, but
    • if an action is linked with the line at the "else" tag to the node, then the action will be executed only for a false condition.

  • If more than one actions should happen when a condition is true/false, then the actions must be linked to each other with lines.
If you want to link a node to another one with a line, then first you should move the cursor to a connectable point of the node:
  • All the nodes have a connectable point at the middle of the upper node frame.
  • All the action nodes have a connectable point at the middle of the lower node frame.
  • All the condition nodes have two connectable point at the lower node frame: one at "then" tag (to connect this condition to another node, "if the condition is true"), and another one at "else" tag (to connect this condition to another node, "if the condition is false").
Click image for larger version

Name:	86.jpg
Views:	31
Size:	31.3 KB
ID:	6936

Look closer to see that those parts of the frame are slightly dotted. - Or, when the cursor is over a point like that then that is automatically highlighted.

Click image for larger version

Name:	87.jpg
Views:	29
Size:	13.1 KB
ID:	6937
Keep the left mouse button held down while you pull the mouse from a point like that to another point like that (naturally at another node), to connect the two nodes to each other with a line like that, between those points.
Naturally only an upper frame could be linked to a lower frame, or the opposite: a lower frame could be linked to an upper frame. (My experience is it usually works from top to bottom. The line perhaps won't be drawn when you move the mouse in the opposite way.) And naturally only one line can be linked to each connection point.
  • A line starting downwards from an action node is purple.
  • A line starting downwards from a "then" point of a condition node is green.
  • A line starting downwards from an "else" point of a condition node is pink.
You can delete a line like that if you grab any of the linked points again, and then pull the mouse a bit from that point, towards the linked, other node.

----------

Notes:
  • If you can't draw the line whatever you do, then select both the nodes you want to connect to each other, then click on the "Two little arrows" button at the bottom of the event set editor panel.
  • As I said above, these lines sometimes are automatically drawn, when you have just added a node to the grid. - If you don't want an automatical line like that, now you are able to delete it.
  • Be careful: these lines sometimes are seeable in the wrong places. For example: you will see that two nodes are connected to each other at their sides.
    But it is wrong. You can see that only because the nodes are beside each other. - So move any of these nods upwards or downwards to see, that the line is between the upper and the lower connection points, as it should.

    Click image for larger version

Name:	88.jpg
Views:	30
Size:	29.5 KB
ID:	6938

Last edited by AkyV; 27-07-24 at 09:49.
AkyV is online now  
Old 25-07-24, 19:13   #6
AkyV
Moderator
 
Joined: Dec 2011
Posts: 5,074
Default

5. Further connection examples between nodes
  • If Lara is targetting an enemy, then the flame will start burning. After that - either the flame has been started burning or not - there will be checked if Flipmap#2 is on. If it is, then the door will open.

    Click image for larger version

Name:	89.jpg
Views:	37
Size:	44.4 KB
ID:	6962
  • If Lara is targetting an enemy, then the flame will start burning. After that - but only if the flame has been started burning - there will be checked if Flipmap#2 is on. If it is, then the door will open.

    Click image for larger version

Name:	90.jpg
Views:	33
Size:	44.5 KB
ID:	6963
  • If 042.wav audio track is playing and Lara is targetting an enemy, then the flame will start burning. But if that audio track is not playing and Flipmap#2 is on, then the door will open.

    Click image for larger version

Name:	91.jpg
Views:	30
Size:	67.4 KB
ID:	6964
  • If PUZZLE_ITEM1 is in the inventrory, then the game will move the pushable object with 2048 units (2 sectors) eastwards an 4096 units (4 sectors) northwards, and turn it by 45 degrees clockwise. (These will be sudden jerks, not continuous movements.)

    Click image for larger version

Name:	92.jpg
Views:	33
Size:	45.7 KB
ID:	6955
  • Currently there is no way to set an "OR " connection for nodes, like: "if Condition A is true OR if Condition B is true, then...". A possible workaround is if both the conditions set the same (random) value for a variable, and then that variable value will be examined.

    Click image for larger version

Name:	93.jpg
Views:	41
Size:	87.0 KB
ID:	6956
  • And there is one more nice complex example here.

Last edited by AkyV; 27-07-24 at 19:21.
AkyV is online now  
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 16:59.


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.