How to replace the music of JC2

Just Cause 2 Mods Forums Tutorials How to replace the music of JC2

Viewing 8 reply threads
  • Author
    Posts
    • #83507
      After a week of work I’m proud to present you the universal guide how to replace the music of JC2
      (especially the one of MHC)

      Teaser Trailer:

      Groovy Music Mod Showcase Video:

      Download Groovy Music Mod (Music from Interstate ’76):
      https://mega.co.nz/#!ok5TwSiA!QcdxYVjXWcRgq7bmL8HEGwE3-CEBKXguIz4xHwKMXPA

      Cartoon Trumpet GUI Sound Mod (replaces the scrolling and click sounds in the menu): https://mega.co.nz/#!Zsg2hISB!BQswRl4KR4sgp_Ax5EDwtBUprcQypWF-CoHzq5jvjWI


      First I want to say thanks to mandella644 for his superb support the last days, only because of him this whole thing started also he was my inspiration to keep on pushing it to it’s limits, thank you!


      Overview


      Before we start the instructions, I want to give you an overview of what I will show in this tutorial and what not:
      1. This tutorial will show you only the basics how to replace the music.
      2. We won’t learn how we can fix the loop for longer songs, for this matter I have created the advanced instructions, scroll up for the link.
      3. Also we won’t go in detail with weapons, vehicle… sounds, particularly for this I will make another tutorial after finished the advanced tutorial mentioned above.


      Where is the music of JC2 getting saved?


      To better understand what will follow, we look at how JC2 manages his music/sound files:

      Browse to your Just Cause 2 directory in the steam folder, in my case it’s in D:SteamSteamAppscommonJust Cause 2. There you go to the folder sound->fmod. The folder “fmod” is probably the most important folder for the music files because here all the music data is stored in files like:

      Music_stereo.fsb (the file we will work with in this tutorial, it holds the main menu, mhc and black market music)(and many more of course)

      Cutscenes_Common.fsb (this file holds the background music of the cutscenes and other music like the one from the benchmarks)

      Dialog_Mission Specific_*.fsb (The biggest .fsb files they hold every quote of the game except the scripted ones. The files have different name endings that indicate their language, e.g. _ger means German. Before extracting be aware that each of the files contain over 5000 mp3s! Little side note: a while back I’ve started a project called Quotes of Panau, there I’ve sorted some of the quotes, link: http://www.jc-mp.com/forums/index.php/topic,2389.0.html)

      Dialog_PA_*.fsb (basically the same thing as above only that these files contain the scripted quotes like the cutscenes dialogs)

      and then there’s also Music_Common.fsb (contains other than all above .it files, these are (at least currently) not editable. Just ignore the file)

      You maybe have already noticed that the sound effects are missing, these will be covered in a special tutorial coming soon!


      Start of the instructions


      Alright, let’s begin the actual instructions! Here’s a list of the programs you will need:

      FSB files extractor 0.3.1 (or simply called fsbext): http://aluigi.altervista.org/search.php?src=fsbext
      FMOD Ex Programmer’s API ver. 4.36.00: http://www.fmod.org, direct link: http://www.fmod.org/download/fmodex/api/Win/fmodapi43601win32-installer.exe
      and FSB Extractor http://aezay.site11.com/aezay/fsbextractor/

      First extract fsbext in a folder, I will place it into C:/FSB. Now go to the “fmod” folder in the JC2 directory and make a backup of the file Music_stereo.fsb then copy it and paste it into the folder where you extracted fsbext, in my case C:/FSB.

      Now it get’s a bit tricky. Start cmd by searching for it in the start menu:
      M8Ql7x9.jpg
      In cmd type: “cd” (leave out the quotes) and the directory where you copied Music_stereo.fsb in, example: “cd C:/FSB”.
      Press enter then type “fsbext -s info.dat Music_stereo.fsb” (leave out the quotes!) and again press enter. What fsbext now does is it extracts all the mp3s from Music_stereo.fsb to (in my case) C:/FSB and also writes a file called info.dat where the file structure of the fsb is getting saved.


      The most important music files


      Alright, now you should have exactly 160 mp3 files in the folder where you extracted the fsb. I will now list the most important mp3s you should know:

      Clubloop_PA_crunched_out.wav (The music that plays at the MHC. In this tutorial we will only edit this mp3)
      PartyLoop_01.wav- PartyLoop_04.wav: (Plays at those party tents all over panau)

      The 3 files mentioned below will need a special technique to properly replace them, tutorial for that will come in the upcoming advanced instructions:

      Frontend_12secCUT2.wav (The first song you can hear when starting JC2, it plays during the logo screen)
      Frontend_AsiaCUT3_long.wav (The 2nd song you will hear, plays during the title screen)
      Frontend_5_CUT.wav (The main menu song, the 3rd song you can hear when starting JC2)


      Making our mp3 ready


      Unfortunately we cannot simply override one of the files with any other mp3. Before we need to convert our mp3 so that it matches the same encoding settings as the one used by JC2.

      Here some basic rules to follow before we will later convert our mp3 file:

      1. Give it the same name as the original file you want to replace. We will replace “Clubloop_PA_crunched_out.wav” therefore we will call our file also “Clubloop_PA_crunched_out.wav”.
      2. I haven’t made many tests what affects the sound quality of the outputed file, what I can say as of now, never directly convert .wav files to the “JC2 mp3s”. In case your music file should be in the .wav format, convert it to a .mp3 with a program like foobar2000 http://www.foobar2000.org/ (I can do a tutorial on that if someone requests it). This really makes a big difference, always use the format mp3 for your song! Also keep in mind that the converter we will later use won’t be able to encode lossless formats like .flac.
      3. The length of the song doesn’t care for this tutorial when the song is longer than the original song, our song will start looping when it reaches the length of the original file. When our song is shorter than the original one, a random song from the game will be played after our song ends till it reaches the length of the original song.
      4. Make sure you turn up the volume of the song as loud as possible without decrasing the quality. Otherwise it can happen that the songs are too silent compared to the other ones.


      Building the FSB


      Now we need the program FMOD Ex Programmer’s API (ver. 4.36.00, the version is important!) to convert our song to the “JC2 mp3” format

      Instal it and run FMOD Soundbank Generator. This window should open:
      4CveMjy.png
      Under Output file I will insert “myclubmusic.fsb”. At the Output directory, I will browse to the folder C:/mymusic.
      Choose MP3 as format, 128 under bitrate (unfortunately JC2 is not cappable to play back higher bitrates) and uncheck every box. Now drag and drop your song into the program. The window should now look like this:
      yRyC7mZ.png
      If everything matches click on the hammer icon at the top to start building the fsb or press CTRL+B. The program will now write the .fsb to the output directory, in my case C:/mymusic.


      Using FSB Extractor to extract our song from the fsb


      Our song is now packed in a .fsb, what we now need to do is extracting it from the fsb so we have our song in the “JC2 mp3” format.

      Open the .rar file in which FSB Extractor gets shipped and extract FsbExtractor.exe to a random folder, then run it. Now go to the folder with the myclubmusic.fsb file we created above and drag’n’drop it onto FSB Extractor.
      syL07CN.png
      Now select the song and press F6, now you need an output directory, I will choose C:/FSB, the one where I’ve extracted all the music of Music_stereo.fsb. When I now click on OK, the original “Clubloop_PA_crunched_out.wav” will be replaced by my version of it.


      Packing our version of Music_stereo.fsb


      First go to the folder where you extracted your Clubloop_PA_crunched_out.wav and check if it plays back properly.

      Now start cmd again and make almost the same steps as above. Type “cd” and then the folder with the original mp3s and your version of the MHC music, I write “cd C:/FSB” (leave out the quotes!). Don’t forget to press enter

      Now write “fsbext -s info.dat -r My_Music_stereo.fsb” and press enter. Fsbext is now packing all the mp3s in our folder to a file called My_Music_stereo.fsb.


      Ending of the tutorial


      That’s it already basically! easy isn’t it?
      All you now need to do is copy My_Music_stereo.fsb into the fmod folder in the JC2 directory and replace Music_stereo.fsb with it.

      When you are then ingame, I recommend to turn down the volume of the effects and the voices in the options so your song is better hearable.

      These were now only the very basics, after 2 days I started this project I was already at this point. I will now start writing the advanced tutorial where I explain how to fix the loop and how to properly replace the main menu song.


      FAQ


      Q: What will now happen ingame after I’ve done all the steps from above?
      A: The MHC music gets replaced by your music. Because this is the basic tutorial the song will start looping after about 1:10 min, you can fix that by reading my advanced tutorial (http://www.justcause2mods.com/forum/19-tutorials/22008-advanced-how-to-replace-the-music-of-jc2#30044).

      Q: I can hear no music/the music is distorted.
      A: You must have done something wrong or missed something from above, when the music is distorted it’s mostely because you chose the wrong bitrate when encoding the mp3.


      If you should have any questions, suggestions, bug reports…, post them in the comments!

      Also check out my other mods, links in signature.

    • #100380
      CapoCapo
      Participant

      This is so freakin awesome,

      Thank you for posting this threat looking forward into seeing more of your work.

      1+ Karma
      + Thank You
      Now lets see what i can do

    • #100385
      voxbox13voxbox13
      Participant

      Thanks FictionSource.!
      Looking forward to trying this out.

    • #100386

      THIS IS THE GREATEST ACHIEVEMENT THAT HAS EVER GRACED THE FACE OF THE INTERNET SINCE JUSUPOV’S WORLD MODDING

    • #100381

      The advanced instructions are released:
      http://www.justcause2mods.com/forum/19-tutorials/22008-advanced-how-to-replace-the-music-of-jc2#30044
      along with the Miami Vice Music Mod (replaces Main Menu, MHC, Partytent music):
      https://mega.co.nz/#!RxY3UI4S!Csm4bDSJJ9rDsFLpBNWBSgJwM4Eu4oa6sYa733z-xwg

      Also if an admin reads this, please add a new section for Music/Sounds in the mod sections!

    • #100399

      Yeah, we need a new section for music/sounds.

    • #100382

      Anyone got a working link to Fsb extractor? No links work for me.

    • #100580

      The link in the OP works fine for me. Maybe you need a direct download link?

      http://aezay.site11.com/aezay/fsbextractor/FsbExtractor13.07.23.rar

    • #100581

      Well, that didn’t work either, so it’s probably on my end, I guess i’ll try the ol’ laptop. Thanks for the link though.

Viewing 8 reply threads
  • You must be logged in to reply to this topic.