Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2016
1,221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.25 KB | None | 0 0
  1. You're going to need some tools.
  2. Download bnkextr: https://github.com/eXpl0it3r/bnkextr/releases
  3. Audacity: http://www.audacityteam.org/download/
  4. WW2ogg: https://github.com/hcs64/ww2ogg
  5. and WWise 64 Bit client: https://www.audiokinetic.com/download/
  6. I'm going to assume you already can use basic conversion utilities, because this will take forever if you don''t.
  7.  
  8. Now, figure out what sounds you want to replace. If you want to replace, say, a AK handling sound, you'll look for it in the AK12 bank. Shit like ambient sounds are harder to track down.
  9. Either way, look in the .txts in Steam\steamapps\common\killingfloor2\KFGame\BrewedPC\WwiseAudio\Windows. They refer to the contents of the .bnk files of the same name. Only look for sound assets under "In Memory ID"- "Events" titles can be helpful, but aren't actual sounds and will be used later.
  10.  
  11. Copy the .bnk with the sound you want to change to the folder where you have bnkextr, and extract. You should get a mess of .wem files labelled sequentially. Copy everything that was extracted (EVERYTHING) to wherever you have ww2ogg, and convert them.
  12.  
  13. Now is the time to rename all your files. Even if you have 250 of them- not uncommon for a more complex bank- you'll need most to all to have a decent soundpack. This is why shorter is an easier place to start.
  14. Anyways, give the files a listen while cross referencing them in the .txt that corresponds to the .bnk. You should find that they were more or less extracted sequentially. Rename these files so you know what they are- I suggest just using TWI's names from the .txt- they're clear enough. Note some random sounds didn't make it in- they are either pure engine sounds or found in other loaded banks. Ignore them for now, we'll get by without them.
  15. Once the naming fun is done, it's time to use Audacity! Import all the sounds, then export multiple in format WAV (Microsoft) 16 Bit Signed PCM. Now you have something WWise can use. Now's a good time to do the same to any sounds you want to add (hentai girl moans are a good choice). This is also where you add any effects to the sounds, except volume modifiers.
  16.  
  17. It's WWise time. Open it up, start a new project. Don't import any factory assets, they're wasted memory. Note the filepath it will save to.
  18. In the 'Project' tab, hit "import files". Select all the nice, renamed .wavs you made. You'll see them under the 'Audio' tab. Now, under 'Project', click project settings, source settigs tab, then set Default Conversion Settings to "Vorbis High". Go back to the 'Project' tab on the toolbar and select 'Convert All Audio Files'. This might make your life easier later. Wwise should take a few seconds to do this for a lot of files. To check, all the assets should go from having a blue name to a white one, and when their source settings are examined they should be Vorbis High Quality.
  19.  
  20. Anyways, if you do have a bunch of files, it's time to put them into groups. TWI makes some dynamic .bnks by making packages that will choose appropriate or random sounds to play in different situations. So when that funpound takes a swing at you, it can make any of 5 sounds. To replicate this, right click "Default Work Unit", tab under "New Child". You'll see a bunch of options for containers. I'm not going to explain these to you, it'd take all day- refer to Audiokinetic's online documentation. The one you'll use most is "Random Container"- as the name suggests, every time it is referenced it selects an asset at random to play.
  21.  
  22. So we want to group these hundreds of files together. Look at that ever-handy .txt for the bnk you're modifying. Remember those events? We're replicating those. So if the first event in the .bnk is "Play_WEP_SA_1858_Fire_DryFire", make a random container "WEP_SA_1858_Fire_DryFire", then edit it to include all instances of the 1858 dry firing. Do this for every event, being sure to include your custom sound FX where applicable. You shouldn't have sound files left over after this process. If there are containers that would only contain single files, don't bother with a container- the container logic is more wasted memory that will have to be run by the CPU when the soundbank is constructed in game.
  23.  
  24. Anyways, we have all the containers built- mostly random, some like footsteps switched if you want to be cool. Maybe a sequence or blend container if you know what you're doing. But the game can't use the files in this format. It needs a new logic, embedded in the .bnk, to tell it what to do with all these containers and assets.
  25.  
  26. To build the logic, we'll need to make a soundbank file. In Wwise, go to the
  27. 'Layouts" tab,. then select "Soundbanks". Tab over to 'Soundbanks' in the Project Explorer, then right click the default work unit. new Child, Sounbank. Name it whatever, we're renaming it later. Don't title the file the same thing as the final file, it'll only make headaches.
  28. OK, so the best way to build that logic is to use the cues the engine provides us with already- So back to the .txt! It contains a roadmap for everything the engine will ask for in a game. So when you look at "Play_WEP_SA_1858_Fire_DryFire", we know we need an event that will play that neat little container for the dry fire sounds we have. Click the soundbank, then right-click the Event Viewer. Click New Event, and in this case "Play". Use the exact title used in the .txt, or else the engine can't use it. When created, it should have the exact same event ID as in the .txt- if it doesn't you fucked the title up. Once that's sorted, you have to assign the event an asset to work on. So for our "Play_WEP_SA_1858_Fire_DryFire" event, click "Browse " and select our dry fire package.I highly recommend having only one asset per event until you sort of know what you're doing. Since the dry fire assets are discrete, non-loop sounds, we don't need to add extra events, like Stops.
  29. Keep going with the previous method, making new events for each entry in the .txt. Most events are play or stop, which are pretty self explanatory.
  30.  
  31. OK, now we've built the SFX, containers, and event scripting. Now we need to set it so it doesn't kill performance. Go to the "Sharesets" tab, in the Project Explorer. Right click "Default Conversion Settings", select "Edit", and set Conversion Settings to Vorbis. If everything has gone right, everything will be in lossy vorbis format already, rather than lossless memory hungry PCM, but let me tell you shit always goes wrong.
  32. Anyways, go back to the soundbanks tab, right click on the soundbank editor, and click "generate soundbank". Back up your old, original .bnk file, and rename your new file with the original .bnk name so yours is the one referenced by the engine in-game. Open the game and test! But we're not done yet. Not by a long shot.
  33.  
  34. If your shit works right, you'll notice the volumes are FUCKED. the way we've gone is enough for first person sounds, but makes 3rd person sounds ear shatteringly- loud.
  35. "But anon, how do I fix this?" you ask. I'll tell you. It's the worst part of the .bnk experience.
  36. Go back to Wwise, sounbank layout, and select "Attenuation". New child, new attenuation. This attenuation will modify the volume of the sound over distance for you. ,It should give you this deceptively simple line graph and "maximum distance" box- pic related, the one that more or less works for most Husk sounds. The exact value used by TW for an attenuation is given in the SDK. Find the event in the original bank and examine it's properties- it will give a discrete number as well as whether you should enable advanced sound functionalities. As far as I can tell, all attenuations use linear drop-offs. To apply an attenuation, select the sound or sounds you wish to work with and edit (or multi edit). Look for positioning type. Select 3D. Under 3D, select the attenuation you created. You can also make custom attenuation for each sound if you want, but most sounds of a given type share.
  37. So, once you have the new attenuations applied, generate a new soundbank. Place it in your game folder (AFTER BACKING UP THE ORIGINAL) and give it the proper name the game will look for. Always test everything 2 or 3 times in game. You can also open the SDK and manually trip events to make sure everything plays correctly.
  38. OK! We've made something functional. Good job. Now realize Tripwire doesn't accept .bnks to the workshop. Probably won't ever because "lol zynthetic knows what he's doing senpaitachi". Fuck you, player who makes free content for our dying community!
  39.  
  40. Anyways, some tips.
  41. Yes, you always have to rebuild entire soundbanks. Each package is an all-or-nothing sort of deal, or your bank will have random times where it's just silent.
  42.  
  43. You can edit volume in the "Master Volume Bus under the edit tab of each sound asset. Remember- like attenuation, small changes here are huge in-game. Look at the peak decibel bars on the side of “Designer Mode” when playing an asset- this will let you balance volumes pretty easily.
  44.  
  45. Yes, proper conversion settings are essential. There is a max size for your soundbanks, and this will all be run in real time by the end user's computer. Be nice and make it as small as possible.
  46.  
  47. To make your bnk even smaller, you can set assets to stream- it's under the loop option on the asset screen. This will mean your sound is saved outside the package as a raw .wem, much like the soundtrack files or game lines.
  48.  
  49. To have a sound take precedence over everything else (like the Scrake entrance sound), set the event to play, but also set a “Pause All” event, and set the scale to “global”. Then add a global “Resume All”, set to be delayed a few seconds. Also, make things fade in and out, or they sound shitty. This is all doable from the event manager.
  50.  
  51. You can't exceed 200 sound assets on the WWise free license. Be prepared to trim it down to make it work with the software.
  52.  
  53. Game Parameters refer mostly to anything under the sharesets tab. Mostly attenuation. If you followed my directions, you don't have to mess with em much. If you enable the right sound functionalities, you can make the original sets and parameters work for you- which is great, because the things are god damn terrible to work with.
  54.  
  55. Switch sets and Switch containers are hard.
  56.  
  57. Watch all the audiokinetic Wwise tutorials on youtube, and read their documentation. Shit is HANDY.
  58.  
  59. that's all I got. Good luck, anon.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement