V130 Project Sounds
by AkyV

Using 'Convert to v130' button in WADMerger lets you use all of the old-generation TR sounds (TR1, 2, 3, 4, 5) and some special sounds in your game. (It's an NGLE-specific feature and irreversible after saving WAD.) - So you don't need to put non-TR4 old-gen sounds on a TR4 sound slot to play them in the game.
 (Don't use SFX_Example.bat any more if you want to use WADMerger Sound Manager. And, if you want to use some non-TR4 old-gen or special sounds, then you need Sound Manager.)
 Global map
 If your WAD is 'version 130' then you can identify these sounds on a so-called 'global map'. This map has 4099 sound slots:
 global map slot____original game slot
 0___________369__0___________369__TR4 (TRLE, NGLE)
 370_________499__0___________129__hard (reserved)
 500_________524__0___________24___src (cust_env)
 The explanation of the map is easy: for example, if you want to use TR3 sound slot#0 then it's slot#1228 on the map, TR3 sound slot#1 is slot#1229 on the map etc.
 Type names
 If you play a sound from the map and you use Diagnostic command in script for sounds then you'll see this kind of text on the screen: 1416 (TR3: 188). It means: 'you can just hear the sound(s) from global map sound slot#1416, i.e. the original TR3 sound slot#188'.
 Hard, src and cust_anim types are specific slots. (I don't know the details. For example, maybe 'hard' means 'hardcoded sounds'?) - Reserved and cust_env are alternative names you can see in WADMerger.
 Sound manager windows
 If your WAD is v130 then you can use more windows than one in Sound Manager of WADMerger: one for each old-gen game and one for the special sounds. (The window of TR2 is a bit inaccurate: as you see, the list starts from TR2_2 instead of TR2_0. So, for example, if you see 1148-TR2_292 Play Sound AnimCommand at some animation of some object then it means this is global map slot#1148, i.e. TR2 sound slot#290.)
 Adding non-TR4 sounds to your WAD
 FIRST METHOD (with objects added)
 1. Click the icon Settings ('wrench') of WADMerger. Add the location of NGLE folder Samples, main.sfx of TR2 game and main.sfx of TR3 game.
 2. Load your WAD into the left (destination) window of WADMerger.
 3. Adjust destination WAD to be v130.
 4. Load the non-TR4 level file that has the object that uses that sound into the right (source) window of WADMerger. (So a PHD, TR2 etc. level file and not a WAD file!)
 5. Copy that object from source into the destination. (Be careful: non-TR4 object slot names and TR4 object slot names are not always the same.)
 6. Save the destination WAD.
 7. The sound file(s) of the sound slot will be put into Sound\Samples folder of the game.
 The names of the files are easy to understand. For example, the four files of TR3 sound slot#17 are:
 TR3 Sound 17-0.wav
 TR3 Sound 17-1.wav
 TR3 Sound 17-2.wav
 TR3 Sound 17-3.wav
 8. WADMerger may show some inappropriate data about this operation now. To correct it, load the saved WAD again.
 SECOND METHOD (without objects added)
 When you have the destination and the source files loaded in WADMerger, too, then open a window in Sound Manager. - For example, TR3 window if you have a TR3 level loaded.
 In this window you can see now the name of the level file at the sounds slots of the objects of that level. If you want to have one of those sound slots in destination then mark that small square at that slot manually.
 The WAV will get to Samples when you save the WAD.
 1. In the proper Sound Manager window (i.e, for example, in TR3 window if this sound slot is from TR3) we can see after the operation: every sound slot of this copied object is marked.
 Putting the cursor line on any marked slot here we can see the parameters of this slot in small windows under the big window. - We must know about these parameters:
 a, The sound name in one of the small window and in the Samples folder are not the same maybe. - For example:
 TR3 Sound 025-0.wav
 TR3 Sound 25-0.wav
 You have to correct it (in Samples).
 b, If you want to adjust these parameters, the WADMerger will always reset them if you save the changes and load this WAD. So this is what would also happen now. And this is a problem because when you put a non-TR4 sound slot into your WAD then that sound slot has bad parameters sometimes. (For example: wrong pitch.)
 2. Unfortunately, my experience is TR5 sound slots won't work on global map. So, I think, the only way to play a TR5 sound from not a TR4 slot is if you use an ImportFile script command or if you play that sound (converted into an audio format) in an audio slot.
 Adding non-TR4 sounds to an object
 It won't work if you want to add a non-TR4 sound slot to any frame of any animation of any object.
 But we can use some tricky solutions to avoid this problem. - For example:
 1. Copy an animation with that sound into the problematic animation slot, then in this new slot, form the animation.
 2. Correct the frame number in AnimCommand panel to put that sound to another frame.
 Deleting non-TR4 sounds from an object
 If you want to delete a non-TR4 sound from a frame of an animation of your object then delete the Play Sound AnimCommand that plays that sound.
 1. As for the bugs, I'm not sure it's safe to delete all the Play Sound AnimCommands of an object that play the same non-TR4 sound slot.
 2. If one of the small windows of AnimCommand panel (the one just above the Change button) doesn't contain a non-TR4 sound slot for the chosen Play Sound AnimCommand (whose purpose to play that sound slot) then you won't hear anything when the animation would play that Play Sound AnimCommand. So you'd better delete that AnimCommand.
 (If you save your WAD with a useless AnimCommand like this then you may get an error message when you load that WAD next time.)
 Deleting non-TR4 sounds from the WAD
 When you want to delete a non-TR4 sound slot from your WAD, then delete all the objects from the WAD that have that sound slot. - But don't do these or else some of your non-TR4 sound files get messed up:
 a, Unmarking a sound slot manually in a non-TR4 Sound Manager window.
 b, Deleting the sound file(s) of the non-TR4 slot from Samples.
 Variant sound sources
 Don't want to use an object with variant sound sources. (For example, if you want to use an object with TR1 and TR4 sound slots.)
 Even if you follow the rules you may encounter some malfunction: some of your non-TR4 sound files got messed up when you using this problematic sound with an object. (Messing-up, for example, if you can hear something else and not the proper sound file. So, for example, a bad pitch is not a messing-up now.)
 You have this method to correct the problem:
 See at all sound slots of the problematic objects if slot number in Sound Manager big window and its WAV number under it in the small window are the same. (For example: TR3_35 slot must have a WAV with number 35.)
 If they all are then delete this problematic object from the WAD. (Check after that: this slot must be unmarked. If it's not then unmark it manually.) Save WAD and close WADMerger. Delete all these sound files from Samples. - After that, you can add this object to your WAD again.
 If some of them aren't then delete this problematic object from the WAD. (Check after that: this slot must be unmarked. If it's not then unmark it manually.) Search the good slot for that sound file and unmark that slot manually. (For example, if TR3_35 has 33.wav then you also have to unmark TR3_33 slot now.) Save WAD and close WADMerger. Delete all these sound files from Samples. - After that, you can add this object to your WAD again.
 1. If we encounter this problem again and again, then let's forget about that problematic object. (Seeing how complicated to prevent this malfunction and the prevention is how unsure, maybe you'd better use a backup WAD.)
 If you want that object everyway then copy the object not from a level file but a WAD and not into the WAD of your level but a temporary WAD. Then delete all the Play Sound AnimCommands of the object in the temporary WAD then copy the object from this WAD to the WAD of your level. Then in your WAD add TR4 sound slots to the object and then any frame of any animation of the object.
 2. Maybe you get an error message with some other object name when unmarking manually. In these cases the correcting operation must also be done about that object.
 3. Of the non-TR4 sound slots I think only TR3 sound slots work always (?) properly with an object.
 4. Using non-TR4 sound slots I've never encountered any case when TR4 sound slots have got messed up because of non-TR4 sound slots.
 Direct using
 You can play sounds of global map directly - i.e. if it plays with not working of an object but activating a trigger. (So that's why it's worth having a non-TR4 sound slot in your WAD without an object having it in your WAD. - Of course you can also play directly the sounds that are added to some object.)
 This trigger is a FLIPEFFECT:
 Sound. Play <&>sound (single playback) of global sound map (v130)
 The value of & is a global map slot.
 1. If you don't want to use objects with non-TR4 sound slots because it's too messy, then it's worth adding these slots (with 'without objects' method) to the WAD to play them directly.
 2. You can use these sound slots at the objects if you export this FLIPEFFECT as an AnimCommand. (But don't forget: it's not the "classic" "sounds at object" thing. So sounds that are playing by FLIPEFFECTs always have the same volume, independently of the distance between Lara and the sound source. I mean you can adjust this volume, but in a complicated way, by variables.)
 Additional things
 1. Maybe whatever we do, some additional programs (for example Tomb Raider 3D Viewer) won't be able to use our WAD/level file if we use v130 in that WAD.
 2. Of course, we know the names of TR4 sound slots. (For example, from here: drop down menu of NGLE/Effects/Sounds.) If we want to know what were the original purposes of TR1, TR2 and TR3 slots then let's see some TXT files in TRViewer folders. (I'm afraid I don't know similar thing for TR5 slots.)
 3. Maybe you have a source WAD file from somebody else with an object that has non-TR4 sound slots. (See for example the frogman in Harpoon Gun demo project). In these cases you'll do with the object the same things as you do with any other object. Except: you have to copy the non-TR4 sound files (attached to demo project) of the frogman into Samples.
 4. If you have a source WAD like I said just before but there are nowhere the needed sounds then you can get these sounds manually:
 - with TR2WAD: TR1 and TR5
 - with TombRipper: TR2 and TR3.
 If it's hard to identify TombRipper WAV numbers then put the list of these numbers beside the proper TRViewer list. - For example, these are the beginnings of TombRipper and TRViewer lists at TR3:
 TombRipper_______TRViewer_____________________so this is the number of the slot
 trsnd001.wav_____0000 -- Lara footstep____________TR3_0 (first sound of the slot)
 trsnd002.wav_____0000 -- Lara footstep____________TR3_0 (second sound of the slot)
 trsnd003.wav_____0000 -- Lara footstep____________TR3_0 (third sound of the slot)
 trsnd004.wav_____0000 -- Lara footstep____________TR3_0 (fourth sound of the slot)
 trsnd005.wav_____0001 -- Lara grunt______________TR3_1
 trsnd006.wav_____0002 -- Lara "no"_______________TR3_2
 trsnd007.wav_____0003 -- Lara sliding_____________TR3_3
 trsnd008.wav_____0004 -- Lara landing on feet______TR3_4
 trsnd009.wav_____0005 -- Lara "hut" (stepping up)___TR3_5
 5. We can use some tricks with that FLIPEFFECT. - For example:
 SHATTER objects always have the same (hardcoded) sound when they shatter: HIT_ROCK (ID: 327) TR4 sound slot. Its sound file (hit_rock.wav) is good when Lara shoots at an argillaceous vase but is not good if Lara shoots at a glass window. - So, it's a solution if you replace hit_rock.wav in HIT_ROCK slot by a 'breaking glass' WAV (with SFX_Example.bat type method).
 But what if Lara shoots at two kinds of SHATTERs in the same level: an argillaceous vase and a glass window? In this case you need one WAV for vase and another one WAV for glass: first of all, you'll unmark HIT_ROCK slot in that WAD. Then you'll place a FLIPEFFECT (in HEAVY mode) on the square of the vase with a sound slot that has a hit_rock.wav-like sound file, and place a FLIPEFFECT (in HEAVY mode) on the square of the window with a sound slot that has a breaking glass WAV-like sound file.
 6. This description is made by TRNG