Luigi Auriemma (ARCHIVE-ONLY FORUM!)
It is currently 19 Jul 2012 12:28

All times are UTC [ DST ]

Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: QuickBMS reimporting feature
PostPosted: 09 Mar 2011 23:51 

Joined: 13 Aug 2007 21:44
Posts: 4068
just like the subject says, now quickbms can even reimport the files back in the archives which means that if you want to modify a file stored in the archive of a game now it's possible using the same script and quickbms used for its extraction :)

the feature is really cool because now many of the extraction scripts already existent can do this job automatically WITHOUT modifying them, it's enough to add 2 options to quickbms in a file.bat or a link or via command-line... really a joke

obviously there are various limitations like in any reimporter tool but in any case remains a great thing because the cases in which will be required to write boring stand-alone rebuilders (that need time and a good person who writes them) will be reduced a lot.

you need at least the version 0.4.10 of QuickBMS that I have released today:

and the following is the dump of the section 3 of the manual of the tool (quickbms.txt) that has all the needed informations to know:
The idea consists in being able to reimport the modified files for the
less complex archives without touching a single line of the script,
yeah just reusing the same bms scripts that already exist!

The function is experimental and it must be used in the following way:

- make a backup copy of the original archive!

- extract the files you want to modify (-f option) or just all the
  files as you do normally via the GUI or by command-line:

    quickbms archive.pak output_folder

- do your modifications to the extracted files and delete the files
  that have not been modified so that the reimporting process will be

- reimport the files in the archive:

    quickbms -w -r archive.pak output_folder

- test the game with the modified archive

Obviously you can use the GUI also for the reimporting procedure
because it's enough to create a file.bat containing the following line
and then double clicking it when you need to do this job:
quickbms.exe -w -r

Now some important notes about this particular reimporting process:
- you CANNOT increase the size of the files you want to reimport, so
  the new files must be minor or equal than the originals
- for the maximum compatibility within the thousands of available file
  formats I have decided to not use tricks for modifying the original
  size and compressed_size values (think to those formats that use
  encrypted information tables or the scripts that use MEMORY_FILEs
  for such tables or that use things like "math SIZE *= 0x800")
- the script is just the same for both the extraction and the
  reimporthing phase which means that many of the scripts written by me
  and the other users already work
- the reimporting of compressed files is perfectly possible because
  the tool automatically switches to the relative compression algorithm
  if available (for example zlib->zlib_compress)
- if the original archive uses complex encryptions that require the
  usage of MEMORY_FILEs to perform temporary decryptions then it's NOT
  supported and the same is valid for chunked content (like the usage
  of the command Append)
- FileXor and FileRot should work correctly
- Encryption and FileCrypt should work too but some algorithms (at the
  moment only 2 almost unknown are confirmed) could give problems
  because it's necessary to switch the encryption mode
- things like CRCs and hashes can't be supported
- at the moment only the files with a name can be reimported so the
  nameless files (log "" OFFSET SIZE) aren't supported due to the
  automatic extensions assigned to them during the extraction but it's
  not excluded their implementation in future, in the meantime you can
  force their importing by giving the DAT extension to the modified
  files so 00001234.txt must be renamed to 00001234.dat
- it's a new and experimental option so it will be improved and
  adjusted during the next months
this feature has already allowed to modify the demo of crysis 2 and I'm sure that when more people will be aware of it there will be a lot of more interest (and happyness) in it

obviously any feedback is appreciated

 Post subject: Re: QuickBMS reimporting feature
PostPosted: 16 Mar 2011 14:48 

Joined: 19 Jul 2009 18:12
Posts: 5
Thats just awsome! You are aswsome!! :D

 Post subject: Re: QuickBMS reimporting feature
PostPosted: 18 Mar 2011 23:34 

Joined: 16 Mar 2011 22:37
Posts: 3
Whenever I do this, and leave an empty output folder, the command line comes up and says it is reimporting but no file in output folder when it is done... Help?

 Post subject: Re: QuickBMS reimporting feature
PostPosted: 19 Mar 2011 00:32 

Joined: 13 Aug 2007 21:44
Posts: 4068
how you can reimport something if you have nothing in the output folder?!?!
the step-by-step is perfectly clear, first you must extract the files in the output folder, then you delete those you don't need and modify those you need, and finally you can reuse the same script and command adding the -r -w option (a file.bat as I suggested).

read the informations in quickbms.txt carefully and as I have already said you must specify also the game because if you are using a script that is not supported for the reimporting then it will never work

 Post subject: Re: QuickBMS reimporting feature
PostPosted: 02 Apr 2011 00:00 

Joined: 26 Dec 2010 20:16
Posts: 10
very nice luigi, very good feature to add to an already good app.

Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC [ DST ]

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for: