|
Post by MaVeRicK on Feb 21, 2019 13:45:43 GMT 10
Hello, I need some help to see if there's any efficient way to swap character audio.
I'm speaking about breathing, pain yelps, comments when zombies come back... etc
The audio files for those are all stored in an audio bank (one for each character) in: 'Natives\x64\sectionroot\sound\wwise' Leon: pl0000_vo_media.bnk Claire: pl1000_vo_media.bnk Ada: pl2000_vo_media.bnk ... etc
Trying to swap those around ended up just muting the character, the reason for that is that each bank has hundreds of numbered audio files.
Their numbering and order seemed random to me so only way i found to swapping them is listen to around 400 files (for each character) and manually rename each accordingly.
Does anyone with more experience modding audio files (I have none) know anyway to efficiently swap the corresponding files with one another.
Footstep sounds for all characters are all in one bank: pl_base_se_all_media.bnk
There are hundreds of files inside of it as well, again numbered randomly (as far as I can tell).
Thanks.
|
|
|
Post by MaVeRicK on Feb 25, 2019 9:19:24 GMT 10
JTeghius Kittius Hey, if you have any free time, please take a look at this, see if you can figure it out.
|
|
First of my name, Queen of Joke Mods, Mother of memes
Posts: 2,569
Original Join Date: May 12, 2009
|
Post by JTeghius Kittius on Feb 25, 2019 9:30:42 GMT 10
JTeghius Kittius Hey, if you have any free time, please take a look at this, see if you can figure it out. thanks for reminding me. I'll try to take a look at it in the morning
|
|
First of my name, Queen of Joke Mods, Mother of memes
Posts: 2,569
Original Join Date: May 12, 2009
|
Post by JTeghius Kittius on Feb 26, 2019 1:19:38 GMT 10
I tried to handle this the same way as the motbank files (which are containers for animations) but it's handled very different for sound. I'm not sure how much can be done about this without individually swapping the sound files
|
|
Posts: 176
|
Post by archerpz on Feb 26, 2019 4:08:50 GMT 10
seems that in that file there's 422 sound effects, the rest are non audio files or padding, idk I think you're going to have to replace each one with the corresponding one of claire/ada/whatever
from what I learned the .bnk files contain at least the events and the pointers to which file should play, something like; (the music .bnk files that don't contain the audio tracks)
fileID { info (duration etc) event; entering main hall }
something like this
some .bnk files you can just replace the file ids, but those are .bnk files that don't contain any audio (just pointers/events) pl0000_vo_media.bnk.2.x64.en contains the .wem files
my 2 cents; the events that trigger the sound are something like; 'play "pl0000_vo_media.bnk.2.x64.en/432537879"' if someone figures out how to change the events of pl0000 to pl1000 or vice versa, swapping files might work
|
|
|
Post by MaVeRicK on Feb 26, 2019 5:49:07 GMT 10
I tried to handle this the same way as the motbank files (which are containers for animations) but it's handled very different for sound. I'm not sure how much can be done about this without individually swapping the sound files That's what I was afraid of hearing. I don't have the ear or the memory for it, I already tried, and spent several hour after unpacking the audios, but the worse part is that there are SEVERAL versions of each sound, not in any logical order, 400+ for each character.
|
|
|
Post by MaVeRicK on Feb 26, 2019 5:59:03 GMT 10
seems that in that file there's 422 sound effects, the rest are non audio files or padding, idk I think you're going to have to replace each one with the corresponding one of claire/ada/whatever from what I learned the .bnk files contain at least the events and the pointers to which file should play, something like; (the music .bnk files that don't contain the audio tracks) fileID { info (duration etc) event; entering main hall } something like this some .bnk files you can just replace the file ids, but those are .bnk files that don't contain any audio (just pointers/events) pl0000_vo_media.bnk.2.x64.en contains the .wem files my 2 cents; the events that trigger the sound are something like; 'play "pl0000_vo_media.bnk.2.x64.en/432537879"' if someone figures out how to change the events of pl0000 to pl1000 or vice versa, swapping files might work Yes, 423 for Leon, 405 for Claire, and 178 for Ada cause she doesn't have comments like "Get off me" or "I can do this". Swapping them one by one is the only way I thought off.
What you say about events and pointers is completely new to me. I think i can try to look into this more. I would love to get a bit more info though, which files has the event triggers?
On a separate note, can someone please point me towards any tutorial here on hex editing... And i mean first step for dummies, because everytime I've tried to do the simplest of edits to a file with HxD the game goes into infinite loading times or runs but everything related to that file gets erased from the game, like I'd just simply erased the file. I'm not looking for anything advanced, just how to replace a word through editor without corrupting the entire file.
|
|
Posts: 176
|
Post by archerpz on Feb 26, 2019 9:21:09 GMT 10
Yes, 423 for Leon, 405 for Claire, and 178 for Ada cause she doesn't have comments like "Get off me" or "I can do this". Swapping them one by one is the only way I thought off. What you say about events and pointers is completely new to me. I think i can try to look into this more. I would love to get a bit more info though, which files has the event triggers? On a separate note, can someone please point me towards any tutorial here on hex editing... And i mean first step for dummies, because everytime I've tried to do the simplest of edits to a file with HxD the game goes into infinite loading times or runs but everything related to that file gets erased from the game, like I'd just simply erased the file. I'm not looking for anything advanced, just how to replace a word through editor without corrupting the entire file.
I don't know where the files are that have the event triggers, if they even exit at all (It's just how I think it works) did some more searching, maybe in ' natives\x64\sectionroot\sound\resource\snd_bank\bank_player' there's a pl0000.wcbk.3 file and a pl1000.wcbk.3 file, and opening them in a hex editor (and changing the character set to unicode) you can see they point to the vo_media.bnk files, or at least contain the path to them (below is an example of how the file looks in the default ascii+ansi) maybe swapping these files around will work, I'm not sure though (worth a try I guess)
|
|
First of my name, Queen of Joke Mods, Mother of memes
Posts: 2,569
Original Join Date: May 12, 2009
|
Post by JTeghius Kittius on Feb 26, 2019 9:42:41 GMT 10
Yes, 423 for Leon, 405 for Claire, and 178 for Ada cause she doesn't have comments like "Get off me" or "I can do this". Swapping them one by one is the only way I thought off. What you say about events and pointers is completely new to me. I think i can try to look into this more. I would love to get a bit more info though, which files has the event triggers? On a separate note, can someone please point me towards any tutorial here on hex editing... And i mean first step for dummies, because everytime I've tried to do the simplest of edits to a file with HxD the game goes into infinite loading times or runs but everything related to that file gets erased from the game, like I'd just simply erased the file. I'm not looking for anything advanced, just how to replace a word through editor without corrupting the entire file.
I don't know where the files are that have the event triggers, if they even exit at all (It's just how I think it works) did some more searching, maybe in ' natives\x64\sectionroot\sound\resource\snd_bank\bank_player' there's a pl0000.wcbk.3 file and a pl1000.wcbk.3 file, and opening them in a hex editor (and changing the character set to unicode) you can see they point to the vo_media.bnk files, or at least contain the path to them (below is an example of how the file looks in the default ascii+ansi) {expand} maybe swapping these files around will work, I'm not sure though (worth a try I guess) I tried modding these files before but it needs to be done more "directly" as changing the references in these files will not trigger other character's speech and just mute the character you're modding. but they may point us in the right direction...
|
|
|
Post by MaVeRicK on Feb 26, 2019 9:44:13 GMT 10
Swapping those files was the first thing I've done to try and swap audios between characters. This resulted in muting the character which I didn't know why at the time. Viewing them in hex editor i found the path to files I mentioned in this thread's description (same files you just mentioned as well): Leon: pl0000_vo_media.bnk Claire: pl1000_vo_media.bnk I then unpacked those files with Wwise Utility and found out why swapping the banks doesn't work: Inside each vo_media bank are 1000+ file, more than half of which do not have any audio files in them (same as you have pointed out earlier), resulting in 400+ actual audio files. The problem is: there's no correlation between different character's banks. For example Claire has audio file in number 0002 but Leon doesn't, while Leon has audio file in 0005 but Claire doesn't. Both have audio files in 0017 but very different, Leon is coughing and Claire is saying "why won't you die" So if you swap banks if Leon is supposed to cough at some point Claire's voice will come out and say "Why won't you die"... And in most other scenarios they'd be mute. I think what we're looking for here is if there really is any event log that points to which numbered file each event calls.
|
|
First of my name, Queen of Joke Mods, Mother of memes
Posts: 2,569
Original Join Date: May 12, 2009
|
Post by JTeghius Kittius on Feb 26, 2019 9:48:01 GMT 10
Swapping those files was the first thing I've done to try and swap audios between characters. This resulted in muting the character which I didn't know why at the time. Viewing them in hex editor i found the path to files I mentioned in this thread's description (same files you just mentioned as well): Leon: pl0000_vo_media.bnk Claire: pl1000_vo_media.bnk I then unpacked those files with Wwise Utility and found out why swapping the banks doesn't work: Inside each vo_media bank are 1000+ file, more than half of which do not have any audio files in them (same as you have pointed out earlier), resulting in 400+ actual audio files. The problem is: there's no correlation between different character's banks. For example Claire has audio file in number 0002 but Leon doesn't, while Leon has audio file in 0005 but Claire doesn't. Both have audio files in 0017 but very different, Leon is coughing and Claire is saying "why won't you die" So if you swap banks if Leon is supposed to cough at some point Claire's voice will come out and say "Why won't you die"... And in most other scenarios they'd be mute. I think what we're looking for here is if there really is any event log that points to which numbered file each event calls. the numbers probably don't make too much sense, but my guess is that capcom got a giant bulk of VO files from the recording session and imported them and the "numbers" is just the order in which they got imported into WWise and are since then referenced by that number in the "bank". I have some experience at using WWise, but not at reverse engineering it sadly
|
|
Posts: 176
|
Post by archerpz on Feb 26, 2019 10:05:27 GMT 10
Swapping those files was the first thing I've done to try and swap audios between characters. This resulted in muting the character which I didn't know why at the time. Viewing them in hex editor i found the path to files I mentioned in this thread's description (same files you just mentioned as well): Leon: pl0000_vo_media.bnk Claire: pl1000_vo_media.bnk I then unpacked those files with Wwise Utility and found out why swapping the banks doesn't work: Inside each vo_media bank are 1000+ file, more than half of which do not have any audio files in them (same as you have pointed out earlier), resulting in 400+ actual audio files. The problem is: there's no correlation between different character's banks. For example Claire has audio file in number 0002 but Leon doesn't, while Leon has audio file in 0005 but Claire doesn't. Both have audio files in 0017 but very different, Leon is coughing and Claire is saying "why won't you die" So if you swap banks if Leon is supposed to cough at some point Claire's voice will come out and say "Why won't you die"... And in most other scenarios they'd be mute. I think what we're looking for here is if there really is any event log that points to which numbered file each event calls. the numbers probably don't make too much sense, but my guess is that capcom got a giant bulk of VO files from the recording session and imported them and the "numbers" is just the order in which they got imported into WWise and are since then referenced by that number in the "bank". I have some experience at using WWise, but not at reverse engineering it sadly welp, I was hoping swapping those files might work, guess not I didn't know that swapping the bnk files for leon and claire resulted in some functional audio (although usually muted, but sometimes audio, even though it's the wrong one) guess that means that events point to the file order (I do think the .wem file ids are in numerical order in the .bnk file, the ones I checked were in sequential order anyway) and yes, those .wem file names seem to be totally random every track I generated to replace Mr X's theme was just a random number, no obvious pattern maybe it's some sort of hash based on the .wem file generated, either way the title is pretty useless for modders (it doesn't tell you anything) {on hex editing}I assume you're using HxD (I installed the latest version a few days ago, had an ancient version before, and it gives a prompt if the file size changes) pressing your insert key toggles between 'replacing' or 'inserting' bytes when you paste over stuff, you can also replace the selection, or overwrite the section if you replace a selection of, for example, 100 bytes, with 60 bytes, you'll make the file shorter but if you overwrite that selection instead, it will write 60 bytes and leave 40 unchanged in some cases you want to replace the section and make the file longer or shorter (textures for example, the .10 header) but other times you don't and another tip, make sure the byte order is in ' Little Endian' it doesn't affect the file itself (the bytes), but it does affect the value that gets displayed in the inspector especially for editing .bnk files, when you search for the track (the id), you won't find it if the byte order is set to ' Big Endian'
|
|
|
Post by MaVeRicK on Feb 26, 2019 10:50:47 GMT 10
{on hex editing}I assume you're using HxD (I installed the latest version a few days ago, had an ancient version before, and it gives a prompt if the file size changes) pressing your insert key toggles between 'replacing' or 'inserting' bytes when you paste over stuff, you can also replace the selection, or overwrite the section if you replace a selection of, for example, 100 bytes, with 60 bytes, you'll make the file shorter but if you overwrite that selection instead, it will write 60 bytes and leave 40 unchanged in some cases you want to replace the section and make the file longer or shorter (textures for example, the .10 header) but other times you don't and another tip, make sure the byte order is in ' Little Endian' it doesn't affect the file itself (the bytes), but it does affect the value that gets displayed in the inspector especially for editing .bnk files, when you search for the track (the id), you won't find it if the byte order is set to ' Big Endian' - Does HxD have Unicode Character Set View? I can't find it.
- Why should I care to keep the file the same size?
- If I overwrite instead of replace, wouldn't that leave a jumbled mess of half a line remaining?
Edit: For example in file 'leon_common.scn.19' I had tried to replace 'WP0100_M19' with 'WP0300_QuickDraw' So Leon would find the Quickdraw in first safe room in 2nd run instead of M19. I used replace which changed file size, in-game this resulted in no weapon appearing at all.
If I had used overwrite it would result in something like this: 'WP0100_M19ckDraw' which wouldn't make sense.
|
|
Posts: 176
|
Post by archerpz on Feb 26, 2019 11:06:47 GMT 10
- Does HxD have Unicode Character Set View? I can't find it.
- Why should I care to keep the file the same size?
- If I overwrite instead of replace, wouldn't that leave a jumbled mess of half a line remaining?
Edit: For example in file 'leon_common.scn.19' I had tried to replace 'WP0100_M19' with 'WP0300_QuickDraw' So Leon would find the Quickdraw in first safe room in 2nd run instead of M19. I used replace which changed file size, in-game this resulted in no weapon appearing at all.
If I had used overwrite it would result in something like this: 'WP0100_M19ckDraw' which wouldn't make sense.
-guess not en.wikipedia.org/wiki/Comparison_of_hex_editors but the main use of that is to be able to search for unicode text, which you can do in hxd (change text encoding when searching) -game not loading? some files have the file length/size written at the start of the file, making the file longer or shorter breaks that -yes, in some cases you can get away with nulling out the rest of the bytes (if the file size has to match) edit; yes in most cases you want to replace instead of overwrite (but you may need to edit other stuff in the file to allow for a different size) have you tried replacing that with another weapon like the shotgun instead? it could be that it's caused by the model not being loaded at all for leon and not just the size change of the file
|
|
|
Post by MaVeRicK on Feb 26, 2019 11:49:15 GMT 10
have you tried replacing that with another weapon like the shotgun instead? it could be that it's caused by the model not being loaded at all for leon and not just the size change of the file I have confirmed that the model can fully load because i swapped the two files themselves without editing them 'claire_common.scn' with 'leon_common.scn' which successfully spawned the m19 for claire and the quickdraw for leon.
It also swapped the ammo that spawns for each which was a great find, but I can't play with those two files swapped because it swaps some other puzzle items which might break gameplay. Also not all weapons got swapped through this file like the shotgun\grenade launcher, they aren't in the files i swapped at least.
But when I edit the file myself something wrong happens, I followed your instructions right now. I edited the file and put m19 in place of quickdraw (overwrite not replace), and paste 00 in place of remaining line. The game worked normally but it was as if I'dchanged nothing, quickdraw was there.
|
|