Technical information for level editors and the curious

If you just want to play the game, you don't need to read this document.

If you're designing a level for TR1, here is detailed technical information about soundtrack trigger handling in the original and patched PC versions.

The handling of triggers is a little complicated, and there are a number of special cases.

General notes

Only one audio trigger can play at a time. Any audio trigger will interrupt any background or foreground sound currently playing. The one exception is the secret chimes, which when played internally play on top of other sounds.

Like other triggers, audio triggers can be marked as "once only" or not. The "has been triggered" flag for audio is not stored in the savefile, so after reloading you can backtrack to play music again.

Even if a trigger is not "once only", the engine will not play the same audio track twice in succession.

In TR1, triggers can stop any (foreground) audio; this is not the case in later games. The engine doesn't actually check whether it's the specified track that's playing, it will stop any foreground track currently playing.

The Tomb of Qualopec uses an antipad trigger to stop audio in one place, and a switch in the off position can stop a soundtrack. In this patch, an audio-stopping trigger will actually resume the background sound loop, if any.

You cannot stop the background loop once started, only replace it with another one. However, track 61 serves as silent ambience (and I believe it should stop the audio on the original TR1 executable).

If a trigger stops sound, the "last track" memory is cleared. This is the only way you can trigger the same track twice in succession. This is used in Caves to ensure that you get music every time you make a run for the door - turning off a switch, or stepping up to a switch that has turned itself off stops sound. Note that on the PlayStation version, stopping audio does not allow replay. I believe this to be a bug.

Track-specific behaviour

Not all tracks are created equal. Different soundtrack numbers have different behaviour.

Soundtracks are identified in level files by their track number on the PlayStation CD, starting at 2 for the title music, going up to 56 for the Skateboard Kid's taunts.

The four background ambiences in the PC version are given numbers 57-60, following on from the PS numbering. This means that 5 and 57 are duplicates, but they are handled differently by the engine.

Title, cut scene and ambience tracks (2, 22–25, 57–60)

These are the only tracks that were originally played by the PC version, and mapped to CD tracks 2–10 (with the ambience before the cut scenes). The original PC engine treats all of them as looping tracks - they become the "background". However, in the title menu and cut scenes, the tracks don't actually loop, as the loop checking routine is not called.

The patched version treats 57 upwards as looping, and the others as foreground tracks.

In the standard game these are only run at level/scene start, not as in-level triggers. But if these were started by an in-level trigger in a custom level, they would become the new background and loop in the original PC version, or play once in the PlayStation version and this patched version.

If the PS1-style audio is in use, the ambience tracks 57–60 map to CD track 28, leading to silence.

Silence (61)

This is a new internal number added for this patch. It operates exactly as the other ambience tracks, is accessed from CD track 28, and is used as the "ambience" for Lara's Home (unless internal dialogue is in use, in which case there's no need to keep the drive running).

PlayStation music tracks (3–12, 14–21)

These are the music tracks played on the PlayStation, but ignored on the original PC version.

In the patched PC version they play once, and then background resumes if applicable. They are accessed from CD tracks 11–27. If they're not present on the CD, they are ignored.

Track 5, the single PlayStation ambience track, occurs at several points in the level files. It is ignored unless the "PS1-style" option is use. If the "PS1-style" patch is in use, it plays once like the music tracks, and maps to CD track 3.

Secret chimes (13)

The original PC version handles these by playing them internally using internal audio ID 173 from the PHD file, not interrupting the ambience or any other sound. The PlayStation takes them from the CD, interrupting other sounds.

In the patched version with PS1-style or TR2-style audio, the chimes are played from CD track 60 if available. Otherwise they are played internally as before.

Note that levels don't normally play the chimes manually; the engine normally plays them in response to the special secret triggers. However, you could use them manually, if you didn't mind player confusion.

Lara's tutorial (26–50) and baddies (51–56)

The original PC version handles these by playing them internally using PHD audio IDs 174–204. Any ambience and other triggered sounds are interrupted. In the original PC version, the ambience may either fail to resume, or resume too early, depending on exactly how the CD-ROM driver responds.

In the patched version with PS1-style or TR2-style audio, these tracks are played from CD tracks 29–59 if available. Otherwise they are played internally. If played internally, the ambience resumes after a hard-coded delay of 10 seconds. This is adequate for the baddies; it would be too short for some of Lara's tutorial, but there is no ambience in Lara's home.

Most of these are started by standard triggers in level definitions. The exceptions are Natla and the Skateboard Kid's taunts, which the engine cues itself as part of their AI behaviour.

There are some hard-coded special cases in the engine for certain sound triggers used in Lara's Home: