ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Sun Jan 21, 2018 12:23 pm

All times are UTC




Post new topic  Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Sat Feb 13, 2016 8:52 am 

Joined: Sat Feb 13, 2016 8:52 am
Posts: 34
Hello,
I want to extract files from Unravel game, but I didn't find any tools for extract and repack. Can you please help me?

There are two examples of the files: https://mega.nz/#F!XUswVAQJ!F4k19KfxZNMwUsDZk7eQBA

THX :)


Top
   
PostPosted: Tue Feb 16, 2016 9:59 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 7464
The compressed files are splitted in chunks compressed with lz4 but only the first chunks can be decompressed, apparently they maintain the state for the other chunks but even in that way it doesn't work with some files (from file 0x3c0 on).
This script extracts only the compressed files with a size lower than 0x10000:
http://aluigi.org/bms/unravel.bms


Top
   
PostPosted: Wed Feb 17, 2016 6:38 pm 

Joined: Wed Feb 17, 2016 6:35 pm
Posts: 2
Thank you, Aluigi for the script.

I wanna localize this game to my language, but I'am totally amateur in this. Can you pls tell me, how and where to find text? I don't know, what is lz4 and things like this :(


Top
   
PostPosted: Wed Feb 17, 2016 11:16 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 7464
lz4 is a compression algorithm.
You must NOT touch the files in the compressed folder, no problems for the others (probably you have to use a hex editor).


Top
   
PostPosted: Sat Feb 20, 2016 12:30 pm 

Joined: Sat Feb 13, 2016 8:52 am
Posts: 34
Thx Aluigi, but your script probably work only with "Unravel.kit" file. If I try extract Unravel.kit.0, error will appear: "You must open the small file with KIT extension"

Can you please create script to .0 files? Thx


Top
   
PostPosted: Sat Feb 20, 2016 2:16 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 7464
You must open the KIT file because it contains the references to the 0 one.


Top
   
PostPosted: Sat Feb 20, 2016 2:56 pm 

Joined: Sat Feb 13, 2016 8:52 am
Posts: 34
Ahhh, ok :)


Top
   
PostPosted: Sun Feb 21, 2016 6:35 pm 

Joined: Wed Feb 17, 2016 6:35 pm
Posts: 2
Huh, I didn't find localization files. Can somebody help me? :)


Top
   
PostPosted: Sun Feb 21, 2016 6:50 pm 

Joined: Sat Feb 13, 2016 8:52 am
Posts: 34
I think, that localization files are .txt files in compressed folder. Is there any way, how to decompress them?


Top
   
PostPosted: Thu Mar 23, 2017 5:53 pm 

Joined: Fri Oct 09, 2015 1:41 am
Posts: 46
aluigi wrote:
The compressed files are splitted in chunks compressed with lz4 but only the first chunks can be decompressed, apparently they maintain the state for the other chunks but even in that way it doesn't work with some files (from file 0x3c0 on).
This script extracts only the compressed files with a size lower than 0x10000:
http://aluigi.org/bms/unravel.bms


Anyone, have success with theses .kit files? I want to translate this game too...


Top
   
PostPosted: Tue Jul 04, 2017 11:45 pm 

Joined: Sun Aug 24, 2014 5:26 pm
Posts: 228
I modified aluigi's script and now it extracts most of the files (big ones too). But some of them still can't be decompressed, so they are stored as is in "compressed\" directory, because i don't know what's wrong with them. Maybe this files need another type of lz4f header, but i don't know for sure and don't have much time now to investigate it.

Code:
get EXT extension
if EXT != "kit"
    print "Error: you must open the small file with the KIT extension"
    cleanexit
endif

comtype lz4f
get KIT_NAME filename
idstring "kit!"
get DUMMY long  # 1
get DUMMY long  # 1
get DUMMY long  # 1
get INFO_OFF longlong
get FILES long
get DUMMY long
get DUMMY byte
get DUMMY long
savepos OFFSET
math OFFSET + INFO_OFF
goto OFFSET

math LAST_PAK = -1
for i = 0 < FILES
    get FLAGS long
    get PAK_NUM short
    get OFFSET long
    get ZERO short  # maybe the 48bit part of OFFSET ?
    get ZSIZE longlong
    get SIZE longlong
    getdstring DUMMY 20
    get ZERO long
    get DUMMY long
    if PAK_NUM != LAST_PAK
        string TMP p "%s.%d" KIT_NAME PAK_NUM
        open FDSE TMP 1
        math LAST_PAK = PAK_NUM
    endif

    set NAME OFFSET
    string NAME p= "0x%08x" NAME
    set PAK_NAME PAK_NUM
    string PAK_NAME p= "%02x" PAK_NAME
    string NAME += "_"
    string NAME += PAK_NAME

    if ZSIZE == SIZE
        log "" OFFSET SIZE 1
    else

   xmath MEM_SIZE "ZSIZE + 11"
        putvarchr MEMORY_FILE MEM_SIZE 0
        log MEMORY_FILE 0 0
   putVarChr MEMORY_FILE 0 0x184D2204 long
   putVarChr MEMORY_FILE 4 0xC04040 threebyte
        append
        log MEMORY_FILE OFFSET ZSIZE 1
        append
        get MEM_SIZE asize MEMORY_FILE
   putVarChr MEMORY_FILE MEM_SIZE 0 long
        get MEM_SIZE asize MEMORY_FILE

   putvarchr MEMORY_FILE2 SIZE 0
        log MEMORY_FILE2 0 0
        clog MEMORY_FILE2 0 MEM_SIZE SIZE MEMORY_FILE

        get MEM_SIZE asize MEMORY_FILE2
   if MEM_SIZE != 0
      log NAME 0 MEM_SIZE MEMORY_FILE2
   else
      string COMP_NAME = "compressed/"
      string COMP_NAME += NAME
      log COMP_NAME OFFSET ZSIZE 1
   endif

    endif
next i


After the main script this one can be used on files in "compressed\" directory. It will extract 299/412 files (if you extracted all kit archives), so almost all game files gonna be extracted properly and only 113 will remain compressed.

Code:
comtype lz4
get FILE_SIZE asize
putvarchr MEMORY_FILE FILE_SIZE 0
log MEMORY_FILE 0 0
append
do
   get ZSIZE long
   savepos OFFSET
   log MEMORY_FILE OFFSET ZSIZE
   math OFFSET += ZSIZE
   goto OFFSET
while OFFSET < FILE_SIZE
append
get ZSIZE asize MEMORY_FILE
xmath SIZE "ZSIZE * 10"
get NAME filename
clog NAME 0 ZSIZE SIZE MEMORY_FILE


Top
   
PostPosted: Tue Jan 02, 2018 2:05 am 

Joined: Tue Dec 26, 2017 1:35 pm
Posts: 2
can i use the quickbms reimporter to repack the files?
i used the this unravel script with the reimporter and with the command line too "quickbms.exe -w -r script.bms archieve.pak output_folder" but it didint work
any help with the repack?
thx


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 12 posts ] 

All times are UTC


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:
Powered by phpBB® Forum Software © phpBB Limited