Welcome to the official home of the Tomb Raider Wad Editing Studio, called TRwest throughout the rest of this document. This page contains some preliminary documentation for TRwest, the format is rather simple right now but it is accurate to the best of my knowledge. I plan on updating this site with a new format and more extensive information in the next few weeks. Sorry, no source code yet, it will eventually be released whenever I'm done working on it or lose interest. If you encounter a problem with TRwest please send an e-mail.
|TRwest||v2.00||09-APR-2001||88KB||The TRwest v2.00 executable|
|v1.00||11-MAR-2001||50KB||The TRwest v1.00 executable|
|scripts.zip||v1.00||09-APR-2001||27KB||Decompiled script.dat files for The Last Revelation, Times Exclusive and Chronicles game|
|trw_l02.zip||v1.00||09-APR-2001||358KB||TRwest Test Level 2 for TRwest V2.00, requires the level files from The Last Revelation, includes the project and TRwest script|
|trw_l01.zip||v1.00||11-MAR-2001||458KB||TRwest Test Level 1, includes the project and TRwest script|
|Lara.TWS||v1.00||11-MAR-2001||2KB||TRwest Script with all the Lara and inventory objects|
|10-APR-2001||Dragon Head: MUTANT, AHMET_MIP and BUBBLES: the BUBBLES object was added|
|Whats New in v2.00|
The image at the top of this page is the main screen of TRwest, an application for building custom wads. TRwest allows you to create a new wad using any of the objects defined in all the wads. It will automatically create all the necessary files for use with the other tools for developing levels for the Tomb Raider game.
What makes up a wad? There are several different files that are compose a wad, they are covered in the level editor manual but I'll go over them again.
|.CD||This file really isn't part of the wad, it is generated by the Room Editor and contains the information about the CD triggers you created in the level. TRwest doesn't create, modify or process files of this type.|
|.LAR||Lara's Animations. While this is listed in the level editor manual as being part of a wad it is never used by any of tools. I've safely deleted this file from the wad directory and was still able to correctly build levels. TRwest does not create, modify or process files of this type.|
|.RAW||Level specific sky graphics, TRwest doesn't do anything with this file|
|.SAM||Sound File, contains a listing of the .wav files that will be included in the .tr4 file when you build a level. TRwest will build this file based on the contents of your wad.|
|.SFX||Sound Effects, contains information about how to play the various .wav files found in the .SAM file. TRwest will build this file based on the contents of your wad.|
|.SWD||Sprite WAD, this contains information about the SKY_GRAPHICS and DEFAULT_SPRITES objects. TRwest will build this file based on the contents of your wad.|
|.WAD||Object WAD, contains all the information about the 3d objects in a wad. TRwest will build this file based on the contents of your wad.|
|.WAS||Object WAD Script, listing of all the objects in the wad. TRwest will build this file based on the contents of your wad.|
Basically the contents of wad are stored in five different files: .SAM, .SFX, .SWD, .WAD, .WAS. TRwest will read in these files when you want to use the objects in the various wads, and will create these files when you save your new wad.
If you installed the Tomb Raider Level Editor in a directory other than C:\Program Files\Core Design\trle the following informational message is displayed when TRwest starts.
And you will be prompted to select the directory where you installed the level editor, the Ok button on the directory selection dialog will become enabled when it finds the file objects.h in the selected directory. TRwest reads in the file objects.h to get the names of the various objects in the wads, this file is also read in and used by the Room Editor in a similar fashion.
The main window of TRwest is divided into two sections. The left side is a tree of wads and their objects and is labeled as "Reference Objects". Each root node in the tree is the name of a wad you loaded, by expanding the wad name you can see a list of all the objects in that wad. The right side of the main window is a list of all the objects that can be defined for any given wad, this list will be referred to as the editing wad list in the rest of this documentation. There are several columns in this list, the first indicates (with a check mark in the column) whether or not a particular object will be saved in the new wad. The ID column indicates the type of object, 'M is for moveables and 'S' is for static meshes, and the internal number for the object. This information is also displayed next to the objects in the tree on the left side of the main window. Object types and numbers are further explained in the next section Object Types. The third column, Name, is the name for the object and is taken from objects.h. The last two columns will have values when you add an object to the new wad and indicates from where you added the object. The File column is the name of the wad and the Label column holds the name of the object. You can click on the heading above any column to sort the list ascending by that column, click on the heading again to sort it descending.
Above the editing wad list is a drop-down menu labeled "Display Objects of Type". I have categorized all the objects (there are over 500) into different classes so you don't have to search around so much for a particular object. The different classes are further described in next section Object Types.
Between the the two main windows are three buttons: Add>>, Replace>>, Delete>>. These allow you to add and delete objects from the new wad and are explained the section Adding, Replacing and Deleting Objects. At the top of the window is the menubar.
|New Wad||Clears the list of objects in the editing wad. If you made any changes since the the last time you saved the current editing wad you will be given the opportunity to save the changes.|
|Open Wad for Editing...||Loads any wad for editing, this will replace the current contents of the editing wad. If you made any changes since the last time you saved the editing wad you will be given the opportunity to save the changes.|
|Save Wad||This will save the contents of the editing wad using the current name. This name is displayed in the title bar and is the name of last wad loaded for editing or the name of the TRwest script used to load the editing wad. A wad name of "[untitled]" mean there is no filename associated with the editing wad and you will be prompted for a place to save the wad. By default, all wads are saved into the graphics\wads directory. I strongly urge you not to overwrite any of the wads distributed with the Level Editor. The levels created by other users may not work correctly if you change the contents.|
|Save Wad As...||Allows you save the editing wad in a new directory and/or with a new name.|
|Load Reference File...||Loads a wad or Tomb Raider 4 level into the Reference Objects tree. Use the "Files of Type:" drop-down menu to choose between wads and levels.|
|Build Wad from Script...||You will be prompted for a TRwest script file. A new wad will be generated with the same name as the TRwest script and saved to the default wad directory. TRwest scripts are fully explained in the section TRwest Scripts.|
|Load Script...||You will be prompted for a TRwest script file. All the wads necessary to build the editing wad will be loaded into the Reference Objects tree and the editing wad list is updated to show which objects are defined in the script, but the editing wad will not be saved. TRwest scripts are fully explained in the section TRwest Scripts.|
|Save Script...||Saves the contents of the editing wad list as a TRwest script. TRwest scripts are fully explained in the section TRwest Scripts.|
|Decompile script.dat||Decompiles a script.dat file for use by SCRIPT.EXE, refer to Decompiling Scripts for more information.|
|Confirm Deletions||Enables or disables the confirmation prompt when you delete an object from the editing wad list, by default confirmations are enabled.|
|Confirm Overwriting Objects||Enables or disables the confirmation prompt when you add an object using the Add>> button that already existing in the editing wad, by default confirmations are enabled.|
|On-Line Help||Starts your web browser and displays the homepage for TRwest (you are reading it now).|
|About||Displays a dialog indicating the current version of TRwest and other information.|
All of the objects for Tomb Raider can be split into two different types: moveables and static meshes. Moveables are objects that are animated like Lara, switches, enemies, doors etc. Static meshes are objects that just sit there and look pretty like the various architecture and debris objects. This object type is displayed to the left of the object names in the Reference Objects tree and editing wad list, 'M' stands for moveable and 'S' is for static meshes. After this object type is the internal object ID number.
Actually, there is a third object type called sprites and they contain various pieces of texture used for special functions in Tomb Raider. In previous versions of the game sprites were used to display the various pickups but that method was replaced with 3D models. It appears that sprites are no longer supported, especially by the Room Editor, and are used only for special things. The only sprite objects defined for wads are SKY_GRAPHICS, DEFAULT_SPRITES and MISC_SPRITES. SKY_GRAPHICS contains the level specific sky texture. DEFAULT_SPRITES contains various textures used for other objects like the flames displayed by the FLAME_EMITTER objects. None of the wads use MISC_SPRITES so I couldn't say what this object contains. If you want your wad to function properly when it is played as a level you must include DEFAULT_SPRITES, the section Required Objects (Lara.TWS) goes over all the necessary objects.
It is important to remember that the function of an object is dependent on it's internal object ID number, the text label associated with the object ID is not relevant and is only a convenience for level creators. Tomb Raider uses these internal object ID numbers as an indication of what the game needs to do when displaying an object and what happens when Lara interacts with an object. For example, if you want an object to function as a switch it's internal object ID number must be 303-306 (SWITCH_TYPE1 - SWITCH_TYPE8) then when Lara interacts with that object she will do her switch movement and the game will fire off any triggers associated with the object that are defined as switch triggers. Another thing to keep in mind is just because you define an object as a switch doesn't mean that object will do any animation when Lara throws the switch, the game looks for a particular animation associated with the switch object and performs it when the switch is thrown. Some objects that were not made to be switches may or may not have this particular animation (called a "state") so the results can be unpredictable. TRwest will happily let you define any object as a switch, like putting the LARA object into the SWITCH_TYPE1 object, but it's up to you to find out if the object will behave in any rational manner when it is used as a switch.
The "Display Objects of Type" drop-down menu above the editing wad list will display all the objects of a certain class. The classification system is something I came up with to group all the objects based on their function. Since I have classified all the objects only once some objects may be re-classified in future versions of TRwest, this really does need to be done better. If you can't find a particular object even when you believe that you are in the correct class try looking in Miscellaneous and Static classes.
|All Objects||Displays all the objects regardless of their class.|
|Lara||Objects that make up Lara and her various movements along with some required objects. Includes the LARA_START_POS object.|
|Animating||Objects with the label ANIMATING## and ANIMATING##_MIP.|
|Doors||Various door objects.|
|Enemies||The bad guys, includes Von Croy and Jean Yves.|
|Enemy AI||The various AI_XXXXX objects.|
|Inventory Items||These are items that Lara can store in her inventory like the crowbar and medi kits. Weapons, puzzle pieces, keys and quest items have their own class.|
|Keys||Objects with the label KEY##.|
|Levers and Switches||The various switches and levers.|
|Miscellaneous||These are various objects that really didn't fit into the other classes and objects that are not defined in any of the wads.|
|Moving||Contains a few objects that animate when triggered like the RAISING_BLOCK object.|
|Outside||The SKY_GRAPHICS and HORIZON objects, these two objects are needed if you want your level to have an outside area that displays the sky and horizon. Refer to the Create a horizon and sky section for a full explanation.|
|Pickups||These are various other inventory items that start with PICKUP_ITEM## like the broken glasses, broken beetle and mechanical beetle.|
|Pushable||Objects labels starting with PUSHABLE_OBJECT##, these are things that Lara can push and pull. Refer to the section Objects that Lara can push around to find out how to make just about any object a pushable object.|
|Puzzles||Objects with the label PUZZLE_ITEM##. When you add puzzle objects to the editing wad you must make some changes to script.txt (refer to Script.txt Modifications).|
|Quest Items||Objects with the label QUEST_ITEM## (Ankh, etc).|
|Shatterable||Objects with the label SHATTER##, these are objects that Lara can shatter by shooting. Refer to the section Objects that Lara can shatter by shooting to found out how to make just about any object shatterable.|
|Static||These are the various architecture, debris, plant and rock objects.|
|Traps||The various traps like the rolling ball, darts and blade traps.|
|Vehicle||The motorcycle and jeep objects, includes the two objects that Lara can smash through on the motorcycle.|
|Weapons and Ammo||Lara's weapons and ammunition pickups.|
Adding objects to your new wad is rather simple, select the object in the Reference Objects tree that you want to add to your wad and press the Add>> button. The item in the editing wad list with the same object ID number is updated: a check mark is displayed and the File and Label fields are filled in with the wad and object name of item you selected in the Reference Objects tree. As a convience you can add all the objects from a particular wad at once by selecting the wad name in the Reference Objects tree (one of the root nodes) and pressing Add>>.
If you attempt to add an object but the same object ID in editing wad is already defined you will be prompted to confirm the replacement of the existing object. You can disable this confirmation prompt with the Confirm Overwrites menu item in the Options menu.
The Replace>> button allows you to add an object from the Reference Objects tree as a particular object in the editing wad list. For example, say you want two objects from two different wads but they are both defined as DEBRIS0, you can add one of the DEBRIS0 objects as DEBRIS0 and the other DEBRIS0 object as DEBRIS1. This replacement function works for all objects in any wad with the following exceptions: you can only replace SKY_GRAPHICS with other SKY_GRAPHICS, DEFAULT_GRAPHICS with other DEFAULT_GRAPHICS (the DEFAULT_GRAPHICS object is exactly the same in every wad), and you cannot replace a moveable with a static mesh or a static mesh with a moveable (this last restriction will be removed in the next version). To replace an object just select an object in the Reference Objects tree and an object in the editing wad list and press Replace>>, the item in the editing wad list is updated in the same manner as when you add an item. When TRwest saves the wad it will replace the internal object ID number of the object selected in the Reference Objects tree with the number you selected in the editing wad list. This is how you can make one object behave like another and is key to making an object into something Lara can push and pull around or shatter by shooting.
Pay special attention whenever you add objects that begin with PUZZLE. There are several different objects that make up a puzzle: PUZZLE_ITEM, PUZZLE_HOLE, PUZZLE_DONE and PUZZLE_ITEM_COMBO. When you add a puzzle item, make sure to add any other objects with the same puzzle number that are defined in the wad or the object won't work correctly.
If you no longer want to include an object in your wad, select the object in the editing wad list and press Delete>>. The checkmark and File and Label fields are cleared and the object won't be saved when you save the wad.
When you save the editing wad some additional information is displayed: the number of "texture objects" and the amount of texture memory used by the wad.
A texture object specifies the texture used by a polygon in an object's model, this number is also known as the Texture Infos number in the Level Converter (but this number also includes room textures). A level can contain a maximum of 4096 Texture Infos (room and wad texture objects), but if you go over 2048 texture objects in a wad the Room Editor will display some objects with transparent (and incorrect) textures. If you go ahead and convert and play the level everything seems to fine but there might be some problem I haven't encountered.
The amount of texture memory is given in bytes and tiles. You can only use a total of 4MB of memory for objects and room textures, which equates to 16 tiles. Refer to section The textures are all screwed up in the game and Room Editor for more information on texture memory.
So, what about wads that are already being used by projects? The answer is this, you can add and replace objects without any trouble, the .PRJ file only holds the internal object ID numbers so any changes you make in the wad are reflected the next time you open the project in the Room Editor. Deleting objects in the wad can cause some minor problems. If you have placed an object in a room and then delete it from the wad the next time you open the project in the Room Editor you will see the following error message if you have a trigger associated with the deleted object:
Retain All Triggers (Remap to Lara?)
Whether or not you want to retain the triggers is up to you, the Level Editor manual says you should always hit Cancel. Also, you will receive the following message whether or not there are associated triggers:
WARNING: ## objects were not in the anim wad and have been removed from the map
This is just the way the Room Editor deals with the deleted objects. When you save the project the Room Editor will remove all references to the deleted object from the project so you won't keep getting these messages whenever you open the project. If you deleted an object by mistake, exit the Room Editor without saving the project, add the object back into the wad and save it. Now when you open the project again in the Room Editor you won't get these messages.
This information applies to both The Last Revelation and Times exclusive levels and are referred to as TR4 files in the rest of this section.
To load a TR4 file select the "Load Reference File..." menu item from the File menu, the "File as type" drop-down menu item has an additional selection: Tomb Raider 4 Level. The file will be loaded into the Reference Objects tree and can be used as if it were a normal wad except that the SKY_GRAPHICS and DEFAULT_SPRITES objects are not available, just get these objects from the standard wads. If you are going to be frequently using TR4 files you should copy them from the \data directory on The Last Revelation CD to a directory on your hard disk, this will speed up the file reading.
You should use the Lara objects from the wads, the animations in the TR4 files may not include all her various movements.
Many of the objects in TR4 files that were not present in the wads may not work as they do in the game because the OCB settings are not known, experiment with the different items and if you find out anything new please send an e-mail and I'll add the information to this page.
You can play the various levels using the game executeable distributed with the Level Editor if you decompile the script.dat from The Last Revelation or the Times Exclusive games and recompile them with SCRIPT.EXE. There are several modifications you will need to make to the english.txt file, but you can download the corrected versions, and a description of the modifications necessary, from the download section at the top of this page. You should be aware that the FMV cut-scenes are not viewable because support for these are not compiled in the game. Also some of the cut-scenes, specifically those that are shown at the start of level don't seem to work correctly. Finally, you won't be able to hear any of the sound effects, I believe it is because the sound format is different in the Level Editor version of game but I haven't really checked into it that much.
What are animation dependencies? The objects in a wad are made up of various pieces of information that control how the object is displayed and any movement when it is used in the game. One of these pieces of information is called an animation and indicates how an object moves. For example, a door object will have an animation that says when I am triggered the polygons that make up my door will move upwards a certain distance and then stop (and thus revealing the passageway hidden behind the door). The problem is, some objects hold these animations for other objects and therefore they depend on the information contained in another object, hence animation dependencies.
Why do you need to know about this? Because if you add an object to the editing wad you must also add the objects it depends on so it can work correctly. TRwest takes this fact into account and checks that you have added all the objects needed when it goes to save the wad. If you haven't added the these additional objects TRwest will display the following error message:
The first line of the error message just contains some data I used for debugging, this won't mean much to you but I left it in just in case it's needed. The second and third line says that in the WWWW wad, the BBBB object depends on the AAAA object and you need to add object the AAAA. TRwest won't be able to save the wad until you add this object. Also, the save process stops once it encounters an error so if an object depends on more than one other object, or there is another object in the editing wad with dependencies you may keep on getting this error message (but with different values for AAAA, BBBB and WWWW) when you save the wad again until all the dependent objects are added.
There aren't that many objects that have animation dependencies so it won't be much of a problem. I've looked through some of the objects and for the most part there is no reason for these dependencies to exist. My best guess is that since the wad data is something that Core put together and wasn't really meant to be taken apart and thrown back together without using their in-house tools, pieces of data that are needed in the production version of the level were never removed properly. However, there are a very few instances where an object really does require the animations from another object. But since TRwest can't yet make the distinction between the required and extraneous animation dependencies you'll have to add the necessary objects. Hopefully, I'll come up with some fix in a future version that will handle this (I have a few ideas).
To make life easier, I have compiled a list of the objects in all the wads that depend on other objects.
|2||UZI_ANIM||CROSSBOW_ANIM, DOOR_TYPE3, SHOTGUN_ANIM|
|6||SIXSHOOTER_ANIM||BIGMEDI_ITEM, FLARE_ANIM, LARA_HOLSTERS_UZIS, LARA_SKIN, LARA_SKIN_JOINTS, PUZZLE_HOLE11, SIXSHOOTER_AMMO_ITEM, TORCH_ANIM|
|2||UZI_ANIM||CROSSBOW_ANIM, LEVER_SWITCH, SHOTGUN_ANIM|
|6||SIXSHOOTER_ANIM||AI_PATROL1, AI_MODIFY, DOOR_TYPE4, DOOR_TYPE5, FLARE_ANIM, HAIR, LARA_HOLSTERS_UZIS, LARA_SKIN, LARA_SKIN_JOINTS, ROPE|
|96||SAS_MIP||DART_EMITTER, FLAME_EMITTER, FLAME_EMITTER2|
|2||UZI_ANIM||CROSSBOW_ANIM, SHOTGUN_ANIM, SWITCH_TYPE1|
|6||SIXSHOOTER_ANIM||BIRD_BLADE, COMPASS_ITEM, DOOR_TYPE4, FLARE_ANIM, FLARE_INV_ITEM, LARA_HOLSTERS_UZIS, LARA_SKIN, LARA_SKIN_JOINTS, TORCH_ANIM|
|2||UZI_ANIM||CROSSBOW_ITEM, CROSSBOW_ANIM, SHOTGUN_ANIM|
|6||SIXSHOOTER_ANIM||FLARE_ANIM, LARA_HOLSTERS_UZIS, LARA_SKIN, LARA_SKIN_JOINTS, PUZZLE_DONE3, SMOKE_EMITTER_WHITE, SMOKE_EMITTER_BLACK, TORCH_ANIM|
|439||ANIMATING7||ANIMATING9, ANIMATING10, ANIMATING14|
|2||UZI_ANIM||CROSSBOW_ANIM, DOOR_TYPE3, SHOTGUN_ANIM|
|6||SIXSHOOTER_ANIM||BINOCULAR_GRAPHICS, CATWALK_BLADE, CROSSBOW_AMMO3_ITEM, CROSSBOW_BOLT, FLARE_ANIM, LARA_HOLSTERS_UZIS, LARA_SKIN, LARA_SKIN_JOINTS, TARGET_GRAPHICS, TORCH_ANIM|
|2||UZI_ANIM||CROSSBOW_ANIM, DOOR_TYPE2, SHOTGUN_ANIM|
|6||SIXSHOOTER_ANIM||CROSSBOW_AMMO3_ITEM, CROSSBOW_BOLT, FLARE_ANIM, HAIR, LARA_HOLSTERS_UZIS, LARA_SKIN, LARA_SKIN_JOINTS, KEY_ITEM2|
|2||UZI_ANIM||CROSSBOW_AMMO1_ITEM, CROSSBOW_ANIM, SHOTGUN_ANIM|
|6||SIXSHOOTER_ANIM||DOOR_TYPE1, FLARE_ANIM, LARA_HOLSTERS_UZIS, LARA_SKIN, LARA_SKIN_JOINTS, SMOKE_EMITTER_BLACK, STEAM_EMITTER, TORCH_ANIM|
|2||UZI_ANIM||CROSSBOW_ANIM, FIREROPE, SHOTGUN_ANIM|
|6||SIXSHOOTER_ANIM||FLARE_ANIM, GRENADE_GUN_AMMO3_ITEM HAIR, LARA_HOLSTERS_UZIS, LARA_SKIN, LARA_SKIN_JOINTS, LEVER_SWITCH, SAS, SWITCH_TYPE7|
|96||SAS_MIP||FLAME_EMITTER2, FLAME_EMITTER3, HOMING_DART_EMITTER|
|2||UZI_ANIM||CROSSBOW_ANIM, PUZZLE_HOLE2, SHOTGUN_ANIM|
|6||SIXSHOOTER_ANIM||AI_PATROL2, AI_X1, DOOR_TYPE1, FLARE_ANIM, HAIR, LARA_HOLSTERS_UZIS, LARA_SKIN, LARA_SKIN_JOINTS, SLICER_DICER|
|2||UZI_ANIM||CROSSBOW_ANIM, DOOR_TYPE2, SHOTGUN_ANIM|
|6||SIXSHOOTER_ANIM||ANIMATING6, FLARE_ANIM, GRENADE_GUN_AMMO1_ITEM, GRENADE_GUN_AMMO2_ITEM, HAIR, LARA_HOLSTERS_UZIS, LARA_SKIN, LARA_SKIN_JOINTS, PUZZLE_ITEM5|
I have created a TRwest script called Lara.TWS that contains all the necessary objects for Lara and the standard inventory items. All the objects defined in this script come from the library wad. You can download it by refering to the top of this page. There is nothing special about the script and you can create your own if you like. But you may encounter some problems in the game, like crashes and objects being displayed as a part from Lara's body if you don't include all the objects you need. Some of the inventory objects can be deleted if you aren't going to include them in your level. This script only refers to the grown up Lara, if you want to create a wad that uses the younger Lara refer to the Use young Lara section for instructions. Here is a description of the objects in the script and why, for objects that are in Lara's inventory the same object is displayed as the item you see on the ground and the item displayed in Lara's inventory screen.
|LARA||This is the base object for Lara and contains most of her animations|
|PISTOLS_ANIM||The animation when Lara uses the pistols|
|UZI_ANIM||The animation when Lara uses the uzi|
|SHOTGUN_ANIM||The animation when Lara uses the shotgun|
|CROSSBOW_ANIM||The animation when Lara uses the crossbow|
|GRENADE_GUN_ANIM||The animation when Lara uses the grenade gun|
|SIXSHOOTER_ANIM||The animation when Lara uses the revolver|
|FLARE_ANIM||The animation when Lara uses a flare|
|LARA_SKIN||Holds the textures that make up most of Lara's skin and clothes|
|LARA_SKIN_JOINTS||Holds the rest of Lara's skin and clothes|
|LARA_SCREAM||The animation when Lara is falling and screaming (not too sure)|
|LARA_CROSSBOW_LASER||The animation when Lara uses the crossbow with the laser sight|
|LARA_REVOLVER_LASER||The animation when Lara uses the revolver with the laser sight|
|LARA_HOLSTERS||The animation when Lara is wearing the holsters|
|LARA_HOLSTERS_PISTOLS||The animation when Lara draws the pistols from her holsters|
|LARA_HOLSTERS_UZIS||The animation when Lara draws the uzis from her holsters|
|LARA_HOLSTERS_SIXSHOOTER||The animation when Lara draws the revolver from her holster|
|CROWBAR_ANIM||The animation when Lara uses the crowbar|
|TORCH_ANIM||The animation when Lara uses the torch|
|CROWBAR_ITEM||The crowbar inventory item|
|BURNING_TORCH_ITEM||The torch inventory item|
|DOOR_TYPE1||This is one of those instances of an extraneous animation dependency. The SIXSHOOTER_ANIM object references DOOR_TYPE1.|
|PISTOLS_ITEM||The pistol inventory item|
|PISTOLS_AMMO_ITEM||The pistol ammo inventory item|
|UZI_ITEM||The uzi inventory item|
|UZI_AMMO_ITEM||The uzi ammo inventory item|
|SHOTGUN_ITEM||The shotgun inventory item|
|SHOTGUN_AMMO1_ITEM||The normal shotgun ammo inventory item|
|SHOTGUN_AMMO2_ITEM||The wideshot shotgun ammo inventory item|
|CROSSBOW_ITEM||The crossbow inventory item|
|CROSSBOW_AMMO1_ITEM||The normal crossbow bolts inventory item|
|CROSSBOW_AMMO2_ITEM||The poison crossbow bolts inventory item|
|CROSSBOW_AMMO3_ITEM||The explosive crossbow bolts inventory item|
|CROSSBOW_BOLT||This is the crossbow bolt you see flying through the air when you fire the crossbow|
|GRENADE_GUN_ITEM||The grenade gun inventory item|
|GRENADE_GUN_AMMO1_ITEM||The normal grenade ammo inventory item|
|GRENADE_GUN_AMMO2_ITEM||The super grenade ammo inventory item|
|GRENADE_GUN_AMMO3_ITEM||The flash grenade ammo inventory item|
|GRENADE||This is the grenade object you see flying through the air and landing on the ground when you fire the grenade gun|
|SIXSHOOTER_ITEM||The revolver inventory item|
|SIXSHOOTER_AMMO_ITEM||The revolver ammo inventory item|
|BIGMEDI_ITEM||The large medipack inventory item|
|SMALLMEDI_ITEM||The small medipack inventory item|
|LASERSIGHT_ITEM||The LaserSight inventory item|
|BINOCULARS_ITEM||The binoculars inventory item|
|FLARE_ITEM||The flare inventory item|
|FLARE_INV_ITEM||The flare object Lara holds in her hand and throws and lands on the ground|
|COMPASS_ITEM||The compass inventory item|
|MEMCARD_LOAD_INV_ITEM||The spinning floppy disk shown above Select Game to Load|
|MEMCARD_SAVE_INV_ITEM||The spinning floopy disk shown above Select Game to Save|
|SMOKE_EMITTER_BLACK||An animation dependency for the SIXSHOOTER_ANIM object|
|STEAM_EMITTER||An animation dependency for the SIXSHOOTER_ANIM object|
|GUNSHELL||When Lara fires the revolver or uzi this is the object displayed as the ejecting shell casings|
|SHOTGUNSHELL||When Lara fires the shotgun this is the object displayed as the ejecting shell casings|
|GUN_FLASH||This is the object shown to display the flash of light seen when Lara fires a weapon|
|BINOCULAR_GRAPHICS||The graphics seen when Lara uses the binoculars, if you don't include this object the game will crash when Lara uses the binoculars|
|TARGET_GRAPHICS||The graphics seen when Lara looks through the LaserSight|
|DEFAULT_SPRITES||Contains various bits of texture used by the game, the game will crash when Lara fires her weapons if you don't include this object|
You will be prompted to enter two separate files. The first is language.dat where language is english, german, dutch, etc. and contains the text strings used by the game, the second file is script.dat. The output from TRwest will be language.txt and script.txt and are placed in the same directory as the source files.
You can decompile the script.dat files for The Last Revelation and Times Exclusive, they use a file called "us.dat" instead of "english.dat" for the text strings in my (American) version of the game. Copy them from the CD to any directory on your hard disk because TRwest will attempt to output the decompiled files to the CD. There is a modification you will have to make to the language.dat file before it can be used by Level Editor version of the game, just add the second to last line (it begins with "OEM1") from the standard english.txt file to the same place in language.txt. If you do not add this line the game will crash during startup. There is more information on how to play The Last Revelation and Times Exclusive levels in the Using Tomb Raider 4 Levels as Wads.
You cannot successfully decompile the script.dat file distributed with Tomb Raider Chronicles, it has slightly different values for some of the commands. But I have modified an internal version TRwest to decompile this file and made it available for download (see the download section at the top of this page). It's interesting to look at but the version of the game distributed with the Level Editor cannot actually play any of the Chronicle levels.
The commands Cut= and FMV= will be commented out since they cause problems with the version of the game distributed with the Level Editor. For more information about the various command refer to Script.txt Commands.
If you have created a level before you are somewhat fimilar with the contents of script.txt, but there are some modifications you need to make for your level to work correctly. Specifically, if you include any objects that begin with KEY_ITEM, PICKUP_ITEM or PUZZLE_ITEM you need to add some lines to the section of script.txt that refers to your level. Lets go over an example.
Say you add the Token, KEY_ITEM1, from the coastal wad to your new wad as KEY_ITEM1. You need to copy the "Key=" line from Coastal Ruins section of script.txt to the section for your level. If you added the Token not as KEY_ITEM1 but as KEY_ITEM5 you need to copy the line and change the number '1' (one) on that line to '5' (five).
Copy from the coastal section to your section:
Key= 1,Token, $0013,$0200,$4000,$0000,$0000,$0002
and change the one to a five:
Key= 5,Token, $0013,$0200,$4000,$0000,$0000,$0002
This first number must be the same as the number appended to KEY_ITEM. The same changes are necessary for the PICKUP_ITEM and PUZZLE_ITEM objects. However, some of these objects have more than one part like the two halves of the Cartouche puzzle. In these instances you need to copy the "Puzzle=" and "PuzzleCombo=" lines and change the first number on all the lines if necessary. For the PuzzleCombo lines the second number refers to the number after the word COMBO in the object name but you don't need to make any changes to that number.
Included in TRwest is the ability to save the contents of the editing wad list to a very small file without having to save it as a wad. These files are called TRwest scripts and they contain information about the objects you have defined for a wad and from which wad they originally came. This is an easy way to distribute a custom wad for your level without having to distribute all the files that make up the wad. Just make available the .TOM file and the TRwest script and the user can use TRwest to build all the files that the Level Convertor needs to build the level. Another use is for retaining the information about where your wad's objects came from since it stores the name of the wad and the object ID number. I would recommend you always save a script along with a wad, I found it very useful when developing the test level to see where a particular object came from. It is also useful to me as the developer of TRwest to help track down any problems in TRwest, if you save a script of your wad I can use it recreate the conditions of any bugs you encounter.
A TRwest script file has an extension of TWS and contains standard ASCII characters that can be easily changed with a regular editor (don't use a word processor since it will insert all the formatting information needed by the wordprocessing application). The format is fairly simple, the first line in the file must be:
This indicates that it is a TRwest script with a version number of '1' (one), there should only be a single space character between "TWS" and "V1". If there are any future changes to the format of the TRwest script file the version number will be updated. The rest of the file defines the objects in the wad, one object per line, in the following format:
Each field in the line is separated by a colon. The first field is the internal object ID number of the object you want to define, the second field is the string "WAD" and indicates that the object came from a wad. The third field is the internal object ID number of the object that TRwest will use when creating this object and the last field is the name of the wad.
Starting with TRwest v2.00 the version of TRwest Scripts are "2" and you can use the string "TR4" in the second field instead of "WAD" to indicate that the object comes from a Tomb Raider 4 level file (The Last Revelation and Times Exclusive).
This defines object 0 (zero), LARA, as the object 0 (zero), LARA, from the library wad. When you just add objects using the Add>> button the two internal object ID numbers will be the same. But if you use the Replace>> button to add an object, the two numbers won't be the same.
This defines object 234, PICKUP_ITEM4, and TRwest will use object 231, PICKUP_ITEM1, from the cleopal wad when it saves your wad.
One last note about the internal object ID numbers. Tomb Raider has two sets of object IDs, one for the moveables and one for the static meshes and they both start at zero. To accomodate the overlapping IDs, the number stored for for static meshes in a TRwest script is the internal object ID of the static mesh plus 465, which is one more than the maximum internal object ID number for moveables. So a line for a static mesh is:
Which defines the static mesh with an object ID 1 (465+1), PLANT1, as 466, PLANT1, from the tut1 wad.
Use the menu items in the Script menu to load and save TRwest scripts. When you are satisfied with the contents of your wad use the Save Wad... and Save Wad As... menu items from the File menu to save your wad. The Build Wad from Script... menu item in the Script menu allows you to immediately build the wad from a selected TRwest script, the name of the wad created will have the same name as the TRwest script file.
This section describes how to do a few things that most users have desired. If you know of any additional topics you want covered or want to contribute to this section drop me an e-mail.
To create an outside area you must add the HORIZON and SKY_GRAPHICS objects to your wad and add the following lines to the section of script.txt that pertains to your level:
The Horizon line tells the game that you are using an outside area, the Layer1 line defines the transparency of your sky and the rate of movement. You can add an additional layer to your sky texture by adding a Layer2 line, it has the same format as Layer1. When the Level Convertor builds the level it will search the graphics\wads directory for a file called TTT.raw, where TTT is the name of the .TOM file, to use as the sky texture, if there is no file called TTT.raw it will use the file pcsky.raw.
The objects PUSHABLE_OBJECT1 through PUSHABLE_OBJECT5 define the objects that can pushed and pulled by Lara. Any moveable can be defined as one of these objects by using the Replace>> button, select the object you want to push around from the Reference Objects tree and one of the PUSHABLE_OBJECT# objects in the editing wad list and click on Replace>>. Future versions of TRwest will include the ability to replace a moveable with a static mesh which will increase the variety of objects that Lara can push and pull.
The objects SHATTER0 through SHATTER9 define the objects that will shatter when Lara shoots them. Since these objects are static meshes you can only replace them with other static meshes. Future versions of TRwest will include the ability to replace a static mesh with a moveable which will increase the variety of objects that Lara can blow up.
If you want to use the younger version of Lara, add to your wad the following objects from angor wad: LARA, PISTOLS_ANIM, LARA_SKIN, LARA_SKIN_JOINTS, LARA_SCREAM, HAIR. She is limited to only using the pistols. Your wad shouldn't contain any other objects that are used by the older Lara (it might be possible to use them but I haven't had any luck with the few tests I tried). And you need to add the following line to your section of the script.txt:
Be sure to include any other required items other than the older Lara animations, refer to Required Objects (Lara.TWS) section for the list of items.
There were some objects in the wad that have some special requirements or have some additional notes I wrote down during testing that might help you in creating your wad. If you encounter any additional information about some objects drop me an e-mail and I'll add it to this section.
Most of the time when the game encounters an object that is not defined properly in the wad it will display Lara's pelvis or possibly one of Lara's shins. For example, if you don't include the small medipack in your wad and the user activates the DOZY cheat and then brings up the inventory screen, the object displayed for the small medipack will be a part of Lara's body. If you encounter a body part instead of the object's real model check through the wad where you got the object to see if any additional objects need to be added (refer to the FISH and AHMET_MIP: Locust swarm section for one of the instances I uncovered during my tests).
This is a rather preliminary explanation for the problem and solution. There may be some additional things the game does when handling texture memory that nobody knows about except Core.
Some people have reported that some or all of the textures are incorrect when they play the level, at first I thought it was problem with TRwest but it has to do with the amount of texture memory used by the level. The Tomb Raider game has a hard-coded limit of 4MB of memory set aside for textures used by the objects, (which is stored in the wad), and rooms (the file used with the Load TGA menu item in the Room Editor). When the Level Convertor builds the level it takes these textures and gathers them into segments called tiles, each tile holds 256KB of texture data so there is a maximum of 16 tiles (16 * 256KB = 4MB) allowed in a level. Additionally, the Level Convertor doesn't combine the object textures and room textures into the same tile. What this means is there is a separate set of tiles only for object textures and another set of tiles for room textures, and the total number of tiles in these two sets cannot exceed 16. If you keep adding objects to your wad or use a lot of different textures in your rooms eventually there will be so much texture data that the Level Convertor will create a 17th (and possibly 18th, 19th, etc) tile. At this point, when you play the level the game starts displaying incorrect textures on the objects. There is no way to create anything that will allow the game to handle more than 4MB of texture data, it is just the way the game was written.
Surprisingly, the Room Editor and Level Convertor don't display an error message if you exceed the 4MB limit. You may think that the Room Editor message ERROR: Too many texture objects means you exceeded the limit, but I believe this indicates that there are too many individual pieces of texture. TRwest can't really determine if you exceed this limit since it doesn't have access to the data for the room textures, it is stored in the project file.
The only way I know of to fix the problem of incorrect textures is to start deleting objects you don't need from the wad or decrease the number of different textures you use in your rooms. The Level Convertor will only include the textures you actually use in your rooms, unused room textures are not included in the level; but it will include all the textures used by all the objects in your wad even if you don't actually use that object in your level.
Here is a listing of the number of tiles allocated for objects in the various wads distributed with the Level Editor.
There are two different ways your can determine if your level uses too much texture memory: the obvious one is that your level is not displaying correct textures. Or, check to see if any objects are displayed with incorrect textures in the object panel in the Room Editor. I won't completely dismiss the notion that TRwest might be generating incorrect texture information, but out of all the levels I created for testing (around 20 or so), the only time there has been incorrect textures is when I have exceeded the limits for texture memory.
When I wrote the processing for the SWD file I made a certain assumption about the format of the data in the file. Of course there is one exception: cleopal.SWD. Just don't use the SKY_GRAPHICS and DEFAULT_SPRITES objects from the cleopal wad in your wad, these two objects are the same in all the other wads so get them from another wad. TRwest will actually save the wad (and output some garbage in the SWD file) but the Level Convertor will crash. I'll be fixing this in a future version of TRwest.
Of the 8 switches that can be defined for a wad (SWITCH_TYPE1 through SWITCH_TYPE8), there are two switches that can be shot to activate: SWITCH_TYPE7 and SWITCH_TYPE8. You can replace these two objects with any other object and Lara will be able to shoot them and the game will activate any associated switch triggers, but the animation for the object when it is shot may not do anything at all or move in strange way. This goes back to the animations defined for an object, which indicate it's behavior during the game. Experiment with the different objects to see what happens.
If you want to include the swarm of locusts in your wad you need to include two separate objects: FISH and AHMET_MIP. The FISH object is what you place in a room to define the locust swarm (like it says in the manual), but it doesn't define the model for the locust, AHMET_MIP does. If you don't include AHMET_MIP in your wad the game will use Lara's shin when displaying all the little bugs, but there is no need to actually place the AHMET_MIP in any room. It's an interesting thing to watch, a bunch of shins flying around...
The white robed enemy from the tut1 wad needs two separate objects to function correctly, BADDY_1 and MESHSWAP3. If you don't include MESHSWAP3 parts of the model will appear as Lara's shin. Make sure you take both objects from the tut1 wad.
The black robed enemy in the guard and karnak wads needs two separate objects to function correctly, BADDY_1 and MESHSWAP2. If you don't include MESHSWAP2 parts of the model will appear as Lara's shin. Make sure you take both objects from the same wad.
Von Croy, in the angkor wad, needs two separate objects for him to appear correctly in the game: VON_CROY and MESHSWAP1. When he initially appears he will use MESHSWAP1 which is the model that has him holding a dairy, the VON_CROY object is of him wielding his machette. Be sure two take both of the objects from the angkor wad.
It appears that only certain bad guys can be killed when Lara runs over them with the motorcycle. These inlcude: BADDY_1, BADDY_2, CROCODILE, DEMIGOD, DOG, HORSEMAN, SAS, SCORPION and WILD_BOAR. If Lara runs over any other type of bad guy you will see some blood splatter and hear the sound of Lara running over something, but the bad guy won't really die and disappear. In fact it tends to screw up game from that point on, Lara has trouble targeting enemies and doing other things. Avoid the condition where Lara can use the motorcycle in the same area as the following: GUIDE, HARPY, MUMMY, SKELETON, SPHINX and VON_CROY. You can try putting one of these objects into one of the slots that work and see what happens. As a test I put the the MUMMY object into the SCORPION slot and it was properly killed by the motorcycle. Then I tried putting the SKELETON in the BADDY_1 slot, the model for the skeleton was textured correctly but all bent out of shape with it's arms pointing in weird directions. There is really nothing TRwest can do about this, the behavior between the motorcycle and the enemies appears to be part of the game code. If you really want to use a certain enemy with the motorcycle just keep experimenting.
Lara's animation when she rides the motorcycle is contained in the VEHICLE_EXTRA object, be sure to add both the MOTORBIKE and the VEHICLE_EXTRA objects to your wad.
The data for the Guide in the settomb wad is contained in the GUIDE and MESHSWAP2 objects, be sure to include both objects in your wad.
To use the Jeep (contained in jeepchas.tr4 and jeepchs2.tr4) you need to include the JEEP, VEHICLE_EXTRA and PUZZLE_ITEM1 items from the same wad. You cannot use the VEHICLE_EXTRA object that is defined for the MOTORBIKE, it will screw up the game. The PUZZLE_ITEM1 object is the Ignition Key and Lara must have this object in her inventory before she can use the jeep. It really doesn't have to be the Ignition Key, the game only checks for the existance of PUZZLE_ITEM1 which you can define to be anything.
The game is coded so that the collision detection is only done with certain objects mainly the enemies and any room walls, but will pass through most other objects like ANIMATING, DEBRIS, PLANT, etc. as if they weren't there, design your levels accordingly. Also the jeep can kill most enemies, it seems to be similar to the MOTORBIKE but I haven't checked them all yet.
The giant dragon head is contained in the MUTANT object and requires the AHMET_MIP object for it's Locust swarm attack, you don't need to add the FISH object as described in the above section on Locust swarms. The BUBBLES object is used for the it's fireball attack, you don't need to place this object anywhere in the level (in fact it will cause the game to crash while loading) just make sure it is in the wad.
While TRwest works rather well in building wads, but nothing is perfect. The following is a list of problems I encountered while doing alpha testing and building the test level. Don't be scared away just because there a few problems, they aren't show stoppers and I haven't had TRwest crash since I finished the testing during the coding phase. The test level was completely created after the coding phase. You can reliably build just about any wad you want. Of course these problems, and any additional problems that will probably crop up once people start using TRwest heavily, will be fixed in future versions of TRwest.
Could not find next anim ### in the output data!
This is for animation ###, moveable XXX in the WWW wad
I know the cause of this problem and how to fix it, please don't send me any e-mail about it. For now, just avoid doing this. It will be fixed in the next version.
This section contains some of the possible error messages you mean encounter in TRwest and the Room Editor and what to do to fix them.
Please remember that the Room Editor wasn't written for public use, it is an in-house tool for use by people who knew how to use it and could avoid any problems that were never fixed. Most of the errors displayed when you load a project in the Room Editor can be solved by exiting and restarting the Room Editor. I sometimes encountered the error message "EVIL: invalid object ID" during the creation of the test level when I loaded my project; don't panic, don't save your project and restart the editor and all will be fine. Refer to the Adding, Replacing and Deleting Objects section for why you might encounter the message about remapping triggers or missing animations.