[Need Help] Repack/rebuild sfc file with lz4 compress

Doubts, help and support about QuickBMS and other game research tools
nguyennk91
Posts: 1
Joined: Sat Jan 28, 2023 1:47 pm

[Need Help] Repack/rebuild sfc file with lz4 compress

Post by nguyennk91 »

Hi team, I'm trying to write a rebuild/repack script to help with localization a qq game (Moonlight Blade).
I was able to unpack them, translate them, and now just need to repack since reimport will not work due to filesize different (Chinese is way shorter compare to Eng translated)
Would appreciate all the help I can get to get started.

Here is the script I used to unpack, not sure if that will help with creating the rebuild script or not

Code: Select all

comtype lz4
idstring "SFC\x1a"
get VER long
get SFC_SIZE asize
for
    savepos TMP
    if TMP >= SFC_SIZE
        break
    endif
    getdstring DUMMY 8
    get ZSIZE long
    savepos OFFSET
    xmath TMP "OFFSET + ZSIZE"
    goto TMP
    get SIZE long
    clog "" OFFSET ZSIZE SIZE
next