Tomb Raider Forums  

Go Back   Tomb Raider Forums > Tomb Raider Series > Tomb Raider The Last Revelation

Reply
 
Thread Tools
Old 10-05-24, 18:58   #11
TombHackR
Golden
 
Joined: Apr 2013
Posts: 1,439
Default

Quote:
Originally Posted by SwiftieLuma View Post
inserted them with an HEX editor into the level file. I also made sure the new file was the exact same size as the original one, i did this by adding bytes and doing operations with a calculator lol
Such an interesting technique !

It definitely makes more sense to use Chronicles / AOD samples so that everything is Jonell.
TombHackR is offline   Reply With Quote
Old 11-05-24, 03:57   #12
xtimz
Member
 
xtimz's Avatar
 
Joined: Apr 2010
Posts: 1,114
Default

How did you find the starting point of the audio in the level file?
xtimz is offline   Reply With Quote
Old 11-05-24, 22:25   #13
SwiftieLuma
Member
 
SwiftieLuma's Avatar
 
Joined: Jan 2024
Posts: 1,451
Default

Quote:
Originally Posted by TombHackR View Post
Such an interesting technique !

It definitely makes more sense to use Chronicles / AOD samples so that everything is Jonell.
Oh yes, i have used this method in other games. I figured this was an effective way of replacing files inside containers that arent compressed.

Quote:
Originally Posted by xtimz View Post
How did you find the starting point of the audio in the level file?
First i used soundjack in order to extract the wav files inside the level file.

you only need to extract them 1 time from one of the levels because they are the exact same file in each level.

So for example, extract Lara's death scream from settomb1.tr4 which is Tomb of Seth. This file is the exact same in all the other levels, internally when you see the offsets and etc information its the same in all levels, and this applies to the other audio files. This is extremely helpful.

Next, go to the hex editor. Im using HxD hex editor.

So what you need to do is open the main file that you wanna mod, in this case a level file, for example

settomb1.tr4 that we already mentioned.

Open the sound file you extracted in a different tab of the editor, then select all the data (Ctrl+A) and copy it (Ctrl+C) then go back to the settomb1.tr4 tab and go to

Search > Find > Hex values (make sure to mark All in the box) and then paste in the bar the information you copied.

Click OK and it will automatically find and select the precise information you entered in the box, which is essencially the audio file of Laras scream.

Thats how you locate the sound you want inside each level file.


And yes, i did this a total of 288 times in order to replace those specific sounds i mentioned in all the levels.

SwiftieLuma is offline   Reply With Quote
Old 12-05-24, 01:12   #14
xtimz
Member
 
xtimz's Avatar
 
Joined: Apr 2010
Posts: 1,114
Default

^ It's a brilliant idea.
xtimz is offline   Reply With Quote
Old 12-05-24, 16:44   #15
TombHackR
Golden
 
Joined: Apr 2013
Posts: 1,439
Default

Dumb question, since I haven't touched a hex editor in about 10 years.

How do you go about inserting 'blank' bytes, so that the file size of the level remains identical?
TombHackR is offline   Reply With Quote
Old 12-05-24, 17:01   #16
SwiftieLuma
Member
 
SwiftieLuma's Avatar
 
Joined: Jan 2024
Posts: 1,451
Default

Quote:
Originally Posted by TombHackR View Post
Dumb question, since I haven't touched a hex editor in about 10 years.

How do you go about inserting 'blank' bytes, so that the file size of the level remains identical?
You figure the right amount of blank bytes you need by using a Hex Calculator or the Windows calculator in programmer mode *and tapping on Hex*

So for example using the calculator you go and type the Number of total bytes from the original file which should be a bit bigger

lets say its 1A70, then check your modded file which should have a smaller number lets say 1500 (Letters are > than numbers)

so basically do 1A70 - 1500

the result is 570, so this is the amount of bytes your modded file is missing.

Sometimes this process can be skipped if your modded file happens to already have the exact same amount of bytes as the original so theres no need to add anything. But obviously always check that the sample rate hz of the sound is identical, and that its the right wave format that the game uses.

After that
go to the very last byte of the modded file, position yourself there with the mouse click,
and then go to EDIT > INSERT BYTES

in the window that comes up type the right amount of bytes you wanna insert
(hex and hex values should be checked) only add the number of bytes in question in the bytecount box.

And that should be it.

Last edited by SwiftieLuma; 12-05-24 at 17:09.
SwiftieLuma is offline   Reply With Quote
Old 13-05-24, 16:41   #17
xtimz
Member
 
xtimz's Avatar
 
Joined: Apr 2010
Posts: 1,114
Default

^ Does it mean that the length of the new sound must be less than or equal to the old one?
xtimz is offline   Reply With Quote
Old 13-05-24, 19:25   #18
SwiftieLuma
Member
 
SwiftieLuma's Avatar
 
Joined: Jan 2024
Posts: 1,451
Default

Quote:
Originally Posted by xtimz View Post
^ Does it mean that the length of the new sound must be less than or equal to the old one?
always equal.

Inserting things that are bigger or smaller may crash the game when you load the edited level.
SwiftieLuma is offline   Reply With Quote
Old 15-05-24, 15:21   #19
TombHackR
Golden
 
Joined: Apr 2013
Posts: 1,439
Default

Quote:
Originally Posted by SwiftieLuma View Post
go to the very last byte of the modded file, position yourself there with the mouse click,
and then go to EDIT > INSERT BYTES

in the window that comes up type the right amount of bytes you wanna insert
(hex and hex values should be checked) only add the number of bytes in question in the bytecount box.
Hang on… am I inserting blank bytes at the end of the .tr4 file or at the end of the .wav file before injecting it?

Quote:
Originally Posted by SwiftieLuma View Post
Inserting things that are bigger or smaller may crash the game when you load the edited level.
Does the new sound file need to be the exact same length in time or just file size?

I am struggling already.

I have tried to use SoundJack! to extract the original samples that are in TR4 to .wav. So that I can then use these .wav files as a reference to look up the samples that are contained within a .tr4 file in a hex editor.

SoundJack! only lists the samples as .wav numbers, rather than the actual names of the .wav files which are presumably lost when the sounds are embedded into a .tr4 file. I am used to the names e.g., climb_up2.wav, lara_no.wav, slipping.wav etc…

Do the .wav numbers happen to be in the same order as the samples appear in sounds.txt in Tomb Raider Level Editor? Since there are a lot of samples to go through and figure out exactly which is which!

As TRLE already provides all of the samples that are used in TR4, as named .wav files… I thought why am I not just using those instead of trying to extract them from the retail TR4 release? Well it turns out, these .wav files provided by TRLE are not identical to those used in retail TR4, since when I tried to view them in a hex editor and look them up within .tr4 files, the samples couldn't be found. I think this is because TRLE is more lenient with .wav encoding and doesn't insist on Microsoft ADPCM .

Last edited by TombHackR; 15-05-24 at 17:44.
TombHackR is offline   Reply With Quote
Old 15-05-24, 21:38   #20
SwiftieLuma
Member
 
SwiftieLuma's Avatar
 
Joined: Jan 2024
Posts: 1,451
Default

I think i was clear in my explanation, but ill try to elaborate a decent tutorial once a arrive home so everything is better explained.
SwiftieLuma is offline   Reply With Quote
Reply

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 08:18.


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.