fantusyflan Posted July 19 Share Posted July 19 Howdy all, I recently been posting soundbank updates for Pathfinder WOTR for personal mods I liked. Then I got a flood of people over time asking me either to update old mods they have in mind or how I figured out how to do this. So will so up front that I hadn't learn through any guide, I work in the tech sector/game a lot and have done a lot of "modding" myself for personal use. So a lot of this was more on intuition over everything else. It's hard to gauge people's comfortability around some more of the technical aspects, but I'd figure since I wrote all of this up for one person, I should probably share this. First thing is that people need to be aware of, are how the soundbank files work in a general sense so let's start there. What are soundbanks? In video games, audio (i.e... SFX/BGM's/Voices) is typically treated as "event data" which triggers/cue's due to some assigned event (character talking, gun shooting, car noises etc...). That data is collectively stored in a soundbank (.BNK) file. A soundbank is basically as the name implies (a bank, filled with sound files). In essence, the bank is sort of like container. Kind of like how an .MP4 video or .MP3 audio works, where the actual audio (AAC encoded file) / video (.H264 encoded file) data are contained inside of the MP4/MP3. The container (the MP4 and MP3 file) only instructs video/music player apps/devices on how to interact with the encoded audio/video files contained within the MP4/MP3 files. With soundbanks, these encoded files are ".WEM" files, which are themselves containers used for compressing a OGG Vorbis (.OGG) audio file. Soundbank (.BNK) -> WEM (.WEM) -> OGG Vorbis (.OGG) Another final layer to this would be .WAV audio since it's widely compatible with everything, but you only need to go that 4th layer down if you have specific needs I list much further down. First thing - Note that there can be (and often are) multiple .WEM files inside of a single soundbank (i.e... For WOTR, the " PC_Female_Pious_GVR_ENG.bnk" file which is the 'Pious Female' voice ingame contains 134 .WEM files). Second thing - Note that there are file naming standards/conventions (decided by the game developer/Owlcat in this case, more on that later), and they are important because they are tied to events/cues in game as mentioned above. For example the .WEM files (i.e... for Owlcat and WOTR) a .WEM file might be something like either of the two below... "66736369.wem" which is assigned to the event "CharCrit_09", which is when a character using the "Pious Female" voice scores a critical hit, triggering the audio to play in-game. "124508443.wem" which is assigned to the event "Fatigue_01", which is when a character using the "Pious Female" voice reaches a fatigued state, triggering the audio to play in-game. Third thing - Note the method of how games even track what assigned .WEM files to belong to which events. For Owlcat (and most game devs), this is done via an XML spreadsheet, which has several columns that maps out the above examples as exactly mentioned. Four thing - Note that soundbanks have "Headers" much like a HTTP requests or API calls (I know I may be speaking greek to most people right now). Essentially they have a section within the soundbank file itself that has unique information. Think of when using microsoft windows, you right-click on a file and their is a "Properties". For some music and video files there is additional info there you don't see anywhere else...kinda like that. Difference is here, is that some of that information can be key to whether or not a soundbank works in-game because it's related to that "event data" mentioned earlier. Specifically in WOTR, this field in the header is called "Use Feedback". Typically this has a set numerical value that's a single or double digit like "0", "5", "12", "16". Where do they come from and why is this a pain in the *** to work with? Now the odd thing about .WEM and soundbanks in general is that it's a proprietary format of a single company called Audiokinetic, who have monopoly on the whole of sound design in the video game industry. They own the software used to generate these files called Wwise, which is used by most video game engines such as Unreal and Unity (which is what Wrath uses). Wwise is NOT user friendly by any means, and is very much a production level application intended for power users who work in the industry, or know quite a bit about audio engineering. To add to the complexity, are unintentionally the game developers who define their own rules/structures however they want/need to for their games. You can start see why it be hard for most people to make sense of this, let alone pick up modding to make their own audio for the game. Which takes me to the next point. Okay, so how hard is any of this to start modding or updating for Pathfinder WOTR? Well knowing the above helps, specifically the piece about the developers. Owlcat like most gaming companies use Wwise to create multiple soundbanks to contain an array of sounds. As Pathfinder WOTR was patched/developed more over time, so too did their structure. For example if you go to any of my mod pages, you'll see that the number of .WEM files contained within the .BNK files have changed or the numbering/file naming convention of the .WEM files are different pre/post patch 2.2+ (circa Dec 2023). Remember the "Use Feedback" value I mentioned for the soundbank headers before? Well, Owlcat changed some (but not all) of those for voice soundbanks, a lot of people didn't even know this was a thing to begin with. And since they didn't know the about this, any new soundbanks created or old soundbanks they tried to update remain(ed) broken. Once again as an example, voice soundbanks in particular can range in count from 110-160~ish .WEM files within the soundbank. So as you can then imagine, not knowing what changed, and only knowing that post patch something did for characters using the modded soundbank that resulted in a mute character, wasn't exactly fun for a lot of modders to retroactively go back to re-learn, find and fix all those issues. Especially since Owlcat made sweeping changes like this multiple times since the release of the game. Well shucks, all that said...where would I start then? STEP #1 is to find out what the current structure/naming conventions are used. Here is a great reference JunktownMods put up on nexus for the current mappings - Player Voices Mapped - Modding Resource. It has multiple spreadsheets per soundbank (per voice type, i..e... female aggressive, female pious etc...). i.e... An example below of the mappings for the "Pious Female" soundbank. STEP #2 is your going to need to decide which soundbank to pick from to use. Since you will basically need to create your own .WEM files that match up to the number in the soundbank your swapping the audio for. So if you want your audio for Bela Dimitrescu to be used instead of say the "Madwoman Female" choice for voice, then you should be looking at that spreadsheet which has the mappings for the "PC_Female_Madman_GVR_ENG.bnk" soundbank. You're also going to need a way to play audio from the soundbank, which can be done one or two ways. To extract the .WEM files from their .BNK file container, since remember, the .BNK file is basically a zip file, then use a compatible audio player for .WEM files (because remember .WEM is a proprietary format, so playback is limited for most audio players). [Recommended] Use a tool that can natively open .BNK containers and play .WEM files. For ease of use, I recommended a fellow foodies tools named Ravioli. Of which there are two that can make things easier for you, just click the highlighted names to download, Ravioli Explorer (RExplorer) and Ravioli Extractor (RExtractor). RExplorer - Allows you to open and play soundbank .WEM files natively within the same window. This is great because it allows you to also preview voices so you can go through and see what the mapped vanilla .WEM files sound like for a soundbank, which can help give an idea of where you would want your custom audio assigned. Fairly straightforward, once your running it, just click "Open File" and select the soundbank you wish to open. Once you do, you will see all the .WEM files in the sound bank. Simply single left-click on them to have the audio play. RExtractor - Allows you to extract all the .WEM files from a soundbank. It even allows you to skip a few steps depending on the need (sometimes I need .WAV to increase gain/normalize audio or something) to convert all the .WEM files in a soundbank to .WAV format. This is pretty straight forward to use just select the soundbank file you want to extract for "Input files" and the "Output directory" for the extracted .WEM files. When you are ready to extract , just click "Start". If you want/need to convert to .WAV just click "Convert sounds to:" checkbox and from the dropdown select .WAV, followed by "Start". STEP #3 is that you now have to take your time mapping out your assignments using the appropriate spreadsheet as mentioned before. Given that this is going to be your own custom thing, how long this will take is entirely subjective. Most I can do from a piece of organizational advice, is to recommend keeping things simple and using an excel spreadsheet. Heck even open another sheet on the excel doc you are using to check the XML mappings, so you don't have bounce around excel sheets in different windows. Once you have all of your new custom bank mapped out via spreadsheet, now you should rename all of those your audio files before doing any conversion into .WEM so the numbers match. So for example, below are the .WAV files from I extracted for the God-King Darius mod I updated. The audio was way too loud in-game, so I needed to normalize it. Unfortunately as stated, .WEM files don't play in most audio players/editors so I needed them in .WAV format first, which I would later convert back to .WEM after having normalized the audio, then finally, reinserting those convert .WEM files back into the soundbank. STEP #4 is kind of a big one, and could be skipped depending on what you are doing from this point onwards. So if... You are trying to simply update an existing sound bank (what most of the mods I do are)... You can skip this step entirely. Though there may be a reason you need to do this, as I've said audio normalization etc..., but if not skip. You are trying to create a custom soundbank with your own custom sounds... You'll need to convert your audio from .WAV into .WEM and that will require the installation and use of the Wwise software. There are plenty of tools that will allow you to do the inverse, but to encode audio to .WEM is proprietary, you must use Wwise for this. Installing it can be a little convoluted if you've never dealt with game/software developer related apps, as is most industry level production software. So am going to paste a couple things here in pieces to get directly to what you need. First thing - Visit the official Audiokinetic page for installing Wwise, and follow steps by clicking here. Step 8 has you installing "Cube Demo" which is basically a demo game audio engineers to test stuff with, skip that by leaving it unchecked and just click the "Next" button. Step 11 you can also skip for the same reason. Second thing - Watch this handy 2min Youtube video that can give you a direct demonstration on how to convert from .WAV into .WEM format by clicking here. Assuming you followed the Youtube video, you now have a bunch of .WEM files with an appended filename that annoyingly has an extra 9 characters, i.e..."39209609.wem" is now"39209609_8E324C96.wem" STEP #5 Of course you are now thinking to yourself, do I have to rename these all again? Answer is yes, the names must match the files you are replacing whichever vanilla soundbank you are planning to use. Bright side is, there are numerous was for you to do this. Feel free to use whichever tool/scripting method to rename...even the hard way, manually. [Recommeneded] A free tool I use for everything renaming on windows all the time is called Bulk Rename Utility. There is a paid/commercial version as well, but unless you need the really advanced filtering for massive of amounts of data processing, you're good on the free version. If using Bulk Rename Utility, once you have it open, navigate to your cache folder of the project as shown in the youtube video. For me using a project I called "jinx", this was at the path C:\Users\Flan\Documents\WwiseProjects\jinx\.cache\Windows\SFX. Once there you should see all of your .WEM files listed. Click inside the window on one of the files and press CTRL+A on your keyboard to select all the .WEM files. at once. It will show you the current file names under "Name" and all the new filenames under "New Name" once you rename them. Now in the "Remove (5)" box, update the "Last n" field to remove the last "9" characters (this targets all those _8E324C96 you see appended to the .WEM files after the Wwise conversion) from all your selected files. Just click the "0" and enter "9" or click the up arrow to increment up by 1 each time. Lastly, click the "Rename" button on the bottom right corner of the screen. Once you do, you'll get a warning asking to confirm that you are about to change the file names. Don't worried if you missed a couple file when selecting or enter the wrong number or something. If you press CTRL+Z you can undo your changes to revert the names back. Or you can click "Actions" next to "File" at the top left of the app, and select "Undo Rename" from the dropdown menu to achieve the same effect. STEP #6 Okay, near the end. Now that you have your newly minted .WEM files, it's time to place them into the soundbank. For this final piece you can use any tool that can retain the headers of the vanilla soundbank you decided to use for swapping the .WEM files for. [Recommeneded] For wider audiences, I'd recommended using two tools to make this work. The first tool is intended to create a soundbank out of .WEM files placed into a folder called KOF XV pck & bnk file editor (RBXV). This has several options available in it, but the most important one is the "Mass Replace" option it has. It keeps the headers intact, and does a like-to-like replacement for each .WEM file from a target folder, while also creating a new .BNK file. Another side benefit is that it doesn't modify/remove source soundbank you are trying to swap, nor does it alter your .WEM files in any way. It just simply creates a new soundbank. When you first open the executable file, it will be a vertical window. There is one thing you want to change before doing anything else, and that is on the top left menu where it says "Mode: KOFXV", click "None". It's important to remember to do this, since I believe failing to do so will preload headers for that specific game (King of Fighters XV), which you obviously want to avoid. Next, click "BNK Editor". In this new pop-up window, you'll see two empty boxes and above it, two options on the top menu. Select "Import BNK", then navigate to the vanilla soundbank you plan to swap the audio for and open it. You'll now see 3 listings in the left box, "Bank Header", "Data Index", "HIRC". The first two, are the only important ones here. If you click "Bank Header", the right box will show the bank header info. Note that this will probably be somewhat cutoff depending on the resolution of your monitor, but that's okay. The main callout here, is just to provide you with seeing that "Use Feedback" field/value I mentioned earlier. As stated before, that is going to differ per vanilla soundbank. The main thing is to ensure that the value you see here, is the same in the vanilla soundbank you just opened, and in the new sound bank you create once this is done. If for whatever reason they aren't, your soundbank won't work. If you click "Data Index" (it's a dropdown so click the small arrow, to the left of it's name), you will see a drop down listing of all the .WEM files in the soundbank, listed by their corresponding index number (i.e... "Wem 0", "Wem 1" etc...). You can probably see why I said it's important to have your .WEM files named prior to this point. Next you want to right-click on "Data Index", which brings up "Import Wems", "Export Wems", and "Mass Replace". Click "Mass Replace". Note this may take several seconds to a minute to load depending on the number and size of your .WEM files. Another window will pop-up that has a "Add Wems" button. Select it, then navigate to your folder that has all of your properly named, custom .WEM files ready, and highlight all of the .WEM files. Which you can do by holding left-click on your mouse to select all of them in the folder, or by pressing CTRL+A on your keyboard. At this point you should see this ne box fill with two columns, one of which is series of drop-downs on the right. The left-hand side is the list of al the .WEM files already in the soundbank, on the right is what you selected from your folder. This should be obvious now but will reiterate, the names on the left, and the ID on the right, should be the same numerical value (i.e. "Wem Name: 5983878" on the left should be "Wem ID: 5983878" on the right). Once ready, click "Confirm". You should now be back at the "BNK Editor" window, which will refresh. Once again re-check the "Use Feedback" field to make sure the value is the same as before. Assuming it is, from the top menu click "Export BNK", which will open a window to save your new soundbank. Of course the filename should be the same as the vanilla soundbank you are intending to replace. For more advanced users, I rather than the above, I would highly recommend the soundbank-editor python script by t1f7 on github that can simply do all that was mentioned for the above tool with a couple CLI arguments. Reason why I'd say this is a much better pick is that it can massively simplify all the above as does exactly what it says in the README doc. "It can list, extract and replace wem sounds saving all other data (headers, events, etc)". Note that to use this requires/assumes a couple things off the bat. 1) You know have python installed on your system. 2) You know how to use python. Frankly I don't want to add even more confusion, but if anything about the last several sentences is confusing, stay away from this script and use the first method which is more user friendly. STEP #7 This last step is the easiest, make a backup of the vanilla soundbank and replace it. I personally just copy and paste the vanilla soundbank into the "GeneratedSoundBanks" folder just one folder level up, easy to remember. For steam this would be "C:\Program Files (x86)\Steam\steamapps\common\Pathfinder Second Adventure\Wrath_Data\StreamingAssets\Audio\GeneratedSoundBanks\Windows". For other platforms like GOG, just do a quick google search to find out where. I don't want to provide something that could/has changed and it's wrong in the future (I don't use GOG). How Do I Test This Is Working? Simply startup the games and either use, or create a new character that was using the vanilla soundbank you have swapped for you're custom one. Bare in mind, that if you are creating a new character, the preview voices in the character creation screen will ALWAYS sound like the vanilla soundbank. Those audio files stored/loaded separately, once you are in-game, you will hear your new voicepack. Placeholder in case I think of something else ¯\_(ツ)_/¯ There are definitely things I've left out, but for the most part they will be hyper specific on things like volume normalization things more technical and on the audio engineering side which I rather not complicate here. Hope that helps out a bit for folks asking about this subject since there seems to be a void about all of this atm. 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now