Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

QuickBMS - Reimporting files in the archives

Featured Replies

  • Replies 58
  • Views 10
  • Created
  • Last Reply

Top Posters In This Topic

  • Author
  • Localization

aluigi, posted Tue Aug 05, 2014 8:10 pm (25)


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.
  • Author
  • Localization

shekofte, posted Sun Aug 10, 2014 10:32 am (73)


Hello Luigi Auriemma and congratulation on zenhax :)

what is the simplest BMS script to compress a single file to .gzip by reimporting ability of Qbms ? just like a file compressor !
(i guess i must define an imaginary extracted archive first)
if you show me such example you will release my obsession .
your sincerely shekofte
  • Author
  • Localization

aluigi, posted Sun Aug 10, 2014 10:44 am (74)


So you had a gzip file and you want to extract the content and then reinjecting it, right?

Code:
comtype gzip
get SIZE asize
clog "dump.dat" 0 SIZE SIZE

I don't think that gzip is the best example because it's a format that is already widely supported, like zip :)
  • Author
  • Localization

shekofte, posted Sun Aug 10, 2014 11:13 am (75)


aluigi wrote:
So you had a gzip file and you want to extract the content and then reinjecting it, right?


suppose i have a large story.txt file that i just want to compress it as .gzip or other recompression supported algorithms !
how to fully programmaticly read the file and save it as zip extensions ?
is there such facility or trick for doing this ?
i wish there was a command like zlog that is inverse of clog and outputs compressed data !
excuse me if my request is foolish :(

anyway i am so eager to see some nice examples that you offer ?
  • Author
  • Localization

aluigi, posted Sun Aug 10, 2014 11:23 am (76)


Now I undestand what you mean.
Quickbms has the compress algorithms that do just that so if you want to compress a file without instead of reimporting it, you can do it:
Code:
comtype gzip_compress
get SIZE asize
clog "dump.gz" 0 SIZE SIZE
No size limits, it's just a compression and not a reimporting.
If you need a list of supported algorithms take a look at quickbms.txt and search "recompression algorithms".
  • Author
  • Localization

shekofte, posted Sun Aug 10, 2014 11:48 am (77)


thanks man Qbms is really glorious
although i already read the guide but i can't recognize it , i feel sorry for myself ...
  • Author
  • Localization

aluigi, posted Sun Aug 10, 2014 12:10 pm (78)


I will release more tutorials in the next weeks
  • Author
  • Localization

aluigi, posted Mon Aug 18, 2014 9:53 am (207)


Currently it's not possible to reimport the files that have been renamed during the extraction.

For example when two files have the same name you can rename the second one manually or automatically with the 'r' choice.

I'm trying to think to some solutions but it's not so easy.
  • Author
  • Localization

raykingnihong, posted Wed Dec 24, 2014 10:45 am (2281)


Hi aluigi my friend very good tutorial I am learning
  • Author
  • Localization

Amsal, posted Sun Feb 14, 2016 12:41 pm (11414)


How can I give the script.bms and the files and the output file in the reimport.bat directly without the GUI!
  • Author
  • Localization

aluigi, posted Mon Feb 15, 2016 5:00 pm (11440)


quickbms.exe -r -w script.bms archive.dat folder

The -G option in reimport.bat is an option to force the GUI mode.
  • Author
  • Localization

lastdreamer, posted Mon Jul 04, 2016 7:22 am (15003)


Hi,

I would like to make a french translation for the game Zero Escape : Zero Time Dilemma, so I used Quick BMS to extract files. But I saw that I can only reimport if the file have a size equal or smaller than the original ones. But French sentences is bigger than English sentences, so it is a big problem for me. Have you another way to reimporte bigger files ?

Thank you !
  • Author
  • Localization

aluigi, posted Mon Jul 04, 2016 9:05 am (15007)


It's a problem of physical space, so there is no ready solution except writing a rebuilder from scratch (the format is not complex) or just appending the new content to the file and then modifying the OFFSET and SIZE field in the archive (something that requires manual work but may be easy with the help of quickbms -l -V).

Are you 100% sure that the game isn't able to load the extracted files?
Maybe check that with Process Monitor and the File filter, because often the games work without archives too.
  • Author
  • Localization

lastdreamer, posted Thu Jul 14, 2016 8:57 am (15264)


Finaly I made my own rebuilder and it work :). It was more easier than I thought.
  • Author
  • Localization

SADEKFCB, posted Thu Sep 15, 2016 10:51 pm (17474)


Image[/URL

[URL=http://www.m5zn.com/out.php?code=16449280]Image


after extracting the file dds from file arch00 And modify it I try Reimport it but dos'nt work

O0 files reimported in 4 seconds

I hope you give me a solution And give us an explanation for video
and Thanks for everything

:geek: :|
  • Author
  • Localization

aluigi, posted Thu Sep 15, 2016 11:21 pm (17475)


Please read section 3 of quickbms.txt very carefully:
http://aluigi.org/papers/quickbms.txt

You must select THE SAME input script, input file and output folder you selected during extraction!
  • Author
  • Localization

aluigi, posted Sat Sep 17, 2016 6:52 pm (17495)


@SADEKFCB
Show me the video of the extraction.
The one you linked simply show a possible wrong selection of the folder which is why quickbms can't find the files to reimport.
In case I wasn't clear before:
You must select THE SAME input script, input file and output folder you selected during extraction!

Additionally note that fear.bms is not 100% valid in reimporting because some files are built in memory before being extracted and so reimporting will not work with some files.
  • Author
  • Localization

aluigi, posted Sat Sep 17, 2016 9:01 pm (17497)


I already helped you, the problem is the selection of the folder which is different than the one of the extraction.
It's very easy: extraction steps = reimporting steps.
Nothing else to add.
  • Author
  • Localization

SADEKFCB, posted Wed Sep 21, 2016 9:18 pm (17575)


thank you aluigi it's work :) :) :) :) :)
  • Author
  • Localization

UnderTeach, posted Sun Nov 27, 2016 10:54 am (19122)


Hi,
I am working on an italian translation of Undertale, still work in progress, but I want to test out the graphical translation. To decrypt the data file from data.win, I used yoyogames.bms script, which worked as expected, but now I can't encrypt them again in a data.win file.
Any suggestions on which script to run? I've tried reimport.bat but I can't comprehend the use of it. Such a noob I am :roll:
Thanks for the great job you're doing.
  • Author
  • Localization

aluigi, posted Sun Nov 27, 2016 11:44 am (19124)


reimport.bat is very simple and it's explained in section 3 of http://aluigi.org/papers/quickbms.txt

In short you should click on reimport.bat and select the same script, archive (remember to make a backup!), and folder (that now acts as "input") you selected during the extraction.

The following are some rules to increase the chances of a good reimporting:
  • in the folder where you extracted the files, keep there only those you edited and delete the others (this is useful mainly for compressed files)
  • the edited files (for example graphics in your case) must have a size which is smaller or equal than the originals
  • for your translation you are probably going to edit STRG.txt, remember to keep your new strings (each line) shorter/equal than the originals
  • in some rare archive formats it's even necessary to keep the new string with the same length of the original, so filling it with spaces, but this is not the case of Undertale probably

If you have other doubts do a search on google with the following keywords because other people had success in modding Undertale and made videos and tutorials:
Code:
undertale quickbms reimport
  • Author
  • Localization

skiracing, posted Thu Jan 12, 2017 11:21 pm (20103)


Hello

I try to edit some staff in alpine ski racing 2007 game. Sometimes re-importing works, sometimes not. Edit I tried is really simple. For example, I only exchanged one number for another or something like that.
When re-importing is not working, mostly, I got this message:

Last script line before the error or that produced error:
26 clog NAME OFFSET ZSIZE SIZE



Please, any ideas how to solve this?
Thank you so much
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.