Quake 3 Revolution (PS2) LINKFILE.LNK

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Alex_Abdulov
Posts: 11
Joined: Fri Dec 30, 2016 8:21 pm

Quake 3 Revolution (PS2) LINKFILE.LNK

Post by Alex_Abdulov »

Quake 3 Revolution (PS2) LINKFILE.LNK

Hi everyone.

Please help.

There is the resource file the game: LINKFILE.LNK

Help identify which method compression here uses.

If it is will a BMS script for unpacking and packing, it will be just super.


File: https://mega.nz/#!KxoDXDIC!zbyAO7MYx41r ... cnsEkbJvCw

Or the first 15 mb of this file: https://mega.nz/#!fsZDyDaQ!ASmNVOb1IyBh ... N_Op842f0A
Last edited by Alex_Abdulov on Tue Jan 03, 2017 7:28 am, edited 2 times in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Quake 3 Revolution (PS2) LINKFILE.LNK

Post by aluigi »

http://aluigi.org/bms/quake3_revolution.bms

*edit* linked the script on my website
Alex_Abdulov
Posts: 11
Joined: Fri Dec 30, 2016 8:21 pm

Re: Quake 3 Revolution (PS2) LINKFILE.LNK

Post by Alex_Abdulov »

aluigi wrote:

Code: Select all

# Quake 3 Revolution
# script for QuickBMS http://quickbms.aluigi.org

comtype dk2
idstring "FKNL"
get ZERO long
get DATA_OFF long
get DUMMY_OFF long
set PATH string ""

        callfunction GET_NAME 1
        get OFFSET long
        callfunction EXTRACT

startfunction EXTRACT
    savepos BCK_OFF
    goto OFFSET

    get FILES_OFF long
    get FOLDERS_OFF long
    get FILES long
    get FOLDERS long

    string PATH + NAME
    string PATH + /

    goto FILES_OFF
    for i = 0 < FILES
        callfunction GET_NAME 1
        get OFFSET long
        get ZSIZE long
        get SIZE long
        string NAME p "%s%s" PATH NAME

        if SIZE == ZSIZE
            log NAME OFFSET SIZE
        else
            clog NAME OFFSET ZSIZE SIZE
        endif
    next i

    goto FOLDERS_OFF
    for i = 0 < FOLDERS
        callfunction GET_NAME 1
        get OFFSET long
        callfunction EXTRACT
    next i

    goto BCK_OFF
endfunction

startfunction GET_NAME
    get NAME_OFF long
    savepos TMP
    goto NAME_OFF
    get NAME string
    goto TMP
endfunction


Thanks Luigi, the script unpacks good, but unfortunately the "reverse pack" does not work, I'm using Quick BMS Editor GUI 2.0b

Prompt how to be ?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Quake 3 Revolution (PS2) LINKFILE.LNK

Post by aluigi »

Use quickbms 0.7.7 and NOT these third parties old gui!
That algorithm is supported in reimporting, probably the edited archive will not work in the game, but the reimport mode should work.
Alex_Abdulov
Posts: 11
Joined: Fri Dec 30, 2016 8:21 pm

Re: Quake 3 Revolution (PS2) LINKFILE.LNK

Post by Alex_Abdulov »

aluigi wrote:Use quickbms 0.7.7 and NOT these third parties old gui!
That algorithm is supported in reimporting, probably the edited archive will not work in the game, but the reimport mode should work.


ok.

I used the command: quickbms.exe -w -r script.bms archive.dat folder

"C:\Program Files\Quick BMS 0.7.7\quickbms.exe" -w -r C:\Quake3Rev\QuakeEX.bms C:\Quake3Rev\LINKFILE.LNK C:\Quake3Rev\LINKFILE\

But there is a "small" problem:

the reimport option acts as a reimporter and so you cannot reinsert a
file if it's bigger than the original otherwise it will overwrite the
rest of the archive or cannot be loaded correctly:

new size: 3214 (4816 uncompressed)
old size: 3148 (4816 uncompressed)

--------------

And so with all the files.
*The unpacked files without changes, all files original.


Similar topic with the same problem: viewtopic.php?t=990

-----
viewtopic.php?t=990#p5473
You can as well as and there, choose the best degree compression ?
---------


What algorithm compression used for LINKFILE.LNK ?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Quake 3 Revolution (PS2) LINKFILE.LNK

Post by aluigi »

What algorithm compression used for LINKFILE.LNK ?

It's the Electronic Arts most used compression algorithm.
Alex_Abdulov
Posts: 11
Joined: Fri Dec 30, 2016 8:21 pm

Re: Quake 3 Revolution (PS2) LINKFILE.LNK

Post by Alex_Abdulov »

new size: 3214 (4816 uncompressed)
old size: 3148 (4816 uncompressed)


You can somehow this fix ?
The degree of compression can be even better ?
-----------

I checked.
If delete the free space at the end of the original file (for example: Arial10.sfn), the file may be imported, but the problem is that not in all files have free space at the end.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Quake 3 Revolution (PS2) LINKFILE.LNK

Post by aluigi »

The qfs_compress_data function in qfs.c contains a QFS_MAXITER value that "may" provide better rates but honestly I have never tested.
I will check it when I will work on the next version of quickbms.
Alex_Abdulov
Posts: 11
Joined: Fri Dec 30, 2016 8:21 pm

Re: Quake 3 Revolution (PS2) LINKFILE.LNK

Post by Alex_Abdulov »

aluigi wrote:The qfs_compress_data function in qfs.c contains a QFS_MAXITER value that "may" provide better rates but honestly I have never tested.
I will check it when I will work on the next version of quickbms.


ok.
i will wait the next version of quickbms.
Anyway thanks !