Metal Gear Solid/Kojima Productions - .bms collection
So far the "collection" consists of these* scripts: one for Metal Gear Solid(PS1 - both the original and Integral), and the rest for Metal Gear Solid 2 and beyond(now with just one script to rule them all - mgs2_dat.bms - plus a few extra scripts for specific archives such as CODEC.DAT). Both scripts are capable of dumping the data based on a hex-string. This "collection" will get updated over time when I get through more games that Kojima had worked on.
On another note, it was my idea to have the mgs2_dat.bms script to have the files being extracted with a .sdt extension. Also, archive files with the name STAGE are not supported on these scripts because of an unknown encryption algorithm applied to the header starting with Metal Gear Solid 2.*
The XBOX version contains a splitted version of data1 and data2 archive files. The script was originally going to handle the splitted files but nothing worked out in the end. Therefore, it is necessary to concatenate the splitted files into one before using the mgs2substance_xbox_concatenatedfilesonly.bms script.
For games that Hideo Kojima didn't actually get involved(a.k.a. his role in those games were along the lines of "Producer") but was developed using the same engine nevertheless:Zone of the Enders Z.O.E.
(included in the pack)ANUBIS ZONE OF THE ENDERS/Zone of the Enders: The 2nd Runner
- mgs2_dat.bms (included in the pack)Changes from v5 to beyond:
The mgs2_dat.bms script can now detect the end offset by the string "\xf0\x00\x00\x00\x10\x00\x00\x00"("\x00\x00\x00\xf0\x00\x00\x00\x10" on Metal Gear Solid The Twin Snakes, and "\xf0\x04\x00\x00\x00\x00" for just Metal Gear Solid), therefore making other scripts from the previous version look redundant. Because I deleted the .DAT files I used to work with while making the script, I need you to report your results with the mgs2_dat.bms script in this thread so that I can know if the extraction had been "succesful".
The mgs2_dat.bms script was adjusted so that it can extract .sdt files properly(it doesn't detect the end offset by the above string anymore; this was reflected by archives that were extracted with under 200% success, as a result there were a few files that started with odd offsets).
mgs_tts_dat.bms and mgs_dat.bms went through the same changes as above. Also, one new script(mgs2xbox_codec.bms) was added.
A new script(mgs_tts_codec.bms) was added, alongside one change not listed here.
A new script(mgspw_pdt.bms) was added. Said script has a function in which the extension is guessed from the sign of the file, and so far only one extension was found.
mgs_dat.bms has been rewritten as mgs1_dat.bms
. It now supports the "stage" archive(or to put it accurately, partial coverage of it), assigns the extensions to the extracted files of their respective archives, and notifies the user regarding other archives.
mgs1_dat.bms can now fully extract STAGE.DIR... as individual files.
Here are a few changes:
1. The handling of DEMO.DAT/VOX.DAT(MGS1) as well as anything that doesn`t contain actual archives that are DEMO.DAT/VOX.DAT/MOVIE.DAT(MGS2 and beyond) has been improved in both mgs1_dat.bms and mgs2_dat.bms scripts. No longer does sthe script depend on strings to be extracted, now it just finds the chunks through 32-bit values and then extracts them along with it. All of this has been done at the expense of speed.
2. A few unused things were added as well, alongside one that is functional but could use some more fleshing out.
- With that said, any suggestions on how to make both scripts faster because of the scripts of this new version is welcome.
mgs2_dat.bms can now handle Metal Gear Solid The Twin Snakes, not to mention the .dmo/.vox naming on MGS1 and .sdt naming on MGS2 has been adjusted to contain less bloaty numbers. Finally, the STAGE_EXTRACT function can now extract "stage.dat" folders as individual .stg2 files(my idea). This pack now contains only four scripts, the rest of which has either deemed unnecessary to include as time goes on or being considered for revision.
mgs2_dat.bms has been fixed to add support for the Demo version of Metal Gear Solid 2.
mgs2_dat.bms has been fixed again to streighten extracted .stg2 files(Metal Gear Solid The Twin Snakes).
mgs1_dat.bms and mgs2_dat.bms has now been revised. Simply put, the output file will now stop at the 0xf0 part. On previous versions, the script could not extract a file that didn't end at zero bytes so it had to extract another one along with it(Metal Gear Solid (France - Disc1) - DEMO.DAT). And last but not least, from this revision onward zone_of_the_enders.bms makes a comeback!
There was a "minor", yet impactful bug that could cause mgs1_dat.bms and mgs2_dat.bms to go on forever when extracting DEMO.DAT/VOX.DAT archives.
Okay, now the mgs1_dat.bms and mgs2_dat.bms scripts has been revised for real.