Music/Audio Modding Guide

Yennefer's Journey

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.

https://preview.redd.it/2pvfww6c3gf81.png?width=1072&format=png&auto=webp&s=8709a950d9524bdd5e47e74eea0375f8720eb653

https://preview.redd.it/nw6d56ve3gf81.png?width=814&format=png&auto=webp&s=c4433eae356c2b8cf04d8d3eee5fbf8bc1906574

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.

https://preview.redd.it/b4owoiri3gf81.png?width=1042&format=png&auto=webp&s=5de2c9bef67e0dcaf3d96119e28ec587ac222351

https://preview.redd.it/le6hibtl3gf81.png?width=1273&format=png&auto=webp&s=4a58c29c1ad4e3ce6fbb0b9a5487c4ac0eecb8bb

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.

https://preview.redd.it/4oad79es3gf81.png?width=2302&format=png&auto=webp&s=737c96ae70876275e76bf01e2687f5c9975b618b

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'.

https://preview.redd.it/gral7z2y4gf81.png?width=1414&format=png&auto=webp&s=474bda8856bae42b60e819fe8c5e64c6576ab599

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.

https://preview.redd.it/aj2n35705gf81.png?width=685&format=png&auto=webp&s=1315263f7bebb0fdc6ee5dd3586c51bf8a8ff169

https://preview.redd.it/5p7wapjk5gf81.png?width=1320&format=png&auto=webp&s=b74d04b46f4622712acd68a9ef460e88f2e96864

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.

https://preview.redd.it/nr9o38z95gf81.png?width=670&format=png&auto=webp&s=6e06ff9efb3523ecf496e89d904e814abfabd808

https://preview.redd.it/ksv1wyt85gf81.png?width=343&format=png&auto=webp&s=58b63ccc320056aa057aab3f0df9d96f0af4609a

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.

https://preview.redd.it/xh8mxx8s5gf81.png?width=1234&format=png&auto=webp&s=226e2f98cd7ae1915cc072f35c44f081f2a801bf

https://preview.redd.it/9gokb09t5gf81.png?width=399&format=png&auto=webp&s=41f3f6db39ac895125216a8fa10b6e616c4bc0f0

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 a 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://preview.redd.it/ogoxrc1vihf81.png?width=3064&format=png&auto=webp&s=1b80226fd2673252925442f80d8a32819403f87b

https://reddit.com/link/sj28bz/video/r14nytvanhf81/player

If you need help with any of the steps, just PM me or leave a comment

Source: https://www.reddit.com/r/gwent/comments/sj28bz/musicaudio_modding_guide/

leave a comment

Your email address will not be published. Required fields are marked *