WRC Generations .PKG bms

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Franco
Posts: 28
Joined: Sat May 14, 2022 11:03 pm

WRC Generations .PKG bms

Post by Franco »

Hello, the existing WRC 10 script does not work.
Can you please make a bms script for this game.

A sample file is below.
https://www.mediafire.com/file/lwqgp029 ... 2.PKG/file
Franco
Posts: 28
Joined: Sat May 14, 2022 11:03 pm

Re: WRC Generations .PKG bms

Post by Franco »

Can anyone take a look, please?
Ha3aP
Posts: 5
Joined: Sun Sep 29, 2019 1:44 pm

Re: WRC Generations .PKG bms

Post by Ha3aP »

Pls help open archive WRC Generations, wrc7.bms don't work ((
https://drive.google.com/file/d/1oABy5s ... share_link
Franco
Posts: 28
Joined: Sat May 14, 2022 11:03 pm

Re: WRC Generations .PKG bms

Post by Franco »

Yes, I tried everything, unfortunately it doesn't work.
Skalia16
Posts: 29
Joined: Sat Sep 25, 2021 5:45 pm

Re: WRC Generations .PKG bms

Post by Skalia16 »

Yes can someone please make a bms script?
Franco
Posts: 28
Joined: Sat May 14, 2022 11:03 pm

Re: WRC Generations .PKG bms

Post by Franco »

Can someone please take a look?
Ha3aP
Posts: 5
Joined: Sun Sep 29, 2019 1:44 pm

Re: WRC Generations .PKG bms

Post by Ha3aP »

Pls pls pls
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: WRC Generations .PKG bms

Post by Ekey »

Some fields are now 64-bit

Code: Select all

# WRC 7 / WRC 10 FIA World Rally Championship (script 0.2.2)
# WRC Generations
# script for QuickBMS http://quickbms.aluigi.org

comtype lz4f    # "\x04\x22\x4d\x18" magic is lz4f

set KEY string ""
getdstring SIGN 4
goto 0
if SIGN u!= "PPKG"
    # the key is "35DsFsyDFFUC4NVANPpYggyakreWkJfy" (quickbms gives problems using the key as-is...)
    set KEY string "0x33 0x35 0x44 0x73 0x46 0x73 0x79 0x44 0x46 0x46 0x55 0x43 0x34 0x4E 0x56 0x41 0x4E 0x50 0x70 0x59 0x67 0x67 0x79 0x61 0x6B 0x72 0x65 0x57 0x6B 0x4A 0x66 0x79"
    filexor KEY
    getdstring DUMMY 0x180  # unknown data
endif

idstring "PPKG"
get VER long    # 2 or 4 (WRC Generations)
get FILES long
get INFO_SIZE long
getdstring ZERO 0x20
for i = 0 < FILES
    filexor KEY 0
    get NAMESZ long
    getdstring NAME NAMESZ
    get NAME_CRC long
    get OFFSET longlong
    get TSTAMP longlong
    get ZSIZE longlong  # PKGB + ZSIZE + PKGE
    get SIZE longlong   # PKGB + SIZE  + PKGE
    get ZIP long
	
    if VER == 2
       get ZCRC long
       get CRC long
    elif VER == 4
       get ZCRC longlong
       get CRC longlong
    else
       print "Error: unsupported version -> %VER% contact me"
       cleanexit
    endif
	
    getdstring ZERO 0x20
    filexor ""

    math OFFSET + 4     # PKGB
    if ZIP == 0
        log NAME OFFSET SIZE
    else
        clog NAME OFFSET ZSIZE SIZE
    endif
next i
Franco
Posts: 28
Joined: Sat May 14, 2022 11:03 pm

Re: WRC Generations .PKG bms

Post by Franco »

Ekey wrote:Some fields are now 64-bit

Code: Select all

# WRC 7 / WRC 10 FIA World Rally Championship (script 0.2.2)
# WRC Generations
# script for QuickBMS http://quickbms.aluigi.org

comtype lz4f    # "\x04\x22\x4d\x18" magic is lz4f

set KEY string ""
getdstring SIGN 4
goto 0
if SIGN u!= "PPKG"
    # the key is "35DsFsyDFFUC4NVANPpYggyakreWkJfy" (quickbms gives problems using the key as-is...)
    set KEY string "0x33 0x35 0x44 0x73 0x46 0x73 0x79 0x44 0x46 0x46 0x55 0x43 0x34 0x4E 0x56 0x41 0x4E 0x50 0x70 0x59 0x67 0x67 0x79 0x61 0x6B 0x72 0x65 0x57 0x6B 0x4A 0x66 0x79"
    filexor KEY
    getdstring DUMMY 0x180  # unknown data
endif

idstring "PPKG"
get VER long    # 2 or 4 (WRC Generations)
get FILES long
get INFO_SIZE long
getdstring ZERO 0x20
for i = 0 < FILES
    filexor KEY 0
    get NAMESZ long
    getdstring NAME NAMESZ
    get NAME_CRC long
    get OFFSET longlong
    get TSTAMP longlong
    get ZSIZE longlong  # PKGB + ZSIZE + PKGE
    get SIZE longlong   # PKGB + SIZE  + PKGE
    get ZIP long
	
    if VER == 2
       get ZCRC long
       get CRC long
    elif VER == 4
       get ZCRC longlong
       get CRC longlong
    else
       print "Error: unsupported version -> %VER% contact me"
       cleanexit
    endif
	
    getdstring ZERO 0x20
    filexor ""

    math OFFSET + 4     # PKGB
    if ZIP == 0
        log NAME OFFSET SIZE
    else
        clog NAME OFFSET ZSIZE SIZE
    endif
next i
Ekey thank you very much. You're the king man, thanks :)
Ha3aP
Posts: 5
Joined: Sun Sep 29, 2019 1:44 pm

Re: WRC Generations .PKG bms

Post by Ha3aP »

Franco wrote:Ekey thank you very much. You're the king man, thanks :)
How open P3D?
the_keane
Posts: 3
Joined: Sun Nov 27, 2022 2:34 pm

Re: WRC Generations .PKG bms

Post by the_keane »

Hi, Thanks for updating the script, did anybody found a way to use the Blender script with .P3D? Its working for WRC10, but not Generations..

Thank you!
Franco
Posts: 28
Joined: Sat May 14, 2022 11:03 pm

Re: WRC Generations .PKG bms

Post by Franco »

Ha3aP wrote:
Franco wrote:Ekey thank you very much. You're the king man, thanks :)
How open P3D?
I don't know anything about it. But unfortunately it doesn't allow changes to the archive files anyway. The game crashes.
the_keane
Posts: 3
Joined: Sun Nov 27, 2022 2:34 pm

Re: WRC Generations .PKG bms

Post by the_keane »

I keep getting this error when importing the models from Generations, it works with no problem with WRC10.. any idea why this happens please?

Thank you!
Wibbyess
Posts: 1
Joined: Thu Dec 22, 2022 6:01 pm

Re: WRC Generations .PKG bms

Post by Wibbyess »

Hi guys, i can't repack the PKG, it give me an error, can you help me?