QuickBMS - Reimporting files in the archives

Videos, guides, manuals, documents and tutorials about using tools and performing tasks
Gsx31
Posts: 2
Joined: Sat Oct 21, 2017 2:14 pm

Re: QuickBMS - Reimporting files in the archives

Post by Gsx31 »

Hello,

Before beginning, I am anxious to thank you for your tutorials.

I wanted to extract the audio files wav which are in the audio files bank in Assetto Corsa, to edit the sound when the engine arrives at the contact breaker.

I managed to extract files wav from the file bank. I puts you the video.

https://www.youtube.com/watch?v=kcpCAZcFEnk

On the other hand, I did not manage to compile the file wav in the file bank.
I made a video in 2 stages which correspond to the stages to extract files, but that never works.

Here I just resume the file of entrance, I made a test, it does not work, the sound did not change

https://www.youtube.com/watch?v=AmaFyRxp4f8

Here I just resume the file of entrance + the file 00000000.fsb I made a test, it does not work, the sound did not change

https://www.youtube.com/edit?o=U&video_id=FqoU6W8dLBI

I make an error somewhere, either it is impossible to recompile files BANK Assetto Corsa

Thank you in advance for your help.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: QuickBMS - Reimporting files in the archives

Post by aluigi »

Everything was correct on the quickbms side, one file correctly reimported.

Have you edited 00000000.fsb?
I mean have you reimported the edited wav file in the fsb archive?
Gsx31
Posts: 2
Joined: Sat Oct 21, 2017 2:14 pm

Re: QuickBMS - Reimporting files in the archives

Post by Gsx31 »

Hello,

I do not if I modified 00000000.fsb.

I do not speak English, but I am going to try to tell you what I'm doing, so that you can tell me or I make an error.

I already posted a video to let you see how I was doing to extract the WAV files from the file imsa_jaguar_xjr12.bank
https://www.youtube.com/watch?v=kcpCAZcFEnk

(I put you a link towards the file, so that can look if it is possible to reinject files)
imsa_jaguar_xjr12.bank https://app.box.com/s/qvn7xzedw05ktstzyjajtkzmbzouaqiz

I also link to the WAV file limit_ext.wav that I edited
https://app.box.com/s/guawklouxkq6nc2t7cpkj8r5tvgeafi1

I'm not going to tell you how to re-inject the files, because I do not know what to do exactly.

When I run "reimport.bat" I have to choose the file imsa_jaguar_xjr12.bank, or the file 00000000.fsb ?

If I chose the file imsa_jaguar_xjr12.bank I notice the modification date of the file 00000000.fsb changed. I therefore conclude that something has been changed, but I'm not sure ...

I run reimport.bat and I will look for the script

Image

Then I will look for the file 00000000.fsb

Image

I have the record

Image

A CMD window opens and I see that 1 file has been reinjected successfully.

Image

I guess that means that the WAV file I edited replaced the original WAV file, but I'm not sure ...

Now, I do not know how to go from this file 00000000.fsb to a file imsa_jaguar_xjr12.bank
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: QuickBMS - Reimporting files in the archives

Post by aluigi »

Gsx31 wrote:I also link to the WAV file limit_ext.wav that I edited
...
I'm not going to tell you how to re-inject the files, because I do not know what to do exactly.

That's the problem.
If you don't update the fsb archive then what you reimport is exactly the same original file.

There is no reason for you to use fsb_aud_ext, that tool is necessary only for fsb5 archives that contain ogg data.
Use fsbext to do the job and you will be even able to reinject the edited file in the archive since, luckily for you, the files are just pcm16 wav.
http://aluigi.altervista.org/papers.htm#fsbext

I suggest you to use the official FMOD soundbank tool for rebuilding the fsb archive, otherwise you can rely on fsbext but I'm not sure if it works properly.

Long story short, you are OT here because it's not related to quickbms reimporting, post in the Audio section regarding FSB editing/reimporting in case you still have problems.
lostprophet
Posts: 49
Joined: Thu Sep 04, 2014 9:34 pm

Re: QuickBMS - Reimporting files in the archives

Post by lostprophet »

Is it possible to reimport into files larger than 4gb?
I'm trying to reimport a 90kb file, but with quickbms it just hangs, (I know, it's not supported for over 4gb), with quickbms_4gb it just shows 0 files reimported, and no error messages.

The game is Blade & Bones, and UE4 game.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: QuickBMS - Reimporting files in the archives

Post by aluigi »

If you get the "0 files reimported" it means you did something wrong.
Read section 3 of quickbms.txt and viewtopic.php?p=23032#p23032

Please note that the edited archive may not work (due to compressions, chunks and so on)
GIRLgaming
Posts: 9
Joined: Wed Oct 17, 2018 6:51 am

Re: QuickBMS - Reimporting files in the archives

Post by GIRLgaming »

aluigi wrote:An interesting feature of quickbms is the possibility to reimport/reinject the extracted files back in the archives.
It does NOT work with 100% of the scripts and there are some limitations but it's a great alternative to spending hours writing a repacker.

Details in section 3 of quickbms.txt:
http://aluigi.org/papers/quickbms.txt

Sometimes you don't need to reimport or rebuild an archive because probably the game already has the ability to load the files outside the archive.
Other times it's necessary to specify a command-line option to allow that operation.

If all the solutions fail, it's time to use the reimporting mode.

Things to know and limitations:
  • you can reinject the files only if they have a size equal or smaller than the original ones
  • only the most used compression algorithms are used, like zlib/deflate, lzma, lzo, lzss and many others
  • the scripts that dump the file from the memory file (for example for chunked files) are not supported

To use this feature you must:
  • make a backup copy of the archive
  • extract the files using the necessary script
  • edit the files you want to modify
  • delete all the files that have not been modified
  • double click on reimport.bat
  • do the SAME steps you did for extracting the archive.
    Seriously, do the same just like if you are extracting the files to the same folder.
    QuickBMS will do the job automatically
  • quickbms will show the names of the files that have been reimported
  • try the game with the new archive

Yes, it's really extremely simple.


Sir I did the same thing but i always get doesn't match error, i followed the steps i search the script needed but still the error. my file is npk so i used the nxpk script. please help me how to do it right
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: QuickBMS - Reimporting files in the archives

Post by aluigi »

@GIRLgaming
Nothing to do.
If you used it correctly and quickbms gives you errors (about compression, memory_files and so on), then there is no solution.
underwater
Posts: 12
Joined: Fri Sep 21, 2018 9:40 pm

Re: QuickBMS - Reimporting files in the archives

Post by underwater »

I'm having trouble repacking bank files.
The process works fine if I do it with a modified bank file that's about 2MB, but when I try the same thing with one that's about 200MB, then quickbms tells me it's larger than the original, even though it's significantly smaller: https://imgur.com/ZU9ZjnX
The bank contains the same number of files as originally, and all of the replaced ones are smaller than the original ones.
(I'm using quickbms_4gb_files for unpacking & packing.)

Here are the files, in case you need them: The original PAK file (6GB), the original bank file (208MB), and the modified bank file (203MB).
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: QuickBMS - Reimporting files in the archives

Post by aluigi »

Because it's a chunk based format in which parts of 65536 bytes are read from the file and compressed.
If the entropy of one of these chunks is bigger than the original chunk, it can't be compressed more than before and it can't be reimported (even if you use reimport2 since they are sequential chunks).
underwater
Posts: 12
Joined: Fri Sep 21, 2018 9:40 pm

Re: QuickBMS - Reimporting files in the archives

Post by underwater »

So, I guess whether this works then is sort of random (i.e. depending on whatever happens to end up in those chunks)?
After all, the 2MB bank worked just fine, and its chunks should've been bigger than 65K as well. Or am I misunderstanding something about the process (very likely)?

Anything "desperate" I could try, (e.g. dumping some files, reducing file sizes, etc.)? Or is that pretty much the end of the road for me?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: QuickBMS - Reimporting files in the archives

Post by aluigi »

Yeah, sort of random.
You can have 99% of the importing file with an entropy equal or lower than the original and 1% that is higher and can't be compressed as before.

There are other solutions for UE4 pak archive, try checking the recent posts and then posting here:
viewtopic.php?f=9&t=1005
torbido
Posts: 5
Joined: Wed Jan 23, 2019 9:50 am

Re: QuickBMS - Reimporting files in the archives

Post by torbido »

I want to delete videos of .pak files, so I made 0B files of the videos with the same names, and tried to import them, and that fails with reimport1 and 2. Any help will be appreciated.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: QuickBMS - Reimporting files in the archives

Post by aluigi »

I don't see any problem with that 0-bytes file reimporting method, what's the error you get?
Hojo Jun
Posts: 3
Joined: Sun Jul 07, 2019 5:28 pm

Re: QuickBMS - Reimporting files in the archives

Post by Hojo Jun »

Hello, aluigi-san, im trying reimport some file but have a little trouble, hope you can help me.

Current im use this script to extract:
https://aluigi.altervista.org/bms/god_eater_2.bms

And, i try hard reimport file 00005cec.dat, but it dont work.

I sure that i do all exactly. Follow this:
Reimport.bat >> Choose Script >> Choose Archive File >> The folden storage 00005cec.dat.

But it dont work, i wonder, maybe because it dont storaged in a folden, so this script dont work?

Before, i tried some file random in any folden like 107, 400... etc, just place it to exactly folden, it will work. But this file really dont have a folden for it.

I tried place it inside a newfolden or choose reimport it directly, but dont work, hope you can help me explain this. Thanks.

This some screen of its, hope it useful to you check. Thanks.

https://ibb.co/XW0FhKM
https://ibb.co/PtMsTym
lazenes
Posts: 22
Joined: Sat Feb 13, 2021 8:32 pm

Re: QuickBMS - Reimporting files in the archives

Post by lazenes »

How do I make quickbms automatically close when the script completes?
I will write my own .bat script and the user will be able to enter the game simply by clicking on this file.
Image
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: QuickBMS - Reimporting files in the archives

Post by aluigi »

@lazenes
Try adding the -R option
LePousson
Posts: 1
Joined: Sun Nov 27, 2022 6:07 pm

Re: QuickBMS - Reimporting files in the archives

Post by LePousson »

aluigi wrote:
  • make a backup copy of the archive
  • extract the files using the necessary script
  • edit the files you want to modify
  • delete all the files that have not been modified
  • double click on reimport.bat
  • do the SAME steps you did for extracting the archive.
    Seriously, do the same just like if you are extracting the files to the same folder.
    QuickBMS will do the job automatically
  • quickbms will show the names of the files that have been reimported
  • try the game with the new archive
Hi everybody !!

Just tried to reimport files into a Farming Simulator file but could not get it working.

Let's say that i'm temporarily working in C:\TempBMS, where I put the quickbms exe files, the fs.txt "script" file, and the Farming archive (named here archive.dlc)

I used this command to reimport files that were uncompressed in C:\TempBMS\archive\ :

Code: Select all

quickbms.exe -G -w -r fs.txt c:\TempBMS\archive.dlc c:\TempBMS\archive\
Was it a right command ? Or did I make something wrong ??

Thanks for replying !!

LePousson