Page 4 of 8

Re: Castlevania: Lords of Shadow

Posted: Sat Nov 02, 2013 9:59 am
by Panzah
Thank you very much, will test it now.
And actually it's the PS3 version demo, but PC is supposed to be released soon along with pre-order page for LoS2.
Also Lords of Shadow - Mirror of Fate HD is coming to PC later this year too.

Re: Castlevania: Lords of Shadow

Posted: Sat Nov 02, 2013 10:26 am
by Thief1987
Hm, for what version this script? Xbox version use chunk compression, zlibbed blocks - 64kb

Re: Castlevania: Lords of Shadow

Posted: Sat Nov 02, 2013 10:42 am
by Panzah
It's for PS3 version, as that's the one I requested it for and uploaded example files of.

Also, it doesn't seem to work quite right. All files that are extracted that are EXACTLY 64 KB are broken. Music files simply cut off at points they shouldn't, textures are inopenable and such.
Script needs revision.

Re: Castlevania: Lords of Shadow

Posted: Sun Nov 03, 2013 9:51 am
by Ekey
Well here updated script.

Code: Select all

# Seeing as Lords of Shadow 2 (PS3-DEMO) (PACKED format) 0.2
# 
# Written by Ekey (h4x0r)
# http://forum.xentax.com
# 
# script for QuickBMS http://quickbms.aluigi.org

comtype unzip_dynamic

idstring "BFPK"
get VERSION long

if VERSION = 256
    get FILES long
elseif VERSION = 258
    get TABLESIZE long
    get FILES long
endif

for i = 0 < FILES
    get NSIZE long
    getdstring NAME NSIZE
    get SIZE long
    get OFFSET long
    get NULL long
    savepos TEMP

    if VERSION = 256
        log NAME OFFSET SIZE
    elseif VERSION = 258
	
        goto OFFSET
        get FULLZSIZE long
        savepos CHUNKOFFSET
		
        log MEMORY_FILE 0 0
        append
        set TEMPZSIZE long 0

        #Ugly part for decompress chunks :)

        do
            goto CHUNKOFFSET
            get CHUNKZSIZE long
            math TEMPZSIZE += CHUNKZSIZE
            math TEMPZSIZE += 4
            savepos OFFSET
            clog MEMORY_FILE OFFSET CHUNKZSIZE CHUNKZSIZE
            math CHUNKOFFSET += CHUNKZSIZE
            math CHUNKOFFSET += 4
        while TEMPZSIZE < FULLZSIZE
		
        append
        log NAME 0 SIZE MEMORY_FILE
        goto TEMP
    endif
next i

Re: Castlevania: Lords of Shadow

Posted: Sun Nov 03, 2013 12:13 pm
by Panzah
This one seems to work perfectly, much appreciated. Hopefully it will work on the final build of the game too.

Re: Castlevania: Lords of Shadow

Posted: Sun Nov 03, 2013 7:44 pm
by Ekey
Panzah wrote:This one seems to work perfectly, much appreciated. Hopefully it will work on the final build of the game too.
I do not think that anything will change in final release.

Re: Castlevania: Lords of Shadow

Posted: Thu Nov 07, 2013 7:41 am
by cienislaw
PC version probably wont use compressed chunks, most likely it will be the same format as for CLoS1. anyway, kudos Ekey, you make life of many ppl much easier;-)

scripts also works with X360 demo of CLos2.

Re: Castlevania: Lords of Shadow

Posted: Sat Jan 11, 2014 5:46 pm
by McGregor II
Hey, I tried to reimport the Castlevania 1 files but it gives me error: wrong cammand-line argument (castlevania.txt) - that's how I named the script file. Here's my input in command-line: quickbms.exe -w -r Castlevania.txt (or bms I tried it too) Data00.dat folder_path\Data00\

Re: Castlevania: Lords of Shadow

Posted: Sat Feb 01, 2014 10:52 pm
by cienislaw
I take back what I said about PC version;-) C2 will have open world with no loading screens, so 64kb chunks makes now more sense. can't wait to see what they did!

Re: Castlevania: Lords of Shadow

Posted: Tue Feb 11, 2014 8:58 pm
by cienislaw
PC demo of C2 is out. data is in .packed archives which has one difference from a aluigi script - extra 4 nulls after each file entry in table. sadly texts are not final retail and DLC lang file in english is missing too. format didn't change, so get ready for translation.

Re: Castlevania: Lords of Shadow

Posted: Sun Feb 16, 2014 5:18 pm
by Haoose
For PC:

Code: Select all

idstring BFPK
get version long
get files long
savepos TMP
for i = 0 < files
#goto TMP
get NSIZE long
getdstring name NSIZE
get size long
get offset long
savepos TMP
goto offset
get zsize long
savepos OFFSET
if zsize == size
log name offset zsize
else
clog name offset zsize size
endif
goto TMP
get dummy long
next i

Re: Castlevania: Lords of Shadow

Posted: Wed Feb 26, 2014 4:06 pm
by Isilfor
Ekey wrote:Well here updated script.

Code: Select all

# Seeing as Lords of Shadow 2 (PS3-DEMO) (PACKED format) 0.2
# 
# Written by Ekey (h4x0r)
# http://forum.xentax.com
# 
# script for QuickBMS http://quickbms.aluigi.org

comtype unzip_dynamic

idstring "BFPK"
get VERSION long

if VERSION = 256
    get FILES long
elseif VERSION = 258
    get TABLESIZE long
    get FILES long
endif

for i = 0 < FILES
    get NSIZE long
    getdstring NAME NSIZE
    get SIZE long
    get OFFSET long
    get NULL long
    savepos TEMP

    if VERSION = 256
        log NAME OFFSET SIZE
    elseif VERSION = 258
	
        goto OFFSET
        get FULLZSIZE long
        savepos CHUNKOFFSET
		
        log MEMORY_FILE 0 0
        append
        set TEMPZSIZE long 0

        #Ugly part for decompress chunks :)

        do
            goto CHUNKOFFSET
            get CHUNKZSIZE long
            math TEMPZSIZE += CHUNKZSIZE
            math TEMPZSIZE += 4
            savepos OFFSET
            clog MEMORY_FILE OFFSET CHUNKZSIZE CHUNKZSIZE
            math CHUNKOFFSET += CHUNKZSIZE
            math CHUNKOFFSET += 4
        while TEMPZSIZE < FULLZSIZE
		
        append
        log NAME 0 SIZE MEMORY_FILE
        goto TEMP
    endif
next i
This script works for full PC version of Castlevania - Lords of Shadow 2.
Except 4,1 Gb file Data00.packed.
Error: "memory allocation problem Not enough storage is available to process this command/"
- error is src\xalloc.h line 600^ xdbg_malloc()

Re: Castlevania: Lords of Shadow

Posted: Thu Feb 27, 2014 12:44 am
by Haoose
Isilfor wrote: This script works for full PC version of Castlevania - Lords of Shadow 2.
Except 4,1 Gb file Data00.packed.
Haoose wrote:For PC:

Code: Select all

idstring BFPK
get version long
get files long
savepos TMP
for i = 0 < files
#goto TMP
get NSIZE long
getdstring name NSIZE
get size long
get offset long
savepos TMP
goto offset
get zsize long
savepos OFFSET
if zsize == size
log name offset zsize
else
clog name offset zsize size
endif
goto TMP
get dummy long
next i

Re: Castlevania: Lords of Shadow

Posted: Thu Feb 27, 2014 1:29 am
by Savage
Tried the last bms for Pc with the big file Data00.packed (4,120Gb's) using quickbms_4gb_files last version i get:
0000000000019ba8 524416 2d/loading/book/i_menu_sw_relics_01-b.dds
Error: the compressed zlib/deflate input is wrong or incomplete (-3)

Error: there is an error with the decompression
the returned output size is negative (-1)

Re: Castlevania: Lords of Shadow

Posted: Thu Feb 27, 2014 2:16 am
by zardalu
Thanks Ekey, Haoose for the updated scripts, I was able to get them working for Data00.packed by using quickbms_4gb_files.exe.

I see the high res detail textures in the 1 GB content\0\Data00.packed archive, but I haven't been able to locate the high res normal maps... can anyone confirm if they exist?