This script automates processing of audio files for PAYDAY 3 all the way from your Export folder to your ~mods folder. This script requires you to do some preparation work for any new audio mod you're creating but will handle the most tedious parts.
Things you need for setup:
- An audio mod staging folder. This is where you will keep all the scripts and through which all the work is done. Any audio mods you create will have their folder in this staging folder.
- Powershell 7: As this is a ps1 script you will need Powershell 7 (Powershell 5 won't do as there are some differrences). To check if you have Powershell 7, right-click on your start button and select "Windows Powershell" on Windows 10 or "Windows Terminal" on Windows 11. Then type in
pwsh
if you see an error that means you don't have Powershell 7. To install, run the following command:
winget install powershell
- ffmpeg: If you have ffmpeg installed, ffmpeg returns its version and such when you run it in cmd/powershell/terminal. If you don't have it, or are not sure, simply run the following command:
winget install ffmpeg
- Wwise 2021.1.13: Go to audiokinetic.com, create an account, and download the WwiseLauncher.
Log into the launcher,
go to Wwise on the left,
select "All" at the bottom, then Version 2021.1.13, and install it.
Launch Wwise, and create a new project (name it whatever), save it, and close Wwise again.
- An audio mod project folder. This is the folder for the audio mod you're working on. Name it something descriptive as this will be the name the script uses to create the folder in your ~mods folder.
- Audio files to replace the vanilla ones with. Make sure that your audio files are already renamed to match the ID of the vanilla files they're supposed to replace. Place those files into your mod project folder. (see point 5)
- Open the PD3_BAP.config in your editor of choice and replace the 5 lines with the respective paths. The file paths below need to be filled out properly for the script to run.
Substitute the paths as follows:
1. The path to your audio mod staging folder. This is the same folder that the files PD3_BAP.ps1 and this PD3_BAP.config file should be in. (For example "D:\Mod Projects\PD3 Sound Mods")
2. The path to the folder that fModel extracts audio files to. You find that in fModel's settings under the "General" tab. Make sure the path leads to the WwiseAudio folder. (For example "D:\fModel\Output\Exports\PAYDAY3\Content\WwiseAudio")
3. The path to your ~mods folder. The same folder that you would normally install mods to. (For example "C:\Program Files (x86)\Steam\steamapps\common\PAYDAY3\PAYDAY3\Content\Paks~mods")
4. The path to the WwiseConsole.exe. In the WwiseLauncher, click on Wwise, click on the wrench icon and select "Open containing folder...". The likely difference will be only the drive letter.
5. The path to the Wwise project file you created. Go to the Projects tab in WwiseLauncher.
Click the arrow button next to your project name that's listed there. The filepath will appear underneath.
Creating a new audio mod:
Once all of that is set up, the PD3_BAP.ps1, PD3_BAP.config, and the two Run.bat files should be in your audio mod staging folder.
When creating a new audio mod, create a new folder here (see point 5) and place your renamed audio files inside as well as COPY the respective Run.bat depending on whether you're working with voice lines or sound effects.
Checklist before running:
✅The PD3_BAP.config is correctly filled out.
✅The exported Media folder contains ONLY the uasset/ubulk/uexp files of the audio you actually want to replace.
✅You have created a folder for your audio mod in your staging folder
✅You have copied the replacement audio files into that folder and they are renamed to have the correct ID.
✅You have copied the respective Run.bat from the staging folder.
By running the Run.bat the script will move ALL the files with the uexp/ubulk/uasset extension to your audio mod's folder, backup and convert any .wav/.mp3./.ogg files to the appropriate audio format with ffmpeg and wwise, and rename the files accordingly. It will also correct file size stored in the uexp to prevent some audio issues.
Then, all the files will be copied to a newly created folder structure in your PAYDAY 3 ~mods folder. Now all you need to do is perhaps rename the folder and pack it using repak or UnrealPak.
Have Fun!