gjol (.zpkg,zpkg.index)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
giles_tesla
Posts: 50
Joined: Fri Sep 30, 2016 4:12 am

Re: gjol (.zpkg,zpkg.index)

Post by giles_tesla »

aluigi wrote:Yes, upload those 2 files that have been generated and the relative index file if available.
It's better if you run the script on the zpkg archive of 2.5Gb

Sample:https://yadi.sk/d/E340c1YdxbfCf
asset.zpkg_0_16282265062=16 GB file (1)
asset.zpkg_16280167910_16282265062=16 GB file (2)
asset_crypt.zpkg_0_16282265062=16 GB file (1) Run before you give to unpack the script file
data.zpkg_0_-1648754618=2.5 GB file (1)
data.zpkg_-1650851770_-1648754618=2.5 GB file (2)
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: gjol (.zpkg,zpkg.index)

Post by aluigi »

Don't you have zpkg.index files?
giles_tesla
Posts: 50
Joined: Fri Sep 30, 2016 4:12 am

Re: gjol (.zpkg,zpkg.index)

Post by giles_tesla »

aluigi wrote:Don't you have zpkg.index files?

I don't know which of these files is index file. Is the source file?
TF7)WQ~{LLCJDW`6X3QY`T7.png
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: gjol (.zpkg,zpkg.index)

Post by aluigi »

Ah ok, I thought there were some files like data.zpkg.index because that was written in the title of the topic.
Anyway I have something working:
http://aluigi.org/bms/gjol.bms
giles_tesla
Posts: 50
Joined: Fri Sep 30, 2016 4:12 am

Re: gjol (.zpkg,zpkg.index)

Post by giles_tesla »

aluigi wrote:Ah ok, I thought there were some files like data.zpkg.index because that was written in the title of the topic.
Anyway I have something working:
http://aluigi.org/bms/gjol.bms

Cool! 2.5 GB file work perfect, 100% decompression, but not the correct file name
Unpack the 16 gb file only a little part of the error is encountered.
D}5YK_7@9)2O5I$A0(TOXAA.png
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: gjol (.zpkg,zpkg.index)

Post by aluigi »

Do you have the same error if you replace:

Code: Select all

get SIZE longlong
with

Code: Select all

get SIZE long
get DUMMY long
?
giles_tesla
Posts: 50
Joined: Fri Sep 30, 2016 4:12 am

Re: gjol (.zpkg,zpkg.index)

Post by giles_tesla »

aluigi wrote:Do you have the same error if you replace:

Code: Select all

get SIZE longlong
with

Code: Select all

get SIZE long
get DUMMY long
?

Like this?

Code: Select all

# gjol / Gu Jianqi Tan online / 《古剑奇谭网络版》
# script for QuickBMS http://quickbms.aluigi.org

idstring "ZPKG"
getdstring DUMMY 12
get DUMMY longlong
get DUMMY longlong
get DUMMY longlong
get DUMMY longlong
get DUMMY longlong
get DUMMY longlong
get ARCHIVE_SIZE asize
savepos OFFSET
for OFFSET = OFFSET != ARCHIVE_SIZE
    getdstring DUMMY 16
    get SIZE longlong
    get DUMMY long
    get CHUNK_SIZE long

    math CHUNKS = SIZE
    math CHUNKS / CHUNK_SIZE
    if SIZE % CHUNK_SIZE
        math CHUNKS + 1
    endif
    for x = 0 < CHUNKS
        get CHUNK_ZSIZE long
        putarray 0 x CHUNK_ZSIZE
    next x
    savepos OFFSET

    comtype blosc   # lzf and fastlzah fail on some files

    # some files use blosc, others use lzma
    get TEST short
    if TEST == 0x005d
        comtype lzma_dynamic    # the others don't work...
    endif

    putvarchr MEMORY_FILE SIZE 0
    log MEMORY_FILE 0 0
    append
    for x = 0 < CHUNKS
        getarray CHUNK_ZSIZE 0 x
        if CHUNK_ZSIZE == CHUNK_SIZE
            log MEMORY_FILE OFFSET CHUNK_SIZE
        else
            clog MEMORY_FILE OFFSET CHUNK_ZSIZE CHUNK_SIZE
        endif
        math OFFSET + CHUNK_ZSIZE
    next x
    append
    log "" 0 SIZE MEMORY_FILE

    goto OFFSET
next

L@)W[W6Z]GH7GJH6L7X{`T1.png
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: gjol (.zpkg,zpkg.index)

Post by aluigi »

Recheck my patch and spot your mistake :)
kanakanaka
Posts: 1
Joined: Sun Jun 25, 2017 3:00 am

Re: gjol (.zpkg,zpkg.index)

Post by kanakanaka »

it seems that the game files of new version has changed, the script does not work correctly, only several files can be decompressed. is there someone can update the script?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: gjol (.zpkg,zpkg.index)

Post by aluigi »

Please provide a sample.
happyend
Posts: 157
Joined: Sun Aug 24, 2014 8:54 am

Re: gjol (.zpkg,zpkg.index)

Post by happyend »

.
hi,aluigi
The game new version is released, current script doesn't work. Please help

new Samples:
https://www28.zippyshare.com/v/6vRAkTcI/file.html
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: gjol (.zpkg,zpkg.index)

Post by aluigi »

This script is compatible with the data* archive that now use the "ZFS" format:
http://aluigi.org/bms/new_sword_legends.bms

I have updated the script to version 0.2.1 for automatically handling the idx file but consider that it will be slow (searching the name from the hash is slow), it's enough to open 604.idx with the script and it will automatically extract all the archives.

I don't know how many archives exist for this game so the script will try them sequentially like data000 data001 and so on till there are none.
If you have a list of these data*, it would be useful.
happyend
Posts: 157
Joined: Sun Aug 24, 2014 8:54 am

Re: gjol (.zpkg,zpkg.index)

Post by happyend »

Thanks!!! aluigi ^^
dotharli
Posts: 2
Joined: Sun May 05, 2019 10:16 pm

Re: gjol (.zpkg,zpkg.index)

Post by dotharli »

Hello!

Asking here may or may not work since this thread has been pretty dead for a while, but I was curious to know if anyone has a method to open the files the script pulls? There are many .dat files and .model files, but unlike Justice Online and Moonlight Blade, there doesn't seem to be a 3DS Max script that can open these .dat files or anything that I am able to find that can open the .model files.

^^ If anyone has any suggestions about this, I'd love to hear them! Am willing to provide samples as well if necessary.
dotharli
Posts: 2
Joined: Sun May 05, 2019 10:16 pm

Re: gjol (.zpkg,zpkg.index)

Post by dotharli »

aluigi wrote:This script is compatible with the data* archive that now use the "ZFS" format:
http://aluigi.org/bms/new_sword_legends.bms

I have updated the script to version 0.2.1 for automatically handling the idx file but consider that it will be slow (searching the name from the hash is slow), it's enough to open 604.idx with the script and it will automatically extract all the archives.

I don't know how many archives exist for this game so the script will try them sequentially like data000 data001 and so on till there are none.
If you have a list of these data*, it would be useful.


It has been YEARS so I am unsure if you are still interested in this information, but there are a total of 35 data files for the game.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: gjol (.zpkg,zpkg.index)

Post by aluigi »

I can help only with the extraction of the files from the ZFS format.
kotaxzz2
Posts: 1
Joined: Wed Mar 10, 2021 9:36 am

Re: gjol (.zpkg,zpkg.index)

Post by kotaxzz2 »

aluigi wrote:This script is compatible with the data* archive that now use the "ZFS" format:
http://aluigi.org/bms/new_sword_legends.bms

I have updated the script to version 0.2.1 for automatically handling the idx file but consider that it will be slow (searching the name from the hash is slow), it's enough to open 604.idx with the script and it will automatically extract all the archives.

I don't know how many archives exist for this game so the script will try them sequentially like data000 data001 and so on till there are none.
If you have a list of these data*, it would be useful.


it means the output filelist from this console ?
Image
Icos
Posts: 8
Joined: Sun Mar 31, 2019 1:04 pm

Re: gjol (.zpkg,zpkg.index)

Post by Icos »

Hey, aluigi!

I've tried to use your script on the recent version of the game, and it looks like the script deadlocks at some code or at least slows down immensely. At some point it stops to extract the data and just doing something for hours without any real output.

I've attached the screenshots of the script's output with debug on at the moment of the deadlock. I've also included a zipped .torrent for the client, for your reference.

Please take a look at it!
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: gjol (.zpkg,zpkg.index)

Post by aluigi »

I guess the problem is just related to the 294460 names that are painful to be handled by quickbms.

What happens if you remove the following instructions from the script:

Code: Select all

        if NAMES != 0
            string HASH 0b HASH # fix for quickbms 0.11
            putvarchr HASH 40 0
            for x = 0 < NAMES
                getarray TMP 10 x
                if HASH == TMP
                    getarray NAME 11 x
                    break
                endif
            next x
        endif
Icos
Posts: 8
Joined: Sun Mar 31, 2019 1:04 pm

Re: gjol (.zpkg,zpkg.index)

Post by Icos »

I've tried to unpack the game with that change.
It unpacked successfully, however, only 238180 files were extracted. Plus the directory structure was not preserved and all files have numbers instead of their real names.
Is there any way to fix that?