Custom Music?

Discuss thug2 modding, post your own, share your ideas, ask questions.
LC-DDM
Posts: 31
Joined: Wed Sep 19, 2012 8:15 pm
Contact:

Custom Music?

Postby LC-DDM » Wed Sep 19, 2012 8:48 pm

Is there a way to create custom music for THUG2? Does it replace tracks, or does it add them?
Image
ZurePitchmen83
Posts: 158
Joined: Mon Jul 30, 2012 9:18 am
Location: USA
Contact:

Re: Custom Music?

Postby ZurePitchmen83 » Thu Sep 20, 2012 9:12 am

It's possible, Try doing this

1. Download RAD Video Tools, you might need a video editor for the song
2. Add a song to a video project with the video editor, then save it as an uncompressed AVI file
3. Use RAD video tools to convert the song, highlight on the AVI, then press the button saying "Bink It!"
4. you may be prompted to converting options for the song, fill in the boxes for it to use 4x4 Scaling Size, 15 Frames per second, and 44100 Hz Audio Frequency
5. Wait for it to convert (Usually Takes 30-60 seconds to convert)
6. Replace any song inside Your THUG2 Music Folder (Usually C:\Program Files\Activision\Tony Hawk's Underground 2\Game\Data\streams\music)
7. Start up your game, Play inside a Free Skate Session, go to Sound Options, then Skip Tracks until you hear your song, NOTE:the name/band won't match, you have to edit soundoptions.qb or something like that to get it to match

Good luck! ;)
THPS4 Level Expansion Pack, THUG2 710 Mod 1.0
Modding and Model ripping since 2009
LC-DDM
Posts: 31
Joined: Wed Sep 19, 2012 8:15 pm
Contact:

Re: Custom Music?

Postby LC-DDM » Thu Sep 20, 2012 2:09 pm

Alright, I shall try that soon. However, I have a few additional questions.

Do you require any specific video editor, or anything will do?

Will changing the soundoptions.qb be able to add a new song, instead of just replacing it?

Also, is it possible to add a new genre (like, you got punk, HipHop, and Rock/Other. I want to add a new one, for example, "chiptune".)
Image
WhoElseButMe
Posts: 419
Joined: Tue Aug 04, 2009 12:50 am
Location: FL - USA
Contact:

Re: Custom Music?

Postby WhoElseButMe » Thu Sep 20, 2012 6:38 pm

Zure... shacks my damn head.
RAD Game Tools and they produce bink files the music isn't a video sheesh.
You do them one by one and add the new track names to the array of music much like the THAW tutorial posted, except these files aren't packaged in a single file.

You can add a new genre, several references exist in soundoptions.qb you'll need to update any arrays of items or any loop that uses a fixed number of 3 to loop through the number of genres and then you'll be able to use it.
Adding your genre to the horizontal menu at the top might require some positioning to make it look good.
Image
WhoElseButMe on Nov 26, 2009 wrote:It's that lack of respect amongst their peers and ignorance towards modding etiquette that keeps us who know this stuff well from spreading it like wild fire. We do still enjoy playing the game and if you need to cheat to play a game PLAY SOMETHING ELSE YOU DON'T SUCK AT.
LC-DDM
Posts: 31
Joined: Wed Sep 19, 2012 8:15 pm
Contact:

Re: Custom Music?

Postby LC-DDM » Thu Sep 20, 2012 6:57 pm

Actually, Zure's way actually worked. I now have a custom song. However I don't know where this "array of music". I assume it's the music list, but it's not in soundoptions. As for adding a new genre, is it as simple as "newgenrename", "number", and done?
Image
WhoElseButMe
Posts: 419
Joined: Tue Aug 04, 2009 12:50 am
Location: FL - USA
Contact:

Re: Custom Music?

Postby WhoElseButMe » Thu Sep 20, 2012 11:51 pm

You need to look through the entire soundoptions.qb if there is a loop loop_to 2 then make it say 3 only if this is a loop of genre also if you find any array that is of the genre add your genre to it then when adding your music to the game you would just use your genres index which would start at 3, if you only add one genre. Basically that is all there is to it you need to adjust the code to work with an added genre and it's really that simple.

The playlist_tracks array is located in music.qb
the playlist_genres array should be in that same qb file
Image
WhoElseButMe on Nov 26, 2009 wrote:It's that lack of respect amongst their peers and ignorance towards modding etiquette that keeps us who know this stuff well from spreading it like wild fire. We do still enjoy playing the game and if you need to cheat to play a game PLAY SOMETHING ELSE YOU DON'T SUCK AT.
LC-DDM
Posts: 31
Joined: Wed Sep 19, 2012 8:15 pm
Contact:

Re: Custom Music?

Postby LC-DDM » Sat Sep 22, 2012 1:50 pm

That's the thing, I just did a search for everything .qb and "music" isn't in the search results. The hell?

I'm sorry, I'm really as dumb as a brick in regards to qb scripting. x.x

I've seen these threads, so I know there was a tool that did this for me, but the guy who uploaded it probably doesn't have it anymore, not to mention the site that the tool was uploaded to doesn't exist anymore.
Image
LC-DDM
Posts: 31
Joined: Wed Sep 19, 2012 8:15 pm
Contact:

Re: Custom Music?

Postby LC-DDM » Wed Sep 26, 2012 4:16 pm

I apologise for Doubleposting, but... I'm really "dying" to know this - what's the .qb that holds the tracklist with the music names? soundoptions.qb doesn't have it and music.qb doesn't exist. o.o
Image
ZurePitchmen83
Posts: 158
Joined: Mon Jul 30, 2012 9:18 am
Location: USA
Contact:

Re: Custom Music?

Postby ZurePitchmen83 » Thu Sep 27, 2012 2:19 am

LC-DDM wrote:I apologise for Doubleposting, but... I'm really "dying" to know this - what's the .qb that holds the tracklist with the music names? soundoptions.qb doesn't have it and music.qb doesn't exist. o.o


My bad on my last post :nope: , the ingame music data is inside skater_sfx.qb, so i'll conclude it

1. Decompile skater_sfx.qb with QB Explorer
2. insert this code to any part where the music data is stored

Code: Select all

   :i :s{$band$ = %s(12,"Your Band Name Goes Here")$track_title$ = %s(30,"Your Music Name Goes Here")$genre$ = %i(1,00000001)$path$ = %s(22,"music\vag\songs\YourBandNameGoesHere"):s}

3. compile the script, you have to change the QBkeys to strings for it to compile, i can give you a list of QBkeys that need to be strings for this if you want
4. hex edit the script with any hex editor, i recommend HxD since it's free and works with any file of any size
5. Use this tool to generate a QBkey of the band name (With no spaces like in the path of the song in the script), then rename the converted BIK video of the song to the QBkey checksum it gave you, then copy it to the music folder in the game data
6. Test the game, and go to the sound options and skip the sound track until you hear it

NOTE:you need to dummy QB_Scripts.prx before you can use your custom songs (unless you use any mod, then search for my reply on another topic, it says what to do)
THPS4 Level Expansion Pack, THUG2 710 Mod 1.0
Modding and Model ripping since 2009
LC-DDM
Posts: 31
Joined: Wed Sep 19, 2012 8:15 pm
Contact:

Re: Custom Music?

Postby LC-DDM » Thu Sep 27, 2012 3:08 am

Thanks. I'll try replacing first instead of adding, just to avoid breaking things too much. :P

EDIT: I either screwed up or am just impossibly stupid - I get "*** error @4: WORD expected!" when compiling, and the supposed compiled QB never shows up. x.x
Image
ZurePitchmen83
Posts: 158
Joined: Mon Jul 30, 2012 9:18 am
Location: USA
Contact:

Re: Custom Music?

Postby ZurePitchmen83 » Thu Sep 27, 2012 11:09 pm

Here's a stripped down version of the skater_sounds.qb script which has strings instead of QBkeys and as successfully been compiled with QB Explorer, This only has the music part of the script, So you have to hex edit that part of the script for your song to work, The QBkey for the song name has to be reversed otherwise it won't play, this also has an extra song slot (which is used for the Goldfinger Superman Song which i won't add into the file to save space)

Example of a reversed QBkey used in the song names
String:Goldfinger
QBkey:eb30462e
Reversed:2e4630eb

You see?, it was reversed by 2 bytes


Here you go
skater_sounds.zip
Modded decompiled Script
(13.7 KiB) Downloaded 684 times
THPS4 Level Expansion Pack, THUG2 710 Mod 1.0
Modding and Model ripping since 2009
WhoElseButMe
Posts: 419
Joined: Tue Aug 04, 2009 12:50 am
Location: FL - USA
Contact:

Re: Custom Music?

Postby WhoElseButMe » Fri Sep 28, 2012 1:01 am

LC-DDM wrote:Thanks. I'll try replacing first instead of adding, just to avoid breaking things too much. :P

EDIT: I either screwed up or am just impossibly stupid - I get "*** error @4: WORD expected!" when compiling, and the supposed compiled QB never shows up. x.x

This means at line 4 a word was expected typically this is because you didn't wrap you qbstring in $ or that your qbstring contains characters that this tools qbkey generator can't handle.
Image
WhoElseButMe on Nov 26, 2009 wrote:It's that lack of respect amongst their peers and ignorance towards modding etiquette that keeps us who know this stuff well from spreading it like wild fire. We do still enjoy playing the game and if you need to cheat to play a game PLAY SOMETHING ELSE YOU DON'T SUCK AT.
LC-DDM
Posts: 31
Joined: Wed Sep 19, 2012 8:15 pm
Contact:

Re: Custom Music?

Postby LC-DDM » Fri Sep 28, 2012 4:48 am

Okay, Zure, I'm willing to get the list of QBkeys that require to be strings, if you could, please.

I swear I'm doing my best to try and do this... you guys are being great help and patient with me, I honestly can't thank you enough.
Image
ZurePitchmen83
Posts: 158
Joined: Mon Jul 30, 2012 9:18 am
Location: USA
Contact:

Re: Custom Music?

Postby ZurePitchmen83 » Fri Sep 28, 2012 10:11 pm

Unfortunately, I can't give you the full list, Since i only know some QBkeys that need to be strings, and even if i left some, it wouldn't work, use my modded script, it's the best i can do for now, this is how you should hex edit the part into the script

Untitled.jpg
Comparsion
Untitled.jpg (46.84 KiB) Viewed 19975 times


You see?, I only added the song that i added into the script, you can edit the TXT of the script, then compile it, and hex edit that part
THPS4 Level Expansion Pack, THUG2 710 Mod 1.0
Modding and Model ripping since 2009
WhoElseButMe
Posts: 419
Joined: Tue Aug 04, 2009 12:50 am
Location: FL - USA
Contact:

Re: Custom Music?

Postby WhoElseButMe » Sat Sep 29, 2012 8:32 pm

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 line

Code: 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 values

Code: 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.
Image
WhoElseButMe on Nov 26, 2009 wrote:It's that lack of respect amongst their peers and ignorance towards modding etiquette that keeps us who know this stuff well from spreading it like wild fire. We do still enjoy playing the game and if you need to cheat to play a game PLAY SOMETHING ELSE YOU DON'T SUCK AT.

Return to “THUG2 modding”

Who is online

Users browsing this forum: No registered users and 17 guests