So I recently got the Made in Abyss game for the Switch. There is a lot about the game that I don't like and a lot I do, but the absolute worst of the do not likes has been solved thanks to some intrepid modders. Of course they're focused on the PC version and I'd like to bring over what I can to my Switch version. Luckily that particular mod works fine on the Switch. However, among the other things they have made mods for, there is a music mod that replaces game BGMs with music from the MiA soundtracks and this is incompatible for the silliest reason: the Switch version doesn't use the OGG Vorbis files that the PC version uses, but instead has a bunch of .opus files (they seem to be much smaller, so I guess it was so they could use much lower bitrates and get away with the quality not suffering quite as much since Opus is even better at bitrates below transparency than Vorbis.) To make matters worse, they aren't proper files. To begin with, they don't have a proper OGG container -- or at least don't seem to. I'm not sure if they even have proper headers at all because I see plaintext files with sample rate, total samples, and loop ranges listed out which they presumably shouldn't need (since they could have put loop tags in a proper Opus file as well.) However, I noticed also the first few bytes are the same across all the files:
Perhaps they are actually encrypted, but this doesn't really make sense for several reasons. 1. Anyone wanting to just grab the audio tracks via file rips could just grab the completely unprotected Vorbis files from the PC version. 2. It would mean they've applied an actual generic file encryption across the entire file which is insanely inefficient and messy when there are other formats that support audio block encryption that would be exponentially better to use here. 3. The entire team has had very little time and budget and it shows all across the game with virtually nothing actually being protected -- the actual PAK files themselves aren't encrypted (which makes it all the more insane if the Opus files are the only things that are... Like why would they not protect key game assets, but then protect this one thing you can easily just grab from the PC version?
The only thing I know for sure right now is that if I produce a proper Opus file with a proper container and all the game will not accept it. In fact, it clearly lacks any sanity checks because it outright crashed the entire Switch when I tried. I presume I could possibly produce headerless streams via ffmpeg, but I'm not 100% sure how (ffmpeg is such a pain to learn!) Presuming that's even what it wants...
The only thing I have that may be at all useful is the bottom of usoundnx.txt specifies that they are using "StreamPlayer" with the implication of the comment even being necessary that the PC version uses something else:
Perhaps they are actually encrypted, but this doesn't really make sense for several reasons. 1. Anyone wanting to just grab the audio tracks via file rips could just grab the completely unprotected Vorbis files from the PC version. 2. It would mean they've applied an actual generic file encryption across the entire file which is insanely inefficient and messy when there are other formats that support audio block encryption that would be exponentially better to use here. 3. The entire team has had very little time and budget and it shows all across the game with virtually nothing actually being protected -- the actual PAK files themselves aren't encrypted (which makes it all the more insane if the Opus files are the only things that are... Like why would they not protect key game assets, but then protect this one thing you can easily just grab from the PC version?
The only thing I know for sure right now is that if I produce a proper Opus file with a proper container and all the game will not accept it. In fact, it clearly lacks any sanity checks because it outright crashed the entire Switch when I tried. I presume I could possibly produce headerless streams via ffmpeg, but I'm not 100% sure how (ffmpeg is such a pain to learn!) Presuming that's even what it wants...
The only thing I have that may be at all useful is the bottom of usoundnx.txt specifies that they are using "StreamPlayer" with the implication of the comment even being necessary that the PC version uses something else:
Google Translate://ストリームプレイヤー
//※opusファイルを使用する場合に必要
// ストリームを使用するプレイヤーのIDを列挙する
streamplayer{
PLAYER_BGM
PLAYER_VOICE
}
Anyone have any thoughts on what it may take to be able to create replacement files?// stream player
//*Required when using opus files
// Enumerate the IDs of the players using the stream