XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Sun Dec 17, 2017 3:18 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 469 posts ]  Go to page Previous  1 ... 22, 23, 24, 25, 26, 27, 28 ... 32  Next
Author Message
 Post subject: Re: My quickBMS scripts
PostPosted: Mon Oct 22, 2012 10:11 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 76 times
Have thanks: 598 times














You can make the ads go away by registering

Wwise sound engine *.pck/AKPK extractor

Finally had the motivation to write a (hopefully) working script for this format now. Most games that use the Wwise engine also use that format - which applies to tons of games from the '10 era.
Sadly, the names are only saved as a CRC value. :-\
Be sure to grab the newest func_getTYPE.bms, I've changed some basic things regarding the detection of RIFF/RIFX-headered files. Detects xWMA, ms_adpcm, ima_adpcm, xbox_adpcm and Wwise ogg now.

Code:
# extracts archives with AKPK identifier (Wwise sound engine)
# newest func_getTYPE.bms is located at http://forum.xentax.com/viewtopic.php?f=13&p=69577#p69577
# (c) 2012-12-10 by AlphaTwentyThree of XeNTaX
#
# tested and working on
# ---------------------
# Kinect Rush: A Disney Pixar Adventure (X360, 2012)
# Assassin's Creed III (PC, 2012)
# Dishonored (PC, 2012)
# Warhammer 40,000: Space Marine (PC, 2012)
# Halo 4 (X360, 2012)
# Assasin's Creed: Revelations (PC, 2011)
# BioShock: Infinite (PC/PS3/X360, 2013)

include "func_getTYPE.bms"
getDstring IDENT 4
if IDENT == "AKPK"
elif IDENT == "1KCP" # The Saboteur (PC)
else
   print "Error: no valid Wwise sound pack"
   cleanexit
endif
set PC 0
endian big
get SIZE_HEADER long # data start offset
get TEST long
get FSIZE asize
if TEST != 1
   reverselong SIZE_HEADER
   endian little
   set PC 1
endif
get BNAME basename
string BNAME += "/"

goto 0xc
get IDENT long
set FOLDER_NAMES 1
if IDENT == 0xc6
   set NBIAS 0x18
elif IDENT == 0x14
   set NBIAS 0x1c
   set PC 1
else
   set NBIAS 0x1c # also in PC versions
endif
goto NBIAS
get NUM_FOLDERS long
if NUM_FOLDERS > 10
   math NBIAS -= 4
   goto NBIAS
   get NUM_FOLDERS long
endif
savepos MYOFF
set INFO NUM_FOLDERS
math INFO *= 8
math INFO += MYOFF # = start of names, will hold offset to jump to for TOC
set ALLNAMES 0 # for ceil after names

for i = 0 < NUM_FOLDERS
   goto MYOFF
   get OFF_NAME_FOLDER long
   math OFF_NAME_FOLDER += NBIAS
   get ID_FOLDER long
   savepos MYOFF
   goto OFF_NAME_FOLDER
   if PC == 0
      get NAME_FOLDER string
   else
      callfunction getPCstring 1
   endif
      strlen LENGTH NAME_FOLDER
      math ALLNAMES += LENGTH
      math ALLNAMES += 1
   string NAME_FOLDER += "/"
   string NAME_FOLDER += BNAME
   putArray 0 ID_FOLDER NAME_FOLDER
next i
if PC == 1
   math ALLNAMES *= 2
   math INFO += ALLNAMES
else
   savepos INFO
   math INFO x= 4
endif
goto INFO
set RUNS 1
callfunction extract 1
cleanexit

startfunction getPCstring
   set NAME_FOLDER ""
   for s = 0
      get CHAR byte
      get NULL byte
      putVarChr NAME_FOLDER s CHAR
      if CHAR == 0
         break
      endif
   next s
endfunction
   
startfunction extract
   savepos INFO
   get NUM_FILES long
   if NUM_FILES == 0
      if RUNS == 1
         get NUM_FILES long
      else
         cleanexit
      endif
   endif
   print "extracting %NUM_FILES% files (number at offset %INFO%)"
   for i = 1 <= NUM_FILES
      get NAME_CRC long
      get MULTI long # in certain cases only
      get SIZE long
      if SIZE == 0
         get SIZE long
      endif
      get OFFSET long
      get ID_FOLDER long
      if OFFSET == 0
         set OFFSET ID_FOLDER
         get ID_FOLDER long
      endif
      string NAME_CRC p= "0x%08x" NAME_CRC      
      if MULTI != 0
         math OFFSET *= MULTI
      endif
      
      savepos MYOFF
      getArray NAME_FOLDER 0 ID_FOLDER
      set NAME NAME_FOLDER
      #string NAME += "/"
      #string NAME += RUNS
      #string NAME += "/"
      string NAME += NAME_CRC
      putVarChr MEMORY_FILE SIZE 0
      log MEMORY_FILE 0 0
      append
      log MEMORY_FILE OFFSET SIZE
      append
      callfunction getTYPE 1
      if PC == 0
         endian big
      endif
      string NAME += EXT
      log NAME 0 SIZE MEMORY_FILE
   next i
   math RUNS += 1
   callfunction extract 1
endfunction

_________________
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)


Last edited by AlphaTwentyThree on Mon Oct 28, 2013 6:21 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Fri Oct 26, 2012 12:59 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 76 times
Have thanks: 598 times
Just updated the above script and added PC version support (little endian). Not quite sure if it works, it's just a workaround. Just try it on some files to check. At least it works for the PC version of Borderlands 2...

_________________
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Fri Oct 26, 2012 6:24 pm 
Offline
mega-veteran
mega-veteran

Joined: Fri Jun 11, 2010 12:08 pm
Posts: 310
Has thanked: 75 times
Have thanks: 20 times
Alpha, dont works again on PC .pcks yet.


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Fri Oct 26, 2012 7:11 pm 
Offline
double-veteran
double-veteran

Joined: Sun Apr 20, 2008 2:58 am
Posts: 836
Has thanked: 5 times
Have thanks: 32 times
I now getting errors from all wwwise packs that i try to test on, creed 3 is giving me the array element error without extracting anything and other pck that use to work will not now extract and gives me "incomplete file number 0 can't read from 1 bytes"


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Fri Oct 26, 2012 8:43 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 76 times
Have thanks: 598 times
I've updated the script, can you check if it works now?

_________________
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Fri Oct 26, 2012 8:48 pm 
Offline
double-veteran
double-veteran

Joined: Sun Apr 20, 2008 2:58 am
Posts: 836
Has thanked: 5 times
Have thanks: 32 times
Nope same errors as before. I have even updated quickbms to latest version and have the latest func_getTYPE.bms


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Sat Oct 27, 2012 3:34 am 
Offline
mega-veteran
mega-veteran

Joined: Fri Jun 11, 2010 12:08 pm
Posts: 310
Has thanked: 75 times
Have thanks: 20 times
Dont understand why dont works in any version script.

Alpha, could I send some files for tests in PM?


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Sat Oct 27, 2012 4:23 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 76 times
Have thanks: 598 times
Wind Blood (2012) Android - sound.pack extractor

Code:
# extracts the sound.pack of Wind Blood (2012) Android
# (c) 2012-10-27 by AlphaTwentyThree of XeNTaX

get FSIZE asize
goto -0xe
get FILES short
set OFFSET 0
goto OFFSET
for i = 1 <= FILES
   idstring "GBMP"
   math OFFSET += 0x12
   goto OFFSET
   get ZSIZE long
   get SIZE long
   get NAMEL long
   getDstring NAME NAMEL
   savepos OFFSET
   if SIZE == ZSIZE
      log NAME OFFSET ZSIZE
   else
      clog NAME OFFSET SIZE ZSIZE
   endif
   math OFFSET += SIZE
   if OFFSET < FSIZE
      goto OFFSET
   endif
next i

_________________
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Sun Oct 28, 2012 6:18 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 76 times
Have thanks: 598 times
Shoot Many Robots *.sar extractor

Code:
# extracts *.sar files found in "Shoot Many Robots" (2012, PC)
# (c) 2012-10-28 by AlphaTwentyThree of XeNTaX

idstring \x7f\xda\x0\x0
get FSIZE asize
get UNK long
get INFO long
goto INFO
for
   get OFFSET long
   get ZERO long
   get SIZE long
   get ZERO long
   get NAMEL long
   getDstring NAME NAMEL
   savepos TEST
   log NAME OFFSET SIZE
   if TEST == FSIZE
      cleanexit
   endif
next

_________________
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Mon Oct 29, 2012 8:36 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran

Joined: Wed Mar 31, 2010 6:54 am
Posts: 1593
Has thanked: 59 times
Have thanks: 751 times
viewtopic.php?p=71018#p71018


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Mon Oct 29, 2012 9:02 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 76 times
Have thanks: 598 times
Yay, thanks. :)

_________________
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Mon Oct 29, 2012 9:44 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 76 times
Have thanks: 598 times
Mountain Bike Adrenaline - BIG extractor

Code:
# extracts the BIG file from Mountain Bike Adrenaline (PS2)
# (c) 2012-10-29 by AlphaTwentyThree of XeNTaX

get FILES long
get UNK long
get MULTI long
savepos INFO
set NAMEBIAS FILES
math NAMEBIAS *= 0x14
math NAMEBIAS += INFO
for i = 1 <= FILES
   get NAMEPOS long
   math NAMEPOS += NAMEBIAS
   get OFFSET long
   math OFFSET *= MULTI
   get FILE_END long
   get TYPE long
   get SIZE long
   savepos MYOFF
   goto NAMEPOS
   get NAME string
   goto MYOFF
   log NAME OFFSET SIZE
next i

_________________
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Tue Oct 30, 2012 9:35 am 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 76 times
Have thanks: 598 times
UPDATE

Updated the func_getTYPE.bms once more. :) Added five or six new types and corrected a stupid mistake that sometimes prevented it from working correctly.

_________________
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Wed Oct 31, 2012 3:31 am 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 984
Has thanked: 76 times
Have thanks: 598 times
Added X360 support to the bdt/bht5 extractor. I don't know if the switch between offset and 4byte zero is connected to the endianness. I'd need other games to check this with.
viewtopic.php?f=13&t=4450&p=78048#p78048

_________________
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)


Top
 Profile  
 
 Post subject: Re: My quickBMS scripts
PostPosted: Fri Nov 09, 2012 10:42 pm 
Offline
n00b

Joined: Thu Dec 15, 2011 9:24 am
Posts: 17
Has thanked: 9 times
Have thanks: 1 time
AlphaTwentyThree wrote:
Just made a really extensive update for both the EA ast extractor and func_getTYPE.bms (faster and more sophisticated)! Extreme enhancements FTW! ;)



I heart you AlphaTwentyThree! I haven't check this in months thinking that you may have given up on it, but lo and behold! It finally extracts all of the BIG .AST files! Out of curiosity, is there a recursive function to extract the resultant .ast files from the big one?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 469 posts ]  Go to page Previous  1 ... 22, 23, 24, 25, 26, 27, 28 ... 32  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


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