Jump to content

QuickBMS Script For Mortal Kombat 11


Thecurvenist

Recommended Posts

Hello Reshax community,

I'm new here, yet not entirelly outside of the extractors community. 🙂

I had a question and maybe a little request (or at least something that could help me find what i need). On Xentax forums, there was a topic regarding Mortal Kombat 11 and the process of game files extraction. I'm interested in retrieving the music / audio within the game files. I think i've spotted the .xxx files they should be in. Now there is a tool available to actually perform a scan and extract of sound files : Ravioli Game Extrator. However, the files it retrieves first hand from the .xxx package files are mostly corrupted.

So i assume it needs kind of a first level of decompression (or format changing) to actually be able to extract the files properly.

The music looks packaged into .fsb file format (fsb4 to be precise i've seen in HeX editor header). Yet those can't be extracted by the fsbext tool (0 files processed), and they're also completely sound broken (vgmstream on foobar2000 doesn't read it for instance)

By that time, Shokoniraya did a script that worked, however the link is no longer working, so the script is nowhere to be found as i speak. I'm sending you a capture as Xentax will soon be shut down 😕 . If anyone has whereabouts or hints that could help extracting the files again, i'm all listening.

I have too little knowledge regarding BMS scripts, i understand some of the writings, but the HeX editing and file compressing is not really my speciality (somehow, i'd like to know more about, that's really interesting to dig).

Thank you in advance for any tips or directions 🙂

image.png.8aa6db7117eb89c1e70b3ebfc998cc9c.png

Link to comment
Share on other sites

Hi!

Thank's for the quick reply 🙂

I've seen that solution passing by in my searchs, yet i thought as last resort ^^ . If i uderstand correctly :

1. I need to clone his master

2. Build the C++ project locally with a compiler to make an .exe

3. I'd assume i need to pull the xxx files into the exe to make the decompression work (or create a batch with commands).

Anyway, i'll try that solution and tell if i'm making progress 🙂

Link to comment
Share on other sites

Yeah... Seems like "fun" to build lol...

Never liked just source releases... Makes some sense in Linux world I suppose, but the guy seems to be using Windows primarily from what he wrote there... And has 0 make system set up... Like better than nothing but still pains to see :classic_sad:

Think you need to use Windows OS, have MinGW-w64 or MSYS2 installed, install GCC according to what he wrote, and pray everything compiles correctly 😕 

Didn't found anything else useful so I guess its either try to do that or try to use the header information from the readme to make some new BMS script, as I was also unable to locate it :classic_sad:

Link to comment
Share on other sites

No problem 🙂 i'm trying the solution right now to see where it goes. Fortunately, i used VScode for past projects but i never really dug C++ writing / architecture. Anyway, if i find anything working out (not only decompress, but being able to use the files in the end), i'll post some extra informations for people who might be interested in the same search.

 

Edit : This isn't easy, it seems like there are holes in the explanations he gave that time (i can understand), but intellisense is deprecated now on VScode, it seems like the unasigned int variables need the <stdint.h> library (wich was not implemented), then there are incomplete implemented classes. Maybe it worked with a previous version but it seems broken now. And as for the task.json and adding headers. Clearly, it's addressed to people knowing the C++ architecture and command lines because i'm kinda lost (i don't know the semantic well or how the project works out). So i'm just leaving it aside for now. Still, i'm letting the subject open if any people has insights or I find courage to actually dig technically into the project. And if so : it should be a great thing to share the .exe for anyone interested.

 

Edit2 : Precision The files i'm looking for are not in .psf. Most of the .psf files contains extra assets, mostly related to characters. The stage musics should be stored in the file types : BGND_[stageName].xxxx 🙂

 

Edit3 : When i'll get some extra time (not now^^), i'll try to push my luck with the C++ source code. If i success into something, i'll keep you posted and post both :

1. The .exe file

2. Some extra documentation on how i made it working

So the next person interested in retrieving the packages can quickly access the information. That's the least i can do 🙂

Edited by Thecurvenist
Link to comment
Share on other sites

  • 1 month later...

Hello Community!

I'm back on this post! Because i am currently on the working phase of data extractions from MK11. I have both a good new and a less good new XD

First : incredible, i succeeded in creating the .exe file with the compiler, GCC, C++... so i made the MK11PackageExtractor.exe! Yet, I Had to make some extra little modifications in the files headers because i got compilation errors (just a quick notice, i only have the "helloworld" knowledge for C++ xD, now I understand how code works, but my level is full newbie when it comes to this kind of langage 😄)

♦️So here's the part where i'm actually less successful, the program doesn't read the signature of the .xxx files, I am trying to inject some log to know what's inside the "mk11_obj.info.compression_flag", because there are 2 possibilities of flag : Oodle or Zlib... (edit after checking logs, i now think things are little more complicated, not to worry though, i'll try to find a way to make this work) xxx files are 64 compression flag while Oodle and Zlib are flagged as 1 and 256. Maybe i'm using the software the wrong way too.

🟩Those are still good news overall because i can now work the code when the .exe fails. 🙂

So I keep digging, if i succeed into anything, i'll inform you here and give the details on how i made the program work. (And maybe the version of the .exe for practical use), who knows?

Keeping tabs!

Edited by Thecurvenist
Link to comment
Share on other sites

Hello Community!

So, after a good sleep, i think i now have solved... the problem! YEAH 🥳🎊

I succeedeed in extracting what's inside the .xxx packages!! not say victory too early though... I still have a path ahead before finding where the musics are... but things are going pretty well. 🙂 It's good omen to see progress!

🟩So, i consider making an extra post to give some documentations (and also the .exe file itselft with the latest version) on how to make his dev environment work and make the .exe file. Yes, you may have to do some extra little modifications! AND, something the author doesn't say, you still need the ooddle .dll (i'll give you everything a bit later, promise!) and force (inside the code) the flag to make the xxx signature flag : 64, use ooddle's dll to make the extraction process working. Everything is then processed and then put into a folder named "output". If you went that far, it won't be complicated to understand the rest.

🟦Ok, the more i dig, the more i uncover. So i may have new informations. First, i was able to find some musics, one in SND_SHELL_MUS_MainTheme.xxx for instance (yup that's the main theme in the menu) and no sound issue, everything's perfect on the sound sampling. Second, i do have now an important information : for a 4 minutes long music, the file is only 6mb... I assume then that the musics have been encoded in a small format (the .wem is close to an .mp3 size). wich is an important indication for the rest of the music. I can search for smaller bundles to track down the music. That's going to take some time but i'm going somewhere 🙂

♦️Oh no... now i got it... ofc yeah , the stage musics where stored in SND_Krypt_Extras.psf since the beginning... which BTW, don't need an .exe to extract them. xD It's not really what i wanted however because they belong to the Kollection tracks, and i'm interested in other cuts. That's still a good thing to know because i'm going to need them 🙂

Keeping tabs!

Edited by Thecurvenist
new informations 🟦♦️
Link to comment
Share on other sites

Hello Community!

So all great news! I finally got my hands on what i was looking for, great sampling, i'm so glad! The funniest part, there was no need to use the .exe for what i was looking for actually 😃🤣... i'll explain later! So because i do have a priority on audio work, i'm going to make my edits in the first place. However, i'll come back here to give you everything you need to perform the extraction and the .exe (with the most recent update) along the way. But still, some sounds are staged and locked behind the xxx files, so i'm going to deliver everything you need to work freely on the files!

The .exe was the last resort i said... actually, it was really useless xD, the things were right under my dumb nose! You know, it's like forgetting the ";" at line 648 on 1300 when you're coding, the same exact feeling... I swear 🤣

🟩I'll try to prepare everything within the week after this one →🟨 x). Still not finished with my HQ edits ^^

→ Sending the .exe and the required files (for the people who don't want to scratch their head like i did xD)

→ Sending a readme and a fork on my github on how to configure the dev environment (giving some details about task.json...) (for the people want want to dig in a little more... but then again, i'm no veteran dev at all regarding C++ and any other langage, i just know how to tinker some stuff 🙂 )

Edited by Thecurvenist
Link to comment
Share on other sites

  • 3 weeks later...

Hello Everyone!

So i'm back, i'm taking some time to explain the way i made things working. Who knows, it may give some insights? So let's begin (I'll try to update a bit this post to make a cleaner tutorial. first, i'm giving the .rar with the updated .exe and extra files to make things running the easy way, i'll update a bit later my git to create a fork of the original source code)

So... let's begin!

___

➡️The Easy Path :

1. Download the MK11PackageExtractor.rar

2. Extract the content in your MK11 folder (from steam, whatever, it's just the base : DriverLetter:\yourpathtothegame\Mortal Kombat 11\

3. ⬇️

➡️Drag your .xxx files out of assets folder (the ones you want) - copy them... it's better for your game can still run XD - and drop them at the same level of your MK11PackageExtractor.exe. 

➡️Clic on decompress.bat and you can check the extraction in the created "output" folder with your "NameOfExtractedPackage". (It's a loop fetching your .xxx files)

(careful, it only works for XXX files, though the source code implemented the feature, I don't know why PSF isn't working. But it doesn't matter because PSF are not compressed like .XXX so Ravioli Game Tools can do the job without problem)

4. In "NameOfExtractedPackage", you may find a ".upk" at its base. There, you can use Ravioli Game Extractor to check the information within and perform a clean extraction of the files. Most of the time, the sound format is .wem, so unless you use vgstream in foobar2000, you'd have to convert the file to listen to the file.

____

➡️The Dev Path : (long term solution) - I haven't posted the things on github yet - so forget the part i'm giving my updated code, yet, i'm sharing what you need in order to perform the compiling

To get the code working, get your dev tool (i'm using VS Code - it's free).

1. Download Mingw64 - i think latest version - to get the compiler working

2. IntelliSense being deprecated, use the last version at disposal (the time i'm writing, it's C / C++)

2. Clone the original git (The one who belongs to thethiny), or mine if you want the modifications used to make the code working

3. 3 steps :

↪️You'll need to add libraries in some headers, cstdint for most, fstream for a few

↪️in MK11file.h, i added the XXX hex code to focus on XXX files 

            PFS   = 0x0008u,

           🆙 XXX   = 0x0040u,

            OODLE = 0x0100u

↪️In extract.cpp, modify the algorithm so the compression flag for .xxx files can ALSO be applied while using oodle.

Why? Because otherwise, .xxx files can't be checked with oodle compression, in other words : it won't work and you'll get an error. With so little documentation, i had to fetch things by myself, it's all because of an hex code for .xxx files not being taken into account, that's strange when you think of it because the original program should check the .xxx files 😄

⏹️4. I added a quick text log to MK11file.cpp to compare file informations in ::validate_header

5. In Tasks.json, you'll need to help setting up the compiler path to create the file. I'm really not an expert in this part so i'm just focusing on MK11PackageExtrator.exe (or rename the file if you like) - This is the part most would prefer my task.json if you want a faster working thing.

Here is maybe the most important part :
 

"tasks": [
        {
            "type": "shell",
            "label": "C/C++: g++.exe build active file",
            "command": "Driver:\\pathtomingw64\\msys64\\ucrt64\\bin\\g++.exe", //replace Driver:\\pathtomingw64 with your folder to mingw64
            "args": [
                "-g",
                "${workspaceFolder}/src/extract.cpp",
                "${workspaceFolder}/src/implementations/*.cpp",
                "-o",
                "MK11PackageExtractor.exe",
                "-std=c++11",
                "-I",
                "${workspaceFolder}/src/headers"
            ],
            "options": {
                "cwd": "${workspaceFolder}"
            },
            "problemMatcher": [
                "$gcc"
            ],
            "group": "build"
        },

6. Use g++, not gcc (there are errors of compilation in gcc)

7. for Visual Studio Code, the part if you want to get a faster compilation : Ctrl + Shift + B while targetting main.cpp

Once again, i'm a total newb in C++, i'm not even a senior developper, i just know how to thinker some stuff and that's it.

 

😄Oh and i forgot, the dev didn't add the required .dll for the .exe to work with .xxx, I had to fetch them but you're lucky, they're part of the .rar so you don't have to do the same i did🙂

 

Happy extracting! 😄

PS : i'm not english native speaker, forgive my bad way of explaining the technical stuff

🔲PS2 : Edit, because i like to manage several projects at the same time : Pushed a mod on Nexus for Mass Effect (i think i'll prefer hanging to less sites than too many, Nexus is a bit much above github), made new music extracts + edits, creating fly camera scripts... -. I still haven't pushed the code modifications on github for MK11 😅 I'll make a fork of the original code, then put all my modifications + a clean release when possible!

 

MK11PackageExtractor.rar

Edited by Thecurvenist
🔲* Added a PS2
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...