Xenoblade Chronicles X: Definitive Edition Mod Loader Switch: Difference between revisions
More actions
Created page with "{{Infobox Switch Homebrews |title=Xenoblade Chronicles X: Definitive Edition Mod Loader |image=Switch-logo.png |description=Exlaunch plugin for loading files outside of sts.ard in Xenoblade Chronicles X: Definitive Edition. |author= |lastupdated=2025/05/11 |type=Hack Utilities |version=1.2.1 |license=GPL-32.0 |download=https://dlhb.gamebrew.org/switchhomebrews/XenobladeChroniclesXModLoaderSwitch.7z |website=https://github.com/masagrator/XCXDE-ModLoader |source=https://gi..." |
No edit summary |
||
| Line 24: | Line 24: | ||
'''Note:''' This only works with the Western version of the game (not the Japanese one), and only with version 1.0.1 or 1.0.2 (Game ID: 0100453019AA8000). | '''Note:''' This only works with the Western version of the game (not the Japanese one), and only with version 1.0.1 or 1.0.2 (Game ID: 0100453019AA8000). | ||
== How to install == | == How to install == | ||
Revision as of 05:50, 18 May 2025
| Xenoblade Chronicles X: Definitive Edition Mod Loader | |
|---|---|
| General | |
| Type | Hack Utilities |
| Version | 1.2.1 |
| License | GPL-32.0 |
| Last Updated | 2025/05/11 |
| Links | |
| Download | |
| Website | |
| Source | |
Xenoblade Chronicles X: Definitive Edition Mod Loader is a special add-on (called a plugin) that lets the game load extra files from outside the normal game data.
It can also play music files from outside the main music file, without needing to change the settings that control how music loops.
Note: This only works with the Western version of the game (not the Japanese one), and only with version 1.0.1 or 1.0.2 (Game ID: 0100453019AA8000).
How to install
- Download latest release here.
- Copy
atmospherefolder to root of your sdcard
For emulators read guide specific to your emulator about how to install mods.
How to use
Copy your files in the same folder tree to
atmosphere/contents/0100453019AA8000/romfs/mod/
If any folder doesn't exist, create it manually.
So for example if you modified "lib_nx.ini" that is in "monolib/shader", whole path should look like this:
atmosphere/contents/0100453019AA8000/romfs/mod/monolib/shader/lib_nx.ini
How to modify sound files
First we need to unpack Music.pck. You can use this Python 3 script HERE
Download it to the same folder where you copied Music.pck (you can find it in romfs/sound folder)
Example of use in Command Prompt:
python pck_unpack_digits.py Music.pck
This will create new folder "Music" with BANKS and STREAMS folders. Look only for files in STREAMS folder. As we don't know what names are hidden under hashes used for .wem files, there is no easy way to determine which song is which. For discussion about this go here:
https://gbatemp.net/threads/xenoblade-x-replace-music.668397/
To create new audio file use this package made up for Windows: REPOSITORY DOWNLOAD
Drop standard .wav file (format s16le) on "DROP_HERE.cmd" if you want it to be played in loop from start to finish, or "DROP_HERE_CUSTOM_LOOP.cmd" if you want to modify where new loop should start. Afaik there is no way to change loop end time that would stop playing previous loop immediately. You need to modify your audio file to end in the way that allows proper looping (the same way was done for game). Rename converted file to what file you want to replace, and put it to folder:
atmosphere/contents/0100453019AA8000/romfs/sound/
Technical details
For files from sts.ard/sts.arh: Plugin is hooking only one function that is responsible for preparing struct with info about file. When first time this function is called, code is iterating recursively through whole "mod" folder to hash its paths and store it in cache. Then that cache is used instead of checking if file exists every single time for better performance. In tests each fopen() call was taking around 500 ticks, cache in worst case situation (which is storing info about 100000+ files) takes averagely 13 ticks.
For Music.pck: Plugin is hooking two functions. One is reponsible for loading .wem files, we are setting flag to load it from romfs if such file exists in romfs/sound folder. Second hooked function is responsible for parsing HIRC "Music Track" type of data. Pointer we use to patch seems to be some virtual memory mapping into filtered bgm.bnk which stores only first 0x8000 bytes. That's why iterating through whole bank is not possible.
Changelog
v1.2.1
- Fix an issue with bgm.bnk not being properly patched in RAM.
v1.2.0
- Add support for loading .wem files outside of Music.pck, this includes automated patching of bgm.bnk to properly adjust loop. More in README.
v1.1.7
- Add support for update 1.0.2.
v1.1.6
- Implement bucket solution that makes searching cache 2x faster in comparison to 1.1.4 release.
v1.1.4
- Fixed an issue with cache related to count of files.
v1.1.3
- Added cache for better performance.
v1.0.2
- First Release.