06-19-2023, 01:21 AM
(This post was last modified: 08-05-2023, 05:37 PM by Seedonator.
Edit Reason: made a mistake in labeling track 39 as locked
)
Alright here we go. First off huge credit to ViveTheModder for figuring out all this stuff for the PS2 version and then assisting me in porting it to Wii.
So as you know, BT3 stores its data inside of .AFS files in the iso. The 2 most important ones are wzs3us1.afs and wzs3us2.afs which contain basically everything a modder will care about afaik. The modding community has made AFL files to name everything inside there so we actually understand what we're modifiying. wzs3us2.afs is exclusively .ADX sound files for voice lines, ambience/sfx and music. wzs3us1.afs contains what the modding community calls .PAK's which inside them have various different things (also including sound effects for anything not found in wzs3us2, I don't know what the actual codec is or how to rip them). Now the important PAKs for this mod are the ones labelled Options_US.pak, Versus_US.pak and Ultimate_Training.pak. This is because these are the 3 game modes/menus which allow you to select custom music in a scroll box. There's a tool out there called Sparking Studio (probably very difficult to find without going to an actual modding server or something) which I used to unpack these files. For now let's just focus on Options_US.pak since if we can get the mod to work there, then it'll take 3 seconds to get it working on the other 2 modes.
Inside of Options_US.pak, theres a bunch of stuff for the menu however only 3 of the files are relevant for this mod:
03_songs_names_active.dbt
04_songs_names_inactive.dbt
36_songs_order.dat
The DBT files are basically the image container files that have the textures for the song text, for both selected and deselected states.
songs_order.dat is what links this song selection menu to wzs3us2.afs (where majority of the sounds are in the iso)
The way this mod works is by utilising the unused ADX files inside of the game.
All the relevant hex values for said files were found by Vive, and I double checked to make sure they line up correctly on the Wii version.
The hex values provided here can be used inside of the songs_order.dat like so:
The first byte here (44) is to determine the total amount of songs in this menu so you can scroll to them, 44 will allow you to go all the way to the bottom and make the maximum usage out of the available slots. The final byte (18) represents the random slot as stated above, this must always be at the end of the file. The rest you can play around with the order afaik and it doesn't really matter, here they're listed in what order they'll show up inside of the AFS itself.
Now if you just edit the songs_order.dat and then reimport the pack and load up the BGM Test menu, you will get a panic handler error cause the game will try to load the DBT files which do not contain textures for the new song ids. Now you can just turn the panic handler warnings off in Dolphin settings and functionally this will work and just show yellow rectangles instead of text. The PAK that I provided in my first reply though contains custom DBTs for this mod to avoid this issue entirely, however making these is a whole new mission I don't really want to explain here unless someone actually needs to know.
So anyway we have all the available slots showing up inside the BGM Test menu, and if we import our own ADX files respectively over the correct files then we can get them to play in game perfectly fine (at 48000hz as well instead of the usual 24000hz which is awesome). However here comes the problem I'm stuck at: Budokai Tenkaichi 3 has a left over locked music slot feature from Sparking! Meteor which results in all the additional music slots being locked. The code that Vega posted here should be able to unlock majority of them except for 10 as listed above.
Honestly though +33 tracks is still pretty awesome but it's not enough for my mod since I'll be including several tracks from other Dragon Ball games that I love which I showed in the demo video in the original post.
So as you know, BT3 stores its data inside of .AFS files in the iso. The 2 most important ones are wzs3us1.afs and wzs3us2.afs which contain basically everything a modder will care about afaik. The modding community has made AFL files to name everything inside there so we actually understand what we're modifiying. wzs3us2.afs is exclusively .ADX sound files for voice lines, ambience/sfx and music. wzs3us1.afs contains what the modding community calls .PAK's which inside them have various different things (also including sound effects for anything not found in wzs3us2, I don't know what the actual codec is or how to rip them). Now the important PAKs for this mod are the ones labelled Options_US.pak, Versus_US.pak and Ultimate_Training.pak. This is because these are the 3 game modes/menus which allow you to select custom music in a scroll box. There's a tool out there called Sparking Studio (probably very difficult to find without going to an actual modding server or something) which I used to unpack these files. For now let's just focus on Options_US.pak since if we can get the mod to work there, then it'll take 3 seconds to get it working on the other 2 modes.
Inside of Options_US.pak, theres a bunch of stuff for the menu however only 3 of the files are relevant for this mod:
03_songs_names_active.dbt
04_songs_names_inactive.dbt
36_songs_order.dat
The DBT files are basically the image container files that have the textures for the song text, for both selected and deselected states.
songs_order.dat is what links this song selection menu to wzs3us2.afs (where majority of the sounds are in the iso)
The way this mod works is by utilising the unused ADX files inside of the game.
All the relevant hex values for said files were found by Vive, and I double checked to make sure they line up correctly on the Wii version.
Code:
0x14 - zs3_20_US - Custom Track 1
0x15 - zs3_21_US - Custom Track 2
0x16 - zs3_22_US - Custom Track 3
0x17 - zs3_23_US - Custom Track 4
0x18 is used for Random (the option is omitted from the BGM Test Menu regardless, however appears in Ultimate Training and Versus)
0x19 is reserved for the Locked slot itself, however if you import a song here it is possible to use it in a specific menu or story scenario but you wont be able to select it ingame as battle music
0x1A - zs3_26_US - Custom Track 5
0x1B - zs3_27_US - Custom Track 6
0x1C - zs3_28_US - Custom Track 7
0x1D - zs3_29_US - Custom Track 8
151 ADX files in between (Announcer voice lines for JP and EN, Map SE and first 4 jingles starting from Jingle_0)
0xB5 - Jingle_04 - Custom Track 9 [Currently Locked]
2 more used Jingles
0xB8 - Jingle_07 - Custom Track 10 [Currently Locked]
0xB9 - Jingle_08 - Custom Track 11 [Currently Locked]
0xBA - Jingle_09 - Custom Track 12 [Currently Locked]
0xBB - Jingle_10 - Custom Track 13 [Currently Locked]
2 more used Jingles
0xBE - Jingle_13 - Custom Track 14 [Currently Locked]
0xBF - Jingle_14 - Custom Track 15 [Currently Locked]
0xC0 - Jingle_15 - Custom Track 16
0xC1 - Jingle_16 - Custom Track 17
0xC2 - Jingle_17 - Custom Track 18
0xC3 - Jingle_18 - Custom Track 19
0xC4 - Jingle_19 - Custom Track 20
7 "Menu Sound Effects" in between (they are actually ambience in the menu locations plus the music used in sim dragon minigames)
0xCC - MnuSe_07 - Custom Track 21
0xCD - MnuSe_08 - Custom Track 22
0xCE - MnuSe_09 - Custom Track 23
0xCF - MnuSe_10 - Custom Track 24
0xD0 - MnuSe_11 - Custom Track 25
0xD1 - MnuSe_12 - Custom Track 26
0xD2 - MnuSe_13 - Custom Track 27
0xD3 - MnuSe_14 - Custom Track 28
0xD4 - MnuSe_15 - Custom Track 29
0xD5 - MnuSe_16 - Custom Track 30
0xD6 - MnuSe_17 - Custom Track 31
0xD7 - MnuSe_18 - Custom Track 32
0xD8 - MnuSe_19 - Custom Track 33
0xD9 - MnuSe_20 - Custom Track 34
0xDA - MnuSe_21 - Custom Track 35
0xDB - MnuSe_22 - Custom Track 36
0xDC - MnuSe_23 - Custom Track 37
0xDD - MnuSe_24 - Custom Track 38
0xDE - MnuSe_25 - Custom Track 39
0xDF - MnuSe_26 - Custom Track 40
0xE0 - MnuSe_27 - Custom Track 41 [Currently Locked]
0xE1 - MnuSe_28 - Custom Track 42 [Currently Locked]
0xE2 - MnuSe_29 - Custom Track 43 [Currently Locked]
The hex values provided here can be used inside of the songs_order.dat like so:
The first byte here (44) is to determine the total amount of songs in this menu so you can scroll to them, 44 will allow you to go all the way to the bottom and make the maximum usage out of the available slots. The final byte (18) represents the random slot as stated above, this must always be at the end of the file. The rest you can play around with the order afaik and it doesn't really matter, here they're listed in what order they'll show up inside of the AFS itself.
Now if you just edit the songs_order.dat and then reimport the pack and load up the BGM Test menu, you will get a panic handler error cause the game will try to load the DBT files which do not contain textures for the new song ids. Now you can just turn the panic handler warnings off in Dolphin settings and functionally this will work and just show yellow rectangles instead of text. The PAK that I provided in my first reply though contains custom DBTs for this mod to avoid this issue entirely, however making these is a whole new mission I don't really want to explain here unless someone actually needs to know.
So anyway we have all the available slots showing up inside the BGM Test menu, and if we import our own ADX files respectively over the correct files then we can get them to play in game perfectly fine (at 48000hz as well instead of the usual 24000hz which is awesome). However here comes the problem I'm stuck at: Budokai Tenkaichi 3 has a left over locked music slot feature from Sparking! Meteor which results in all the additional music slots being locked. The code that Vega posted here should be able to unlock majority of them except for 10 as listed above.
Honestly though +33 tracks is still pretty awesome but it's not enough for my mod since I'll be including several tracks from other Dragon Ball games that I love which I showed in the demo video in the original post.