READ THE RULES: Click here

Follow us on Facebook: https://www.facebook.com/xentax/ :)

Castlevania: Lords of Shadow

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Post Reply
User avatar
chrrox
Moderator
Posts: 2552
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1284 times

Castlevania: Lords of Shadow

Post by chrrox » Tue Sep 28, 2010 10:36 am

This is a bms script to extract the assets of Castlevania: Lords of Shadow
I tested this on the ps3 files.

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
next i

Last edited by chrrox on Tue Oct 05, 2010 3:16 am, edited 2 times in total.

dogkarl
ultra-n00b
Posts: 9
Joined: Fri Sep 10, 2010 7:56 am
Been thanked: 2 times

Re: Castlevania: Lords of Shadow

Post by dogkarl » Thu Sep 30, 2010 7:49 am

Great job! I wonder if it'll works on XBOX360 files.

tommy
ultra-n00b
Posts: 3
Joined: Mon Oct 04, 2010 10:11 pm

Re: Castlevania: Lords of Shadow

Post by tommy » Mon Oct 04, 2010 10:27 pm

It doesn't work for X360 version, or maybe it only works for demo files?

I get error: incomplete input file number 0, can't read xxxxxxxx bytes.

However when used with -l parameters, it lists file list correctly, so it seem it doesn't extract data...

WRS
ultra-veteran
ultra-veteran
Posts: 601
Joined: Fri Nov 06, 2009 12:13 am
Has thanked: 74 times
Been thanked: 132 times

Re: Castlevania: Lords of Shadow

Post by WRS » Mon Oct 04, 2010 10:49 pm

there's a typo in the script.

change
log name ofset size
to

Code: Select all

log name offset size
?
Useful tool links:

tommy
ultra-n00b
Posts: 3
Joined: Mon Oct 04, 2010 10:11 pm

Re: Castlevania: Lords of Shadow

Post by tommy » Mon Oct 04, 2010 10:57 pm

Well it actually works, but I get error when trying to extract Music.packed, first file has space in its file name. Could that be an issue? Data00 for example worked fine.

And change ofset to offset didn't work :)

EDIT: So English.packed didn't work either, and there was no space in filename....Hmm what could it be? quickbms -l parameter does however work for all files, including English.packed and Music.packed. But extracting works with Data00.packed, and I imagine with Data01.packed as well...

Here's verbose log:

Code: Select all

QuickBMS generic files extractor 0.4.7
by Luigi Auriemma
e-mail: aluigi@autistici.org
web:    aluigi.org

- open input file English.packed
- open script los.bms
READLINE 1   idstring BFPK
READLINE 2   get version long
             >set version (0) to version
READLINE 3   get files long
             >set files (1) to files
READLINE 4   savepos TMP
             >set TMP (2) to TMP
READLINE 5   for i = 0 < files
             >set i (3) to i
             >set 0 (4) to 0x00000000
             >set i (3) to i
             >set files (1) to files
READLINE 6   goto TMP
             >set TMP (2) to TMP
READLINE 7   get NSIZE long
             >set NSIZE (5) to NSIZE
READLINE 8   getdstring name NSIZE
             >set name (6) to name
             >set NSIZE (5) to NSIZE
READLINE 9   get size long
             >set size (7) to size
READLINE 10  get offset long
             >set offset (8) to offset
READLINE 11  savepos TMP
             >set TMP (2) to TMP
READLINE 12  goto offset
             >set offset (8) to offset
READLINE 13  get zsize long
             >set zsize (9) to zsize
READLINE 14  savepos OFFSET
             >set offset (8) to offset
READLINE 15  if zsize == size
             >set zsize (9) to zsize
             >set size (7) to size
READLINE 16  log name offset size
             >set name (6) to name
             >set offset (8) to offset
             >set size (7) to size
READLINE 17  else
READLINE 18  clog name offset zsize size
             >set name (6) to name
             >set offset (8) to offset
             >set zsize (9) to zsize
             >set size (7) to size
READLINE 19  endif
READLINE 20  goto TMP
             >set TMP (2) to TMP
READLINE 21  next i
             >set i (3) to i
- set output folder ./Test/

  offset   filesize   filename
------------------------------
             .start_bms start: -1 0 0

00000000 1   idstring BFPK

00000004 2   get version long
             >set version (0) to 0x00000000

00000008 3   get files long
             >set files (1) to 0x00000246

0000000c 4   savepos TMP
             >set TMP (2) to 0x0000000c
- variable i seems uninitialized, I use its name
             >get i (3) i
             >get 0 (4) 0x00000000
             >set i (3) to 0x00000000
             .start_bms start: 6 0 0

0000000c 5   for i = 0 < files
             >get i (3) 0x00000000
             >get files (1) 0x00000246
             condition < is met

0000000c 6   goto TMP
             >get TMP (2) 0x0000000c
             >get TMP (2) 0x0000000c

0000000c 7   get NSIZE long
             >set NSIZE (5) to 0x00000029

00000010 8   getdstring name NSIZE
             >get NSIZE (5) 0x00000029
             >set name (6) to sounds/voices/english/babba_off_msg_1.ogg

00000039 9   get size long
             >set size (7) to 0x000076f7

0000003d 10  get offset long
             >set offset (8) to 0x00008e17

00000041 11  savepos TMP
             >set TMP (2) to 0x00000041

00000041 12  goto offset
             >get offset (8) 0x00008e17
             >get offset (8) 0x00008e17

00008e17 13  get zsize long
             >set zsize (9) to 0x5367674f

00008e1b 14  savepos OFFSET
             >set offset (8) to 0x00008e1b

00008e1b 15  if zsize == size
             >get zsize (9) 0x5367674f
             >get size (7) 0x000076f7
             condition == is not met
             .start_bms start: 17 1 0
             .start_bms end: 17 1 0 (ret 18)
             .start_bms start: 19 0 0

00008e1b 18  clog name offset zsize size
             >get name (6) sounds/voices/english/babba_off_msg_1.ogg
             >get offset (8) 0x00008e1b
             >get zsize (9) 0x5367674f
             >get size (7) 0x000076f7
  00008e1b 30455      sounds/voices/english/babba_off_msg_1.ogg

Error: incomplete input file number 0, can't read 1362753026 bytes.
       anyway don't worry, it's possible that the BMS script has been written
       to exit in this way if it's reached the end of the archive so check it
       or contact its author or verify that all the files have been extracted


Note that if both the scripts and your files are correct then it's possible
that the script needs a newer version of QuickBMS, in which case download it:

  http://aluigi.org/quickbms

User avatar
chrrox
Moderator
Posts: 2552
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1284 times

Re: Castlevania: Lords of Shadow

Post by chrrox » Tue Oct 05, 2010 3:16 am

it was a type just correct the one word offset it was a copy paste error.
i edited my first post try it now.

tommy
ultra-n00b
Posts: 3
Joined: Mon Oct 04, 2010 10:11 pm

Re: Castlevania: Lords of Shadow

Post by tommy » Tue Oct 05, 2010 3:24 am

It still didn't work.

However this script did (took from Clive Barker's Jericho)

Code: Select all

ImpType Standard ;
Goto 8 0 ;
Get FNum Long 0 ;
For n = 1 to FNum ;
Get FNLen Long 0 ;
GetDString FN FNLen 0 ;
SavePos FOO 0 ;
Get FO Long 0 ;
SavePos FSO 0 ;
Get FS Long 0 ;
Log FN FS FO FSO FOO ;
Next n ;

User avatar
chrrox
Moderator
Posts: 2552
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1284 times

Re: Castlevania: Lords of Shadow

Post by chrrox » Tue Oct 05, 2010 3:40 am

I don't have the full game only the one pac file they gave me glad to hear the other script worked tho.

Gromber
advanced
Posts: 55
Joined: Tue Oct 05, 2010 9:42 pm
Has thanked: 2 times
Been thanked: 2 times

Re: Castlevania: Lords of Shadow

Post by Gromber » Tue Oct 05, 2010 9:51 pm

¿and to create a new *.packed file? i want to join dvd1 and dvd 2 packages.

thanks for the scripts.

viperxp
ultra-n00b
Posts: 1
Joined: Sat Jan 01, 2011 12:15 pm

Re: Castlevania: Lords of Shadow

Post by viperxp » Sat Jan 01, 2011 1:47 pm

hello script helped me managed to unpack everything but I need to wrap it back again I tried to translate the lyrics, and now try whether it works

3pacalypse
beginner
Posts: 38
Joined: Thu Jul 08, 2010 3:17 am
Location: Bulgaria
Has thanked: 1 time
Contact:

Re: Castlevania: Lords of Shadow

Post by 3pacalypse » Wed Jun 22, 2011 6:50 am

Please tell us how to pack it back again!
A Member of the Bulgarian Game Localization Teams: http://playonbg.info/ & http://adventurersbg.info/

michalss
Moderator
Posts: 942
Joined: Sun Mar 27, 2011 8:42 pm
Has thanked: 10 times
Been thanked: 135 times

Re: Castlevania: Lords of Shadow

Post by michalss » Thu Jun 23, 2011 7:40 pm

That scrip it could be use also for repack, but there is 1 problem with filesize of some files. Bu they are exact the same size like it was just after extract:
Please help ?

Code: Select all

Error: file "language/english.txt"
       the reimport option acts as a reimporter and so you cannot reinsert a
       file if it's bigger than the original otherwise it will overwrite the
       rest of the archive:
         new size: 104229
         old size: 102588

EDIT : This is strange i have my file modded and it has 30KB less than the oringal and still telling me new file is bigger. Anyone seen this before ?
Quick BMS Editor GUI - simple easy to use
Goto : viewtopic.php?uid=34229&f=29&t=6797&start=0

Downloads from DropBox : https://dl.dropboxusercontent.com/u/

michalss
Moderator
Posts: 942
Joined: Sun Mar 27, 2011 8:42 pm
Has thanked: 10 times
Been thanked: 135 times

Re: Castlevania: Lords of Shadow

Post by michalss » Fri Jun 24, 2011 7:23 am

please anyone ???
Quick BMS Editor GUI - simple easy to use
Goto : viewtopic.php?uid=34229&f=29&t=6797&start=0

Downloads from DropBox : https://dl.dropboxusercontent.com/u/

carnage
beginner
Posts: 35
Joined: Tue Jun 26, 2012 3:21 pm
Location: Brazil
Been thanked: 2 times

Re: Castlevania: Lords of Shadow

Post by carnage » Fri Jul 06, 2012 9:11 pm

Guys I am having the same problem that michalss friend, when you import the file contents Data00.packed some files show the error message stating that the size is different from the original, but in my case these files are not edited, or are unique how can they be bigger?
Would fix this?

Code: Select all

Error: file "bmp\vsh\grafico2d\font.0585d3fd.x360.psb"
       the reimport option acts as a reimporter and so you cannot reinsert a
       file if it's bigger than the original otherwise it will overwrite the
       rest of the archive:
         new size: 141 (189)
         old size: 126 (189)

- do you want to skip this file? (y/N)
PS
File size English.txt was around 60 ~ 63KB larger than the original and was able to import successfully.

User avatar
aluigi
VVIP member
VVIP member
Posts: 1917
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 644 times
Contact:

Re: Castlevania: Lords of Shadow

Post by aluigi » Thu Jan 31, 2013 11:11 am

I have written a script that should match the format at 100% (music.packed included):
http://aluigi.altervista.org/papers/bms ... evania.bms

Post Reply