Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    2. News

    1. Red Dead Redemption 2

    1. GTA Online

      1. After Hours
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

maxspeedwind

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

Share this post


Link to post
Share on other sites
Mr.Arrow

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

Edited by Mr.Arrow

Share this post


Link to post
Share on other sites
IgorX

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

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites
IgorX

 

 

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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
IgorX

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.

Share this post


Link to post
Share on other sites
maxspeedwind

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.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
tadd

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

Share this post


Link to post
Share on other sites
CamxxCore

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
CamxxCore

 

 

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

Share this post


Link to post
Share on other sites
tadd

Nice work man!

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
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

×

Important Information

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