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.

REIMPORT2 mode - no size limits

Featured Replies

  • Author
  • Localization

GHFear, posted Sun Mar 15, 2020 6:19 pm (54666)


aluigi wrote:
unreal_tournament_4.bms is not good in reimport mode.
I guess there is some tool called u4pak that users use and it's discussed on this forum too.


I would not recommend using pak file reimport modding as a way of modding Unreal Engine 4 games that you purchased on steam or Epic Game Store.
New version of EAC anticheat and anti tamper hook the pak-handing function and signature-check function and make sure the signatures match the originals and modifying PAKs can get you banned on certain online games.
It also doesn't work for new versions of UE4 after 4.22 or 4.23 if I remember correctly.
If it's offline, go ahead. :) But for new online games using EAC, it's risky.
You can build new PAKs that you place alongside the original PAKs or sideload a mod-enabler dll that let's you run unpacked assets from the Content folder.
That way, you don't get any broken PAKs or modify any existing files and the anti cheat will not be checking signatures against your files.
  • Replies 98
  • Views 2
  • Created
  • Last Reply

Top Posters In This Topic

  • Author
  • Localization

MuslimCyberGames, posted Tue Sep 01, 2020 8:45 am (58471)


Hey, I just wanna ask for the game Story of Seasons: Friends of Mineral Town.

Can you fix this? for the Script Zip

Link:https://zenhax.com/viewtopic.php?f=9&t=13854
  • Author
  • Localization

aluigi, posted Thu Oct 08, 2020 9:27 pm (59106)


@MuslimCyberGames
Eh no, the ZIP format is a different complex thing and reimporting can't work with it (for various reasons).
  • Author
  • Localization

VObject, posted Fri Oct 09, 2020 9:06 am (59124)


Hi! Help me guys :(

This script extract .pck AKPK files fine, but when I try to import files using reimport/reimport2, the program does not process what has been changed in the exported folder. Can you please tell me how to import modified file into the archive? What am I doing wrong?

Image

script:
https://drive.google.com/file/d/1l1NDNw ... sp=sharing

example pck file:
https://drive.google.com/file/d/1Jf5524 ... sp=sharing

Django Reinhardt and classic music for Mafia DE need your help :cry:
  • Author
  • Localization

aluigi, posted Fri Oct 09, 2020 9:29 am (59130)


@VObject
Try replacing this part:
Code:
      putVarChr MEMORY_FILE SIZE 0
      log MEMORY_FILE 0 0
      append
      log MEMORY_FILE OFFSET SIZE
      append
      callfunction getTYPE 1
      if PC == 0
         endian big
      endif
      string NAME = EXT
      log NAME 0 SIZE MEMORY_FILE
with:
Code:
      string NAME  = "."
      log NAME OFFSET SIZE
      if PC == 0
         endian big
      endif
  • Author
  • Localization

VObject, posted Fri Oct 09, 2020 9:47 am (59133)


aluigi wrote:
@VObject
Try replacing this part:
Code:
      putVarChr MEMORY_FILE SIZE 0
      log MEMORY_FILE 0 0
      append
      log MEMORY_FILE OFFSET SIZE
      append
      callfunction getTYPE 1
      if PC == 0
         endian big
      endif
      string NAME = EXT
      log NAME 0 SIZE MEMORY_FILE
with:
Code:
      string NAME  = "."
      log NAME OFFSET SIZE
      if PC == 0
         endian big
      endif


Unfortunately, import still failed, but now it looks like this:
Image
  • Author
  • Localization

aluigi, posted Fri Oct 09, 2020 10:09 am (59136)


Have you select the same folder you selected during extraction?
Because the files are not found there and I suppose the folder was c:\qbms\export1
  • Author
  • Localization

VObject, posted Fri Oct 09, 2020 10:18 am (59137)


aluigi wrote:
Have you select the same folder you selected during extraction?
Because the files are not found there and I suppose the folder was c:\qbms\export1


Oh, of course, my embarrassing fail, I'm sorry. Unlike other scripts, this one creates an sfx folder, and I thought that when importing it need to select it, and not the original exported one.
Now the import was successful, thanks a lot, you are the best, aluigi :!:
  • Author
  • Localization

aluigi, posted Fri Oct 09, 2020 10:20 am (59139)


Don't worry, it's a mistake that happens ;)
Happy it works now
  • Author
  • Localization

VObject, posted Fri Oct 09, 2020 11:50 am (59146)


aluigi wrote:
Don't worry, it's a mistake that happens ;)
Happy it works now


Oh Luigi, I think I was in a hurry to rejoice :(
In your updated script, the import works fine, but when exporting, the files are exported as broken .WAV :( In original script it was correct .Wwise

Image
  • Author
  • Localization

aluigi, posted Fri Oct 09, 2020 5:08 pm (59167)


The reason is that I dump the file directly to the disk.
In the original script it gets saved in a buffer, analyzed for getting the extension and the dumping the buffer to disk.
Anyway it's just an extension so it's not really a problem :)
  • Author
  • Localization

VObject, posted Sat Oct 10, 2020 5:51 am (59198)


aluigi wrote:
The reason is that I dump the file directly to the disk.
In the original script it gets saved in a buffer, analyzed for getting the extension and the dumping the buffer to disk.
Anyway it's just an extension so it's not really a problem :)


Hmm, but how to import new file correctly then?

I tried:
1) Converted new mp3 file to wem (through wwise audiokinetic program) and replace this wem file to the pck archive instead of the unpacked wav
https://drive.google.com/file/d/15E2_mC ... sp=sharing

2) Converted new mp3 file to wem (through wwise audiokinetic program), rename extension to wav and replace this 'wav' file to the pck archive instead of the unpacked wav

3) Converted new mp3 file to wav and replace this wav file to the pck archive instead of the unpacked wav
https://drive.google.com/file/d/118kyUL ... sp=sharing

But game cannot read it :(

Also I tried to replace one file exported by this script from the package with another, but, unfortunately, the game still could not read modified pck after importing :(
  • Author
  • Localization

aluigi, posted Sun Oct 11, 2020 5:36 pm (59278)


I can only give support for the usage of the reimport features, which is just running reimport2.bat (or reimport.bat in some cases) and keep fingers crossed.
  • Author
  • Localization

Samdou, posted Wed Jul 28, 2021 7:07 pm (65396)


aluigi wrote:
Technical explanation:

Example of input archive
Code:
###112233################DATADATADATA#######
   | | |                 |
   | | |                 file
   | | size
   | compressed size
   offset
Standard reimport mode
Code:
###112233################DATADATADATA#######
                         |          |
                         | new file |
New reimport2 mode
Code:
###112233################DATADATADATA#######DATADATADATADATADATA
   | | |                                    |                  |
   | | |                                    | new bigger file! |
   | | new size
   | new compressed size
   new offset

As usual you will find all the info and limits (don't expect miracles) in section 3 of http://aluigi.org/papers/quickbms.txt

Feel free to post your positive and negative feedback about reimport2 here in this topic :)

What's the difference between reimport2 and reimport3?
  • Author
  • Localization

aluigi, posted Fri Jul 30, 2021 5:30 am (65409)


The difference is that reimport3 replace the original file with the new one in the same position by shrinking or enlarging the archive depending by the new size.

It's a method which is only useful when working on an archive containing sequential files without offset, for example many localization packages.

Example:
Code:
###112233################DATADATADATA#######
                         |          |
                         | file     |

###112233################DATADAT#######
                         |     |
                         | new |

###112233################DATADATADATADATADATADATA#######
                         |                      |
                         | new                  |
  • Author
  • Localization

Samdou, posted Fri Jul 30, 2021 1:30 pm (65414)


How can I tell if an archive is sequential and doesn't have an offset?
  • Author
  • Localization

aluigi, posted Fri Jul 30, 2021 2:54 pm (65415)


check if the script contains an instruction like "get OFFSET".
But usually reimport3 is only useful in very rare situations, often when the "slog" instruction is involved in localization files containing sequential text strings.
  • Author
  • Localization

Samdou, posted Fri Jul 30, 2021 5:38 pm (65417)


Thanks for the info
  • Author
  • Localization

snailtrauma, posted Tue Aug 03, 2021 4:13 pm (65477)


Hi. Recently I've looked into the possibility of translating the japanese PC version of Mr. Driller into English. Fortunately, QuickBMS has a HARC compression/decompression scheme for the *.DAT files, which has allowed me to at least see the image files that need editing.

However the game has... quite a few peculiar things inside it. There are text files, documents and even what seem to be browsing files for JASC Paint Shop Pro. Most of these seem to have been compiled but are seemingly unused by the game, as no references are made in the executable.

It also has a fair amount of images with English text. The game seems to be somewhat of an arcade port (which had an english version), but not all options or text are translated.

Unfortunately, the real issue here is that the image files are *.TIM files, and I'm not sure about the best way to reinsert them. Even being careful to have them retain the same size as their original JP versions, QuickBMS refuses to reimport many files, including the *.TIM files. I suspect it's because the program expects the files to have the HARC scheme but this obviously isn't the case for all of them.

What could be done to remedy this? Am I doing something wrong, or is another script/compression scheme required?
  • Author
  • Localization

aluigi, posted Thu Aug 05, 2021 7:23 am (65521)


Is there any error message from quickbms when you use reimport2.bat with the driller2_dat.bms script?
It seems a very simple format using zlib so quite ideal for reimporting.
  • Author
  • Localization

snailtrauma, posted Fri Aug 06, 2021 9:42 am (65554)


Yes, every attempt at reinserting the files will produce the following error:

Quote:
- signature of 4 bytes at offset 0x00000000 doesn't match the one
expected by the script:

this one: "x"
83 8c 83 78 ...x

expected: "HARC"
48 41 52 43 HARC


It shows this for every file, actually, even unchanged ones.
  • Author
  • Localization

aluigi, posted Mon Aug 09, 2021 11:52 am (65643)


Because it has been used in the wrong way.
You must launch reimport2.bat and select the SAME file and folder you selected for extraction.

IIt's very simple but for any doubt please check section 3 of http://aluigi.org/papers/quickbms.txt
  • Author
  • Localization

snailtrauma, posted Fri Aug 13, 2021 9:49 am (65696)


That's exactly what I did, and the issue still happens.
  • Author
  • Localization

aluigi, posted Fri Aug 13, 2021 2:59 pm (65699)


In case it isn't clear:

Extraction:
- run quickbms.exe
- select driller2_dat.bms
- select ARCHIVE.DAT (whatever is the name)
- select the output folder, for example c:\output

Reimporting:
- run reimport2.bat
- select driller2_dat.bms
- select ARCHIVE.DAT (whatever is the name)
- select the previous output folder where are the extracted files, for example c:\output
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.