Jobs Support Register

[Tutorial] Sound Extraction and basic modding

+

biosmanager

Poser
#1
[Tutorial] Sound Extraction and basic modding

Hey guys,

as stated in another thread I'm experimenting with sound modding in TW3.
I figured out some basic things I'd like to share with you. I plan to update this thread with new information how to mod sound in the game.

  1. Extracting sound files
    • First of all you need to extract the audio files provides in the content folders. Navigate to <game dir>\content. You find several folders which contain a file "soundspc.cache". That's what we are looking for. Copy these to a folder somewhere else.
    • In order to acces the files in the archives you need to download quickbms
      Extract the soundspc.cache files using the provided witcher3.bms script. You get a bunch of .wem and .bnk files. These are soundbanks from Audiokinetic WWise. The problem is. you can't really work with these files.
  2. .wem file type
    To my understanding these files are directly streamed to the game. They are used for e.g. music and background tunes. Download ww2ogg and revorb.exe as ww2ogg does not produce correct granulepos.

    Example:
    First execute ww2ogg on a file using the provides codebook:

    ww2ogg 4227130.wem --pcb packed_codebooks_aoTuV_603.bin

    It will generate a .ogg file. Use revorb.exe to fix this file. This files will actually be playable in an audio player.

    revorb.exe 4227130.ogg 4227130_fix.ogg
  3. .bnk file type
    These are soundbanks, containing multiple .wem audio files. Download the latest bnkextr to unpack .bnk files.

    Example:
    Usage:

    bnkextr combat.bnk

    Apply the upper tools on the resulting .wem files to get audio files to work with.
  4. Converting back to .wem and .bnk and cook
    TODO... will be updated

Thought you might find this useful. More info to come.
 
Last edited:

biosmanager

Poser
#3
Did you succesfully imported a sound to the game?
I'm on it. Now I have files to work with. I see no problem re-importing the games with adequate converting. The real issue is to match the extracted audio files with specific events/triggers in-game. Extraction of the soundbanks deliver files like 0001, 0002, ...
 

Mordek113

Tourist
#4
I'm on it. Now I have files to work with. I see no problem re-importing the games with adequate converting. The real issue is to match the extracted audio files with specific events/triggers in-game. Extraction of the soundbanks deliver files like 0001, 0002, ...
The easiest way to check if this is gonna work is replacing a well-known music with another one.

sfx\music\kaermorhen\q403\tw3_hunt_or_be_hunted_chasing_edit_02_percussion_c148adce.wem

Here is a path to "Hunt or be hunted". You don't even have to extract other files, just import that one with another = custom.
 

biosmanager

Poser
#5
The easiest way to check if this is gonna work is replacing a well-known music with another one.

sfx\music\kaermorhen\q403\tw3_hunt_or_be_hunted_chasing_edit_02_percussion_c148adce.wem

Here is a path to "Hunt or be hunted". You don't even have to extract other files, just import that one with another = custom.
When is this file being played? So your idea is basically to "overwrite/replace" an existing file with another?
For the file/in-game association: Do you have any idea where to lookup which file will be played? Is sound triggered by scripts?
 

Mordek113

Tourist
#6
When is this file being played? So your idea is basically to "overwrite/replace" an existing file with another?
For the file/in-game association: Do you have any idea where to lookup which file will be played? Is sound triggered by scripts?
Yeah I think so. You can check "sound.ws" in content0\scripts\engine\sounds\. Some sounds are triggered by this script

Also, you can find all sound paths in uncooked\soundbanks\pc\soundbankinfo.xml
 
Last edited:

QueenNothing

Poser
#10
Is everyone mostly waiting on a better toolkit?

I'm at the same point, where I can convert a few files to .wav, but not sure how to get them back into the game. As far as I can tell, the soundbanksinfo.xml file references file names with words, like "reaction_crowds_when_bear_attack.wav" and "reaction_crowds_when_bear_attack_2021b791.wem". The wem files I'm getting are entirely numerical.
 

biosmanager

Poser
#11
Maybe this is because all these wem files are part of a soundbank (.bnk). Maybe those actual filenames are references in the soundbank.
 

Strazyplus

Poser
#12
Attempts to extract sounds has been unsuccessful, I can't seem to figure it out. Nothing will extract from soundspc.cache. other tools like witcher mod kit uncooked things but sounds seemed missing.

 

Strazyplus

Poser
#14
I have been trying that however have been unsuccessful as well. although making it more difficult when no error logs are given.
 

Mezziaz

CyberPsycho
#15
I have been trying that however have been unsuccessful as well. although making it more difficult when no error logs are given.
What step do you have problems with? Unpacking the "soundspc.cache"-files with QuickBMS or something else?
 

Strazyplus

Poser
#16
witcher3.bms drag drop onto quickbms.exe Cmd dialog appears "select input archives/files" select soundspc.cache in content0. then asks me to select output. then I get this


also with the [TOOL] Sound Editing Tools that was linked I download phyhon and nothing happens when I drag drop soundspc.cache onto decode_sounds_cache.py
 

sv3672

Max-Tac
#17
What step do you have problems with? Unpacking the "soundspc.cache"-files with QuickBMS or something else?
My tool from here can extract both sounds.cache and .w3speech files. The former seems to have a newer version of the format (e.g. in content/patch1), perhaps that is causing problems ?
 

Gilrond-i-Virdan

NetWatch
#19
biosmanager;n56938 said:
Hey guys,
revorb.exe 4227130.ogg 4227130_fix.ogg
Interesting guide, but I got stuck on this revorb step. Where can I find the source for it, to build it for Linux? Other tools mentioned above I managed to build, including quickbms and ww2ogg.

UPDATE: Looks like most of the time that revorb isn't needed - produced ogg files are OK as is.

Did anyone make a map of where various music from the game is found? There are gazillions of files over there.
 
Last edited: