Home Gallery Resources The Team Rules chat Login Register
Pages: [1]
Author Topic: How to add song titles to Custom Sound Engine Music  (Read 22707 times)
0 Members and 1 Guest are viewing this topic.
Lost Saltshaker
Advanced Kitten
***
Offline Offline

Posts: 41


Has no taste in music.

  • Awards Starstormer Tutorial Writer

  • View Profile Awards
    « on: December 20, 2014, 05:46:04 PM »


    For those using Dantarion's Custom Sound Engine for extra music slots, you may have noticed that when the match starts no text is displayed on the top-left of the screen. Well I noticed and it started to bug me, so after some tinkering I figured out to fix this little problem. After two weeks of testing, I can confirm that this should be My Music safe.

    Note: My Music is unaffected by this tutorial, so custom music play chance still cannot be modified in My Music.

    For those that just want to plug-and-play, check out the Basic Tutorial below:

    I have prepared a package that creates titles for slots C000 through C25F. That equates to 16 songs for all 37 stages added with the Stage Expansion Code, which should be enough to satisfy most users. You can download it here.

    If you are using Riivolution, you may have to rename the files to info_en.pac and common2_en.pac. Though I have not tested it, BrawlEx Users should be able to export MiscData[13] from my common2.pac and insert it into Phantom Wings' modified common2.pac. When you are ready, put info(_en).pac in /pf/info2/, and common2(_en).pac in /pf/system/.

    Once placed properly, you can edit info.pac just as you would normally replace Song Titles in Brawl. The song titles that I have added are appropriately named for easy searching. 0000C14F.brstm's song title is 'C14F', for example.


    For those that want to follow my process to make their own custom slots, check out the Manual Tutorial below:

    Step 1: Preparation
    First, acquire two fresh copies of info.pac and common2.pac. I assume you know where to acquire these files. Now, open Common2.pac in Brawlbox, and export MiscData[13] to a file. Then, open MiscData[13] in your Hex Editor.



    Select the block from 0xB0 to 0xDF. Copy and paste this data onto a new file and save it. This is the slot data for the song "Battlefield" on Battlefield. We'll be using it as a template for our own slots, as its settings seem to work fine for me.



    Now, select the block from 0x31D0 to 0x3217 (assuming you're starting from a fresh MiscData[13]). Copy and paste this data onto a new file and save it. This data contains the footer of the file, which will be pasted back on after we make our changes, so you can delete this block after saving it to file.

    Step 2: Adding Title Slots



    First, open the file containing "Battlefield"'s data if it is not still open. We're going to make some changes. Replace the first four bytes (red) with the name of the song that you want to add a Title Slot for. For example: 0000C010.BRSTM is the first song for my first Stage Expansion slot, so I would put $0000C010 as the first four bytes.

    Then, jump to 0x10. Replace these next four bytes (blue) with the slot ID you want to give the song title. This is the line number that will be read from info.pac. The last slot used is $00000108 for "The Hidden Village", so use $00000109 for this with each consecutive slot added going further up in this fashion.

    Now, copy the entire file and paste it onto the end of MiscData[13] (assuming you deleted the footer). There you go. You just added a Title Slot! Now repeat this step for any other tracks that you want to add Title Slots for, but keep track of which line number links to which track.

    Step 3: Finishing MiscData[13]
    Now that you have all of your desired slots, we just need to clean up MiscData[13] a bit. First, paste the footer back onto the end of the file. We don't need to change anything on it, thankfully.



    Go back to the start of the file (0x0). The first four bytes (red) need to be changed. They represent the total filesize, so figure that out and replace the value. The second four bytes (blue) represent the size of the slot data. For simplicity's sake, the value always ends up being (filesize - $38).

    Save and close MiscData[13]. Now, reimport it back into Common2.pac. I am not too certain about Common2.pac's size limit, but you can set it's compression from LZ77 to ExtendedLZ77 to reduce its filesize and keep it working on Gecko, which is much more picky than Riivolution.

    Step 4: Adding Titles
    Open info.pac in Brawlbox and go to MiscData[140]. Hit the + button to add a new line. This new line is ID $0109, the slot we added in MiscData[13]. Now, type in the title of the track you assigned to slot $0109. Keep adding lines until you have a title for every slot you added. Set info.pac's compression from LZ77 to ExtendedLZ77 to reduce filesize, and you're done!

    Place info.pac in /pf/info2/ and Common2.pac in /pf/system/. If you are using Riivolution, don't forget to name the files info_en.pac and Common2_en.pac. I heard that previous File Replacement Codes have trouble replacing Common2, so I suggest using the File Patch Code v3.5.1b if you use Gecko (you should already have this if you are using BrawlEx).


    Troubleshooting:

    Q: My Wii freezes when the Song Title should come up.
    A: This means that the game recognizes the slots you added (common2 is working), but could not find the corresponding line in info.pac. Either info.pac is improperly named, it is too big or incorrectly formatted, or you gave an incorrect line number in MiscData[13].

    Q: My Wii does not freeze, but my custom titles do not show up.
    A: This means that common2 is not being read. If you are using the File Patch Code, you will most likely have problems patching common2. This is just a flaw of the code, unfortunately. Just reset and hope it works this time. If you are using Riivolution, make sure that common2 is renamed to common2_en.pac if necessary.


    I hope I have been as clear as possible.
    Logged


    Ebola16
    Importer of Dreams
    Boss Kitten
    ****
    Offline Offline

    Posts: 4133


    Brawl R&D // Dolphin Emulator Dev

  • Awards Famous Hacker Super Saiyan Topic Sniper Pin Collector

  • View Profile Awards
    « Reply #1 on: January 06, 2015, 03:12:17 PM »


    I know this is slightly outside the scope of the tutorial, but is it possible to add the custom sound engine's extra music slots to a tracklist? The last time I looked at sound modifications, tracklists and music slots could be swapped but not added to stages.

    Also, if an expansion stage were to have 16 songs, do I still need to assign it a tracklist from a stage already in Brawl?

    Ideally, I'm looking to see if you know how to add music slots to tracklists or create a new tracklist for custom stages.

    Edit: Apparently BrawlDJ is the way to go! http://opensa.dantarion.com/wiki/BrawlDJ#Downloads This is exciting!

    Edit 2: BrawlDJ does not work  Cry
    « Last Edit: January 08, 2015, 03:44:27 AM by ebola16 » Logged

    Brawlex Advancements (Supplement to the Brawlex thread's original post)
    I use RSBE Brawlex v2.0.0.0 Extended, Win 10, and 3ds Max (3ds Max Guide). Refresh to see my imports!

    Lost Saltshaker
    Advanced Kitten
    ***
    Offline Offline

    Posts: 41


    Has no taste in music.

  • Awards Starstormer Tutorial Writer

  • View Profile Awards
    « Reply #2 on: January 08, 2015, 02:21:57 PM »


    I know this is slightly outside the scope of the tutorial, but is it possible to add the custom sound engine's extra music slots to a tracklist? The last time I looked at sound modifications, tracklists and music slots could be swapped but not added to stages.

    Also, if an expansion stage were to have 16 songs, do I still need to assign it a tracklist from a stage already in Brawl?

    Ideally, I'm looking to see if you know how to add music slots to tracklists or create a new tracklist for custom stages.

    Edit: Apparently BrawlDJ is the way to go! http://opensa.dantarion.com/wiki/BrawlDJ#Downloads This is exciting!

    Edit 2: BrawlDJ does not work  Cry


    1. I believe Dantarion said that it is possible to edit/add tracklists, but doing so would corrupt save files. Don't quote me on it, though.

    2.To achieve more songs on a single expansion stage, you would have to assign it another tracklist then use the Stage-Song Dependant Song Loader. At least that's how I do it.
    Logged


    Ebola16
    Importer of Dreams
    Boss Kitten
    ****
    Offline Offline

    Posts: 4133


    Brawl R&D // Dolphin Emulator Dev

  • Awards Famous Hacker Super Saiyan Topic Sniper Pin Collector

  • View Profile Awards
    « Reply #3 on: January 08, 2015, 02:35:16 PM »


    1. I believe Dantarion said that it is possible to edit/add tracklists, but doing so would corrupt save files. Don't quote me on it, though.

    2.To achieve more songs on a single expansion stage, you would have to assign it another tracklist then use the Stage-Song Dependant Song Loader. At least that's how I do it.

    I see. I'm assuming that BrawlDJ is the closest we've come to editing/adding tracklists. I forgot that the Stage-Song Dependant Song Loader is stage dependent so it shouldn't modify the original tracklist. That's good news for me!
    Logged

    Brawlex Advancements (Supplement to the Brawlex thread's original post)
    I use RSBE Brawlex v2.0.0.0 Extended, Win 10, and 3ds Max (3ds Max Guide). Refresh to see my imports!

    Pages: [1]
    Print
    Jump to: