TOMB-RAIDER-EDITOR.com

image
image
image


ADDING OBJECT NAMES TO YOUR SCRIPT


By Bedazzled

This is something, which appears to cause new builders a lot of problems, but actually it’s quite simple. Using the script from the tut1 level as an example I’ll show how easy it is to add a puzzle or key item, later I’ll show how to change the items name.

The tut1 script is shown below.


[Level]

Name= Playable Tutorial Level
Legend= The year 2000, somewhere in Egypt...
Horizon= ENABLED
Layer1= 160,160,192,7
PuzzleCombo= 3,1,Cartouche Piece 1, $0000,$0400,$0000,$0000,$0000,$0002
PuzzleCombo= 3,2,Cartouche Piece 2, $0000,$0400,$0000,$0000,$0000,$0002
Puzzle= 3,Ba Cartouche, $0000,$0400,$0000,$0000,$0000,$0002
Puzzle= 5,Eye Of Horus, $0017,$0500,$0000,$0000,$0000,$0002
PuzzleCombo= 5,1,Eye Piece, $0017,$0500,$0000,$0000,$0000,$0002
PuzzleCombo= 5,2,Eye Piece, $0017,$0500,$0000,$0000,$0000,$0002
Puzzle= 6,The Hand Of Orion, $0000,$0400,$8000,$c000,$0000,$0002
Puzzle= 8,The Hand Of Sirius, $0000,$0400,$8000,$c000,$0000,$0002
LoadCamera= 0,0,0,0,0,0,255
LoadCamera= 11088,-1100,28896,11119,-1399,31486,0
Level= DATA\TUT1,107

First let’s take a closer look at a couple of those lines and see what it all means.

Puzzle= 5,Eye Of Horus, $0017,$0500,$0000,$0000,$0000,$0002

Puzzle= This indicates a puzzle item.
5, This means the puzzle is placed in puzzle_item slot 5.
Eye of Horus, This is the puzzle name which appears in the inventory.

PuzzleCombo= 5,1,Eye Piece, $0017,$0500,$0000,$0000,$0000,$0002
PuzzleCombo= 5,2,Eye Piece, $0017,$0500,$0000,$0000,$0000,$0002


PuzzleCombo= This indicates that the puzzle item consists of several parts.
5,1, This indicates that it’s part 1 of the puzzle item in slot 5.
5,2, This indicates that it’s part 2 of the puzzle item in slot 5.

Eye Piece This is the item name, which will appear in the inventory when Lara picks up one of the puzzle pieces.

The long line of Hex numbers determines how the item is displayed in the inventory, which I will not cover in this tutorial.

If the puzzle consists of only one part there will only be a single line as in this example .

Puzzle= 8,The Hand Of Sirius, $0000,$0400,$8000,$c000,$0000,$0002


Example 1

Add the Sun Talisman puzzle from the Temple of Karnak to an unused puzzle_item slot of our script.

Scroll through the script.txt file until you locate the Karnak section reproduced below.


[Level]
Name= Temple Of Karnak
Horizon= ENABLED
Layer1= 128,96,64,7
Puzzle= 2,Canopic Jar 1, $0001,$0320,$0000,$0000,$0000,$0002
Puzzle= 3,Canopic Jar 2, $0001,$0320,$0000,$0000,$0000,$0002
Puzzle= 1,Sun Talisman, $0000,$0500,$0000,$0000,$0000,$0002
PuzzleCombo= 1,1,Sun Disk, $0000,$0180,$0000,$0000,$0000,$0002
PuzzleCombo= 1,2,Sun Goddess, $0000,$04b0,$0000,$0000,$0000,$0002

Puzzle= 5,Golden Vraeus, $0003,$0300,$0000,$0000,$0000,$0002
Puzzle= 7,Guardian Key, $0009,$0300,$0000,$0000,$0000,$0002
Key= 2,Hypostyle Key, $0000,$0400,$0000,$c000,$0000,$0002
LoadCamera= 89366,-258,48077,88372,-1300,45701,0
Level= DATA\KARNAK,110

As you can see the puzzle uses slot 1, WADMerger would have automatically placed the puzzle items into puzzle_slot 1 for you. So simply copy and paste the 3 lines highlighted in blue into your script as shown below.

[Level]
Name= Playable Tutorial Level
Legend= The year 2000, somewhere in Egypt...
Horizon= ENABLED
Layer1= 160,160,192,7
Puzzle= 1,Sun Talisman, $0000,$0500,$0000,$0000,$0000,$0002
PuzzleCombo= 1,1,Sun Disk, $0000,$0180,$0000,$0000,$0000,$0002
PuzzleCombo= 1,2,Sun Goddess, $0000,$04b0,$0000,$0000,$0000,$0002

PuzzleCombo= 3,1,Cartouche Piece 1, $0000,$0400,$0000,$0000,$0000,$0002
PuzzleCombo= 3,2,Cartouche Piece 2, $0000,$0400,$0000,$0000,$0000,$0002
Puzzle= 3,Ba Cartouche, $0000,$0400,$0000,$0000,$0000,$0002
Puzzle= 5,Eye Of Horus, $0017,$0500,$0000,$0000,$0000,$0002
PuzzleCombo= 5,1,Eye Piece, $0017,$0500,$0000,$0000,$0000,$0002
PuzzleCombo= 5,2,Eye Piece, $0017,$0500,$0000,$0000,$0000,$0002
Puzzle= 6,The Hand Of Orion, $0000,$0400,$8000,$c000,$0000,$0002
Puzzle= 8,The Hand Of Sirius, $0000,$0400,$8000,$c000,$0000,$0002
LoadCamera= 0,0,0,0,0,0,255
LoadCamera= 11088,-1100,28896,11119,-1399,31486,0
Level= DATA\TUT1,107

Things become a little more complicated when we want to add a puzzle item which uses a slot already occupied by a puzzle. An example of this is the Portal Guardian from the Coastal Ruins level which uses puzzle slot 5, already used by the Eye of Horus. WADMerger can be used to place the puzzle into an unused slot, such as slot 2.


Example 2

Add the Portal Guardian puzzle from the Coastal Ruins into puzzle_item slot 2 of our script.

Scroll through the script.txt file until you locate the Coastal Ruins section again copy & paste these 3 lines into your script.

Puzzle= 5,Portal Guardian, $0008,$0600,$8000,$f000,$0000,$0002
PuzzleCombo= 5,1,Ornate Handle, $0002,$0500,$4000,$1000,$0000,$000a
PuzzleCombo= 5,2,Hathor Effigy, $0016,$0400,$8000,$0000,$0000,$0002


It should now look like this. Notice there are now 2 puzzles using the puzzle_item 5 slot.

[Level] Name= Playable Tutorial Level
Legend= The year 2000, somewhere in Egypt...
Horizon= ENABLED
Layer1= 160,160,192,7
Puzzle= 1,Sun Talisman, $0000,$0500,$0000,$0000,$0000,$0002
PuzzleCombo= 1,1,Sun Disk, $0000,$0180,$0000,$0000,$0000,$0002
PuzzleCombo= 1,2,Sun Goddess, $0000,$04b0,$0000,$0000,$0000,$0002
Puzzle= 5,Portal Guardian, $0008,$0600,$8000,$f000,$0000,$0002
PuzzleCombo= 5,1,Ornate Handle, $0002,$0500,$4000,$1000,$0000,$000a
PuzzleCombo= 5,2,Hathor Effigy, $0016,$0400,$8000,$0000,$0000,$0002

PuzzleCombo= 3,1,Cartouche Piece 1, $0000,$0400,$0000,$0000,$0000,$0002
PuzzleCombo= 3,2,Cartouche Piece 2, $0000,$0400,$0000,$0000,$0000,$0002
Puzzle= 3,Ba Cartouche, $0000,$0400,$0000,$0000,$0000,$0002
Puzzle= 5,Eye Of Horus, $0017,$0500,$0000,$0000,$0000,$0002
PuzzleCombo= 5,1,Eye Piece, $0017,$0500,$0000,$0000,$0000,$0002
PuzzleCombo= 5,2,Eye Piece, $0017,$0500,$0000,$0000,$0000,$0002

Puzzle= 6,The Hand Of Orion, $0000,$0400,$8000,$c000,$0000,$0002
Puzzle= 8,The Hand Of Sirius, $0000,$0400,$8000,$c000,$0000,$0002
LoadCamera= 0,0,0,0,0,0,255
LoadCamera= 11088,-1100,28896,11119,-1399,31486,0
Level= DATA\TUT1,107

We placed the portal Guardian into slot 2, so we must change the script accordingly.

[Level]
Name= Playable Tutorial Level
Legend= The year 2000, somewhere in Egypt...
Horizon= ENABLED
Layer1= 160,160,192,7
Puzzle= 1,Sun Talisman, $0000,$0500,$0000,$0000,$0000,$0002
PuzzleCombo= 1,1,Sun Disk, $0000,$0180,$0000,$0000,$0000,$0002
PuzzleCombo= 1,2,Sun Goddess, $0000,$04b0,$0000,$0000,$0000,$0002
Puzzle= 2,Portal Guardian, $0008,$0600,$8000,$f000,$0000,$0002
PuzzleCombo= 2,1,Ornate Handle, $0002,$0500,$4000,$1000,$0000,$000a
PuzzleCombo= 2,2,Hathor Effigy, $0016,$0400,$8000,$0000,$0000,$0002

PuzzleCombo= 3,1,Cartouche Piece 1, $0000,$0400,$0000,$0000,$0000,$0002
PuzzleCombo= 3,2,Cartouche Piece 2, $0000,$0400,$0000,$0000,$0000,$0002
Puzzle= 3,Ba Cartouche, $0000,$0400,$0000,$0000,$0000,$0002
Puzzle= 5,Eye Of Horus, $0017,$0500,$0000,$0000,$0000,$0002
PuzzleCombo= 5,1,Eye Piece, $0017,$0500,$0000,$0000,$0000,$0002
PuzzleCombo= 5,2,Eye Piece, $0017,$0500,$0000,$0000,$0000,$0002
Puzzle= 6,The Hand Of Orion, $0000,$0400,$8000,$c000,$0000,$0002
Puzzle= 8,The Hand Of Sirius, $0000,$0400,$8000,$c000,$0000,$0002
LoadCamera= 0,0,0,0,0,0,255
LoadCamera= 11088,-1100,28896,11119,-1399,31486,0
Level= DATA\TUT1,107

If the Eye Of Horus had not been required in the level, the Portal Guardian could have been placed into puzzle slot 5. The Portal Guardian text could then have been pasted over the Eye of Horus text, with no need to change the slot number in the script.


Example 3

This next example shows the addition of a one-piece puzzle “Pharos Pillar” and a key item.

[Level]
Name= Playable Tutorial Level
Legend= The year 2000, somewhere in Egypt...
Horizon= ENABLED
Layer1= 160,160,192,7
Puzzle= 1,Sun Talisman, $0000,$0500,$0000,$0000,$0000,$0002
PuzzleCombo= 1,1,Sun Disk, $0000,$0180,$0000,$0000,$0000,$0002
PuzzleCombo= 1,2,Sun Goddess, $0000,$04b0,$0000,$0000,$0000,$0002
Puzzle= 2,Portal Guardian, $0008,$0600,$8000,$f000,$0000,$0002
PuzzleCombo= 2,1,Ornate Handle, $0002,$0500,$4000,$1000,$0000,$000a
PuzzleCombo= 2,2,Hathor Effigy, $0016,$0400,$8000,$0000,$0000,$0002
PuzzleCombo= 3,1,Cartouche Piece 1, $0000,$0400,$0000,$0000,$0000,$0002
PuzzleCombo= 3,2,Cartouche Piece 2, $0000,$0400,$0000,$0000,$0000,$0002
Puzzle= 3,Ba Cartouche, $0000,$0400,$0000,$0000,$0000,$0002
Puzzle= 5,Eye Of Horus, $0017,$0500,$0000,$0000,$0000,$0002
PuzzleCombo= 5,1,Eye Piece, $0017,$0500,$0000,$0000,$0000,$0002
PuzzleCombo= 5,2,Eye Piece, $0017,$0500,$0000,$0000,$0000,$0002
Puzzle= 6,The Hand Of Orion, $0000,$0400,$8000,$c000,$0000,$0002
Puzzle= 8,The Hand Of Sirius, $0000,$0400,$8000,$c000,$0000,$0002
Puzzle= 11,Pharos Pillar, $0013,$04b0,$0000,$0000,$0000,$0002
Key= 10,Gate Key, $0008,$0300,$8000,$e000,$0000,$0002

LoadCamera= 0,0,0,0,0,0,255
LoadCamera= 11088,-1100,28896,11119,-1399,31486,0
Level= DATA\TUT1,107

These changes will not become apparent in game until you create new Script.dat & English.dat files. These will be created and copied into the TRLE root folder, when you run the Script MS-DOS Batch file found in the script folder by double clicking it.



Bedazzled : Changing Object Name to your Script




Changing the name of a puzzle or key involves working with the English.txt file as well as the script.txt file. It’s most important to remember that you can only replace a line of text in the English.txt file. You must never add or delete a line; doing so will cause the Level Editor to crash.

Note: It’s always a good idea to backup your script folder before making any changes to the script or English.txt files.


Example 4

Changing the name of a key.

Locate the line for the key in the script.txt file and rename the key as seen below, then copy the new name and save the script file back on itself.

Key= 10,Indra Key, $0008,$0300,$8000,$e000,$0000,$0002

Open the English.txt file and scroll through to find the Gate Key. The section is shown below:

Pharos Pillar

Token
Gate Key

The Rules of Senet


Paste the new key name over the name Gate Key; the text should now look like this:

Pharos Pillar

Token
Indra Key

The Rules of Senet


Save this file back on itself and run the Script MS-DOS Batch file. You’ll see the change next time you run the game.

Changing the name of a single piece puzzle item is done in a similar way. Rename the puzzle item in the script, save the script file, copy the new name and paste it over the puzzle items original name in the English.txt file. Save the English.txt file and run the Script MS-DOS Batch file.

Renaming a two part puzzle item is achieved in a similar way, but this time you must rename each puzzle part as well as the completed puzzle item.

The example below shows how I’ve renamed the Ba Cartouche puzzle to the Sun Key.

The original Script.txt.

PuzzleCombo= 3,1,Cartouche Piece 1, $0000,$0400,$0000,$0000,$0000,$0002
PuzzleCombo= 3,2,Cartouche Piece 2, $0000,$0400,$0000,$0000,$0000,$0002
Puzzle= 3,Ba Cartouche, $0000,$0400,$0000,$0000,$0000,$0002

The renamed puzzle parts:

PuzzleCombo= 3,1,Sun key Piece, $0000,$0400,$0000,$0000,$4000,$0002
PuzzleCombo= 3,2,Sun key Piece, $0000,$0400,$0000,$0000,$4000,$0002
Puzzle= 3,Sun key, $0000,$0500,$0000,$0000,$0000,$000a

The original English.txt

Sun Talisman
Cartouche Piece 1
Cartouche Piece 2
Ba Cartouche

Ra Cartouche

The modified English.txt

Sun Talisman
Sun key Piece
Sun key Piece
Sun key

Ra Cartouche


I think that just about covers it, you should now be able to rename your puzzle & key items without running into problems. That puzzle/key in the inventory calling itself 'load' should now be a thing of the past.




Back to top

image
©Copyright 2007-2009© tomb-raider-editor.com All rights reserved
Last update: 14/04/2008