Re: Xenoblade Chronicles X/2 format bible
Posted: Mon Jan 07, 2019 3:07 pm
well done;~~
Code: Select all
- c_structs (2): "if" "id2" "-1"
Error: invalid command "if" or arguments -1 at line 41
Code: Select all
- signature of 4 bytes at offset 0x000000000018d5e0 doesn't match the one
expected by the script:
this one: "~%"
7e 98 25 f8 ~.%.
expected: "xbc1"
78 62 63 31 xbc1
- 24 files found in 6 seconds
coverage file 0 53% 1036794 1929104 . offset 00000000000fd208
coverage file 1 0% 1627499 11007429922 . offset 000000000018d5e4
ive tried it and tried feeding it into foobar with the .nop plugin but each time seem to get the file is corrupted. am i trying to read it out wrong or? even on quick bms 0.7.7.PredatorCZ wrote: ↑Wed Apr 11, 2018 9:24 amThere is hactool decryptor already released. It can extract/decrypt most NSW cartriges.chrrox wrote:is there a decrypted release out there?
Here is another script, that will extract SAR Containers from both games.
Code: Select all
# Xenoblade Chronicles sar unpacker # Author Lukas Cone in 2016-2018 # script for QuickBMS http://quickbms.aluigi.org get FOURCC long if FOURCC == 0x31524153 endian big elif FOURCC == 0x53415231 endian little else cleanexit endif get filesize long get Version long get FILES long get OFFSET long get DataOffset long get dummy long get dummy long getdstring PATH 128 goto OFFSET for i = 0 < FILES get iOffset long get iLen long get dummy long putarray 0 i iOffset putarray 1 i iLen set _fname PATH string _fname + "/" if Version > 500 getdstring iFname 36 string _fname + iFname goto 48 0 SEEK_CUR else getdstring iFname 52 string _fname + iFname endif putarray 2 i _fname next i for i = 0 < FILES getarray iOffset 0 i getarray iLen 1 i getarray iFname 2 i log iFname iOffset iLen next i
This thing is still being updated? Damn. From this error message, it seems, that file is marked as compressed, but actually isn't. Or they added something new to the archives.
If the file begins with sadf dpcm/opus and head, it's a valid nop file. Make sure, your filename extension is .nop, if you're using vgmstream plugin, it will detect formats by extension first. Also vgmstream only supports opus formats, so if you have the one with dpcm, it won't work.
It works with Xenoblade 3's archive files, all you need to do is to replace bf2.ard with bf3.ard and zlib with zstd.PredatorCZ wrote: ↑Sat Apr 21, 2018 4:29 pm Here is a QuickBMS script version 2, that will extract contents of bf2.ard/arh archives. From Xenoblade 2.
Some extracted files will have [%file id%] %filename% names, cause is that script cannot find them in a tree. Cause is unknown.
Make sure that both ard/arh files are in same folder and in quickbms dialog, always select bf2.arh.
Code: Select all
# Xenoblade Chronicles arh/ard unpacker # Author Lukas Cone in 2018, Version 2 # script for QuickBMS http://quickbms.aluigi.org # 1st iteration 1:15 hours # 2nd iteration 40 minutes endian little comtype zlib open FDSE "bf2.ard" 1 idstring 0 "arh1" get unk long get numnodes long get offset1 long get size1 long get offset2 long get size2 long get tocoffset long get numfiles long filexor "0x33 0xB5 0xE2 0x5D" GoTo offset1 0 SEEK_SET get chunksize long for i = 0 < numfiles savepos OFFSET get fname string putarray 0 i fname math OFFSET n OFFSET math OFFSET + offset1 putarray 3 i OFFSET get fid long; next i GoTo offset2 0 SEEK_SET set numusednodes long 0 for i = 0 < numnodes get id1 SIGNED_LONG get id2 SIGNED_LONG putarray 1 i id1 putarray 2 i id2 if id2 > -1 putarray 4 numusednodes i math numusednodes + 1 endif next i filexor "" GoTo tocoffset 0 SEEK_SET for i = 0 < numfiles get coffset longlong get csize long get ucsize long get compressed long get id long getarray Filename01 0 i getarray fileoffset 3 i strlen filenamelen Filename01 math Fileend = fileoffset math Fileend - filenamelen string cstr = "" callfunction FindFilename 1 strlen NAME_LENGTH cstr math filenameoffset - fileoffset math filenameoffset n filenameoffset # print "%filenameoffset%" if filenameoffset > 0 string Filename01 < filenameoffset endif string cstr + Filename01 if compressed > 0 GoTo coffset 1 SEEK_SET idstring 1 "xbc1" get _numfiles long 1 get _ucsize long 1 get _csize long 1 get _hash long 1 getdstring _fname 28 1 savepos OFFSET 1 if NAME_LENGTH < 1 string cstr P "[%id%] %_fname%" endif clog cstr OFFSET csize ucsize 1 else if NAME_LENGTH < 1 string cstr P "[%id%] %Filename01%" endif log cstr coffset csize 1 endif next i startfunction FindFilename for g = 0 < numusednodes getarray f 4 g getarray id1 1 f getarray id2 2 f if id1 <= fileoffset && id1 > Fileend set filenameoffset SIGNED_LONG id1 # print "%filenameoffset% %id2%" set currentChar SIGNED_LONG f callfunction LOOPNODES 1 string cstr r cstr # print "%cstr%" break endif next g endfunction startfunction LOOPNODES set cci SIGNED_LONG id2 getarray id1 1 id2 getarray id2 2 id2 math currentChar ^ id1 # print "%currentChar% %id1% %id2%" string _cstr = currentChar string cstr + _cstr set currentChar SIGNED_LONG cci # print "%cstr%" if id2 > 0 callfunction LOOPNODES 1 endif endfunction
It took me 4 hours to extract around 76k files and around 7k had incomplete filenames. That's kinda unacceptable. The script is clearly flawed.
Please update your max tool for Xenoblade 3PredatorCZ wrote: ↑Mon Jul 25, 2022 2:17 pmIt took me 4 hours to extract around 76k files and around 7k had incomplete filenames. That's kinda unacceptable. The script is clearly flawed.
He's already working on a new tool that replaces it.ice wrote: ↑Sat Jul 30, 2022 6:21 pmPlease update your max tool for Xenoblade 3PredatorCZ wrote: ↑Mon Jul 25, 2022 2:17 pmIt took me 4 hours to extract around 76k files and around 7k had incomplete filenames. That's kinda unacceptable. The script is clearly flawed.