[TOOL] Sound Editing Tools for The Witcher 3

+
[TOOL] Sound Editing Tools for The Witcher 3

This is not a sound editor by definition, but it allows you to prepare a wave for Wwise and then cache it into the game as a soundspc.cache file.

Requirements: Python 2 (2.6 or above)

Instructions:

1) Convert your song(s) to the WAVE format. WAVE must be 16-bits or greater, uncompressed and have no cue chunk.
2) Run prepare_wave.py to prepare your WAVE for Wwise.
3) Open Wwise, create a new project, change project settings/source to Vorbis High, import your prepared WAVE and convert all audio files.
4) Go to your Wwise project folder/.cache and copy all your new WEM files to a folder.
5) Run compare_wem.py for each WEM file (comparing them against an original WEM file from The Witcher 3) and answer yes to the request to merge headers.
6) Copy all merged files to an empty folder and remove ".merged" from their names.
7) Run create_sounds_cache.py on the folder with the merged files.
8) Apply the new generated soundspc.cache to <The Witcher 3 Folder>/Mods/modMyMod/content.

Update 1.10:
Added 64-bits support for cache files (works even under Python 32-bits).
Extra script for replicating sounds (useful for replacing multiple entries with the same sound) added. It reads the sounds file from soundbanksinfo.xml.
If a cache file contains more than one file with the same data, the data will be added only once and all files within the cache will reference their data to this single offset.
prepare_wave.py script can now add extra loops into the prepared WAVE. Useful to prevent engine enforced silences between loops if the duration of the sound is too short.
Added license.

Update 1.20:
Added a new script for rebuilding soundbanks (non-streamed files need to be included within a soundbank).
Fixed some bugs through the scripts.

Update 1.30:
rebuild_soundbank.py can now be used to increase or decrease the length of music within the soundbank.
Some minor fixes.

Update 1.31:
Added an option for rebuilding music segments with only one track.

Update 1.32:
Fixed objects quantity for when rebuilding soundbanks for music.

Update 1.33:
Fixed some issues with reading soundbank data.
Fixed invalid __len__ method for SBMusicSegmentObject class.

Update 1.34:
Improved some of the music segment fields as to have replaced music have close to default values.

Update 1.35:
Fixed corrupt bank on replacement of multiple tracks in music segment.

Update 1.36:
It now replaces every reference containing tracks for the music ID.

Update 1.40:
Every single bnk file from the game now works with rebuild_soundbank.py.

Update 1.50:
Added the ability to add new songs to an already defined in-game playlist.
Added the ability to debug the Init.bnk file through --debug.
Added more detailed output to stdout.
Fixed an issue where it would not recalculate the data offsets while building music.
Fixed an issue with reading the bank's header.

Update 1.51:
Ensures that custom object ids don't conflict with other previously added custom object ids.

Update 1.52:
Added the ability to remove songs from an already defined in-game playlist.

Update 1.60:
Added the ability to export and reimport playlist definitions as to allow modders to customize the games' playlists more freely.

Download: http://chrissnoeren.nl/mxtemp/sound_editor_160.7z
 
Last edited:
If this could be playing in few Novigrad Inns, that woul be nice.


Or this, but I don't know zone in W3 which can match to this song


Probably nowhere :sad2:
 
Last edited:
So, you're telling me I can now change combat music to some Rammstein and Marilyn Manson?
Like, really?
***I'M SO FUCKING WET RIGHT NOW***
 
@Yog-Sothoth88 What is the correct way to running the .py files? Am I just supposed to drag the WAVE files in to them? That is what I'm trying to do (have python 2.7 installed) and all that happens is that the command prompt then opens and then instantly closes.

Where are the original Witcher 3 .wem files located?
 
It's a command line set of tools. So hold the Windows key + R, type cmd.
A new MSDOS window will popup.
Type, cd <directory containg the scripts>
Type, <scriptname>.py

Calling the scripts without parameters will cause it to display its usage information (parameters needed for it to operate).

Generally the parameters are as follow:

prepare_wave.py <wave-file> <number of extra loops, 0 for just the original sound without any loops>
compare_wem.py <input aka the original tw3 file you are comparing against> <output aka your modified wem file>
rebuild_soundbank.py --debug <bnk file>
rebuild_soundbank.py <original bnk file> <directory to the wem files to be rebuilt into the bnk>
create_sounds_cache.py <directory containing your modified bnks and/or wems>
decode_sounds_cache.py <sounds.cache file>
 


What am I doing wrong?
 
It should be entered without <>.

Thanks!

But...



:(

Edit: Nevermind, I tried using different software now to convert to a .wav file and now it worked.

However I still don't know however where the original .wem files are located. I have inspected the game files with the Mod Editor (W3 Edit) and I can find where the sound effects are located but not the music.
 
Last edited:
Unpack patch1/bundles/patch.bundle.

Look at soundbanks/pc/soundbanksinfo.xml

File Id is the name of the wem file within the game.

So, if you want to replace this music:

music\toussaint\gwent\tw3_bob_13_tavern_02_MASTER.wav

You will create a wem and rename it 805624.wem.
 
Top Bottom