Convert old MexScript to BMSScript ?

Doubts, help and support about QuickBMS and other game research tools
Tgames
Posts: 81
Joined: Mon Apr 01, 2019 10:49 am

Convert old MexScript to BMSScript ?

Post by Tgames »

Hi,

I would like to know if a tutorial or a converter exist to port old MexScript to BMS ?

I would like to port them myself to learn the BMS Scripts in order to make new scripts myself.

Like this MexScript :

Spider-Man PC PKR3 Files (The only Script who works with theses files, not the case of the BMScripts on the website).

Code: Select all

ImpType StandardTail;
Get MW Long 0;
SavePos TailOffOff 0;
Get TailOff Long 0;
GoTo TailOff 0;
Get U1 Long 0;
Get Folders Long 0;
Get Files Long 0;
SavePos FolderStart 0;
Set D Long Folders;
Math D *= 40;
Math D += FolderStart;
For T = 1 To Folders;
GoTo FolderStart 0;
GetDString FoN 32 0;
Get TPF Long 0;
Get CurFiles Long 0;
SavePos FolderStart 0;
GoTo D 0;
Set A Long 0 ;
Do ;
Math A += 1 ;
GetDString FiN 32 0;
Get U2 Long 0;
Get ComBool Long 0;
SavePos FOO 0;
Get FO Long 0;
SavePos USO 0;
Get USize Long 0;
SavePos CSO 0;
Get CSize Long 0;
Set Name String FoN;
String Name += FiN;
If ComBool < 2;
Log Name FO CSize FOO CSO ;
EndIf;
While A < CurFiles;
SavePos D 0;
Next T;


or even this one (Same, the Atlantis The Lost Tales BMSScript is broken, only this following MexScript works fine) :

Code: Select all

IDString 0 "BigFile 1.00" ;
SavePos S 0 ;
Math S += 4 ;
GoTo S 0 ;
Get FileNum Long 0 ;
Get DataSize Long 0 ;
Get DataStartL Long 0 ;
Get DataStartH Long 0 ;
For T = 1 to FileNum ;
Get StringSize Long 0 ;
Get U1 Long 0 ;
Get Size1 Long 0 ;
Get Size2 Long 0 ;
Get Size3 Long 0 ;
Get R1 Long 0 ;
Get ROff Long 0 ;
Get U2 Long 0 ;
GetDString FN StringSize 0 ;
Math ROff += DataStartL ;
Log FN ROff Size1 0 0 ;
Next T ;
Acewell
Posts: 706
Joined: Fri Aug 08, 2014 1:06 am

Re: Convert old MexScript to BMSScript ?

Post by Acewell »

this will replace that spider man script and will extract all files as opposed
to just uncompressed wav and bik files, at least from my tests. :)

Code: Select all

idstring "PKR3"
get INFO_OFF long
goto INFO_OFF
get UKN long
get NUM_FOLDERS long
get TOTAL_FILES long
savepos FOLDERSTART
math TMP = NUM_FOLDERS
math TMP * 40
math TMP + FOLDERSTART
for i = 0 < NUM_FOLDERS
    goto FOLDERSTART
    getdstring FOLDERNAME 0x20
    get TPF long
    get FILES long
    savepos FOLDERSTART
    goto TMP
    for j = 0 < FILES
        getdstring FNAME 0x20
        get UKN2 long
        get FLAG long
        get OFFSET long
        get SIZE long
        get ZSIZE long
        string NAME p "%s%s" FOLDERNAME FNAME
        if FLAG < 2
            log NAME OFFSET ZSIZE
        else
            clog NAME OFFSET ZSIZE SIZE
        endif
    next j
    savepos TMP
next i
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Convert old MexScript to BMSScript ?

Post by aluigi »

MexScript and BMS script are compatible, no need to edit them.

BMS simply makes the filenumber field optional and doesn't need the ';' delimiter.
Tgames
Posts: 81
Joined: Mon Apr 01, 2019 10:49 am

Re: Convert old MexScript to BMSScript ?

Post by Tgames »

Hi aLuigi.

Not the case here, theses 2 scripts doesn't work on QuickBMS ! QuickBMS extract 0% of archive.
But works fine on MultiEX Commander. MultiEX Commander extract 100% of the archive.

Why ? Maybe a bug on QuickBMS ?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Convert old MexScript to BMSScript ?

Post by aluigi »

Please upload the two sample files and I will check what's wrong.
Tgames
Posts: 81
Joined: Mon Apr 01, 2019 10:49 am

Re: Convert old MexScript to BMSScript ?

Post by Tgames »

Here is the Spider's PKR and Atlantis The Lost Tales BIG FILE ;)

https://we.tl/t-fz7Voki6S7
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Convert old MexScript to BMSScript ?

Post by aluigi »

In the first script the problem is the following line:

Code: Select all

Log Name FO CSize FOO CSO ;

which must be fixed with:

Code: Select all

Log Name FO CSize # FOO CSO ;

The reason is that quickbms doesn't need those two fields for reimporting the file and they collide with the syntax of the optional arguments.

All the multiex scripts on my website have these additional fields fixed.

Where did you find these scripts?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Convert old MexScript to BMSScript ?

Post by aluigi »

I don't see any problem with the second script.
Tgames
Posts: 81
Joined: Mon Apr 01, 2019 10:49 am

Re: Convert old MexScript to BMSScript ?

Post by Tgames »

Thanks for the fix for the first script aLuigi !
I found theses scripts on old Zenhax posts when searching for scripts.
Because you don't have working scripts for theses games on your website.

For the second script i talked about this one :

https://aluigi.altervista.org/bms/atlan ... _tales.bms

Who doesn't work and only the MexScript works fine.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Convert old MexScript to BMSScript ?

Post by aluigi »

It's a completely different format.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Convert old MexScript to BMSScript ?

Post by aluigi »

This is the correct script for that format:
http://aluigi.org/bms/zerozone.bms
Tgames
Posts: 81
Joined: Mon Apr 01, 2019 10:49 am

Re: Convert old MexScript to BMSScript ?

Post by Tgames »

Ah okay, because the BIGCD1.BIG i send you it's Atlantis The Lost Tales game ^^

So what format this script on your website extract ?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Convert old MexScript to BMSScript ?

Post by aluigi »

The reference topic was viewtopic.php?t=2192 but I think the original topic was https://forum.xentax.com/viewtopic.php?t=13999
Tgames
Posts: 81
Joined: Mon Apr 01, 2019 10:49 am

Re: Convert old MexScript to BMSScript ?

Post by Tgames »

Ahhhh okay for the Sega Saturn version !!

Good to know !

Do you have a Versailles 2 ( *.bf ) script ? It's written supported but i can't found anywhere the script on your website.

http://wiki.xentax.com/index.php/CyroBF
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Convert old MexScript to BMSScript ?

Post by aluigi »

If you have a sample file I can support it on the fly

P.S.: I have now added Sega Saturn in the title of the Atlantis script
Tgames
Posts: 81
Joined: Mon Apr 01, 2019 10:49 am

Re: Convert old MexScript to BMSScript ?

Post by Tgames »

aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Convert old MexScript to BMSScript ?

Post by aluigi »

Tgames
Posts: 81
Joined: Mon Apr 01, 2019 10:49 am

Re: Convert old MexScript to BMSScript ?

Post by Tgames »

Thanks aLuigi !

Do you know if .SPW and .SPR used in every Cryo Games are extractable by a BMS Script ?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Convert old MexScript to BMSScript ?

Post by aluigi »

I have only SPR in that archive and it's just data, I bet SPW is the same.
Tgames
Posts: 81
Joined: Mon Apr 01, 2019 10:49 am

Re: Convert old MexScript to BMSScript ?

Post by Tgames »

So they are not extractable ?

https://we.tl/t-h6XhkZ59Dg

Like i know thanks to your scripts and lot of researcher we have almost every files supported of Cryo Games, except SPR/SPW.