Metal Gear Solid V: The Phantom Pain
0 of 0

File information

Last updated

Original upload

Created by

Jakob

Uploaded by

Jakob6174

Virus scan

Safe to use

Tags for this mod

About this mod

Effortlessly replace in-game SFX/music/voices. No replacement size restriction and no need to use a hex editor.

Requirements
Permissions and credits
Changelogs
MGSV Sound Replacement Tool
Metal Gear Solid 5, like many other games, use a proprietary format to pack sounds along with event information into a container known as a "Wwise Soundbank", without going into too much detail, soundbanks (Created with Audiokinetic's Wwise Software) allows game developers to manage system resources as well as organize SFX more effectively by packing them in a way so that only the necessary sounds are loaded at any time.

Luckily these soundbanks (Which have the extension ".sbp") are nothing more than containers that house "RIFF" files as well as their associated event information, for example, firing a gun in-game would call the ID for the gun sound which would likely be in a soundbank loaded in memory at that time.

Update v0.9:
It is now no longer required to use "GzsTool" to extract ".bnk" and ".stp" soundbanks as this tool will handle that for you. Be sure to read the updated guide that follows. (At the same time I have completely dropped support for the old functionality since it is no longer needed)


Requirements:
SnakeBite by Topher (Necessary)
File Monolith by Morbidslinky (Or any ".dat" archive extractor for MGSV, I prefer this one)  
Wwise Authoring and SDK (2015.1.x) (The major version is important, Wwise can only guarantee compatibility between minor versions)
Ravioli Game Tools (Recommended as it allows you to listen to sounds inside soundbanks without extracting them)

Guide

I will demonstrate a typical workflow from start to finish and hopefully, everything falls into place. I will point out significant details along the way that, when considered, increase the chances of a successful sound swap close to 100%.

For the purposes of this guide, I will be replacing some gunshot sounds; Which happen to be located in ".\Steam\steamapps\common\MGS_TPP\master\chunk0.dat". If you don't know where a particular sound is stored, a good place to start in general is "chunk0".

Tip: Downloading "Ravioli Game Tools" and associating it with ".sbp", ".bnk" and ".stp" extensions allows you to simply double click the files and from the interface, be able to listen directly to the sounds.

1. Use "Archive Unpacker.exe" from "File Monolith" to extract ".\chunk0.dat" to a folder named "chunk0" that is preferably somewhere outside your game directory. Once completed, navigate to ".\chunk0\Assets\tpp\sound\asset\" to find many SBP soundbanks. Note: I would advise against altering anything extracted from ".dat" files; Instead you should copy and paste anything you intend to modify into another working folder. Since we won't be repacking chunk0 in favour of "SnakeBite", we can rely on this folder for unaltered files in case you want to start again. 

2. Extract my tool (Wwise.exe) into a suitable working location as well as the soundbank you wish to modify. The names of the ".sbp" files can sometimes hint at the sounds that they contain, but in many cases, you have no choice but to go through one-by-one playing each sound with "Ravioli Explorer" until you find what you are looking for. In my case, I am going to copy "common_bank_01.sbp" to my new working folder.


My working folder, I decided to put the extracted "chunk0" folder here as well


3. To extract the soundbanks from an ".sbp" file, either open a CMD prompt in the same directory (You can shift + right click in explorer to get an option to open CMD prompt here) and type ".\Wwise.exe <path_to_sbp>"; or simply drag and drop an ".sbp" on top of "Wwise.exe". This will now extract every sound file contained ( As "RIFF_####.wem" instead of the ID to make them easier to find) as well as create directories for you to put replacement sounds in later.

Wwise_Output contains extracted files, Wwise_Input will be where you put the replacements

The contents of Wwise_Output/common_bank_01, don't delete anything from here but more importantly, don't delete the original ".sbp" file.


Note: In most cases, the output folder will contain both a ".bnk" file and ".stp" (Which are both just soundbank containers), this a good time to use "Ravioli Explorer", listening to the contents of each while keeping a note of the file numbers of the particular sounds you want to replace (It's possible that a particular soundbank doesn't contain any sounds, this is normal). In my case I wanted the "M-2000 Silenced" gunshot sound that resided in  ".\common_bank_01_sbp\common_bank_01.bnk" and had ID: 363550897


Using Ravioli Explorer to listen to the sounds

TIP: It actually might be a good idea to temporarily change the extension of a ".bnk" to anything else and then read it with "Ravioli Explorer" since then the files will simply be in an ordered list in the format "File####.wem" which is far easier to remember.

4. Next, I open "common_bank_BNK.log" to get the information I need for the "M-2000 Silencer" sound that had the ID: 363550897.
So inside the log, I search for "
363550897", which gives me all the information I need to find/create a replacement. I can see that it is the "RIFF_0985.wem" file and it has the format "PCM" (Make note of this for later). While not essential it's also a good idea to match the number of channels as well, in this case, "Mono". 


Top of the log file:
 
After searching for 363550897:


5. I'm assuming you have some idea of the sound you want to replace the original with, I would use "Adobe Audition" or "Audacity" first to edit and export my replacement in a ".wav" format, as well as match the number of channels to the original. Once satisfied with the replacement, go ahead and launch Wwise v2015 and create a project named "MGSV". Now import your new ".wav" using "Project>Import Audio File" and use the dialogue from there.

IMPORTANT: Press "Shift + K" to bring up the project settings, and click on the "Source Settings" tab. Now change "Default Conversion Settings" to whatever format you noted inside the log. For example, the "M-2000 Silencer" sound was extracted as "RIFF_0985.wem" and is in "PCM" format so I will change the conversion settings inside Wwise accordingly. Now click "Project>Convert all audio files", which by default are put inside the "<Project_name>\.cache..." folder.


6. Now that we have our replacement with the extension ".wem", simply give it the same name as the original (So for me I would name it "RIFF_0985.wem") and put it inside the ".\Wwise_Input\<Soundbank>" folder. At which point you can then repeat the step 3 again and it will automatically detect your replacement, creating a brand new ".sbp" inside the ".\Wwise_Output\" folder with all the necessary changes. 

My replacement inside the .\Wwise_Input\<Soundbank> folder


After running the command ".\Wwise.exe .\common_bank_01.sbp", this is the ".\Wwise_Output" folder with the newly generated soundbank


Note: All of the original files inside the ".\Wwise_Output\common_bank_01" folder are still there to listen to and as long as you have the original ".sbp", you can freely add/remove RIFF files inside the ".\Wwise_Input" folders without consequence. I would only ever run the tool with the original soundbank. You can even manage multiple soundbanks since the generated folders get their names from the soundbank that was given as an argument.

7. Obviously, all I need to do now is repack the ".sbp" file into "chunk0" If you haven't already, install and launch SnakeBite, read any dialogues that come up and accept the default options. This (among other things) takes care of unpacking and repacking the ".dat" files for us and allows us to create mods using the built-in "Makebite" tool. Put your new ".sbp" file in its own folder but make sure to create the hierarchy that existed in the chunk0, which is where it originated from. For example, my folder structure was:

M-2000
|___Assets
|___|___tpp
|___|___|___sound
|___|___|___|___asset
|___|___|___|___|___common_bank_01.sbp

Then launch "SnakeBite", select mods and go to "File>Launch Makebite" and fill it in accordingly.
In my case:
 


This will create an archive that you can use in "SnakeBite", which allows you to enable and disable your mods safely.

That's about it really, keep in mind that I do not have the time to test every soundbank in game, however, I have tested a great deal of them and while I won't be actively developing the tool, I will be happy to fix any problems should someone encounter them.

If you have any questions I will try my best to answer them.


Tip: In regards to finding a particular sound, here are the guidelines I follow as well as some information about Wwise soundbanks as I understand them. I hope they help and would appreciate any input/criticism.
The purpose of soundbanks is twofold: Organisation and optimisation
The goal is to have as few soundbanks loaded into memory at any time, while of course making all sounds available for that level
Developers would likely follow a template so the team is on the "same page" so to speak
There is unlikely to be any duplicate sounds as (although limited/undesirable) sounds can be streamed from other banks on demand
Gunshot, impact; movement, grunts/groans; explosions etc... Will likely exist in one place with the format "PCM"
You can see the format of a sound from the log generated after running "Wwise.exe". Sounds that require quick reading (Such as those that respond to user input and cannot be predicted, like firing a gun) are more likely to be in "PCM" format, whereas "Vorbis" is compressed, so require more time/processing power. 
I'm not entirely sure about this one, but I think only ".bnk" soundbanks can have event information associated with them. In fact, Wwise banks are ".bnk" but MGSV uses '.sbp' which typically have the following structure: 
<<     SBP     >>  <<                 BNK      >>  <<           STP         >>
<< | Header | >> << | Header | Data | HIRC | >> << | Header | Data | >>

The STP header was particularly interesting to me for reasons I won't go into, all that matters is if this is correct, then I would
expect the ".stp" to only contain sounds that have no use for event information.
I would love some clarification on this.