AnonBaiter's Script Compendium

Do you know a tool, link or website for working on a specific game files or to help game research? Let's collect them here!
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

AnonBaiter's Script Compendium

Post by AnonBaiter »

Here goes nothing.

Multi-platform/miscellaneous:
Rockstar Renderware scripts(.DIR/.IMG or just .IMG)
Metal Gear Solid/Kojima Productions - .bms collection
The Crystal Dynamics quickBMS Collection

And in any case you receive an error in one of my scripts you've downloaded on this thread, contact me by PM. By doing so, you must show in detail what is causing the error in the first place, and if possible, include the file* the error has been triggering. I'll look into it.
* I advise you to upload the file on a filehoster that doesn't require an account.

EDIT: Due to the 9-URL limit, this thread has now one section.

EDIT2: Okay, so it's time to explain how I handle the updates on this board. Suppose I can do an update about some script here and there, and go to the respective post about said script so I can edit said post to replace what's currently in the attachment with a new attachment. Then I write a "detailed" description of what changed in that new, replaced attachment and after that I'm done editing that post. If you suddenly see "Not downloaded yet" out of what was an already-downloaded file, do not mistake this for a bug. That means a new version of that script has been uploaded. This is to avoid useless bumping among the effects of "hey the script has been updated with a new version with this and that feature".

With that said, I hope I was able to clear out some confusion.
Last edited by AnonBaiter on Mon Sep 25, 2017 12:23 am, edited 21 times in total.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: AnonBaiter's Script Compendium

Post by AnonBaiter »

Rockstar Renderware scripts

I made two separate scripts, meant to work with two separate files with different structures. I advise you to read the included .txt file because it has whatever you need to know before using these two scripts.

What the .txt forgot to state is that there's an function I commented around somewhere in these two scripts. Not that it's necessary for you to enable that function but even that isn't necessary since the developers copy-pasted these files on the PS2 version of their games just to fill out the space.

Another one is that the .txd/.dff files inside the GTA3.IMG archive on the XBOX version of both games(GTAIII, GTAVC) are compressed using some sort of lzo1x algorithm variant(lxo1x-999). If anyone has a solution to decompress these files, I'm open to any suggestion you have to offer.
Last edited by AnonBaiter on Thu Aug 25, 2016 6:47 pm, edited 1 time in total.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: AnonBaiter's Script Compendium

Post by AnonBaiter »

Tomb Raider: Legend - NDS .pak

That file was quite easy to work with, since I'm still just a beginner on the field and stuff...
Keep in mind that it only works for the NDS version. It might work for the games developed by Human Soft, but none are tested so far.
So in case you find a Human Soft game that uses a similar file format then contact me in private.

(it might have a similar structure with plenty of other games out there... in any case, I'll post them either way)
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: AnonBaiter's Script Compendium

Post by AnonBaiter »

METIN - .tar

It's the exact same script, just written for a MMORPG game. As of quickBMS' latest version, it can also extract non-english filenames.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: AnonBaiter's Script Compendium

Post by AnonBaiter »

Metal Gear Solid/Kojima Productions - .bms collection

so far this collection includes
mgs1_dat.bms - Metal Gear Solid(all PS1 releases only)
mgs2_dat.bms - Metal Gear Solid 2(all PS2 and Xbox releases only), ANUBIS Zone of the Enders/Zone of the Enders The 2nd Runner(all PS2 releases only), Metal Gear Solid 3(all PS2 releases only), Metal Gear Solid 4(all PS3 releases only)
mgs2_substance_xbox.bms - Metal Gear Solid 2 Substance(Xbox version only)
module_ipk.bms - Metal Gear Solid 2(all PS2 releases only), ANUBIS Zone of the Enders/Zone of the Enders The 2nd Runner(all PS2 releases only), Metal Gear Solid 3(all PS2 releases only)

mgs2_dat.bms is barebones as a script however so be careful in case you decide to use it
Last edited by AnonBaiter on Sat Sep 01, 2018 5:17 pm, edited 43 times in total.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: AnonBaiter's Script Compendium

Post by AnonBaiter »

[OBSOLETE] SDX1/SDX2 converter

Exactly what it says in the title. Only tested on Gravity Rush, so I don't know about the other games that use this format.

UPDATE(16/10/2016): The script got a new update. Changes include the refinement of AT9 header to aim accuracy over what an encoded 192kbps .at9 file would look like. See here:
Encoded .at9 file(no loops)

Code: Select all

00000000  52 49 46 46 5C B0 09 00 57 41 56 45 66 6D 74 20  RIFF\°..WAVEfmt 
00000010  34 00 00 00 FE FF 02 00 80 BB 00 00 C0 5D 00 00  4...þÿ..€»..À]..
00000020  00 02 00 00 22 00 00 04 03 00 00 00 D2 42 E1 47  ....".......ÒBáG
00000030  BA 36 8D 4D 88 FC 61 65 4F 8C 83 6C 01 00 00 00  º6.MˆüaeOŒƒl....
00000040  FE 74 0F F0 00 00 00 00 66 61 63 74 0C 00 00 00  þt.ð....fact....
00000050  C2 5C 13 00 00 01 00 00 00 01 00 00 64 61 74 61  Â\..........data
00000060  00 B0 09 00 37 56 5F 40 98 15 73 39 32 A8 B9 64  .°..7V_@˜.s92¨¹d
To achieve that, I've made several tests with .at9 stereo encoding. Then I compared the encoded .at9 files to the .at9 files the script generated before this revision - it also involved comparing what I had of .at9 files from other games as well. That is the reason why I made this update in the first place.

In case the .sxd1/.sxd2 gets used in a game with another codec(such as anything other than 0x42), let me know.

UPDATE(12/11/2017): The script has gone through a minor fix regarding some Soul Sacrifice music file. Thanks goes to zhichuner for providing even a single sample.
Last edited by AnonBaiter on Fri Jan 05, 2018 2:58 pm, edited 7 times in total.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: AnonBaiter's Script Compendium

Post by AnonBaiter »

[OBSOLETE] DOOM (2016) - .mega2
Last edited by AnonBaiter on Thu May 11, 2017 6:50 pm, edited 3 times in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: AnonBaiter's Script Compendium

Post by aluigi »

As far as I remember the bms extension is accepted in the attachments, just in case you want to attach the scripts without compressing them.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: AnonBaiter's Script Compendium

Post by AnonBaiter »

Ahh, I never knew that the attachment could support something beyond just the .zip/.rar extensions.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: AnonBaiter's Script Compendium

Post by AnonBaiter »

The Crystal Dynamics quickBMS Collection

There ya' have it, the .bms collection we've all been waitin' for!

"Are there any more games to play?"

UPDATE(13/12/2016): A modified script of tomb_raider_legend.bms(thanks goes to aluigi for the script) was added to the pack(it's now crystaldynamics_type000.bms). It has been tested through almost all versions(barring PS3 and PC) of the entirety of Crystal Dynamics' first reboot(Legend, Anniversary and Underworld).
UPDATE(20/12/2016): crystaldynamics_type000.bms is now renamed back to tomb_raider_legend.bms. This move was made to show respect for the original script author(aluigi).
UPDATE(25-26/06/2017): The pack has been given an *SPAM*: new scripts were written for Crystal Dynamics games until they entered the sixth generation(which will be covered at a later update), also a few existing ones within the pack were revised. Not included however are the scripts for the .PKG archives since they were made by Toys for Bob, whose games were also published by Crystal Dynamics. The pack has also been organized, with all of the scripts included being given proper filenames(cdat##_[gamename].bms) except for tomb_raider_legend.bms.
Last edited by AnonBaiter on Mon Jun 26, 2017 3:16 am, edited 10 times in total.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: AnonBaiter's Script Compendium

Post by AnonBaiter »

Forza Motorsport - UIMusic.wmapack

This script was originally designed for the archive that is stored in the Xbox-exclusive Forza Motorsport only. Unless you manage to find an .wmapack file that is used in another game, that is.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: AnonBaiter's Script Compendium

Post by AnonBaiter »

func_header_AT9.bms

Well, I've been inspired by AlphaTwentyThree's scripts so...
Basically, this script serves as a guide for adding headerless AT9 data through two functions. Provided it has the variables to call it, that is.

Here is a example(non-looped):

Code: Select all

include "func_header_AT9.bms"

set FREQUENCY 48000
set CHANNELS 2
set OFFSET 0
set BITRATE 192

get SIZE asize
math RSIZE = SIZE
xmath TOTALSAMPLES "SIZE * FREQUENCY / CHANNELS / 60"
putarray 0 i TOTALSAMPLES
math SIZE -= OFFSET
callfunction AT9 1
So far this script only supports bitrates through 192, but later on I'll work on adding support to later bitrates(up to 504) as well as up to 8 channels if possible.

UPDATE(04/12/2016): This script can now support looping. A new function was added to reflect this.
UPDATE(13/12/2016): The RSIZE variable is now required for calling.
Last edited by AnonBaiter on Mon Jan 16, 2017 9:02 pm, edited 8 times in total.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: AnonBaiter's Script Compendium

Post by AnonBaiter »

Tomb Raider Legend (Xbox 360) - .mul->.xma

This was mostly based off AlphaTwentyThree's two scripts which handles the .mul files(based on their different structures) stored in the Xbox 360 version of Deus Ex Human Revolution. Except this script can handle all .mul files within one script, even up to 8 channels. It can also work with other Xbox 360 games that were developed by Crystal Dynamics.

UPDATE(06/12/2016): A new [but minor] update to the script was made. Said update includes an naming condition if the .mul file it's about to convert contains one channel(therefore ########.mul is converted to XMA as ########.xma instead of ########_1.xma). Although for files that contains 2+ channels, the naming process is the same(########_1.xma and ########_2.xma for 2-channel .mul files and so on).
UPDATE(12/02/2017): Due to vgmstream`s XMA1/XMA2 support, xma_test/xma_parse is no longer a dependency. As far as the audio goes, the difference between an output .xma file from the previous update to this update is minimal.
Last edited by AnonBaiter on Mon Feb 13, 2017 5:57 am, edited 11 times in total.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: AnonBaiter's Script Compendium

Post by AnonBaiter »

Crystal Dynamics .mul sorter

This script is designed for use in .mul files(or EMFF as vgmstream used to call it) used by Crystal Dynamics(although one of their games might use different engines, as is the case of Mad Dash Racing, Blood Omen 2, Whiplash and Project Snowblind - as a result, the format used in these games tend to differ) from the sixth-generation era and beyond.
Last edited by AnonBaiter on Thu Jan 19, 2017 10:53 pm, edited 2 times in total.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: AnonBaiter's Script Compendium

Post by AnonBaiter »

func_header_AT3.bms/func_header_AT3plus.bms

Look, I know this name is similar to the one used in one of AlphaTwentyThree's scripts. The only difference, however, is that there are now two functions: one for non-looped files, and one for looped files. There's also a AT3plus header script as well!
It serves the same purpose as func_header_AT9.bms. It only needs the variables to call it.

Here is an example(non-looped):

Code: Select all

include "func_header_AT3.bms"

set FREQUENCY 44100
set CHANNELS 2
set OFFSET 0
set BITRATE 132

get SIZE asize
math SIZE -= OFFSET
callfunction AT3 1
UPDATE(12/12/2016): Fixed an bug in which func_header_AT3plus.bms would stop working.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: AnonBaiter's Script Compendium

Post by AnonBaiter »

[ALMOST-IRRELEVANT] Metal Gear Solid HD Collection (Vita) - .9tav->.at9

The first of many scripts to depend on the func_header_AT9.bms script. These files are stored within .sdt files, which can be demuxed with sdt_demux.py(written by Nisto). You can find it here.
Do keep in mind though that this works only with "mgs2" files. I haven't found a way to work with "mgs3" .9tav files yet, but for some of these files(without the MTAF header) they should "work" with the script.

UPDATE(17/12/2016): The script sees the addition of DUMMY6 and DUMMY7 variables, and it assigns the BITRATE and CHANNELS variables for the function depending on the value. An message will be shown when the .9tav file in question has a different DUMMY6 and DUMMY7 value from the ones assigned.
Last edited by AnonBaiter on Mon Sep 25, 2017 12:25 am, edited 2 times in total.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: AnonBaiter's Script Compendium

Post by AnonBaiter »

[ALMOST-IRRELEVANT] Metal Gear Solid HD Collection (PS3) - .msf->.genh

This .msf format was used in... you guessed it, Metal Gear Solid HD Collection.
Anyway, this .msf format uses an ADPCM codec which is signed as 0x1 despite being reserved for 16-bit PCM codec audio... or maybe I'm wrong.
Sorry if the converted output file is a few samples ahead.
Last edited by AnonBaiter on Mon Sep 25, 2017 12:26 am, edited 1 time in total.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: AnonBaiter's Script Compendium

Post by AnonBaiter »

GENH extractor
Last edited by AnonBaiter on Sat Apr 01, 2017 3:35 am, edited 1 time in total.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: AnonBaiter's Script Compendium

Post by AnonBaiter »

[OBSOLETE] Redump multi-track .bin audio tracks - RIFF header adder

If you're stuck by odd formats Redump uses for their releases, you can just use vgmtoolbox(Misc. Tools -> Extraction Tools -> Generic -> ISO/Archive Extractor then drag the .cue/.gdi file - hoping the tool doesn't crash just by reading these files anyway).
However, if vgmtoolbox can't extract Redbook Audio, then this script can do what vgmtoolbox can't!

About the script, all it does is add RIFF headers on Redump's .bin audio files as .wav files for playback on all players.

IsoBuster can also handle Redbook Audio, but consider this as an alternative in case your Redump ISO doesn't work with it.
Last edited by AnonBaiter on Thu May 11, 2017 6:51 pm, edited 2 times in total.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: AnonBaiter's Script Compendium

Post by AnonBaiter »

Okay, so I finally got a new computer. It includes Linux(Debian, version Wheezy) as its installed OS, but if I want to keep writing BMS scripts for yet "unexplored" formats I'll use VirtualBox.
It's going to take a while though, as WIndows XP does not detect the external HDD from the USB, and I'll have to get through more ISOs from various Windows systems.

I just wanted to say I haven't given up on it yet!