Jump to content

how to decode .rel file?


Recommended Posts

maxspeedwind

Hi guys, I've been studying how the game use sound and text for couple of days. I read the mission scripts decoded, found nowhere the subtitle and sound handle/hash. I guess there are other files associate text and sound hash, the files should be in GTA V\update\update.ref\x64\audio\config, like audioconfig.dat4.rel, but I cannot view it. Is there a way to view or edit .rel file now?

Edited by maxspeedwind
Link to comment
https://gtaforums.com/topic/883202-how-to-decode-rel-file/
Share on other sites

Nope, same goes to GTA 4, but you can definitely play the sounds using openIV.

There's a tool which supports sounds.dat15 from gta 4.

As for gta 5, .dat54 contains about 17000+ audio names and metadata like time latency and etc. . It's important to edit this file in audio replacement because without it you get mixing of 2 songs. It's like to turn on 2 songs one time. =$

Edited by IgorX
Link to comment
https://gtaforums.com/topic/883202-how-to-decode-rel-file/#findComment-1069446474
Share on other sites

maxspeedwind

 

Nope, same goes to GTA 4, but you can definitely play the sounds using openIV.

There's a tool which supports sounds.dat15 from gta 4.

As for gta 5, .dat54 contains about 17000+ audio names and metadata like time latency and etc. . It's important to edit this file in audio replacement because without it you get mixing of 2 songs. It's like to turn on 2 songs one time. =$

 

 

what tool? and can be used to edit audioconfig of gta 5?

Link to comment
https://gtaforums.com/topic/883202-how-to-decode-rel-file/#findComment-1069446943
Share on other sites

 

 

Nope, same goes to GTA 4, but you can definitely play the sounds using openIV.

There's a tool which supports sounds.dat15 from gta 4.

As for gta 5, .dat54 contains about 17000+ audio names and metadata like time latency and etc. . It's important to edit this file in audio replacement because without it you get mixing of 2 songs. It's like to turn on 2 songs one time. =$

 

 

what tool? and can be used to edit audioconfig of gta 5?

Andrew's IV Audio Editor

It can edit dat15 file from gta 4 only. It doesn't work for gta 5 files.

Edited by IgorX
Link to comment
https://gtaforums.com/topic/883202-how-to-decode-rel-file/#findComment-1069447428
Share on other sites

maxspeedwind

I just found a tool can open .rel file, here https://www.hex-rays.com/products/ida/support/download_freeware.shtml

I tried to open speech2.dat4.rel, and in 'string' window I saw some readable words as picture below.

 

72xbig.jpg

 

 

looks like sound definition, but I found no hash mentioned, then I opened audioconfig.dat4, I noticed the 'waveslots2.xml', but I didn't see the xml file in folder.

I think the tool is powerful but I have no idea how to use it, just post it here if someone is interested in this.

 

21opnwy.jpg

Edited by maxspeedwind
  • Like 4
Link to comment
https://gtaforums.com/topic/883202-how-to-decode-rel-file/#findComment-1069449653
Share on other sites

maxspeedwind

I read some mission scripts found sentences like this sub_df51(&l_CFC, "FAM1AUD", "FAM1_TALK1", 9, 0, 0, 0))

 

It looks to define subtitle and voice, parameter FAM1AUD is obvious fam1aud.gxt2 which contains subtitle, FAM1_TALK1 I think means talk1 voice in fam1.awc.

 

I think in script it call sound with its name and in awc file we can only see hash, if I know the way it convert name to hash ....

Edited by maxspeedwind
Link to comment
https://gtaforums.com/topic/883202-how-to-decode-rel-file/#findComment-1069452076
Share on other sites

I read some mission scripts found sentences like this sub_df51(&l_CFC, "FAM1AUD", "FAM1_TALK1", 9, 0, 0, 0))

 

It looks to define subtitle and voice, parameter FAM1AUD is obvious fam1aud.gxt2 which contains subtitle, FAM1_TALK1 I think means talk1 voice in fam1.awc.

 

I think in script it call sound with its name and in awc file we can only see hash, if I know the way it convert name to hash ....

OpenIV can convert names to hash.

Link to comment
https://gtaforums.com/topic/883202-how-to-decode-rel-file/#findComment-1069452192
Share on other sites

maxspeedwind

I checked functions, they simply put name as FAMAUD or FAM1_TALK into some global variables like g_3BCF, then system functions will handle these global variable to find hashed subtitle and .wav. It looks like not simply convert them to hash to match the files, system functions do more complicated things which I couldn't found out.

Edited by maxspeedwind
  • Like 1
Link to comment
https://gtaforums.com/topic/883202-how-to-decode-rel-file/#findComment-1069453092
Share on other sites

maxspeedwind

I've found a rule for .wav hash if it can be called a rule, like 0x19341800.wav, the file names of .wav are never bigger than 0x20??????, so I think the hash of .wav name is not directly converted from string like FAM1_TALK1 because that would made head of hash with random letter [A-F], why all hashs are between [0x000????? - 0x1???????], R* used a mask to convert them again? or is that a OpenIV problem?

 

Hash in subtitle file looks like converted from string like FAM1_TALK1, I tried to hash SS_FF\\FAM1_TALK1 or just TALK1 but matched none.

 

And both subtitle, .wav are not listed in normal speak sequence in respective file, they are random like sh*t.

Edited by maxspeedwind
Link to comment
https://gtaforums.com/topic/883202-how-to-decode-rel-file/#findComment-1069455285
Share on other sites

  • 4 weeks later...

Heh I've been trying to get someone to reverse the .rel files for a while. We are looking into it though...

 

It seems some of the .rel contain synth info among other things.

 

As for the awc hashes, they are a little weird... if you hash "sos" you get 0x78fad4aa but in the awc it is mentioned as 0x18fad4aa... something to do with them not using the full 32bits.

 

But if you binary search sounds.dat54.rel for the 0x78fad4aa then you will get a hit... so seems the regular hash is what we need.

 

Also there are dat54.nametable files and just sounds.dat() type files, that I guess have related data.

 

We need someone with reversing skills, who is in a good mood to get any further though! 😄

Edited by tadd
Link to comment
https://gtaforums.com/topic/883202-how-to-decode-rel-file/#findComment-1069507583
Share on other sites

Heh I've been trying to get someone to reverse the .rel files for a while. We are looking into it though...

 

It seems some of the .rel contain synth info among other things.

 

As for the awc hashes, they are a little weird... if you hash "sos" you get 0x78fad4aa but in the awc it is mentioned as 0x18fad4aa... something to do with them not using the full 32bits.

 

But if you binary search sounds.dat54.rel for the 0x78fad4aa then you will get a hit... so seems the regular hash is what we need.

 

Also there are dat54.nametable files and just sounds.dat() type files, that I guess have related data.

 

We need someone with reversing skills, who is in a good mood to get any further though!

 

I have been working on this: https://github.com/CamxxCore/RageAudioTool Its a WIP tool to read/ write .rel files. It can read and write data to the files but not add new entries... yet. And most of the nested data structures have yet to be reversed. Trying to collaborate with fireboyd78 to go further with it.

Edited by CamxxCore
Link to comment
https://gtaforums.com/topic/883202-how-to-decode-rel-file/#findComment-1069509285
Share on other sites

MrGTAmodsgerman

 

Heh I've been trying to get someone to reverse the .rel files for a while. We are looking into it though...

 

It seems some of the .rel contain synth info among other things.

 

As for the awc hashes, they are a little weird... if you hash "sos" you get 0x78fad4aa but in the awc it is mentioned as 0x18fad4aa... something to do with them not using the full 32bits.

 

But if you binary search sounds.dat54.rel for the 0x78fad4aa then you will get a hit... so seems the regular hash is what we need.

 

Also there are dat54.nametable files and just sounds.dat() type files, that I guess have related data.

 

We need someone with reversing skills, who is in a good mood to get any further though!

 

I have been working on this: https://github.com/CamxxCore/RageAudioTool Its a WIP tool to read/ write .rel files. It can read and write data to the files but not add new entries... yet. And most of the nested data structures have yet to be reversed. Trying to collaborate with fireboyd78 to go further with it.

 

Nice man, bad that i didn't get this tool to work on VS 2013, it gives me errors about

Error	1	'RageAudioTool.audCommonVariable<T>.Active.get' must declare a body because it is not marked abstract or extern. Automatically implemented properties must define both get and set accessors.	\RageAudioTool-master\RageAudioTool\TempTypes.cs	107	30	RageAudioToolError	2	Property or indexer 'RageAudioTool.audCommonVariable<T>.Active' cannot be assigned to -- it is read only	\temptypes.cs	112	13	RageAudioTool
Edited by MrGTAmodsgerman
Link to comment
https://gtaforums.com/topic/883202-how-to-decode-rel-file/#findComment-1069517595
Share on other sites

 

 

Heh I've been trying to get someone to reverse the .rel files for a while. We are looking into it though...

 

It seems some of the .rel contain synth info among other things.

 

As for the awc hashes, they are a little weird... if you hash "sos" you get 0x78fad4aa but in the awc it is mentioned as 0x18fad4aa... something to do with them not using the full 32bits.

 

But if you binary search sounds.dat54.rel for the 0x78fad4aa then you will get a hit... so seems the regular hash is what we need.

 

Also there are dat54.nametable files and just sounds.dat() type files, that I guess have related data.

 

We need someone with reversing skills, who is in a good mood to get any further though!

 

I have been working on this: https://github.com/CamxxCore/RageAudioTool Its a WIP tool to read/ write .rel files. It can read and write data to the files but not add new entries... yet. And most of the nested data structures have yet to be reversed. Trying to collaborate with fireboyd78 to go further with it.

 

Nice man, bad that i didn't get this tool to work on VS 2013, it gives me errors about

Error	1	'RageAudioTool.audCommonVariable<T>.Active.get' must declare a body because it is not marked abstract or extern. Automatically implemented properties must define both get and set accessors.	\RageAudioTool-master\RageAudioTool\TempTypes.cs	107	30	RageAudioToolError	2	Property or indexer 'RageAudioTool.audCommonVariable<T>.Active' cannot be assigned to -- it is read only	\temptypes.cs	112	13	RageAudioTool

 

I think optional accessors on auto-implemented properties was only added with C# 6.0 or something. So its an issue of backwards compatibility (I use MSVS2015). I did add a pre-built version of the tool on the releases page so you might want to just download that.

 

Alternatively you could just add the wanted 'set' accessor to the "Active" property in that class.

Edited by CamxxCore
  • Like 1
Link to comment
https://gtaforums.com/topic/883202-how-to-decode-rel-file/#findComment-1069518125
Share on other sites

  • 11 months later...
MrGTAmodsgerman

I think optional accessors on auto-implemented properties was only added with C# 6.0 or something. So its an issue of backwards compatibility (I use MSVS2015). I did add a pre-built version of the tool on the releases page so you might want to just download that.

 

Alternatively you could just add the wanted 'set' accessor to the "Active" property in that class.

 

@CamxxCore Hey, any news about that tool? It haven't updated about a year ago. This tool is still very important for the whole community. Is this project dead now?

  • Like 2
Link to comment
https://gtaforums.com/topic/883202-how-to-decode-rel-file/#findComment-1070157243
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.