Xenoblade X replace music

  • Thread starter Thread starter pwnsweet
  • Start date Start date
  • Views Views 18,311
  • Replies Replies 130
  • Likes Likes 2

pwnsweet

Well-Known Member
Newcomer
Joined
Jul 20, 2008
Messages
63
Reaction score
15
Trophies
1
XP
400
Country
Australia
So in the original game on WiiU, it was possible to replace the music for the city (day and night) with, for example, Xenoblade Colony 9 music. Actually, it was possible to replace any music with whatever track you wanted.

Can we please figure out how to do it on the switch version? I want to play X again on the switch but I cannot handle the city music (and a lot of time is spent in the city).
 
Based on other threads here the modders are having progress as we speak. I'm in the same boat as you, hated the (c)rappy/hip-hoppy tune so much I had to turn the volume off in the city. And the music loops were anyway far too short for the time needed to spend in the city area.
 
I have some lyric-less tracks waiting to be replaced, they are from my WiiU mod :lol:
I like the music in X, just think the lyrics are outputting.
 
back then, i replaced NLA theme from wiiU ver with some sawano best tracks, i still have that file, hope someone can mod it into this game
 
I would be happy with even simple "fetch music from here, instead of there" cheat in order to play the game (yep, that NLA night track makes the game unbearable and unplayable), as it seems the modding community hasn't yet wholly cracked the XCX DE file formats. Based on the posts I've read you can extract some stuff, but repacking is the problem.

Not in terrible hurry though myself, this gets done when it gets done, can clear my backlog meanwhile...
 
@shuyinlove in the same spot as you, no idea (yet) how to open the Music.pck archive(?). Spent some time today between other stuff playing around citron/ryujinx and putting aptly named(?) apx files into mod directory subfolders . But due time constraints, just did some quick tries none of which had any effect.

It seems that at the moment we have tools for unpacking the nsp, the text and model assets, but no progress yet has been made on the sound packages.

Or the very probable option that I'm missing something bloody obvious :P Any progress at your end?
 
  • Like
Reactions: chfx
I did a music overhaul mod over on Gamebanana for the Wii U version a few years back. I would like to update it to the Switch version, but currently I have no idea how to get track listing. On Wii U, it was easy. Just had to swap files. On Switch I'm assuming the files are all packed into Music.pck, and have had no success on extracting them. I'm assuming making the .BFSTM files would be straightforward, but currently lack the file structure names to figure out what they would need to be called and what the songs in question would be.
 
  • Like
Reactions: solomani and lwiz
Just had to swap files. On Switch I'm assuming the files are all packed into Music.pck, and have had no success on extracting them. I'm assuming making the .BFSTM files would be straightforward, but currently lack the file structure names to figure out what they would need to be called and what the songs in question would be.

This tool from @Nenkai might be of help with track names an locations - there is list of filenames etc. included in sources.
 
  • Like
Reactions: chfx
Audio files are outside of ard/arh. And it's not related to unpacking pck.
Yeah, I know that. But the filename/resource *lists* in the tool sources do list thee audio filenames and their paths, which might or might not be helpful.
 
On Switch I'm assuming the files are all packed into Music.pck, and have had no success on extracting them.
It's using WWISE. You can use for example this for extracting files from it, decoding to mp3/ogg is broken.
https://github.com/Vextil/Wwise-Unpacker

Code:
"Tools\quickbms.exe" "Tools\wavescan.bms" "Game Files" "Tools\Decoding"

Files will be extracted to Tools\Decoding

Of course without correct names, it seems to use 32-bit hashes, probably FNV-1
Post automatically merged:

vgmstream can convert unpacked wav files correctly to working WAV
 
Last edited by masagrator,
So found that game is not using clean version of FNV-1.

Like for "cmn_201_001_Play" it's outputting 0xab650034 while clean version outputs 0xD468DA48

I'm trying to write Python reimplementation.
Post automatically merged:

C:
#include <stdio.h>
#include <string.h>

int main() {
    char str[] = "cmn_201_001_Play";
    unsigned int FNV1_INIT = 0x811C9DC5;
    unsigned int FNV1_PRIME = 0x1000193;
    for (size_t x = 0; x < strlen(str); x++) {
        if ((unsigned char)(str[x] - 65) < 26)
            str[x] += 32;
        FNV1_INIT = (FNV1_PRIME * FNV1_INIT) ^ str[x];
    }
    printf("0x%08X", FNV1_INIT);
    return 0;
}
Output:
Code:
0xAB650034
It turned out it was easier to write it in C. :D

Still it doesn't solve issue that we don't know what names should we use since it doesn't find anything for f.e. x01_00
 
Last edited by masagrator,
  • Like
Reactions: cucholix
Here is my Python script that can unpack .bnk and .wav files from .pck

https://github.com/masagrator/NXGameScripts/blob/main/XenobladeChroniclesX/pck_unpack.py

It uses hashes as names and it's properly analyzing headers instead of doing brute force.

Example command:
Code:
python pck_unpack.py Music.pck

wav files in STREAMS folder must be converted with vgmstream to be playable

200 music files is not that much, it's possible to analyze all of them manually to figure out where each music file is.
Post automatically merged:

And here is pck packer dedicated to non-voice files (so no support for en.pck and ja.pck because they have slightly different build)

https://github.com/masagrator/NXGameScripts/blob/main/XenobladeChroniclesX/pck_nonvoice_pack.py

You must unpack pck file with pck_unpack.py and provide created folder to that python script

Code:
python pck_nonvoice_pack.py Music
It will generate new pck in PACKED folder.

Example info about unpacked music wav file according to vgmstream:
Code:
sample rate: 32000 Hz
channels: 2
channel mask: 0x3 / FL FR
stream total samples: 6547200 (3:24.600 seconds)
encoding: Platinum 4-bit ADPCM
layout: interleave
interleave: 0x24 bytes
metadata from: Audiokinetic Wwise RIFF header
bitrate: 288 kbps
play duration: 6547200 samples (3:24.600 seconds)

I guess someone else can take from here how to convert audio to correct format.
 
Last edited by masagrator,
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.
 

Site & Scene News

Popular threads in this forum