However, if you just want to add support for older versions to your script and save some time, the compression algorithm being used (which is what frank re-implemented in his LZ77 DLL) is LZ4.
Here's a code snippet of how to decompress a compressed chunk (0x0970 type) in older versions:
http://pastebin.com/rKxRSHVa
FIFA 17
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: FIFA 17
Thanks for all the info
-
- Posts: 1125
- Joined: Tue Feb 02, 2016 2:35 am
Re: FIFA 17
So, now that we have enough information for the Frostbite archives, is the script ready or put on hold?
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: FIFA 17
On my side I opted for a big break.
I will return on this stuff when it's the right moment.
I will return on this stuff when it's the right moment.
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: FIFA 17
There will be no updates on the script.
Use the solutions provided in the previous posts.
Use the solutions provided in the previous posts.
-
- Posts: 1125
- Joined: Tue Feb 02, 2016 2:35 am
Re: FIFA 17
So I did this strange edit with frostbite.bms:
The reason I even managed to pull this off was because the script could trigger an error whether the "ZERO" value wasn`t a zero at all:The error in question was this:So I had to make an edit so that the script stays compartible with more recent games that use the Frostbite 3 engine.
I only tested this on Mirror`s Edge Catalyst, so I have no idea if this "workaround" can also work with Star Wars Battlefront, Battlefield 1 or even FIFA 17.
Code: Select all
startfunction RAW_CAS_CAT
open FDSE "cas.cat"
goto TOC_OFFSET
idstring "NyanNyanNyanNyan"
get FILES long
getdstring ZERO 20
if ZERO != "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
goto -16 0 SEEK_CUR
endif
math LAST_PACK_NUM = -1
for i = 0 < FILES
getdstring HASH 20
get FOFFSET long
get FSIZE long
get ZERO long
get PACK_NUM long
if PACK_NUM != LAST_PACK_NUM
math LAST_PACK_NUM = PACK_NUM
get PACK_NAME basename
string TMP p "%s_%02d.%s" PACK_NAME PACK_NUM PACK_NAME
open FDSE TMP 1
endif
log "" FOFFSET FSIZE 1
next i
endfunction
Code: Select all
. 0000000000000240 getdstr ZERO "" 20
00 00 00 00 20 bb 4f 61 04 b3 c5 2d 09 7c 9c 13 .... .Oa...-.|..
d8 a0 7c 0d
Code: Select all
Last script line before the error or that produced the error:
422 open FDSE TMP 1
I only tested this on Mirror`s Edge Catalyst, so I have no idea if this "workaround" can also work with Star Wars Battlefront, Battlefield 1 or even FIFA 17.
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: FIFA 17
NoFaTe wrote:Yes, the compression algorithm in use is a legacy version of zstd.
ZSTDv06_decompress
The algorithm is available in the quickbms source code but it's not compiled in, I will add it in the next version of quickbms.
The lack of retrocompatibility in zstd is really annoying, now I need to add a "new" legacy version everytime the algorithm is updated... boooring