A script that takes a directory of XWB files and extracts the contained sound files to WAV files. The names are properly mapped according to a CSV file.
For the Viva Piñata game, the sound effects and musics are all stored in the
xwavebank directory in the games files. Instead of manually extracting all of
the sound files using the unxwb tool and
then having to rename the files by hand, this tool allows to do all at once:
python3 wavebanks_extractor.py --sound-mappings viva-pinata.csv --wavebanks-dir C:\Program Files\Viva Pinata\xwavebank --destination outputYou will end up with a directory like this:
output
├── Ambient
│ ├── Day.wav
│ └── Night.wav
├── Music
│ ├── BGM
│ ├── Other
│ └── Romance
├── NPC
│ ├── Arfur
│ ├── Bart
│ ├── ...
│ └── Willy
├── Pinata
│ ├── Arocknid
│ ├── ...
│ ├── Whirlm
│ └── Wing flapping.wav
├── Sound effects
│ ├── Alerts
│ ├── Ambient
│ ├── ...
│ └── XP point.wav
└── Unknown
├── fan-00000000.wav
├── firefly-00000000.wav
├── firefly-00000001.wav
├── ...
└── testdlc-00000000.wav
Luigi Auriemma's unxwb, translated to Python using Copilot.