Quantcast

Jump to content

» «
Photo

how to decode .rel file?

15 replies to this topic
maxspeedwind
  • maxspeedwind

    Player Hater

  • Members
  • Joined: 08 Mar 2017
  • Aland

#1

Posted 09 March 2017 - 02:14 PM Edited by maxspeedwind, 09 March 2017 - 02:15 PM.

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?


Mr.Arrow
  • Mr.Arrow

    God Save the Penis

  • Members
  • Joined: 08 Nov 2011
  • United-Kingdom

#2

Posted 09 March 2017 - 03:57 PM Edited by Mr.Arrow, 09 March 2017 - 03:58 PM.

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

IgorX
  • IgorX

    3D

  • Members
  • Joined: 20 Aug 2009
  • None
  • Best WIP Mod 2014 [Grand Theft Auto 3D]

#3

Posted 09 March 2017 - 04:13 PM Edited by IgorX, 09 March 2017 - 04:15 PM.

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. =$


maxspeedwind
  • maxspeedwind

    Player Hater

  • Members
  • Joined: 08 Mar 2017
  • Aland

#4

Posted 09 March 2017 - 07:23 PM

 

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?


IgorX
  • IgorX

    3D

  • Members
  • Joined: 20 Aug 2009
  • None
  • Best WIP Mod 2014 [Grand Theft Auto 3D]

#5

Posted 09 March 2017 - 11:20 PM Edited by IgorX, 09 March 2017 - 11:21 PM.

 

 

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.


maxspeedwind
  • maxspeedwind

    Player Hater

  • Members
  • Joined: 08 Mar 2017
  • Aland

#6

Posted 11 March 2017 - 03:31 AM Edited by maxspeedwind, 11 March 2017 - 03:33 AM.

I just found a tool can open .rel file, here https://www.hex-rays..._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

  • MrGTAmodsgerman, jedijosh920 and WildBrick142 like this

maxspeedwind
  • maxspeedwind

    Player Hater

  • Members
  • Joined: 08 Mar 2017
  • Aland

#7

Posted 12 March 2017 - 03:03 PM Edited by maxspeedwind, 12 March 2017 - 03:53 PM.

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 ....


IgorX
  • IgorX

    3D

  • Members
  • Joined: 20 Aug 2009
  • None
  • Best WIP Mod 2014 [Grand Theft Auto 3D]

#8

Posted 12 March 2017 - 04:12 PM

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.


maxspeedwind
  • maxspeedwind

    Player Hater

  • Members
  • Joined: 08 Mar 2017
  • Aland

#9

Posted 13 March 2017 - 03:03 AM

Unfortunately I converted FAM1_TALK1 to hash which is F322300A, but there is no such wave named F322300A in fam1.awc.

 

And I don't know what is l_CFC, also I don't understand g_3B2A/*{165}*/ = a_0 , I know a little about program.


maxspeedwind
  • maxspeedwind

    Player Hater

  • Members
  • Joined: 08 Mar 2017
  • Aland

#10

Posted 13 March 2017 - 04:28 AM Edited by maxspeedwind, 13 March 2017 - 04:30 AM.

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.

  • jedijosh920 likes this

maxspeedwind
  • maxspeedwind

    Player Hater

  • Members
  • Joined: 08 Mar 2017
  • Aland

#11

Posted 14 March 2017 - 03:19 AM Edited by maxspeedwind, 14 March 2017 - 03:49 AM.

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.


tadd
  • tadd

    Li'l G Loc

  • Members
  • Joined: 01 Oct 2013
  • None

#12

Posted 09 April 2017 - 10:10 PM Edited by tadd, 09 April 2017 - 10:11 PM.

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! 😄

CamxxCore
  • CamxxCore

    Mark Chump

  • Members
  • Joined: 19 Oct 2013
  • Canada

#13

Posted 10 April 2017 - 09:12 PM Edited by CamxxCore, 10 April 2017 - 09:12 PM.

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/C...e/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.

  • IgorX, MrGTAmodsgerman, jedijosh920 and 1 other like this

MrGTAmodsgerman
  • MrGTAmodsgerman

    Inventor

  • Members
  • Joined: 02 Jan 2012
  • Germany

#14

Posted 15 April 2017 - 04:57 AM Edited by MrGTAmodsgerman, 15 April 2017 - 04:57 AM.

 

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/C...e/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	RageAudioTool
Error	2	Property or indexer 'RageAudioTool.audCommonVariable<T>.Active' cannot be assigned to -- it is read only	\temptypes.cs	112	13	RageAudioTool

CamxxCore
  • CamxxCore

    Mark Chump

  • Members
  • Joined: 19 Oct 2013
  • Canada

#15

Posted 15 April 2017 - 01:39 PM Edited by CamxxCore, 15 April 2017 - 01:49 PM.

 

 

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/C...e/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	RageAudioTool
Error	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.

  • MrGTAmodsgerman likes this

tadd
  • tadd

    Li'l G Loc

  • Members
  • Joined: 01 Oct 2013
  • None

#16

Posted 20 April 2017 - 10:19 AM

Nice work man!




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users