Skip to content

Modifying Soundbanks

DarthParametric edited this page Sep 4, 2024 · 2 revisions

Copy and pasted instructions from elsewhere, seems to work for both KM and Wrath - CascadingDragon

N.B.: This overwrites an existing vanilla soundbank. This approach is now considered outdated. Refer to Creating Custom Soundbanks to learn how to add a new, standalone soundbank.


Steps for modifying a soundbank

All that said, the process is a rewarding one; if you’re still interested, read on. A huge amount of credit is owed to u/Rational_Drunk on Reddit, but unfortunately a key link is broken in their instructions, which led me to work out the following method. Additional thanks to BurlyWurly for collaborating on the writing of these instructions.

  • Step 1: Identify the voice files that you’ll want to use for your voice pack, and download them or record them - they must be in .wav format. If recording your own voice lines, you will want to wait until Step 10 to aid you in identifying what phrases are needed.

  • Step 2: Identify the voice profile that you plan to replace. Locate the soundbank file in \Steam\steamapps\common\Pathfinder Second Adventure\Wrath_Data\StreamingAssets\Audio\GeneratedSoundBanks\Windows (for example, PC_Male_Pious_GVR_ENG.bnk)

  • Step 3: Create a project folder where you’ll store all your files that you’ll use/create throughout this process. Make two copies of the soundbank you intend to edit; save one as a backup in a subfolder of your project folder, and have the other copy in the main project folder.

Note from CascadingDragon

Yes, weird that it links to Mega and not some Github. It appears to work as described, and I didn't see any network traffic while using it on a VM. Your mileage may vary. Remember to always be safe while downloading unknown files

  • Step 4: Download the Divinity Sound Converter package (https://mega.nz/file/s4AmgI4J#pGqUrybQAoBX0Wf6lkjweDBmhE4Zr5F7ImxMKgu3M3U). Extract the contents into the main project folder with your soundbank file. If you do not have Python installed, you will need to download Python as well

  • Step 5: Drag and drop your soundbank (.bnk) file onto bnkextr (as if bnkextr was a folder, and you were moving the soundbank file into that folder.)

    • There should now be a new folder with the same name as your .bnk file that you’re manipulating. Inside the folder, there will be a collection of .wem files.
  • Step 6: Move the .wem files into the folder with divinity_converter.exe, ww2ogg, and revorb. Select all the .wem files, then drag & drop them onto divinity_converter.exe - this will convert the .wem files to .ogg files, which you can find in the folder called NUMBERED.

    • (Note: In the event that the above link no longer works, alternative links & instructions will be listed at the end of the instructions)
  • Step 7: Copy all the .ogg files to a new folder in your project folder (I named the folder OGG.) You can listen to these files with VLC media player.

  • Step 8: Listen to the files and create a document that lists the file names and their contents.

    • Personal Recommendation: I used Google Sheets for this, so that I could have column A with the file name, then column B with written-out text of the voice lines. Yes, this is more tedious than it sounds. DO NOT RENAME THE .OGG FILES - maintaining the file name is extremely important. This makes typing up the file name in Column A even more anxiety-inducing.
  • Step 9: Determine what you want to replace each file with. The new files you want to use must be in .wav format (as stated in Step 1.) I recommend creating a separate document that lists the file names you’re considering using as replacements.

    • Personal Recommendation: I would recommend initially renaming these .wav files (I need to emphasize that we’re talking about the .wav files here, DO NOT RENAME THE .OGG FILES) with the written-out text of the voice lines. It’s just one less thing to have to cross-reference - but do whatever makes sense for you.
  • Step 10: Back in your first document, identify which .wav file you’ll replace each .ogg file with - since I used Google Sheets, I documented this in Column C.

  • Step 11: Create a new folder in your project folder (I named the folder New Voice Files.) Copy/paste your .wav files into this new folder, and rename them with the file name you intend to replace.

    • Personal recommendation: I advise doing this very methodically and one-at-a-time. If you’ve been using my spreadsheet method, I would recommend sorting column C alphabetically so that you can go in order from your .wav files since those will be the ones you’re copy/pasting/renaming. You must rename them exactly. If you intend to use a source file more than once, I would simply copy and paste it for however many times you need to use it. For instance, when I was making my Vhailor voice pack, I had far fewer voice files to work with than I was replacing, so out of necessity, I had to use some of Vhailor’s lines more than once - in some instances - such as his grunts for taking damage - I had to use the same file 5 or 6 times (be gentle with Vhailor, he’s over 20 years old, he’s not as fancy as these modern CRPGs.) Since I had things sorted by column C, I knew how many times I intended to use a certain Vhailor file, and just pasted that many copies of it into my new folder, and then renamed them appropriately according to column A.
  • Step 12: Your new voice folder should now have the same number of voice files that you extracted from your .bnk file, and they should have the same file names. Now, you need to convert them from .wav to .wem. Download Wwise from Audiokinetic (the functionality you want access to is free.) I found the following video extremely helpful for this step: https://www.youtube.com/watch?v=39Oeb4GvxEc

  • Step 13: Wwise will have helpfully added a suffix to each of your new .wem files. (This is sarcasm; this is not helpful at all.) You now need to rename all of your .wem files and remove the suffix, while carefully preserving the rest of the file name.

    • Personal Recommendation: You may need/want to run the files through Audacity to check the volume.
  • Step 14: You now have a folder of .wem files with the same file names as the ones you extracted. You now need to repack these back into your .bnk file. To do this, download soundbank.py

  • Step 15: Highlight ALL the new .wem files AND the original soundbank file you want to modify, and drag them simultaneously on to soundbank.py

    • Type replace into the CMD window that pops up

    • A modified .bnk file named "changed.bnk" will appear in the same folder. Rename it to whatever soundbank you were trying to replace (e.g. PC_Male_Pious_GVR_ENG.bnk) and drop it into the generated soundbanks folder in step 2.

Troubleshooting

If the voice profile isn’t working, the mostly likely candidate is that one of the files is named improperly. If the volume is too low, try using Audacity (link in Step 13.)

Alternative Instructions for steps 4-6

If the above link does not work, bnkextr can be found here

Download ww2ogg and revorb and place them (in their folders) in the same folder as your .wem files you just extracted.

Create a new text file in the folder with wem files. In the text document, copy and paste the following text:

for %%f in (*.wem) do "./ww2ogg024/ww2ogg.exe" %%f --pcb "./ww2ogg024/packed_codebooks_aoTuV_603.bin"
Pause
for %%f in (*.ogg) do revorb.exe %%f
pause

Save the text file with the extension .bat. Run the .bat file. This should create an .ogg file from each .wem file that was in the folder.

Original text for guide Yes, it's a Darkest Dungeon mod, but it specifically calls attention to it getting it's info from Wrath so *shrug emoji

https://www.nexusmods.com/pathfinderwrathoftherighteous/mods/178