[How-To]Add Custom Music in THUG2 (PS2) (Revised 12/5/19)
Posted: Fri Mar 15, 2013 1:55 am
12/5/19 Update:
After 6 years, I finally did it correctly! Silence/No next song is playing bug is no more! Here's the revised instructions how to put custom music on PS2 version of THUG2.
Here's what you need:
THUG2 ISO (Make it from your THUG2 Disc)
WadEdit v4: http://thmods.com/forum/viewtopic.php?f=8&t=28 (Requires Java Runtime Environment to be installed)
THawkPS2AudioConvert (Batch program created by me. Requires QuickBMS and SoX. Both of these programs available below, while the batch program download are available on the attachment below. See ReadMe.txt for a little bit of details)
QuickBMS: http://aluigi.altervista.org/papers/quickbms.zip (For running the MUSICP extraction scripts and also needed for script included in THawkPS2AudioConvert to convert the audio formats to the one the game understands.)
SoX: https://sourceforge.net/projects/sox/fi ... t/download (For the THawkPS2AudioConvert's audio conversion). Also for MP3 support: https://app.box.com/s/tzn5ohyh90viedu3u90w2l2pmp2bl41t
aluigi's THPS HED/WAD script: http://aluigi.altervista.org/bms/thps_hed_wad.bms (To ensure correct extraction of MUSICP.WAD)
hedwadext: http://aluigi.altervista.org/papers/hedwadext.zip (To repack the MUSICP.WAD with it's correct namecase and file alignments)
UltraISO or Xpert 2.0 (I use the latter personally)
First let's extract the MUSICP.WAD archives the correct way:
*Note: If you didn't want to add/remove any existing songs, rename your songs with the same name from the original ones. Otherwise, move on to the Additional steps.
1. Extract MUSICP.WAD and MUSICP.HED from MUSIC directory in THUG2 ISO (Or if you're using Xpert, Just go to where it extracts the contents of the ISO).
2. Edit the thps_hed_wad.bms script and change the ALIGN parameters to 1 and EXTRACTION_MODE to also 1.
3. After you've done editing, extract MUSICP.WAD using Quickbms and THPS HED/WAD Script with this command:
If it asks you to create new directory, just type y then confirm.
3. Using THawkPS2AudioConvert, edit the Convert.bat accordingly and after you done, launch it to start conversion.
4. After the conversion was done, copy your converted audio inside the songs directory to [Where you extract MUSICP.WAD Contents]\music\vag\songs directory.
5. Repack the files again using hedwadext with this command:
*Note: hedwadext will not repack the WAD if there's another same WAD existed so delete it first.
6.Replace the old MUSICP.WAD and MUSICP.HED in the MUSIC folder in THUG2 ISO with the new one you just created (Or rebuild the ISO if you're using Xpert).
7. Play it on PCSX2 or Burn the ISO to DVD-R or Play the ISO on your PS2 using HDLoader/USB Advance/Open PS2 Loader.
Additional steps:
Well, if you adding the new song instead of replacing the existing one, use this and WhoElseButMe steps:
1. Extract the DATAP.WAD and DATAP.HED from the THUG2 ISO (Again, If you're using Xpert, Just go to where it extracts the contents of the ISO).
2. Extract the DATAP.WAD using WadEdit with this command:
3. After you've done with extracting, go to the [DATAP.WAD Folder you just extracted]\scripts\game\skater directories and follow this steps to decompile skater_sfx.qb file:
Note: you didn't need to generate a QBKey for the song names.
After 6 years, I finally did it correctly! Silence/No next song is playing bug is no more! Here's the revised instructions how to put custom music on PS2 version of THUG2.
Here's what you need:
THUG2 ISO (Make it from your THUG2 Disc)
WadEdit v4: http://thmods.com/forum/viewtopic.php?f=8&t=28 (Requires Java Runtime Environment to be installed)
THawkPS2AudioConvert (Batch program created by me. Requires QuickBMS and SoX. Both of these programs available below, while the batch program download are available on the attachment below. See ReadMe.txt for a little bit of details)
QuickBMS: http://aluigi.altervista.org/papers/quickbms.zip (For running the MUSICP extraction scripts and also needed for script included in THawkPS2AudioConvert to convert the audio formats to the one the game understands.)
SoX: https://sourceforge.net/projects/sox/fi ... t/download (For the THawkPS2AudioConvert's audio conversion). Also for MP3 support: https://app.box.com/s/tzn5ohyh90viedu3u90w2l2pmp2bl41t
aluigi's THPS HED/WAD script: http://aluigi.altervista.org/bms/thps_hed_wad.bms (To ensure correct extraction of MUSICP.WAD)
hedwadext: http://aluigi.altervista.org/papers/hedwadext.zip (To repack the MUSICP.WAD with it's correct namecase and file alignments)
UltraISO or Xpert 2.0 (I use the latter personally)
First let's extract the MUSICP.WAD archives the correct way:
*Note: If you didn't want to add/remove any existing songs, rename your songs with the same name from the original ones. Otherwise, move on to the Additional steps.
1. Extract MUSICP.WAD and MUSICP.HED from MUSIC directory in THUG2 ISO (Or if you're using Xpert, Just go to where it extracts the contents of the ISO).
2. Edit the thps_hed_wad.bms script and change the ALIGN parameters to 1 and EXTRACTION_MODE to also 1.
3. After you've done editing, extract MUSICP.WAD using Quickbms and THPS HED/WAD Script with this command:
Code: Select all
quickbms thps_hed_wad.bms MUSICP.HED [Wherever you want to extract it]
If it asks you to create new directory, just type y then confirm.
3. Using THawkPS2AudioConvert, edit the Convert.bat accordingly and after you done, launch it to start conversion.
4. After the conversion was done, copy your converted audio inside the songs directory to [Where you extract MUSICP.WAD Contents]\music\vag\songs directory.
5. Repack the files again using hedwadext with this command:
Code: Select all
hedwadext b MUSICP.HED [WAD Folder you just extracted] 1
*Note: hedwadext will not repack the WAD if there's another same WAD existed so delete it first.
6.Replace the old MUSICP.WAD and MUSICP.HED in the MUSIC folder in THUG2 ISO with the new one you just created (Or rebuild the ISO if you're using Xpert).
7. Play it on PCSX2 or Burn the ISO to DVD-R or Play the ISO on your PS2 using HDLoader/USB Advance/Open PS2 Loader.
Additional steps:
Well, if you adding the new song instead of replacing the existing one, use this and WhoElseButMe steps:
1. Extract the DATAP.WAD and DATAP.HED from the THUG2 ISO (Again, If you're using Xpert, Just go to where it extracts the contents of the ISO).
2. Extract the DATAP.WAD using WadEdit with this command:
Code: Select all
java -jar WadEdit.jar DATAP.WAD DATAP.HED [everywhere you want to extract them]
3. After you've done with extracting, go to the [DATAP.WAD Folder you just extracted]\scripts\game\skater directories and follow this steps to decompile skater_sfx.qb file:
WhoElseButMe wrote:Why? Holy fuck man.
@LC-DDM, the reason the script doesn't decompile are the 61 instances of the RandomRange.
Open the FULL ORIGINAL script in a hex editor and do a HEX search for these 2 bytes 0730 change them to 0707.
Now the script will decompile and everywhere there was a RandomRange you'll see = = (0707) leave these as they are.
Make the changes you want to the Playlist_Tracks array and compile the script.
Before you can use this script you'll need to open the re-compiled script in a hex editor and do a hex search for 0707 and change it to 0730.
Example for adding an entry, just above the end array (:a}) copy that lineCode: Select all
:i :s{$band$ = %s(1,"X")$track_title$ = %s(11,"Los Angeles")$genre$ = %i(2,00000002)$path$ = %s(19,"music\vag\songs\XLA"):s}
:i :s{$band$ = %s(4,"ZEKE")$track_title$ = %s(18,"Long Train Runnin'")$genre$ = %i(2,00000002)$path$ = %s(20,"music\vag\songs\ZEKE"):s}
:i :a}
paste that line and change it to match your valuesCode: Select all
:i :s{$band$ = %s(1,"X")$track_title$ = %s(11,"Los Angeles")$genre$ = %i(2,00000002)$path$ = %s(19,"music\vag\songs\XLA"):s}
:i :s{$band$ = %s(4,"ZEKE")$track_title$ = %s(18,"Long Train Runnin'")$genre$ = %i(2,00000002)$path$ = %s(20,"music\vag\songs\ZEKE"):s}
:i :s{$band$ = %s(4,"NOFX")$track_title$ = %s(22,"Idiots are Taking Over")$genre$ = %i(2,00000002)$path$ = %s(20,"music\vag\songs\NOFX"):s}
:i :a}
And just to be clear you generate a QbKey for the short name only music\vag\songs\NOFX
NOFX = 2bb019e1, this becomes your track name, 2bb019e1.bik and goes into \Game\Data\streams\music\
Enjoy.
Note: you didn't need to generate a QBKey for the song names.