Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

P4G Music Swapping Guide (OUTDATED) - A Tutorial for Persona 4 Golden (PC)

Converting, looping, and replacing music in P4G!

There is now a much more up to date & faster method for modding music. We highly recommend checking out the new tut here

This guide is only meant to be used for modding music, voice clips, and other audio within the game. If you're looking to mod graphics or other assets, please refer to MadMax1960's P4G Mod Loader Guide for editing and managing .pac files.




Throughout this guide, certain things will only apply to the creation of music mods, while the majority of the guide will explain how to install mods.

Skip to Step 4 if you are installing a downloaded mod. Guide is subject to change and obscurity as tools & methods develop. 

1. Before we get started, let's download a few things first. 


Requirements:



OPTIONAL tools for creating your own mods:



(To make the looping process easier, later on, it's best to make sure your audio is trimmed before continuing. I recommend using Audacity, or any Digital Audio Workstation to make needed adjustments).

We also recommend backing up any audio files, and Persona 4 Golden files before attempting to install these mods. If an error occurs, and you'd like to reset your game to default, you can find steps on how to verify the integrity of your game files here (this won't affect your save data if online).

2. Converting Your Files

When your audio files are ready to use, go ahead and launch LameXP.exe, and you should be greeted with this screen:



It'll make some loud noises, but don't worry. You can disable these in Tools>Configuration.  Click on the Compression tab, and for "Encoder / Format," select PCM/Wave.



After doing this, head over to the Output Directory tab, and choose the folder that you'll be storing the uncompressed .wav's in. This can be any folder you'd like, so long as you can access it easily later.

Going back to the Source Files tab, you can now drag and drop any audio files you wish to format for use in the game's files. Select Encode Now!, and depending on your computer speed and amount of files, your audio will be converted to uncompressed .wav's in less than a minute or so.



If done successfully, you'll have the uncompressed .wav files in whichever directory you chose, and they'll be ready for the next step.

3. Setting Loop Points

Though this step is not entirely necessary for the file to play in-game, it's best to do so in order for the song to seamlessly loop when finished. Open Wavosaur.exe, and drag and drop your audio file into the program. Press 'L'  to pull up the Loop Point markers. These can be dragged anywhere on to the track to set specific start and endpoints for the track to play after getting passed the intro.

Below, you can find a short and simple tutorial on how to get these points, but we'll be adding one more step at the end.

After determining where your loop points lie & saved the file, right-click either the Start Loop or End Loop flags on top of their respective markers, and click Properties. You'll want to copy the Start and End loop points for later, as they're required for injection of the file.



4. Injecting and Replacing Music in the XWB

If anywhere you were to mess up in the guide, it would be at this step, as this is the part where your files are injected directly into the game for playback. Make sure the mod you downloaded (or created) is on hand, along with the loop points for each song. 

Open up the Command Prompt (Win+r, and type cmd.exe, and run). Navigate to the XactTool folder you were in by using the cd command. For example:

cd C:\Users\[Username]\Documents\xacttool


Once in this folder, simply type xacttool, and press enter to launch the program.



From here, you'll want to follow the template below to inject your song properly.

xacttool -wb "{your steam games folder/[Day or Persona 4 Golden]/snd folder/bgm.xwb file directory}" -r "{music file you want to inject}" -ls {loop start} -le {loop end} -i {index number}


The index number refers to which song you're replacing in the game. If unsure, we've created a helpful spreadsheet that indicates each song's index number. 

So, for example, if you were trying to replace Your Affection with the Reincarnation remix, the code would be written as follows.

xacttool -wb "X:\Games\Steam\steamapps\common\Day\SND\BGM.xwb" -r "06 Your Affection.wav" -ls 1966080 -le 6597440 -i 23


If all goes correctly, you'll get a message like the one below, along with a brand new BGM file in your game's SND folder. 



Backup your original BGM.xwb file in a separate folder (as this contains the game's original music), and rename the newly created "BGM.new.xwb" to "BGM.xwb."



5. Repeat the above steps as many times as necessary!


If you have any questions at all, the comments are open. Both of us will try to be active to answer any questions, and hopefully, the community will be just as active and helping!

Todos

Add FAQ's! Add Section About Batch Files 40% High Priority access_time Jun 28 2020 Add Junes Theme to Index Spreadsheet Low Priority access_time Jul 1 2020
1-10 of 12
1
Pages
  • 1
  • 2
Go to page:
  • Snesterday avatar
    Snesterday Joined 12mo ago
    Offline
    12mo 12mo
    EDIT: Confirmed installing x86 AND 64bit framework fixed the issues I was experiencing.  Was able to successfully replace the fast forward sound with the velvet room theme, should hopefully drastically improve QoL for people using fast forward, especially speedrunning.

    ____________________
    Having some issues and unsure the exact cause.  I have pulled a backup of the BGM.xwb and the file I want to inject and tried them in numerous directories (downloads, separate backup folder, the xacttools folder) and I continue to get the following error when I try to do the audio replacement:

    Unhandled exception. System.ComponentModel.Win32Exception (2): The system cannot find the file specified.
       at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
       at System.Diagnostics.Process.Start()
       at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
       at System.Diagnostics.Process.Start(String fileName, String arguments)
       at xacttool.Program.ConvertToAdpcm(String filePath) in D:\dev\p4gpc\p4gpctools\xacttool\Program.cs:line 200
       at xacttool.Program.ReplaceWaveInWaveBank() in D:\dev\p4gpc\p4gpctools\xacttool\Program.cs:line 148
       at xacttool.Program.Main(String[] args) in D:\dev\p4gpc\p4gpctools\xacttool\Program.cs:line 90

    My first thought was this happened to be an issue with the directory, but digging into the error message a little more it appears something is missing from the xacttools install, though the directions seemed fairly straightforward.  I'm going to keep troubleshooting, but my end goal is to replace the annoying fast forward sound when skipping dialogue with the velvet room music.  I figure it is also possible there is just a massive variance in track length causing the issue, but the error message does not suggest that's causing the problem.

    Perhaps someone else could give it a shot?  The Fast Forward sound is 0000041a.wav (I believe index 1050 but maybe someone else can validate).  I'd really just like to replace that with the normal velvet room theme if possible, which at least in the extract I have is 00000015.wav.

    Bananite
    URL to post:
  • Bakihiko avatar
    Bakihiko Joined 1y ago
    Offline
    1y
    Did everything as the guide said, but all of the music (except for the opening's music) is gone. I did everything as intended, and I didn't backup or move the wrong file. I backed up and replaced BGM.xwb as it said. What did I do wrong?
    Bananite
    URL to post:
  • TGE avatar
    TGE Joined 1y ago
    Offline
    1y
    Could you update this guide to use the XWB redirection built into the modloader?
    Bananite
    URL to post:
  • Sppidey avatar
    Sppidey Joined 1y ago
    Offline
    1y
    Hey so i was trying to open Xactool when i downloaded and extracted the file but when i try to open Xactool.exe it just makes the application open for a less than a second and then close completely and it does this constantly. I really need help since I cant go any further with converting the downloaded mod without Xactool.
    Bananite
    URL to post:
  • Takanobu avatar
    Takanobu Joined 1y ago
    Offline
    1,831 points Ranked 22,157th
    11 medals 2 rare
    • Became a Game Pioneer Medal icon
    • Thanked 50 submitters Medal icon
    • Returned 100 times Medal icon
    • Received thanks 5 times Medal icon
    • Submitted 10 Sounds Medal icon
    • Reached 1,000 Points Medal icon
    1y 1y
    Thank you for the guide.

    Also, just wanted to point out that the song index number spreadsheet is super helpful! Could you please check if this index number is correct? "00000033.wav A Sky Full of Stars 51"

    I can work with every other BGM, but this one does not change.

    Thanks!
    Bananite
    URL to post:
  • bobostal avatar
    bobostal Joined 1y ago
    Offline
    1y
    This works just fine for me when I use Wav files from soundpacks on here (Like the P3P portable music pack from madmax) but when i inject my own wavs (Made with lameXP like in the guide) my game has no sound whatsoever. I made sure I didn't overlook anything but it just doesn't work for some reason
    Bananite
    URL to post:
  • Rob-RmanX avatar
    Rob-RmanX Joined 1y ago
    Offline
    103 points Ranked 80,159th
    1y
    I'm a newbie when it comes to modding so bare with me. I got to Step 4 and now I'm lost, not really sure what the problem is. Anytime I run the xacttool it says I'm missing something but I don't know what I could be missing? The exact phrase is "Missing required option: -wb" but everything after it says that shows up just like in the first picture you have in Step 4. On top of that no matter what I type, hitting any key on the keyboard, resets the window back to asking for a file path.
    Bananite
    URL to post:
  • so do you run the cd command in the first line cmd presents, because if so i did that and still can't find the xacttool folder. or what i mean is windows cant find it.
    Bananite
    URL to post:
  • LameXP shows on the task manager, but it doesn't open up. How can i fix this? 
    Bananite
    URL to post:
  • Bananers avatar
    Bananers Joined 5y ago
    Offline
    3,417 points Ranked 2,950th
    12 medals 1 rare
    • Returned 1000 times Medal icon
    • One month a member Medal icon
    • 6 months a member Medal icon
    • Returned 100 times Medal icon
    • 1 year a member Medal icon
    • Submitted 10 Sounds Medal icon
    1y
    Is the Junes theme a background song? I can't seem to find it in the spreadsheet.
    • Helpful x 1
    I eat bananas.
    URL to post: