This guide will cover how to mod the music and sound effects currently in-game, this will let you add your own music, or edit the sound effects for cards, among other things.
Prerequisites:
Just as a heads up, this is a really long process, not that it takes long to do once you know what you're doing, but it took me a good hour or two to get this working properly on my first attempt.
Step 1:
Choose the music track you want to mod into the game, open it in Audacity and here you'll need to edit the song so that it loops properly, how you do this is up to you, but take careful note of the length of the track, and convert the length to milliseconds as you'll need it later, for example, the length of my song is 151619ms. I recommend keeping the loop simple, i.e. the song goes back to the start when it ends, as otherwise, it means a good deal more work for you later. If your song does have a complicated way that it has to loop, you should check out this guide for modding Resident Evil, focus on the parts about looping the song, some of this information will be covered here, but it gives a full run-through of what you need to take note of if you're going to loop the song in a more complicated way.
Step 2:
Export the song as a .wav file, making sure it's signed as 16-bit PCM. Also, I'd recommend upping the volume of the music a bit, but it's not necessary.
Step 3:
Open up the Ravioli Game Tools folder and open 'RExplorer.exe', click on 'Open File' and navigate to your Gwent game folder, the audio files are located in C:Program Files (x86)GOG GalaxyGamesGwentGwent_DataStreamingAssetsaudio. Depending on what you are modding, you'll need a different file, in my case I want to mod the main menu music, so I need to pick and open 'music_main_menu.pck'. Click on the folders that have shown up until you see a list of .wem files.
Step 4:
Now you'll need to click on and listen to the files until you find the song you want to change, this can be complicated to find as in my case with modding the current main menu music, there's a duplicate audio file present, so you may end up modding the completely wrong file. Once you've found the right one, right-click on it and select 'View as text', here you'll need to take note of the tempo, or any other identifying features of the text, also write down the name of the file. Once you've done all that you can close RExplorer.
Step 5:
Now we'll need to open up 'RavioliScanner.exe', click on 'New Scan', and open up the same file we just used, which for me is 'music_main_menu.pck'. Here you'll see another list of files, some will come up as broken, that's fine, you can just ignore them. Now you'll need to find that file that you want to mod again, to do this, you'll, unfortunately, need to examine multiple files by double-clicking them until you find one that has that identifying feature you took note of previously. Once you've found it you'll need to remember the numbers and letters that correspond with it in the 'Offset' column, only record the numbers after '0x', e.g. instead of '0x01E0490C', you'd just need '01E0490C'.
Step 6:
Next, we need to create our own .wem file. Launch WWise, create a new project, go to 'Project' in the top left, then to 'Import Audio Files'. Click on 'Add files' and add your new .wav file. Now, to make sure that the file is small enough for the game to use our new file we need to compress it. To do this, go over to your audio panel and click on your new file, now in the middle of the screen, in the Sound Property Editor, open the 'Conversion Pane', and next to 'Default Conversion Settings' click 'Edit'. Now here scroll right until you see the 'Format' column, open it and click 'Vorbis', leave everything else as is and exit this panel.
Step 7:
Go back to 'Project' and click on 'Convert all Audio Files', click ok and wait a second for it to finish converting. Now once again, go to 'Project' and then click on ' 'File Manager', then right-click on the project folder address and select 'Open Containing Folder'. Now in the folder open up .cache>Windows>SFX and your new .wem file will be there.
Step 8:
Before you do anything else I'd recommend backing up the .pck file you're about to edit, just so you can easily restore it if something goes wrong. Open up HxD, open both the original .pck file you're modding and the new .wem file you've just created. In your .wem file, you need to copy everything, press Ctrl+A and Ctrl+C, now go to your .pck file and click 'Search', and 'Go to'. Now here you need to write down the offset you copied down earlier and click 'Ok'. Now, without moving the cursor, overwrite the text by copying and pasting, in HxD you can do this by pressing Ctrl+B, but it may differ depending on your hex editor, make sure you're overwriting, not adding. Save the file and replace the original in C:Program Files (x86)GOG GalaxyGamesGwentGwent_DataStreamingAssetsaudio. Open the game and you should hear your song, but right now it won't loop properly, there may be a silent gap, or the song may be cut off.
Step 9:
I highly recommend making a few backups of the working file as you go along this step, otherwise, if you mess something up, you'll probably have to restart from the beginning of this step or the previous step, which is a huge pain. In this step you'll be changing the values of the stated lengths and loop times in the .pck file, you'll use a hex editor for this. I'm not going to explain this step in detail as I could not do a better job of explaining it as it is explained in this guide, or alternatively this guide. If you use one of those guides, you should be good, though, again, there's lot of trial and error, it took me an hour to get my song looping properly the first time, and even then I couldn't get it absolutely perfect. As an example of the final values and the code which I changed, see the images below, and watch a bit of the video for the final result of the mod, the song is fake wings, by Yuki Kaijura.
https://reddit.com/link/sj28bz/video/r14nytvanhf81/player
If you need help with any of the steps, just PM me or leave a comment
Not being able to craft them sucks. Especially when everyone I talk to about it…
First I'd like to say I absolutely love this game it's quality. Basically I first…
Welcome to Teacher Tuesday, a thread where anyone can ask any type of question without…
I’m kind of new/returning to gwent I played beta and obviously it’s a lot lot…
Level 1 Bag (Free with Atmosphere Level 2) 6 small consumable (First Aid, Repair, Fire…
Here's my crew - T34-85M - for the life of me I cant figure out…