XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Mon Oct 22, 2018 5:25 pm

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Xenoblade Chronicles X/2 format bible
PostPosted: Tue Apr 10, 2018 7:59 pm 
Offline
mega-veteran
mega-veteran
User avatar

Joined: Mon Apr 21, 2014 8:32 pm
Posts: 184
Has thanked: 5 times
Have thanks: 115 times

Topology of list:
  • File Extension
    • Format/usage
    • Can be opened with
Here is list of formats used in XenobladeX

And here is list of formats used in Xenoblade 2.



You can make the ads go away by registering


_________________
My Blog
Image


Last edited by PredatorCZ on Mon Apr 23, 2018 7:14 pm, edited 7 times in total.

Top
 Profile  
 
 Post subject: Re: Xenoblade Chronicles 2 arh/ard
PostPosted: Wed Apr 11, 2018 12:48 am 
Offline
Moderator
User avatar

Joined: Sun May 18, 2008 3:01 pm
Posts: 2487
Has thanked: 57 times
Have thanks: 1240 times
is there a decrypted release out there?


Top
 Profile  
 
 Post subject: Re: Xenoblade Chronicles 2 arh/ard
PostPosted: Wed Apr 11, 2018 9:24 am 
Offline
mega-veteran
mega-veteran
User avatar

Joined: Mon Apr 21, 2014 8:32 pm
Posts: 184
Has thanked: 5 times
Have thanks: 115 times
chrrox wrote:
is there a decrypted release out there?

There is hactool decryptor already released. It can extract/decrypt most NSW cartriges.


Here is another script, that will extract SAR Containers from both games.

Code:
# 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   

_________________
My Blog
Image


Top
 Profile  
 
 Post subject: Re: Xenoblade Chronicles X/2 format bible
PostPosted: Mon Apr 16, 2018 2:56 pm 
Offline
ultra-n00b

Joined: Sat Apr 08, 2017 2:49 am
Posts: 2
Has thanked: 0 time
Have thanks: 0 time
I am probably just being a bit stupid, but I am having the following problem when I try to extract the bf2.ard/arh archives:

Code:
- open input file D:\NS\QBMS\bf2.arh
- open script D:\NS\QBMS\xenoblade2.txt
- set output folder D:\NS\QBMS\out

  offset           filesize   filename
--------------------------------------
- enter in folder D:\NS\QBMS
- open input file D:\NS\QBMS\bf2.ard

- signature of 1 bytes at offset 0x0000000000000000 doesn't match the one
  expected by the script:

  this one: "a"
  61                                                a

  expected: "0"
  30                                                0

- 0 files found in 0 seconds
  coverage file 0     0%   1          1915120    . offset 0000000000000001
  coverage file 1     0%   0          10957229330 . offset 0000000000000000

Press ENTER or close the window to quit


Any idea what's wrong and how to fix it? The .ard/.arh files are ones that I extracted myself from a Xenoblade 2 .nca using hactool. All other files from that .nca, such as the .webm files, all seem fine. Also, I have used QuickBMS to extract other files before (quite a while ago, I admit) and haven't seen this issue before.

I am using QuickBMS 0.8.4 on Windows 10 Pro 64 Bit, if that makes any difference. Also, already tried running as admin and using compatibility options, but that seemed to make no difference.

I am but a humble 3D modeller with very limited programming knowledge, so any help would be much appreciated! :)


Top
 Profile  
 
 Post subject: Re: Xenoblade Chronicles X/2 format bible
PostPosted: Wed Apr 18, 2018 3:17 pm 
Offline
mega-veteran
mega-veteran
User avatar

Joined: Mon Apr 21, 2014 8:32 pm
Posts: 184
Has thanked: 5 times
Have thanks: 115 times
4g3n75m17h wrote:
I am probably just being a bit stupid, but I am having the following problem when I try to extract the bf2.ard/arh archives:

I am using QuickBMS 0.8.4 on Windows 10 Pro 64 Bit, if that makes any difference. Also, already tried running as admin and using compatibility options, but that seemed to make no difference.


ARH file must have arh1 as signature (fist 4 bytes), when opened with hex editor. Otherwise it's a corrupted file.

_________________
My Blog
Image


Top
 Profile  
 
 Post subject: Re: Xenoblade Chronicles X/2 format bible
PostPosted: Thu Apr 19, 2018 2:50 am 
Offline
ultra-n00b

Joined: Sat Apr 08, 2017 2:49 am
Posts: 2
Has thanked: 0 time
Have thanks: 0 time
PredatorCZ wrote:
ARH file must have arh1 as signature (fist 4 bytes), when opened with hex editor. Otherwise it's a corrupted file.


That is what makes me curious though. When I open the .arh file with a hex editor, arh1 are the first 4 bytes.

Also, the .ard and .arh files extract perfectly when I use the ‘xenoblade2-research’ tool from ‘Thealexbarney’ on GitHub. I compiled their tool using Visual Studio 2017 Community, ran the extraction command for the .ard and .arh files through CMD using the tool, and all the files were extracted successfully, so I can assume based on that; my .ard and .arh files are not corrupted.

I had these files extracted before I used your script, and was mainly interested in using your script to extract the files again so I could compare the newly extracted files from your script to the already extracted files from the ‘xenoblade2-research’ tool to see if there are any differences before I start trying to figure out how to access the models and textures.

So, that said, assuming my files are not corrupted, I am at a loss as to why your script isn’t working. :( Any ideas about what might be happening?


Top
 Profile  
 
 Post subject: Re: Xenoblade Chronicles X/2 format bible
PostPosted: Fri Apr 20, 2018 4:35 pm 
Offline
mega-veteran
mega-veteran
User avatar

Joined: Mon Apr 21, 2014 8:32 pm
Posts: 184
Has thanked: 5 times
Have thanks: 115 times
4g3n75m17h wrote:

So, that said, assuming my files are not corrupted, I am at a loss as to why your script isn’t working. :( Any ideas about what might be happening?


The problem is QuickBMS, I'm using version 0.7.7. I tried version 0.8.4 and it showns exact same error. I will try to fix script. I might also figure out those broken filenames.

EDIT:
For some reason they removed IDString "hello" FILEID syntax, looks like they don't give a shit about backwards compatibility, whinch is sad.

EDIT2:
Filenames are using some kinda of Patricia or Radix Tree, my knowlege of this technique is very limited and take some time, so in that case I fixed script, it's edited version is on first post. I also deleted attachemt.

_________________
My Blog
Image


Top
 Profile  
 
 Post subject: Re: Xenoblade Chronicles X/2 format bible
PostPosted: Sat Apr 21, 2018 4:29 pm 
Offline
mega-veteran
mega-veteran
User avatar

Joined: Mon Apr 21, 2014 8:32 pm
Posts: 184
Has thanked: 5 times
Have thanks: 115 times
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:
# 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



_________________
My Blog
Image


Top
 Profile  
 
 Post subject: Re: Xenoblade Chronicles X/2 format bible
PostPosted: Tue Apr 24, 2018 4:21 am 
Offline
ultra-n00b

Joined: Tue Apr 24, 2018 4:16 am
Posts: 2
Has thanked: 0 time
Have thanks: 0 time
Can't wait until we can extract 3d models


Top
 Profile  
 
 Post subject: Re: Xenoblade Chronicles X/2 format bible
PostPosted: Mon May 21, 2018 10:06 am 
Offline
beginner

Joined: Sun Jul 02, 2017 8:40 pm
Posts: 25
Has thanked: 9 times
Have thanks: 0 time
is there a way to extract data from xci (switch cartridge image)?


Top
 Profile  
 
 Post subject: Re: Xenoblade Chronicles X/2 format bible
PostPosted: Tue Jul 24, 2018 8:59 am 
Offline
ultra-n00b

Joined: Mon May 28, 2018 9:51 am
Posts: 4
Has thanked: 2 times
Have thanks: 0 time
I've been browsing around in the Xenoblade 2 game files and found a file called tora.bin in the minigames folder. It's got to be the game file to Tiger! Tiger!, right? If so, what could be done with it? Messing around in a text editor didn't get me anywhere... Answers would be kindly appreciated!



Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group