Xenoblade X replace music

  • Thread starter Thread starter pwnsweet
  • Start date Start date
  • Views Views 18,311
  • Replies Replies 130
  • Likes Likes 2
Here is my Python script that can unpack .bnk and .wav files from .pck
//SNIP
Thanks a lot for your time and effort! Will do local version of NLA music when time permits and maybe write a short tutorial about it, unless someone else beats me at it.
 
Hey thanks, this is great! It was just the springboard I needed; I can't thank you enough.

Initial dirty testing is going pretty well, I managed to swap NLA Day with a new track, I'd show video evidence but I'm too new around here to show a video lol. Once I clean things up on my end I can finally start porting my CEMU mods over to Switch.
You replaced NLA Day with another XCX music track or an external music file?
 
Thank you! Going to sift through them. Also, does anyone know if you can just use a .BFSTM with these file names to inject them with a mods folder via emulator, or do we have to repack the music.pck to get this to work?
 
Thank you! Going to sift through them. Also, does anyone know if you can just use a .BFSTM with these file names to inject them with a mods folder via emulator, or do we have to repack the music.pck to get this to work?
That's not how any of this works. No, you can't use raw bfstm files as it's not AudioKinetic's format.
 
That's not how any of this works. No, you can't use raw bfstm files as it's not AudioKinetic's format.
Sorry I didn't fully understand previous posts. I saw a previous post by Arpeggiate mention being able to replace a song. I did the extracting and converted the files with VGM so they're previewable.

Is it that you need the Music.pck repacked with updated files but in the original .wav format that you can't preview?

*edit* sorry I think I get it now. Just gotta figure out how to convert to the correct format.
 
Last edited by chfx,
I did this quick and dirty using songs shorter or same length from OST, then repacking the Music.pck and substituting it with layeredfs. The hashes for NLA songs are 34A380BD for day and 385CB3EB for night. Changed all the (c)rap tracks too while I was at it due personal music preferences.
 
Hey, I'm trying to figure out this last conversion step before repacking the files. I unpacked Music.pck, converted the song files with vgmstream into listenable tracks, and got a replacement bgm ready. My problem is converting the replacement bgm into that format so the game can load it. I see that Arpeggiate and Iwiz got it to work, and I would be grateful if you or others can give detail how to convert it. I genuinely can't play Xenoblade X until I can replace NLA music like I did on the Wii U.
 
I see that Arpeggiate and Iwiz got it to work, and I would be grateful if you or others can give detail how to convert it.
Arpeggiate has the details I think, I just used other tracks from OST, so no conversion was necessary.
 
  • Like
Reactions: cucholix
What tool did you used to convert the external wav into a compatible wav?

Hey, sorry. I had to take a break since it's the start of a busy work week for me.

Since I work in Game Audio myself, I'm using WWise to re-header the files (due to the Audiokinetic Wwise RIFF header), it's a bit of a tumultuous process, hence why I said dirty testing, I'm trying to simplify it and make it easier to do for others. I'm also trying to convert all of the hex names into... well something tangible lol. There's lots of duplicates.

Here's a few I've figured out, I haven't dug too deep since I'm focusing on converting right now:

1FB6013E - Melancholia
3BF547BA - Mono X (Title Theme)
1D4BDB58 - Mono X (Title Theme Short)
1E69B0F8 - Z10 Briefing (Character Select theme)
01546BBB - Black Tar (Ground)
10692B95 - Black Tar (Ground)
046C954F - Black Tar (Skell)
3EAD7FE6 - Primordia Day
03A5DF8F - Primordia Night
34A380BD - NLA Day
385CB3EB - NLA Night
1F430BF5 - Uncontrollable (Ground Tyrant theme)
2F4B7A3E - Uncontrollable (Ground Tyrant theme)
00D5ED49 - Wir Fliegen (Overdrive theme)
0274DBCA - Wir Fliegen (Overdrive theme long version)
 
I've identified some "conflictive" tracks
Code:
battle (?) 1D6308EB
Battle (?) (lyrics) 2A8720AB

In the Forest (lyrics) 30D2E39E
In the Forest (no lyrics) 3F130BE5
Teletia battle (no lyrics) 15C3EC96
Teletia battle (lyrics) 2F4B7A3E
Don't Worry (Skell flight) (lyrics) 2D6EA0A4
Don't Worry (Skell flight) (no lyrics) 227751D9
Don't worry (Skell flight) (lyrics alt ver) 2FFD64D8

Wir fliegen (lyrics) 3BB72308
Wir fliegen (fast) (no lyrics) 24EBFB92
Wir fliegen (no lyrics) 1F430BF5
Wir fliegen (lyrics) 04CDD66F

Black Tar (lyrics) 07D2FBE2
Black Tar (lyrics) 046C954F
Black Tar (lyrics) 01546BBB
Black Tar (lyrics) 10692B95

NLA Day 34A380BD
NLA Night (lyrics) 385CB3EB
Hangar customization (?) 37E08443
Hangar customization (?) 004664CC

Epic big battle final credits? (no lyrics) 3635105A
Epic Battle (no lyrics) 09BAB7D7
 
Last edited by cucholix,
we have to deal with those fixed loop as well, for now I satified by replace NLA theme with Melancholia and opening track.
Here the mod file for anyone dont know or didnt bother to do this. Its must better to play now.


Mod NLA night theme with melancholia (squad select screen theme) in wii u version because it was removed in switch ver, and NLA day theme with opening song because it can only be heard once
 
Last edited by shuyinlove,
Figured out how hash algorithm works. So my algorithm is fine:
https://gbatemp.net/threads/xenoblade-x-replace-music.668397/post-10615998

Trying now first to figure out all banks names (because there is less of them) and then I will start going through streams.

Figured out names already:
Python:
BANKS_IDS = {
    0x50C63A23: "Init",
    0x1899AC8D: "bgm",
    0xA7A2F691: "Common_2xx",
    0xDD4B5BF7: "CS_music",
    0x14D7D7E0: "CS_FX",
    0xC0AF27EA: "CS_dialog",
    0xA3A900B3: "Common_0xx",
    0xADA53E8A: "Common_1xx",
    0xA1A0AE98: "Common_3xx",
    0xAFAD90A5: "Common_6xx",
    0xB1391129: "Common_etc",
    0x4BC75294: "Common2",
    0x6F772BA0: "BG",
    0x12E95823: "Weather",
    0xA576C2EC: "Maps",
    0x37C1C2B3: "ev_voice",
    0x8DDD29D9: "voice_mb",
    0x8EDD2B3E: "voice_np",
    0x04A6A750: "pc_voices",
    0x671ADFE4: "SeVoices",
    0xBEF5CF2A: "BradeRoomDoor",
    0x1454D1B8: "CookingJingle",
    0xE633F6CC: "missions",
    0x1537F38D: "Gimmick_etc",
    0x6E96B32A: "town1",
    0x6E96B329: "town2",
    0xBD2312BF: "Talk",
    0xE5BDB566: "syanai",
    0x76D55BB9: "takeda",
    0x35A3F705: "Voice202307",
}
 
The mod I remember using has NLA Day replaced by colony 9, NLA Night replaced with Valak Mountain Night, and straight replaced all the battle music with xeno 1.

if… any are looking for suggestion.

going through xeno 1 tracks researching for this reminds me of how exceptional xeno 1 score was.., what the hell happened on xbx….? I understand the composer for xbx is famous, but these songs are bad.
 
So for the curious, I was originally just repacking this straight onto my switch, but I decided to do it through an emulator instead to expedite the process. You can indeed just use a mod/romfs/LayeredFS in an emulator and load the Music.pck directly (so long as it's been repacked by masagrator's script). Others have already figured that part out though!

I think the central problem with just using straight up WAV files (that is, external files) is that they're technically just Libopus(OGG) and wrapped in a header up to 0x40. The header is easy to figure out. It's very easy to convert them to Libopus using ffmpeg. Something to the effect of...

ffmpeg -i song.wav -c:a libopus -b:a 196k -ar 48000 -ac 2 song_opus.ogg

the header you can put in with HxD or some other editing software:

52 49 46 46 28 C7 48 00 57 41 56 45 66 6D 74 20 28 00 00 00 39 30 02 00 80 BB 00 00 00 EE 02 00 04 00 10 00 06 00 C0 03 02 31 00 00 6A FD 8D 00 00 00 00 00 30 2F 48 00 78 97 00 00 73 6D 70 6C 3C

You could technically just brute force your way in but it's pretty inelegant, and I'm fairly certain that as shuyinlove said, they're missing loop points; the files won't play anyway. I'm doing it the long way, that is dragging the file into WWise and re-encoding it and then exporting it but I doubt every single person is gonna wanna install Wwise and do this several times over lol.

Idle musings while stuck at work. Not at my PC right now to properly check.
 
The mod I remember using has NLA Day replaced by colony 9, NLA Night replaced with Valak Mountain Night, and straight replaced all the battle music with xeno 1.

if… any are looking for suggestion.

going through xeno 1 tracks researching for this reminds me of how exceptional xeno 1 score was.., what the hell happened on xbx….? I understand the composer for xbx is famous, but these songs are bad.
No experience in making OSTs for games. This was his first big game, before was only some mobile game. After XCX he never again took a job in making OSTs for games, it's easy to guess why. He feels the best making OST for TV series and movies.
 

Site & Scene News

Popular threads in this forum