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 24-04-24, 17:25   #1
AkyV
Moderator
 
Joined: Dec 2011
Posts: 5,074
Default TEN – How to start building a new project, a new level

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


The short version of the tutorial (for a beginner, like you, I suggest accepting all the default values where available):
  1. Download and install Tomb Editor program pack.
  2. Create a new Tomb Engine project (i.e. game) with TombIDE program of the pack.
    (The place of the project has nothing to do with the place of Tomb Editor program pack.)
  3. Open this project in TombIDE, remaining on the Level Manager page after that. Create a new level map (PRJ2) file here, for this project.
    This will also do these for the level automatically:

    • create the basic script (see in TombIDE),
    • do the main settings (the route to the playable level file etc.) properly (see in Tomb Editor),
    • attach a basic WAD2 file for some useable Moveable objects and sprites (see in Tomb Editor),
    • add a huge useable sound set (see in Tomb Editor).

  4. In Tomb Editor program of the pack, add a texture set on Texturing panel. (For example, a classic good old TRLE one, like the one for Playable Tutorial Level, will work nicely for a test.)
  5. Still in Tomb Editor program, texture the only one initial, big boxy room, also placing Lara object there. - That will be enough to try the level in the game.
    Don't forget to save the changes.
  6. Still in Tomb Editor program, hit F5 shortcut key.
    This will convert this PRJ2 into a playable level (with TEN extension), also launching that level in the game - so you can test what you have just edited.
For more details, please keep reading.

CONTENTS:

1. Installing Tomb Editor
2. Starting a new project
3. What is a level?
4. Starting a new level map and adding it to your project
5. Check the needful contents of the level script
6. Check the main TE settings for the level
7. Check the crucial attachments
8. Edit something
9. Convert the level map into a playable level, and try it in the game

----------

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 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.
  • This tutorial helps you start building your very first level in your very first Tomb Engine project. I mean, we will make a hardly-edited very first room for this level now, so you will be able to start it in the game. – That should be enough to you to understand that how you can start building in Tomb Engine.
    So now you won’t learn eg. how to edit room geometry, how to set the secret maximum number, how to add a name to an inventory item etc. Those are discussed in other tutorials, because they all happen AFTER starting the building.
  • 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.)
  • Perhaps you understand this better in a form of another tutorial.

Last edited by AkyV; 18-06-24 at 18:22.
AkyV is offline  
Old 24-04-24, 17:34   #2
AkyV
Moderator
 
Joined: Dec 2011
Posts: 5,074
Default

1. Installing Tomb Editor

If you want to create levels for your Tomb Raider game with Tomb Engine, then you can’t use editors like DXTre3d, TRLE (winroomedit) or NGLE.
The one and only useable editor is Tomb Editor, the original (and currently: the only one) home of Tomb Engine.

So, first of all, you need to download and install the Tomb Editor pack on your computer.
It is available eg. here – but eg. here you can find even older versions.

The default route of Tomb Editor installed is C:\Tomb Editor.
The contents of this main folder are:
  • Tomb Editor program.
  • Side programs dedicated to Tomb Editor: SoundTool, TombIDE, WadTool.
  • Most of the files which are necessary to start a basic project and level for Tomb Engine. (But texture files for room faces must be find somewhere else. But this is still not necessary now, when you start reading this tutorial.)
  • Other important files for Tomb Editor pack.
So when you have the Tomb Editor pack installed on your computer, then you are just ready to start building levels for Tomb Engine.

----------

Note:
After the installation, don’t forget to check sometimes if there is a fresher version of Tomb Editor pack.
If there is, then download it and install it on the same route where the pack was originally installed.

Last edited by AkyV; 18-05-24 at 09:20.
AkyV is offline  
Old 24-04-24, 17:37   #3
AkyV
Moderator
 
Joined: Dec 2011
Posts: 5,074
Default

2. Starting a new project

After the installation of Tomb Editor pack, you are ready to make your very first Tomb Engine project. (Level map file extensions are well-known as “PRJ” files, but do not misunderstand: what we call “project” now is not a level, but a whole level set – i.e. your current Tomb Engine game itself, which will be released when you fully made it.)

But where do you need to place your projects?
Well, NOT in Tomb Editor main folder – that is a place you usually never modify while editing.
I suggest placing all of your projects nicely collected in a so-called general project folder. This could be called eg. “My_Tomb_Raider_projects”, created manually. (I created it in Documents folder.)
Each project you make will be placed in its own main folder. Does it mean now you should also create manually a project main folder in the general folder? No, there is a TombIDE wizard which will do the whole project-creating procedure for you.

Projects are handled in TombIDE (TIDE) program, that is why the whole project-creating procedure is also being done there.
So start TombIDE.exe, and the panel of TIDE Start page opens up.
Click on “Create a new project” button now.
The first page of a new panel opens up (General Information):
  • Let’s suppose the project you start now has the name of “Lara’s Newest Adventures”. So type it now here.
  • Click on “Browse” button, find and select the general project folder.
    After that, the little window in the middle of this first page shows that a subfolder in the general project folder will be created as the main folder of this project, having the project name.
  • The engine type you choose now is naturally Tomb Engine.
Click image for larger version

Name:	1.jpg
Views:	69
Size:	36.0 KB
ID:	5253

Now click on “Next” button to continue the procedure on the next page of the panel (Extra Options).
I suggest changing nothing here. Which means level map files will be handled in a folder called "Levels", which is a subfolder in the main folder of the project. (I mean, this is the default place for level map files, and you, the beginner probably should keep it like this.)

Now click on "Create" button here, then look at the increasing bar at the bottom of the panel.
When the bar is at 100 %, then you get a message that the project has been successfully created.

Click image for larger version

Name:	2.jpg
Views:	57
Size:	31.5 KB
ID:	5256

Click on the message - which closes this panel, so you will see TIDE Start page again.
The window of this page was empty so far, but now you can identify here this freshly-created project, in its row. (Later, having more than one project in TIDE, they will be all listed here, in their own rows.)

Click image for larger version

Name:	3.jpg
Views:	54
Size:	52.8 KB
ID:	5260

And this project main folder has been also created on the selected route, with the basic contents a TEN project should have. (Including Levels folder - still being empty - in that default position.)

Click image for larger version

Name:	4.jpg
Views:	72
Size:	53.9 KB
ID:	5261

So that very first TEN project exists at last.
If its row is selected (highlighted) on TIDE Start page, that naturally means this is the project you are actually working on in TIDE.
Double-click on that row (or click on "Open selected button" below), so the project opens in TIDE, you will be able to work on it. Each project opened in TIDE has more pages, now you can see its Level Manager page. (See the panel header which names the current project.)
Now click on the red arrow in the upper left corner of the page, to go back to TIDE Start page, closing this project now in TIDE.

----------

Notes:
  • Use spaces only in the names which could be created even (or only) by the automatism of Tomb Editor pack. (Like “Lara’s Newest Adventures”.) But you’d better ignore them in other names, which can be created only by you. (Like “My_Tomb_Raider_projects”.)
    This is true for any names using Tomb Editor.
  • If you are sure that you are working on only one project currently, then tick "Remember project selection on next startup" option on TIDE Start page, just before opening this project there.
    After this, each time when you launch TIDE, it will open not on Start page, but on Level Manager page of this project.
  • If you refreshed your Tomb Editor pack (as I said above), then the freshest Tomb Engine version will be valid only for projects which are created AFTER this update.
    So TEN projects existing at this update keeps the TEN version they have. That is why you need to refresh TEN version, one by one for each single existing project, after TE update: open the project in TIDE (like this one with "TEN New Project" name), and then click on Update button at the header of Level Manager page.

    Click image for larger version

Name:	5.jpg
Views:	68
Size:	67.0 KB
ID:	5277
  • Below that red arrow you can find the side task bar of TIDE. If a project is open in TIDE, you will always see it, whatever page is just seeable here for that project.

    • The topmost four icons here is for this project. Click on one to open the given page of the project. From above: Level Manager page, Scripting Studio, plugin page (unavailable for TEN, which is not using plugins), Miscallenous Functions&Properties.
      (You can change some parameters on Miscallenous Functions&Properties page, if you want, but it is not necessary now. I mean, the routes here are we have just defined, the default game icon works properly now, the splash screen image isn't defined here yet - but the game will run nicely even without it. Etc.)

      Click image for larger version

Name:	18.jpg
Views:	67
Size:	52.6 KB
ID:	5837
    • The lower icons are to open the programs of Tomb Editor, and the project main folder.
    • Click on "+" icon to add more icons to the side bar (even for non-related things like Word or Excel), or right-click on the icon to remove it.
    • Even if you customize the bar with the "+" icon, the bar will be the same for each projects of TIDE.

  • If you want to rename a project of TIDE, then it is the recommended procedure for the proper execution (to have the proper name both in TIDE and the project main folder):

    1. Select the row of the project on TIDE Start page.
    2. Right click on it to open a menu panel, then select "Rename project" there. "Rename Project" panel opens up.

      Click image for larger version

Name:	6.jpg
Views:	45
Size:	12.2 KB
ID:	5279
    3. Tick "Rename project directory as well" on the panel.
    4. Write the new name on the panel, then click on Apply.

  • If you want to delete a project of TIDE, then it is the recommended procedure for the proper execution:

    1. Select the row of the project on TIDE Start page.
    2. Hit Delete key to remove that row.
    3. Now you can delete the main folder of the project (as usual).

  • If you want to relocate a project of TIDE, then it is the recommended procedure for the proper execution:

    1. Select the row of the project on TIDE Start page.
    2. Hit Delete key to remove that row.
    3. Relocate (cut/paste) the main folder of the project, on a new route (as usual).
    4. Click on “Open a .trproj file” button on TIDE Start Page.
    5. Select the file with TRPROJ extension, in the main folder of the project.
    6. The project row is restored on TIDE Start page.

    Naturally it is also the way to add an existing project main folder to TIDE, if it has never been in your TIDE yet. (Eg. a friend of yours gives you this folder.)
    If that TRPROJ file is missing for some reason, then click on “Import project using a .exe file” button on TIDE Start page after the relocation, and select the PLAY.exe file in the main folder of the project.
  • As you can see eg. on the image about Miscallenous Functions&Properties page, routes sometimes won't be described by the folder names. Eg. you can see a ProjectDirectory tag there. But it doesn't matter, these tags are the same as if the route were described there by folder names.

Last edited by AkyV; 19-05-24 at 17:25.
AkyV is offline  
Old 25-04-24, 18:55   #4
AkyV
Moderator
 
Joined: Dec 2011
Posts: 5,074
Default

3. What is a level?

Before we discuss how to start a new level, important to understand, that actually what a "level" is.
(Don't do anything now, just read and listen.)

Level map
Level maps are the editable versions of levels. So when you create, modify a level in the level editor program, then the changes are saved and stored in level map files.
Previously level map files was known as files with PRJ extension. But if your level editor program is Tomb Editor, then these files work a bit differently, TE has its own level map formula, whose extension is called PRJ2.
At the moment you don't have PRJ2 files, but soon you will create them and save them in Levels folder of the project main folder. (In fact, in subfolders of Levels folder, and each subfolder is dedicated only to one level of the project, having a name which nicely refers to the level name.)

Or, alternatively:
See the "Import TRLE level" menu option in TE, which lets you import your PRJ level maps (made previously with TRLE or NGLE) into PRJ2 format.
And also see "Convert level to TombEngine" which lets you convert your non-TEN level maps into a TEN PRJ2 file. - I.e. it is important, because eg. that is not enough if you open a TRNG PRJ2 in TE, and then you change the engine there for TEN and simply start editing it.
Imports and conversions like that should be well-done. However, there is no guarantee that they are 100 % perfect. So, after any action like this, I recommend to check your whole level map if everything is okay. (For example, TEN cannot handle triggers made for TRNG engine. So in a TEN level converted from a TRNG level, TRNG triggers will be useless, they should be deleted - or formed into a trigger useable here.)

Playable level
The playable version of the level is a level file what the game will play as a level. This playable file is made by a conversion, converted from the PRJ2 level map file of this level. (The conversion will be a very simple task to you: only a simple click on a button.)
TRLE (for TR4 engine) and NGLE (for TRNG engine) playable level files both have TR4 extensions. But this is not true for playable levels of other engines.
The playable levels of Tomb Engine have TEN extensions. Each TEN file will be automatically available in Engine\Data subfolder of the project main folder, just after their conversions from PRJ2 files. (At the moment only title.ten is available there, i.e. it is a pre-converted level for Tomb Engine. However, it is not the well-known The Last Revelation title, but something much simpler, that is why you can't find the level map file for it in Levels folder, from which the pre-conversion was made.)

Crucial attachments
Literally or "only" technically, but levels are useless without their crucial attachments. (Which you will attach in TE to the level map. Then you need to save the map to keep it.)
  • Item files
  • Texture files
  • Sound files and their catalog files
The contents of each file like that is unique, you are the one who can decide which things are placed and saved in it, you place them there, you remove them from there.

Item files
An item file (attached to a level) contains all the Moveable and Static objects (Lara, creatures, statues, furniture, effect emitters etc.) and sprites which can be used in that level.
Unlike the older editors, in TE you can select more than one item file for a level. (And if an object is there in both, then you can set which one of them should be applied in the level.)
  • Builders using TRLE/NGLE previously definitely know that the extension of an item file is WAD, made/edited probably with WadMerger program. But it is not obvious any more, if your level editor program is Tomb Editor. In TE WAD extension is usually supported, but not preferred.
  • WAD2 extension means an enhanced item file (eg. with the feature of UV-mapping which is not possible in WAD files). WAD2 files are made and useable only for TE levels, it is the preferred extension here.
    There is a tool in TE pack dedicated to edit item files, called WadTool. Just open a WAD in it, and save it. It will be saved automatically as a WAD2 item file. (Or you can naturally arrange even a brand new WAD2 in WadTool.)
  • TEN engine is able to use only specific WAD2 files, which means WAD extension is not supported for TEN engine. (Except if WAD has only objects having non-TEN specific behaviors, like Statics.)
    You can find a menu option in WadTool, to convert your other item files into a TEN WAD2.
    "Specific" means eg. TEN Lara object is optimized for TEN, so a "casual" (non-TEN) Lara would not be animated properly there. (Later we discuss it in this tutorial - but not the details, because it is not a TEN WAD2 tutorial.)
WAD2 files for a TEN level should be placed in Levels folder, in the subfolder of that level. (It is recommended to use a sub-subfolder there for it.) - Though, technically it is not a must, they can be placed even anywhere in your computer.

Texture files
A texture file (attached to a level) contains all the texture tiles which can be placed on room faces (floor sector, ceiling sector, wall section) in that level.
Unlike the older editors, in TE:
  • you can select more than one texture file for a level, placing tiles even from each in your level,
  • not only TGA extension is supported for texture files, but even other ones: BMP, JPG, PNG etc.
Texture files for a TEN level should be placed in Levels folder, in the subfolder of that level. (It is recommended to use a sub-subfolder there for it.) - Though, technically it is not a must, they can be placed even anywhere in your computer.

Sound files and their catalog files
Sounds saved in sound files can be emitted mostly by Moveable objects (mostly Lara or other creatures), but even by any effect (like a rumbling earthquake). Etc.
Sound files have WAV extensions - just like in the old times.

Sound files are not directly attached to a level map, for two reasons:
  • Sound files for a TEN level should be placed in Sounds subfolder of project main folder. (Though, technically it is not a must, they can be placed even anywhere in your computer.) Initially you can find all the original sounds here of the legacy engines, in their own subfolders. - But naturally you are allowed to edit these contents, modifying, deleting, adding sound files here.
    These places are needed to be attached to that level.
  • There must be one catalog file (or, unlike the older editors, even more catalog files), attached to the level, where the sounds you want to attach are named. The main reason is that sounds can have different properties for different levels, and the catalog will describe the properties that this sound will have on this level.
    Sound catalogs can be even older types, familiar from TRLE/NGLE (Sounds.txt or SFX/SAM files of WAD files), or the ones having XML extensions, which are made for TE. Later you will be able to make custom XML files, but some of them are created when saving a WAD2 file. And there are even some preset XML catalogs in Catalogs/TEN Sound Catalogs subfolder of Tomb Editor main folder.
    There is a tool in TE pack dedicated to edit sound catalogs, called SoundTool. If you want, just open a non-XML catalog into it, and save it as an XML one.
Level script
Script means game or level data, described simply by typing some texts.
In TRLE or NGLE there is a "level block" in the script, where all the scripted data of that level are typed. In TE it works the same way - except if the engine for your TE project is TEN. In that case script works a bit differently, as you will see. (Though, a level block also exists there.)
There is a tool in TE pack dedicated to edit script. This is TIDE you have already used to create your project, and you definitely will use it later much to edit your script.

Conclusion

When you start building a new level for your project, then these are your tasks, recommended in this order:
  1. Create a PRJ2 level map file.
  2. Add this level to the project.
  3. Check the needful contents of the level script. If your script has less contents than that, then the level is useless in the game.
  4. Check the main settings (in TE) for the level. If they are wrong, then the level is useless in the game.
  5. Check the crucial attachments.
  6. You can try to edit something in the level map - then save it.
  7. Convert the PRJ2 level map into a TEN playable level.
  8. Start the level in the game, try what you have just edited in the map.

Last edited by AkyV; 03-06-24 at 23:04.
AkyV is offline  
Old 26-04-24, 07:08   #5
AkyV
Moderator
 
Joined: Dec 2011
Posts: 5,074
Default

4. Starting a new level map and adding it to your project

I present these two actions in the same chapter, because when you create a new PRJ2 file, that will be automatically added to your project.

Create a new PRJ2 file with TombIDE wizard and add it to the current project
  1. Open the "Lara Newest Adventures" project in TIDE, remaining on Level Manager page.
  2. See the left big window here, with the title of "Level list". As the text says in it, click on it, or - because the text is not available when there is at least one level in this window - click on the "+" button on the upper left corner of the window.
  3. The panel of "Create a New Level" opens:

    • Level Name: this level name will be shown in the game for this level. Let's say it is "Test Level 1" now.
    • Use custom PRJ2/Data name: if you tick it, then you can add an alternative name key instead of the default one.
      Name keys are the names of the most important files of this level. The default name key is mostly the Level Name, except: there cannot be spaces. So eg. for Test Level 1, level files will be auto-created with this name key later: Test_Level_1.prj2, Test_Level_1.ten etc.
      Let's suppose we don't want the default name key now, so tick the option and type "Test1" as the name key. (So the file names will be Test1.prj2, Test1.ten etc.)
    • "Generate a new [Level] section for this level in the project’s Script.txt file”: as I said above, there is a scripted part even for TEN. If you untick it, then the wizard will skip this part, not creating the needful contents of the level script. So later you have to create it manually (but before starting the level at the very first time in the game).
      (The option name is a bit misleading, though, Script.txt and [Level] section are presented in a bit different way for TEN. But it doesn't matter.)
      Some values in the scripted part you need to define now:

      • Ambient sound ID: the initial ambient background noise of the level. I suggest accepting this 110.wav now, because later you can change it any time. Or you can click on Open /audio/ button to open Engine\Audio subfolder in the project main folder now, to try to find another one.
        (Audio subfolder has the original audio file set of The Last Revelation game. Later you can change the contents any time. Now I suggest choosing a WAV above 100 value here, because in that set, background noises are placed on those IDs. However, for TEN you can use any ID for a background noise - but we won't discuss it in this tutorial.)
      • "Enable HORIZON (Make the skybox visible in the level)": the sky above you can be visible in the outdoor areas of the level only if it is ticked. I suggest ticking it, because later you can change it any time.
        (Skybox and horizon are working together, but they are not the same. But it doesn't matter now.)

    Click image for larger version

Name:	7.jpg
Views:	67
Size:	36.6 KB
ID:	5314

  4. Click on Create button.
What happened now are:
  • As I said, each level should have a folder dedicated to it, in Levels folder of this project. Now a dedicated folder to Test Level 1 automatically has been created there, having this level name.
  • A Test1.prj2 file has been also automatically created, in Test Level 1 folder.
  • The main settings of this level have also been done properly.
  • Some crucial attachments of the level has been automatically attached. (Later we discuss it in the tutorial.)
  • In Level list window of this project (on Level Manager TIDE page), a row for this level has been also automatically created.

    Click image for larger version

Name:	8.jpg
Views:	52
Size:	9.5 KB
ID:	5518
  • The needful contents of the level script has been also automatically created. (Later we discuss it in the tutorial.)
Now you can click on the red arrow to go back to the Start page of TIDE.
But TIDE now asks you if you want to save what you have just did. Naturally accept it.
(However, operations you did in TIDE are automatically saved. Except if those are rows typed in the script.)

Create a new PRJ2 file manually and add it to the current project
  1. If you don't want to use the TIDE wizard to create a PRJ2 file automatically, then, first of all, create manually a dedicated folder to Test Level 1, in the main folder of Lara Newest Adventure project.
  2. Then you need to create an unsaved, new level map, which is very easy: usually just launch TE now.
    (It is not always true, because there is an option which opens a project - the one that was opened latest in TE previously - when you launch TE now.
    But it is not a problem, you can easily create a new level map even if there is - for any reason - another project there in TE: just see "New Level" dropdown File menu option there, or hit CTRL+SHIFT+N keys.)
  3. The next step is saving this map manually, as a PRJ2 file (Test1.prj2), naturally placed in Test Level 1 folder.
    It is also very easy: in TE, just see "Save Level as" dropdown File menu option, or hit CTRL+SHIFT+S keys.
  4. Open Lara Newest Adventure project in TIDE.
    You can see: the level is already there in Level list window, i.e. it has been automatically added to this project. (It is possible only because you have created this PRJ2 in a level folder which is a subfolder of this project.)
    However, if the level is not there, just refresh the list. (See the "round arrows" button in the upper right corner of Level list window.)
But later you will need to do these things manually (they will be discussed in this tutorial):
  • The main settings of the level will not be done now.
  • The crucial attachments will not be not attached at all now.
  • The needful contents of the level script will not be not created at all now.
----------

Notes:
  • The order of the levels in Level list window is independent of the level orders in the game.
  • So a manually created PRJ2 can be seeable immediately in TE, but the wizard won't open TE for you, to have a look at that PRJ2.
    In fact, opening a PRJ2 file in TE is not necessary at this point of the tutorial. However, if you are so curious, then open TE, and see "Open existing level" or "Open recent" dropdown File menu options or hit CTRL+O keys.
    (But there are also some peculiar ways to open a PRJ2, from the level folder. Like clicking on the file there - only if it is associated in File Associaton.exe of Tomb Editor main folder -, or drag and drop it on TE GUI.
    And you can find ways even from the Level list window of TIDE.)

    Name:  9.jpg
Views: 296
Size:  13.7 KB
  • There are some ways to remove a level from a project - after selecting (highlighting) it in the Level list window. The easiest way is simply hitting DELETE key. (Be careful, the level itself will be also deleted. You'd better make a copy before.)
    However, keep in mind that is not enough to remove the level from the project. Eg. if the level already has some rows in the script of the project, then those rows won't be removed now, you need to remove (delete) them manually.
  • So Test Level 1 name now belongs to

    • the level name in the Level list window,
    • the name of the folder dedicated to the level,
    • the level name shown in the game.

    There is a "Rename level" function in the Level list window to change this "window name". (Refresh the list if you can't see the new name.) Which will also rename the other two if you tick the two options there.

    Click image for larger version

Name:	10.jpg
Views:	53
Size:	13.4 KB
ID:	5520
  • Naturally you can add any TEN PRJ2 manually to a project. Eg. even if it is a PRJ2 freshly imported, converted from a PRJ. - Just place this PRJ2 in the proper level folder, i.e which is in the project main folder.
    Anyway, you can also try "Import an existing level" (a Level Manager function) for this, if the addition you want is a bit more complex than that. (This is also a good method to place the level out of the project main folder, so it won't be deleted if you remove the level from the project later.)
  • Either you created a project with the wizard or manually, you can have more than one PRJ2 files in the map of the level.
    For example, when Test1.prj2 is opened in TE, you decide you make an "alternative version". So you manually save eg. Test1-A.prj2 (as a copy of Test1.prj2, in the same folder), editing the two versions differently after that. (But naturally you can even simply copy/paste Test1.prj2 for this, in its own folder.) - And autosaves are also possible in TE, anyway.
    Naturally the Level list window of TIDE should show the proper version of the level map. To set this, see the right half of Level Manager page, which is named "Selected Level Properties". Click on Settings tab, and then click on the option you want:

    • „Use the latest .prj2 file by date as the default level file”: the proper level version is always the one which was saved the latest.
    • „Use a specific .prj2 file from the folder”: the window will show all the level versions in the level folder. Click on the one which you want the proper one. (Tick the option at the bottom of the window, if you also want to see the autosaves here.)

    Click image for larger version

Name:	11.jpg
Views:	49
Size:	18.0 KB
ID:	5521

Last edited by AkyV; 18-11-24 at 18:07.
AkyV is offline  
Old 27-04-24, 09:11   #6
AkyV
Moderator
 
Joined: Dec 2011
Posts: 5,074
Default

5. Check the needful contents of the level script


Script files for TRLE and NGLE builders are known as Script.txt, English.txt, Script.dat, English.dat - and TRNG can also have some "subscript" files, using #INCLUDE directives.
In TEN, Script files are totally different:
  • There are no files with the name of Script or English.
  • There are no TXT or DAT files, all the files have LUA extension.
  • So there is no "building the script" procedure (from TXT to DAT). That is why the script will be refreshed for the game even when you simply save it.
All the script files for a TEN project are available in Engine\Scripts subfolder of the project main folder.
Some of them are not important for us now, and some of them won't be important even later. - So let's see which script files are important, when you start building a new level:
  • Gameflow.lua.
  • Strings.lua.
  • LUA file with the key level name (in Levels subfolder of Scripts folder), i.e. Test1.lua now.
Open Scripting Studio page of the project, in TIDE.
Naturally this is the page where you can edit your script.

The main parts of this page are:
  • Dropdown menu.
  • Toolbar with buttons.
  • The big window to see/edit the script.
    Any text you can see here is some textual data for your game/level. Or, if a row starts with a -- sign, that means the row is just a comment, a note, so you can type anything here.
  • File Explorer panel on the right side. Here you can find all the available script files of the project.
    Click on any file name of File Explorer, to open that file in the big window.
    There are tabs above the window, for the script files are just open there. Gameflow.lua are always open initially. (Naturally you can close any tab if you just doesn't care about it any more.) Click on any of those tabs to see its contents in the window.
Click image for larger version

Name:	19.jpg
Views:	87
Size:	71.4 KB
ID:	5841

Gameflow.lua

This script file exists initially in TE pack, and always very simple. However, it is crucial, your level won't run in the game (properly) if you do not set here the main data of the level (properly). - We can call this main data a "level block", because it is a data block for a level. However, unlike mostly level blocks of TRNG scripts, which can be even very huge (except if you use subscripts), TEN level blocks are always only for the main data. (I.e. additional scripting is always handled somewhere else - soon you will see where.)

Gameflow.lua is is separated into three parts with the ------------ rows (which are comments, because they are start with -- signs):
  • In the first (uppermost) part there are some general settings of the game, like eg. the maximum number of secrets. - This part is unimportant to us now (because their default values are nicely useable - or, at least, their effect is currently irrelevant), so we skip it.
  • In the second (middle) part you can find the level block for the title, existing initially. Yes, technically the title is also a level - but we won't discuss it now, it is not a title tutorial. What matters is it works nicely for your project even now, so now you don't need to care about its default script values or any other part. (Though, as I said, it is not the well-known The Last Revelation title, but something much simpler.)
    However, you need to know that not the "title" name turns a level into title, but the fact that its level block is the first (uppermost) level block in Gameflow.lua.
  • In the third (lowest) part you can find the level blocks for all the "real" (i.e. non-title) levels of your game. This part is initially empty, but, when a wizard creates a level for the project, then the level block for this level will be automatically created (placed in the order of creating those levels).
So what we are interested in now is how this level block looks for Test1.prj2, which the rows and their default values are in this block.
Initial level block rows are simple commands for that level. ("Officially" I shouldn't call them commands, but something else. However, I bet you will remember them more easily, if I call them commands. In latter tutorials we will be more precise, but in a basic one like this it is enough.) - These commands are, from above to bottom (technically the command order doesn't really seem important here, though):
  • Test1 = Level.new(): this command indicates that here starts a level block. The Test1 tag of the command indicates that all the commands of this block will start with this tag.
    (Note: since TE 1.5., this text is "Test1 = TEN.Flow.Level()" - except for title.)
  • Test1.nameKey = "Test1": it tells that the name key of this level will be Test1. (Please notice that title level has no name key defined this way.)
    As you can see, the command tag is the name key you set. But it is not necessary, you can change the tag manually even now, so they will be different. (Technically you can also change the name key manually - but don't forget to change it in all the places where it is already used.)
  • Test1.scriptFile = "Scripts\\Levels\\Test1.lua": as I told above, there should be a LUA file with the name key of the level in Scripts\Levels folder, which file is defined here. (Please notice that \\ sign are used instead of \ sign.)
  • Test1.ambientTrack = "110": as you set it previously, the initial ambience background noise for the level should be 110.wav.
  • Test1.horizon = true: as you set it previously, the sky above you can be visible in the outdoor areas of the level. (That is why it is "true".)
  • Test1.levelFile = "Data\\Test1.ten": as I told above, the playable level that belongs to Test1.prj2 level map should be called Test1.ten. And, as I also told above, each TEN file will be automatically available in Engine\Data subfolder of the project main folder, including Test1.ten. These infos are defined here.
  • Test1.loadScreenFile = "Screens\\rome.jpg": TR4 and TRNG shows a place of the level, when the game loads that level. However, TEN is based on TR5 engine, and TR5 engine shows an image, when the game loads that level. So TEN also shows an image now - this is rome.jpg now, should be placed in Engine\Screens subfolder of the project main folder.
  • Flow.AddLevel(Test1): this command tells that the level block for the level with Test1 tag name (not Test1 name key!) ends here, and the playable level with these block parameters is set as a part of this game.
    (Note: since TE 1.5., this text is "TEN.Flow.AddLevel(Test1)" - except for title.)
Click image for larger version

Name:	20.jpg
Views:	98
Size:	80.5 KB
ID:	5842

These default values are proper for our purposes, so we won't change them now. (But you can naturally do that later, though.)

Naturally if you created Test1.prj2 file manually, then you need to add this level block manually to Gameflow.lua: so type these rows there now.

Strings.lua

Previously probably you used English.txt to edit the texts which are seeable in the game.
The TEN script file for this purpose is called Strings.lua, existing initially in TE pack.

With comments, this file is also separated into parts. We are interested now only in the lower part now, which the comment names as "Level name strings".
There are some initial (and perhaps ununderstandable - but it doesn't matter now) level names are set here. But when the wizard created Test1.prj2, then a new entry was also created here, telling that the name you will see in the game for the level which has Test1 name key is Test Level 1, as you set it previously:

Test1 = { "Test Level 1" },

Click image for larger version

Name:	21.jpg
Views:	80
Size:	34.4 KB
ID:	5843

Naturally you need to type this entry manually now, if you you created Test1.prj2 file manually.

Test1.lua

This file has been automatically created when the wizard created Test1.prj2.
The contents of the file isn't important now, we won't use these entries now, to test this new level. (This will be the place later of the thing I've just called "additional scripting".)

Click image for larger version

Name:	22.jpg
Views:	80
Size:	23.7 KB
ID:	5844

However, the fact that this file exists by the wizard means you should create this non-existing file manually, when you created your level manually:
  1. There is a dropdown menu option, a toolbar button and even a shortcut key in Scripting Studio, to open a new script file.
    When you do this, a panel pops up. Set here the file route (in Levels subfolder of Scripts folder), the file name (typing Test1) and the format (LUA), then create Test1.lua for Test Level 1. (That -- FILE comment will be automatically created now.)

    Click image for larger version

Name:	29.jpg
Views:	86
Size:	22.7 KB
ID:	5869
  2. Type the basic contents in Test1.lua.

    Code:
    LevelFuncs.OnLoad = function() end
    LevelFuncs.OnSave = function() end
    LevelFuncs.OnStart = function() end
    LevelFuncs.OnLoop = function() end
    LevelFuncs.OnEnd = function() end
Don't forget to refresh the script by saving in TIDE the script files you have just modified.
----------

Note:
If more than one level map belongs to a level (see the previous chapter why), then naturally still only one script belongs to the level.
So, if the level already has the needful contents for its first level map, then its further level maps will use the same contents, you don't need to do anything in the script files, to make the level ready to play.

Last edited by AkyV; 18-11-24 at 20:03.
AkyV is offline  
Old 03-05-24, 19:04   #7
AkyV
Moderator
 
Joined: Dec 2011
Posts: 5,074
Default

6. Check the main TE settings for the level


The main TE settings for a level map can be checked in dropdown Tools\Level Settings menu, on Game page.

So open Test1.prj2 in TE (see Chapter 4 how), and check these settings.

Click image for larger version

Name:	23.jpg
Views:	59
Size:	50.8 KB
ID:	5846

If the wizard created the PRJ2 file for you, then the values here always should be the proper ones. But if you created it manually, then you need to set the proper values:
  • Game version to target: naturally you choose here TombEngine now.
  • Folder in which all runtime game components reside: select Engine folder of the project main folder.
  • Target folder and filename for level file: select Test1.ten in Engine\Data folder of project main folder. (I mean, Test1.ten naturally doesn't exist now, because we are just before the first conversion from PRJ2 to TEN. So you should manually type the file name now.)
  • Path of Lua level script file: select Engine\Scripts\Level folder of the project main folder.
  • Target executable that is started with the ’Build and Play’ button: select TombEngine.exe in Engine\Bin\x64 folder of the project main folder. (Or choose the EXE in x86 folder, if your system configuration is different.)
Don't forget to also check Misc page here:
„Full file path for the currently open level” value should be the route of this PRJ2.

Click image for larger version

Name:	24.jpg
Views:	56
Size:	31.0 KB
ID:	5849

----------

Note:
If more than one level map belongs to a level (see above why), then naturally the same main TE settings belong to these level maps.
So, if the level already has these main TE settings for its first level map, then its further level maps will use the same main TE settings. However: you need to check these at each map of the level.
Except: naturally the „Full file path for the currently open level” route is different for each level map.

Last edited by AkyV; 18-05-24 at 11:16.
AkyV is offline  
Old 12-05-24, 09:33   #8
AkyV
Moderator
 
Joined: Dec 2011
Posts: 5,074
Default

7. Check the crucial attachments


The next step is that you need to check the crucial attachments of the level map.

So remain in Test1.prj2 in TE now, and check these.

WAD2 file

As I said above, in TE you can select more than one WAD2 file for a TEN level. - But, for a basic tutorial like this, only one WAD2 attached is enough to us to start editing the level. That is why we are examining now only one WAD2 attached to Test1.prj2.
As I said above, the best place for this only one WAD2 file is a subfolder in the level folder - which now could be Documents\My_Tomb_Raider_projects\Lara's Newest Adventures\Levels\Test Level 1\WADs.
Now create it manually.

You haven't created a WAD2 file for Test1.prj2, so this subfolder should be empty yet.
That is why there is still not a WAD2 file to attach to Test1.prj2.

However, the results are different, when you check this attachment at Test1.prj2, which was created with the wizard, or at Test1.prj2, which was created manually:
  • The Items panel (in the middle of TE left side) is empty at the manually created file, indicating: there is still not a WAD2 file attached to Test1.prj2.
  • However, the Items panel is not empty when PRJ2 was created by the wizard. It has an object (in fact, Lara herself), indicating: there is already a WAD2 file attached to Test1.prj2.
Click image for larger version

Name:	12.jpg
Views:	64
Size:	23.6 KB
ID:	5775

How can it be possible?
Well, as I said above, many well-known objects are not compatible with TEN. Lara and many other objects should be optimized for TEN.
To make your things easy, TEN developers made a basic TEN WAD2 file, which contains a TEN-specific Lara, some other TEN specific-objects - and also some other, general (but surely TEN-compatible) objects, which are needful to edit a level.
This is the WAD2 which has been automatically attached to Test1.prj2, when the wizard created this PRJ2. Yes, this WAD2 is not an item file with the custom objects you want for your level - however, its contents is a proper object set to start learning how to handle Moveable objects and sprites in TEN. (This WAD2 has no Static objects - but I am sure soon you will be able to add easily Statics to this, with WadTool program.)
This WAD2 is called TombEngine.wad2, and you can always find it in Tomb Editor main folder, in Assets\Wads route.

Yes, if you created your PRJ2 manually, then this is the WAD2 you should attach to the PRJ2 file now, also manually: just click on the Items panel, and, in the window popped up, search and select this WAD2.

Later, when you are not so noob to TEN any more, you will create your custom TEN-specific WAD2 for this level, saved in Documents\My_Tomb_Raider_projects\Lara's Newest Adventures\Levels\Test Level 1\WADs, attached as a second WAD2 of the level (eg. via dropdown Items menu).
Or first you detach TombEngine.wad2 (eg. via dropdown Items menu), which you don't need any more, so the custom WAD2 will be the only item file of the level. (But in this case naturally you should also check if there are objects of TombEngine.wad2 placed in the level map.)

Texture file

As I said above, in TE you can select more than one texture file for a TEN level. - But, for a basic tutorial like this, only one texture file attached is enough to us to start editing the level. That is why we are examining now only one texture file attached to Test1.prj2.
As I said above, the best place for this only one texture file is a subfolder in the level folder - which now could be Documents\My_Tomb_Raider_projects\Lara's Newest Adventures\Levels\Test Level 1\textures.
Now create it manually.

You haven't created a texture file for Test1.prj2, so this subfolder should be empty yet.
That is why there is still not a texture file to attach to Test1.prj2.

We won't waste our time now to create a texture file for this level.
Instead, we copy/paste an existing texture file into this folder, that should be enough now to start learning how to texture floor, ceiling and walls in TEN.
I think the easiest is if what you copy now is the well-known textures of the well-known Playable Tutorial Level, copied from the original TRLE pack, i.e. tut1text.tga file.
So now we copy/paste this TGA into that textures folder, and then attach it to the PRJ2 file, with a simple, manual way: just click on the empty Texturing panel (on the right side of TE), and, in the window popped up, search and select this TGA. (Or you can choose any other existing texture file, if you want. - However, this tutorial will be discussed with tut1text.tga attached.) Now the tiles of the selected TGA will fill the panel.

Click image for larger version

Name:	13.jpg
Views:	55
Size:	76.2 KB
ID:	5776

Sound files and their catalog files

The topic of sound files and catalog files are something that should have a really detailed and long tutorial.
That is why now I only tell in this topic that what you should do to hear the proper sounds in the game, when the level with Test Level 1 name is playing. We'll use the easiest way now to attach these sounds:
  1. Open dropdown Tools\Level settings menu in TE. The Level Settings panel opens. Click on Sound Sample Paths tag on the left side, to open that page.

    • If you created Test1.prj with the wizard, then you will see a row on this page. If you click on Browse button now, next to this row, then the abovementioned Sounds subfolder opens. Which means sound files for this level will be chosen from this subfolder (and its subfolders). - This is good to us now, so you can close the panel now.
    • If you created Test1.prj manually, then you won't see a row on this page, it is empty. Or perhaps it looks a mess, having several ununderstandable rows. Click on the rows to select them, and then remove them, by hitting DELETE key. Then click on the + button in the upper right corner of the panel, to add this Sounds subfolder to the page.

    Click image for larger version

Name:	14.jpg
Views:	61
Size:	100.4 KB
ID:	5777

  2. Open dropdown Tools\Level settings menu in TE. The Level Settings panel opens. Click on Sound Infos Paths tag on the left side, to open that page.

    • If you created Test1.prj with the wizard, then you will see a row in the upper window of this page. If you click on "Folder" button now, in the middle of this row, then the abovementioned Catalogs/TEN Sound Catalogs subfolder opens. Which means the catalog we will use for this level is placed in this subfolder. (You can see in that row that this catalog is TEN_ALL_SOUNDS.xml now.) - This is good to us now, so you can close the panel now.
      There are other rows in the lower window (the sounds named in this catalog), but it is not important now.
    • If you created Test1.prj manually, then you won't see a row in this upper window. Click on the + button in the upper right corner of the panel, to add TEN_ALL_SOUNDS.xml to the window.
      The lower window was empty so far, but now the rows of sounds (of this catalog) show up there.

    Click image for larger version

Name:	15.jpg
Views:	54
Size:	78.2 KB
ID:	5778

  3. Open dropdown Tools\Level settings menu in TE. The Level Settings panel opens. Click on Sound Infos Paths tag on the left side, to open that page again.
    "Autodetect sounds on compilation if none selected" option is probably ticked (in the middle of TE, on the right side). But if it is not, then tick it now. Now the proper sounds will be automatically selected when you convert this PRJ2 into a playable level later.
    When you come back to this page after the first conversion, then you will realize that some rows in the lower window went green. Which is good, they are the autodetected sounds of this catalog.

    Click image for larger version

Name:	16.jpg
Views:	60
Size:	72.4 KB
ID:	5779
Overwriting the level map

Test1.prj2 file already exists, but, after attaching these attachments, the file needs to be updated in TE, to keep these attachments attached even if you close TE, or (creating/openining another level map) close only Test1.prj2.
So you now overwrite (save) Test1.prj2 (naturally still opened in TE), which is naturally very simple: just see "Save Level" dropdown File menu option, or hit CTRL+S keys.

----------

Notes:
  • TE pack often calls both WAD and WAD2 formats simply WAD. Just in one of the images of this chapter.
  • The mess on Sound Sample Paths will be probably "restored" later automatically, editing several hours and days and weeks on your level. Then you should repeat to remove the improper rows - but now naturally won't remove the proper row from here.
  • If more than one level map belongs to a level (see above why), then theoretically they can have different crucial attachments. - However, practically they should be the same. At most it differs a bit here or there.

Last edited by AkyV; 03-06-24 at 23:03.
AkyV is offline  
Old 12-05-24, 11:04   #9
AkyV
Moderator
 
Joined: Dec 2011
Posts: 5,074
Default

8. Edit something


It's time to edit something in Test1.prj2 level map, in TE - so you can try it soon in the game.
However, we don't want to edit too much now - only the minimum contents which are needful to test this level in the game:
  • This brand new level map has only one room now. A big boxy room in the big window of TE.
    Click on F3, so now you can texture the room faces.
    See the Tool Palette, floating in the upper left corner of that window. Click on Fill button there, then:

    • Click on a texture tile on Texturing panel. Now you'll see a red/yellow frame around it. This tile should be a tile which looks nicely on the floor.
      Now click on any floor sector of the room. That tile will be placed on each floor sector.
    • Click on another texture tile on Texturing panel. This tile should be a tile which looks nicely on the walls.
      Now click on any wall panel of the room. That tile will be placed on each wall panel.
    • Click on another texture tile. This tile should be a tile which looks nicely on the ceiling.
      Now click on any ceiling sector of the room. That tile will be placed on each ceiling sector.

  • Click on any floor sector in the room, with the right mouse button. A menu panel pops up. Choose "Move Lara" here. Lara object will be placed on that sector: this is the place where she starts this level soon.
Click image for larger version

Name:	17.jpg
Views:	53
Size:	76.7 KB
ID:	5780

And that's all. This edited state in TE is enough to be played. (Click on F4 to see how relatively dark this room is.) - Don't forget to save (overwrite) the level map now.

However, you can edit more in this level even now, if you want: forming the room geometry, making water rooms, texture animations, creating rooms and connecting them to each other by making portals, placing light bulbs, placing and spawning enemies etc. - Just search some info for them somewhere else, because in this tutorial we won't discuss things like that.
And the tutorial will still use that minimally edited boxy room, though.

Last edited by AkyV; 18-05-24 at 11:39.
AkyV is offline  
Old 12-05-24, 11:04   #10
AkyV
Moderator
 
Joined: Dec 2011
Posts: 5,074
Default

9. Convert the level map into a playable level, and try it in the game


After editing some little things to test in the game, there's nothing else left than trying this level in the game.

I present conversion and trying in the same chapter, because when you convert a PRJ2 file into a TEN file, many times the game will automatically launch to try it.

TRLE or NGLE has a separated program for the conversion. Though, NGLE has an automatism which will do everything with a single click on a button: save level map file => running the converter for the conversion => optionally starting the game to try this freshly made level there.
TE also has this automatism, with a single click on a button, but working a bit differently:
  • Level map file needs to be saved manually, when you want it, the automatism won't do it.
  • The conversion is being made directly in TE.
The "Build level and play" command is what starts this automatism in TE.
Hit F5 shortcut key for this command, but there are other ways as well (see eg. dropdown File menu).
What happens now automatically is:
  1. The "Build level" window pops up. Messages show up fast in it.
  2. After the last message having just showed up, the game starts (without showing the title level).
  3. The game shows rome.jpg on the screen: remember, this is the image what you will see when the game loads the level.
  4. The level starts where you placed Lara object. So you can start testing what you have just edited: run with her, jump, draw weapons and shoot etc. Listen to the sounds what these actions cause. Etc.

Click image for larger version

Name:	25.jpg
Views:	46
Size:	49.6 KB
ID:	5863

And that's all. Now you are able to start editing projects, levels. Quit the game, and start learning and trying the further steps for editing levels.

----------

Notes:
  • After the conversion, check Sound Sample Paths page in TE: those sound rows really went green now.
  • You don't need to start the game everyway after a conversion. So if you don't want that, then search for "Build level" command, instead of "Build level and play" command. The easiest way if you hit SHIFT+F5 shortcut key.
    So you won't leave TE (into the game) after the conversion now. The "Build level" window remains open, goes green - indicating that the conversion was successfull.
  • If you are unsure about the result of the conversion, then I suggest using "Build level" command everyway.
    I mean, successfull conversions are not always perfect. If you scroll the green "Build level" window after the conversion now, then you may discover yellow messages sometimes. These are "only" warnings, not errors: the game will be able to run with them, but something is not okay, you should find and fix it. Now, or even later. What matters is you should fix it the latest just before you release your game, so that surely won't be buggy.

    Click image for larger version

Name:	26.jpg
Views:	51
Size:	64.5 KB
ID:	5864
  • The "Build level" window goes red sometimes, indicating that the conversion was interrupted due to an error, which you need to find and fix now.
  • If you won't launch the game after the conversion, then launch it later manually so you can test the level even this way.
    The manual launch can be done eg. by clicking on PLAY.exe in project main folder. Or you can do it even from TIDE.
    The procedure has just been started, now hit CTRL fast to open the game setup. Or don't do that, and the game starts with the title level. Choose New Game menu option, to start the level. (Please note that always the level starts now, which is the first "real" - i.e. non-title - level in the level list of Gameflow.lua. Change there false in "Flow.EnableLevelSelect(false)" into true, if you want to choose the proper level now, when clicking on New Game option.)

    Click image for larger version

Name:	27.jpg
Views:	42
Size:	5.2 KB
ID:	5865

    Click image for larger version

Name:	30.jpg
Views:	44
Size:	14.0 KB
ID:	5877
  • There is one more version for "Build level and play" command, which is "Build level and play in preview mode" command: click on the "double arrow" button on the right edge of the toolbar (below the dropdown menu stripe). Now the game will also start automatically, but you will reach the game faster (which could be useful if the level is big, so if the conversion is slower) - but some elements won't be build. (Eg. the border between the ambience lights of different rooms won't be seamless in the portals between the rooms.) I.e. use this command only for functional tests, not spectacle ones.

    Click image for larger version

Name:	28.jpg
Views:	57
Size:	48.0 KB
ID:	5867

Last edited by AkyV; 19-05-24 at 10:00.
AkyV is offline  
Closed Thread

Bookmarks

Thread Tools

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

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



All times are GMT. The time now is 17:38.


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.