This script is heavily based on (by which I mean copy/pasted from) /u/NikolayTeslo's comment in /r/BaldursGate3. This script will also use vgmstream to do the conversion so you don't need a separate step for that.
This script assumes you are on Windows and are comfortable enough in a terminal to run a command or two.
You will need to download/install a few things to make this work.
- BG3 Modders Multitool
- Used to unpack the audio files and metadata from the game.
- Download the latest release from the releases page and extract somewhere.
- Python 3
- Used to run this script.
- Install how you would normally install Python, The Windows Installer from the website is a good choice if you don't know what to do.
- Run
python --versionto check that Windows doesn't have the broken alias enabled.- If it does, then search Settings for "app execution aliases" and disable the entries for
python.exeandpython3.exe.
- If it does, then search Settings for "app execution aliases" and disable the entries for
- vgmstream
- Used to convert the
.wemfiles to.wavso audio players can play them. - Download the latest release from the builds website and extract the folder somewhere.
- Double check the release has a bunch of DLLs included.
- Used to convert the
- wwiser
- Used to convert the
.bnkfiles to XML so they can be read. - Download both
wwiser.pyzandwwnames.db3from the releases page and place them in the folder this README resides.
- Used to convert the
- Open the Modders Multitool
- Make sure you have your game path set correctly. This can be confirmed by opening the Configuration dialog from thetop menu.
- In the top menu, select
Utilities>Game File Operations>Unpack Game Files. - Select
SharedSoundBanks.pakandSharedSounds.pakand confirm. - Wait for the unpacking to complete.
- Back in this project, change the constants in
categoriser.pywwiser_pyzshould be the path of thewwiser.pyzyou downloaded.folder_vgmstreamshould be the folder you extracted vgmstream to.folder_unpacked_datashould be theUnpackedDatafolder in your BG3 Modders Multitool location.folder_audio_convertedshould be the folder where you want your final files to be.
- If you want the files renamed to more human-friendly names, check the advanced section.
- Run
python categoriser.py- This will take some time, so go off and enjoy your life while it does its thing.
- Your audio files will be categorised in the converted folder.
- The file names will be numbers, not human friendly names. If you are looking for something specific, then you will need to sort through them manually.
Note
These steps require wsl, or some other way of using Linux, as you will be dealing with file paths that are invalid in Windows.
This step uses the bg3-sids wiki by HumansDoNotWantImmortality.
- In
wsl, clonehttps://github.com/HumansDoNotWantImmortality/bg3-sids.wiki.git.- If you accidentally run this in Windows, you'll find that it can't check any of the files out. Open
wsland rungit checkout masterto actually check out the files.
- If you accidentally run this in Windows, you'll find that it can't check any of the files out. Open
- In
wsl, run the following script in that project to make the file names valid in Windows.for file in *; do new_file=$(echo "$file" | sed 's/[\\&]/_/g') mv "$file" "$new_file" done
- Back in this project, set
should_renameto True andfolder_bg3sids_wikito the path you cloned the wiki to. - Switch back to Windows to run the Python script.
- None. I'll only revisit this if I need to mess with more audio files.