Paradise Lost *.DAT (Need little help with BMS script)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
StreamThread
Posts: 54
Joined: Fri May 27, 2016 2:28 pm

Paradise Lost *.DAT (Need little help with BMS script)

Post by StreamThread »

Hello

Paradise Lost it is Based PC Arcade Machine port of Far Cry Instincts game from XBOX.
All game archives structure is same as in Far Cry Instincts. But this port also include non game used *.NFO files, in which can found full filenames by Hashes:
Image

I'm try to modify unpack BMS script for using these filenames in unpacking.
But extracting only first file from archive:
Image

Code: Select all

Open FDDE FAT 1 
Open FDDE NFO 2
GetDString MW 4 1
Get FN Long 1
For i = 0 < FN
Get Off Long 1
Get Size Long 1
Get Hash Long 1
SavePos CP 1
FindLoc NP Long Hash 2
GoTo NP 2
Get NPO Long 2
Get FName String 2
Log FName Off Size 0 0
GoTo CP 1
Next i


I'm first time use Quick BMS. You can say where I make error?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Paradise Lost *.DAT (Need little help with BMS script)

Post by aluigi »

It's better if you provide the whole nfo file and at least the first 2 megabytes of the dat one (you can use the filecutter script to create the small file).
StreamThread
Posts: 54
Joined: Fri May 27, 2016 2:28 pm

Re: Paradise Lost *.DAT (Need little help with BMS script)

Post by StreamThread »

Ok, i'm upload a full weaponpack.dat with FAT and NFO files: http://www.mediafire.com/download/pw99a ... ponPack.7z

My modified script work with all archives and correctly export first file from any archive, as can see on previous screen. I'm still not understand where my error. I'm try with "While Do" construction instead "For" and it's same export only first file.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Paradise Lost *.DAT (Need little help with BMS script)

Post by aluigi »

StreamThread
Posts: 54
Joined: Fri May 27, 2016 2:28 pm

Re: Paradise Lost *.DAT (Need little help with BMS script)

Post by StreamThread »

Thanks.

Well, now what about supporting extraction with filenames from main Instincts, evolution, vengeance games? :)
These games not have NFO files, but filenames can been found in XML files from DAT in this structure:

Code: Select all

<Mesh Name="objects_xbox\_generic_objects\exterior\barrels\barrels_oil01.xbg" CRC="2266845554">
        <File Name="objects_xbox\_generic_objects\exterior\barrels\barrel_rusty_01-00_df.xbt" CRC="2204547476" Type="1" />
        <File Name="objects_xbox\_generic_objects\exterior\barrels\barrel_nt.xbt" CRC="1278899709" Type="1" />
        <File Name="objects_xbox\_generic_objects\exterior\barrels\barrel_bottom_clean_df.xbt" CRC="2689316887" Type="1" />
        <File Name="objects_xbox\_generic_objects\exterior\barrels\barrel_clean_top_df.xbt" CRC="2929818829" Type="1" />
        <File Name="objects_xbox\_generic_objects\exterior\barrels\barrel_top_nt.xbt" CRC="1685118698" Type="1" />
    </Mesh>


Is possible to use these CRC info's for getting filenames? Personally I have no luck with it. But while I do not have more experience in this.


Of course, in dreams, support of Far Cry Instincts Predator archives will be best =)
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Paradise Lost *.DAT (Need little help with BMS script)

Post by aluigi »

That's not part of the format.
That one is one of the N files inside the archive.
You can only rely on the information coming from the format and not on random files in it.
StreamThread
Posts: 54
Joined: Fri May 27, 2016 2:28 pm

Re: Paradise Lost *.DAT (Need little help with BMS script)

Post by StreamThread »

I got it)
My working script for Far Cry Instincts Predator

Code: Select all

Open FDDE FAT 1 
GetDString MW 4 1
Get FN Long 1
comtype lzma86dechead
For T = 1 To FN
Get Off Long 1
Get ZSIZE Long 1
Get SIZE Long 1
Get Hash Long 1
if Size != ZSIZE
clog "" Off ZSIZE SIZE 0
else
log "" off SIZE 0 0
endif
Next T



aluigi, you can update your main FAT2_FAT3 script using logic from my script.
Structure of FCIP FAT files have little differences: 16 bytes per file instead 12 bytes like in XBOX Far Cry Instincts. Same 3 longs for Offset, Size, CRC and additional long for compressed size.
In DAT archives some files have lzma compression, some uncompressed.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Paradise Lost *.DAT (Need little help with BMS script)

Post by aluigi »

I'm a bit confused, wasn't my script already compatible with the sample you provided?
StreamThread
Posts: 54
Joined: Fri May 27, 2016 2:28 pm

Re: Paradise Lost *.DAT (Need little help with BMS script)

Post by StreamThread »

aluigi wrote:I'm a bit confused, wasn't my script already compatible with the sample you provided?


Emm..

On this topic I provide samples only from Paradise Lost game, which identical with Far Cry instincts, Evolutions, Vengeance. Your script is compatible with all of them.
But not with Instincts Predator, because structure is little changed. Because of this I offer update your script. Don't worry, my script is 100% working)
But if you guide by rule "trust but check", samples for Instincts Predator I provided in Far Cry Instincts Predator thread)
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Paradise Lost *.DAT (Need little help with BMS script)

Post by aluigi »

Yeah I need a sample because I have to instruct my script to recognize/guess the format :)