Welcome
Ladies and Gents:

These forums are now closed and registration disabled.

Please join us at our new forum on Proboards. Our hope is that these new forums are more stable, provide more and better features, and allow continuation of the project forums in a safer, more secure, long term environment.

me3explorer.proboards.com

--The ME3Explorer Team

Current Research: WwiseBanks

Technical research related to the structure of Mass Effect game files.

Current Research: WwiseBanks

Postby WarrantyVoider » 06 Dec 2013, 21:12

you can freely download the wwise SDK from here
https://www.audiokinetic.com/downloads/components-53-wwise/

but ofc you only get libs & headers and no source code. so I simply took a lib and decompiled it, especially the one responsible for reading wwisebanks, which are chunk streams. A chunk works like this:
struct ChunkHeader
{
int ChunkID;
int Size;
}


and following ID have been seen so far (each ascii letter = one byte):
BKHD //BanKHeaDer
DIDX
DATA //well data
HIRC
STID //StringMapping?


especially interesting look following functions:
int __thiscall CAkBankMgr__ProcessBankHeader(void *this, int a2)
int __thiscall CAkBankMgr__ProcessDataChunk(void *this, unsigned int a2, int a3)
int __thiscall CAkBankMgr__ProcessHircChunk(void *this, int a2, int a3)
int __thiscall CAkBankMgr__ProcessStringMappingChunk(void *this, int a2, int a3)
int __stdcall CAkBankMgr__ProcessGlobalSettingsChunk(int a1)


let see if I can make a tool out of that for reading/writing banks. here the decompiled code for download:

https://www.mediafire.com/?u41lz3c3t92g7c3

greetz WV

PS:links
fobs old try: http://me3explorer.freeforums.org/post560.html#p560
xentax information: http://wiki.xentax.com/index.php?title=Wwise_SoundBank_%28*.bnk%29
always backup your files!
mess with the best or die like the rest!
"I tried everything!" - "mkay, please list that..." ; please dont pm me for help, we have a help section

WarrantyVoider has been thanked by:
User avatar
WarrantyVoider
Emeritus
 
Posts: 2270
Joined: 22 Aug 2012, 11:33
Has thanked: 480 time
Have thanks: 626 time

Re: Current Research: WwiseBanks

Postby giftfish » 06 Dec 2013, 22:34

Very excited about this. Should have a little bit of additional research on dialogue-related issues that pertain to wwisebanks today or tomorrow.
giftfish
 

Re: Current Research: WwiseBanks

Postby giftfish » 07 Dec 2013, 22:05

Ok, summary post here of what I've learned with dialogue editing that is pertinent to the wwisebanks.

post6419.html#p6419
giftfish
 

Re: Current Research: WwiseBanks

Postby giftfish » 29 Jan 2015, 21:42

WWISEBANK VIEWER/EDITOR -- RESEARCH POST

I had somehow forgotten that WV had added editing capabilities for this tool. I had opened it awhile back and was a bit overwhelmed by all the numbers...and no obvious string IDs anywhere...and have just been too busy to get back to it. I finally took a little bit of time to take a look. A quick reminder: we know that the Wwisebank contains a list of all sound files used in a PCC and when it comes to dialogue, the bank is linked to FaceFX through PCC objects that have the "VO_STRGID_X_Play" suffix.

Here's what I found when using Ashley/Kaidan's convo with Udina in the BioD_CitHub_HospitalP2_LOC_INT.pcc:

Tab 1 -- RAW
Just displays the RAW hex.
Spoiler:
Image


Tab 2 -- First Scan
Spoiler:
Image

Not sure what "First Scan" means. Looks like this bank has 3 "chunks"...whatever those are. The top one I'm pretty sure is the "header" (BKHD = bank header?). The second one, "HIRC" (no idea what that means) contains all the sound references, with a total count at the top -- 62 in this case. Each entry is numbered, of course, and categorized using names familiar to those used in Wwise: Actor-Mixer, Sound SFX/Sound Voice, along with others like Event/Event Action, Effect, and Attenuation. Events are probably for sounds that are triggered. Effects seem like they might be ambient sounds. Attenuation may be an effect that's applied or something. Not sure. Everything in the bank seems to have the same number for "Unk1." "State" seems relatively obvious; all set to 1 in this bank.

The "ID Audio/Source" are two things we're very interested in. I chose this dialogue, specifically, b/c it's so short so it makes hunting for links easier. After about 10 minutes of using WV's hex/float converter and looking through the relevant VO_play (2629-2644) & wav (2790-2798) objects in PCCEd2 and not finding anything that made sense, I decided to open Soundplorer and look there, which is when I found the link I've been wanting to see:
Spoiler:
Image

So, that's the link b/c the bank and sound file. Nice.

What I can't find is the link b/n the bank and the VO objects. Here's the relevant VO object after inspecting:
Spoiler:
Image

It's labeled with a value of 2402 in the bank, but that number isn't anywhere in the bank at all. Certainly not inside entry 18. In addition, all VO objects in the dialogue are assigned this number. The number only changes in the PCC when you move onto a different dialogue. I was also wondering about the ID number present, but those change for Shepard's gender, so both would have to be present in the bank (which they are not).

The final chunk is the "String ID" (STID). I use quotes since it doesn't seem to point to the TLK at all, or any object in the PCC. It simply contains the name of the dialogue.


Tab 3 -- HIRC Objects
Spoiler:
Image

This is a list of all objects in the HIRC chunk, along with their specific hex. It looks like the numbers in parentheses correspond to the categories. I'm assuming these are bank-specific, but haven't checked multiple banks yet to be sure.

This is the tab you can edit in, though I haven't tried yet. There's the ability to clone an entry, edit and save the hex. What I don't know is how you'd need to edit the hex (as in what changes to make) if you cloned an entry with the intent of adding a new wav/ogg file. Obviously, you'd need to somehow link it to the new audio. It looks like all 1-3 "ID" entries associated with every entry change between different voice-related bank entries.

As far as I can tell, the steps for adding a new line of dialogue would look something like this:

  • Clone an existing wav/ogg in the PCC using PCCEditor2 and rename it using a newly created string. (already doable...can't remember if I tried cloning sound objects yet)
  • Do a sound replace of the cloned audio using Soundplorer to insert the new audio. (already doable)
  • Change the ID for the new sound file in Soundplorer, I guess? I'm not clear if this is a "random" number we can mess with (like conditional IDs) or not. (not possible yet)
  • Clone a wwisebank entry in the Wwisebank Viewer/Editor. Replace the ID with the new one. (already doable...I think)
  • Use the FaceFX Editor & PCCEd2 to clone an existing VO file and rename it using the new string. (already doable)
  • Add the new string ID/test to the TLK. (already doable)
  • Add the new line of dialogue in the Dialogue Editor. (already doable)

Btw, I'm not sure what either of the options do under the "Transfer" menu option.

-----------------------------------------

@warrantyvoider -- A couple questions then in relation to the above:

1. Now that I've found a way to link the bank entry to the string ID, can you somehow make the viewer display this? It would be very, very useful since so many other dialogue objects use the string ID in their names. Speeds up research.

2. Assuming my ideas about are correct (let's wait to see what you and others say, ha), can that additional editing ability be added to Soundplorer?

giftfish
 

Re: Current Research: WwiseBanks

Postby WarrantyVoider » 30 Jan 2015, 04:54

well I dont have much time for reresearch, could we have a chat about this on IM?

greetz WV
always backup your files!
mess with the best or die like the rest!
"I tried everything!" - "mkay, please list that..." ; please dont pm me for help, we have a help section
User avatar
WarrantyVoider
Emeritus
 
Posts: 2270
Joined: 22 Aug 2012, 11:33
Has thanked: 480 time
Have thanks: 626 time

Re: Current Research: WwiseBanks

Postby giftfish » 30 Jan 2015, 15:40

WarrantyVoider wrote:well I dont have much time for reresearch, could we have a chat about this on IM?

Sure. Yahoo has been broken in my Pidgin for a little while, so I'll see if I can get it fixed today or tomorrow.

I'm hoping Fob might have time/desire to track some more links down, since I'm pretty new at this. I also wasn't sure how much info you'd need to try to incorporate the string IDs into the Viewer/Editor (or if it would be feasible to do so). But, it seems like my research has the string ID link covered :)
giftfish
 

Re: Current Research: WwiseBanks

Postby WarrantyVoider » 30 Jan 2015, 15:56

ah yeah, yahoo, I got to reinstall that, could you please pm me your nickname again? thanks

greetz WV
always backup your files!
mess with the best or die like the rest!
"I tried everything!" - "mkay, please list that..." ; please dont pm me for help, we have a help section
User avatar
WarrantyVoider
Emeritus
 
Posts: 2270
Joined: 22 Aug 2012, 11:33
Has thanked: 480 time
Have thanks: 626 time

Re: Current Research: WwiseBanks

Postby WarrantyVoider » 30 Jan 2015, 17:12

im sorry, but I cant create an account without some us cell phone number, so no way for me to get an account (officially) at yahoo IM, you will have to choose something else... fb chat?

greetz WV
always backup your files!
mess with the best or die like the rest!
"I tried everything!" - "mkay, please list that..." ; please dont pm me for help, we have a help section
User avatar
WarrantyVoider
Emeritus
 
Posts: 2270
Joined: 22 Aug 2012, 11:33
Has thanked: 480 time
Have thanks: 626 time

Re: Current Research: WwiseBanks

Postby giftfish » 30 Jan 2015, 17:30

WarrantyVoider wrote:im sorry, but I cant create an account without some us cell phone number, so no way for me to get an account (officially) at yahoo IM, you will have to choose something else... fb chat?

Let's just use the forum chat online here. I've been doing that with Fog.Gene for the wiki on and off. It works well enough.

I'm working on the Wiki right now, but I'll log in for awhile :)
giftfish
 

Re: Current Research: WwiseBanks

Postby JohnP » 04 Feb 2015, 17:19

I tried to add new audio about a month or so ago, but met with no success. My edits caused every sound in the bank to fail to play in game (i.e. the entire conversation was silent).
What I tried to do:
-Put the new audio itself into an AFC file (I just appended it to JAM.afc for this test)
-Cloned a WwiseStream object in the PCC file and pointed it to the offset and length the AFC for the new audio
-Added a new entry in the TLK file for the new line
-Cloned two WwiseEvent objects in the PCC with the name VO_xxxxxx_m_Play / VO_xxxxxx_f_Play where xxxxxx was the string ID I created in the TLK
-Gave the WwiseEvents random IDs
-Using HxD, added three HIRC entries to the appropriate WwiseBank for each VO_play object: Event (which has the same ID as the PCC VO_play object), EventAction (which are what is contained in the Event), and SoundSFX, which the EventAction points to, and has the same ID as the WwiseStream object I cloned earlier).
-Edited the HIRC header area to account for the added data
-Verified that WwiseBank viewer would show my added data to make sure I edited the header correctly (it did)
-Used Dialog Editor to change a dialog node to point to my new string ID instead.

When I loaded the game, everything came up fine (no crashes or hangs), but any sound that was part of the bank I edited didn't play. That's as far as I got as I was tired of looking through WwiseBanks. Lol.

JohnP has been thanked by:
JohnP
Modder
 
Posts: 159
Joined: 15 Jan 2013, 18:39
Has thanked: 55 time
Have thanks: 132 time

Next

Return to Technical Research

Who is online

Users browsing this forum: No registered users and 0 guests

suspicion-preferred