Get your graphics formats figures out here! Got details for others? Post here!
5 posts • Page 1 of 1
- Posts: 26
- Joined: Sun Nov 08, 2009 11:05 am
- Location: Brazil
- Has thanked: 3 times
- Been thanked: 10 times
Code: Select all
# Silent Hill 3 [PS2] MFA extractor #start of header GET filename FILENAME IF filename & "0.mfa" GOTO 0xD8 ELSE GOTO 0xB8 ENDIF MATH header_size = 2048 GET real_size ASIZE CALLFUNCTION Extract 1 MATH temp_size = block_size FOR block = 1 IF temp_size < real_size # if the current total extracted size is smaller than the MFA archive size, continue extracting PRINT "Addtional block number %block% at offset %temp_size|h%" CALLFUNCTION Additional 1 ELSE CLEANEXIT ENDIF NEXT block STARTFUNCTION Additional MATH extra = 1 MATH offset = temp_size MATH offset += 8 GOTO offset CALLFUNCTION Extract 1 MATH temp_size += block_size ENDFUNCTION STARTFUNCTION Extract GET number_of_files LONG PRINT "Files: %number_of_files%" GET file_section_size LONG MATH block_size = file_section_size MATH block_size += header_size SAVEPOS offset FOR i = 0 < number_of_files # read file name GET name_offset LONG IF extra = 1 MATH name_offset += temp_size ENDIF GOTO name_offset GET filename STRING #read file offset MATH offset += 4 GOTO offset GET file_offset LONG MATH file_offset += header_size IF extra = 1 MATH file_offset += temp_size ENDIF # this unknown attribute seems to be related to Korean files MATH offset += 4 GOTO offset GET korean LONG IF korean == 0x000081A4 STRING filename += "[K]" ENDIF # read file size GET filesize LONG # save the file to disk LOG filename file_offset filesize SAVEPOS offset NEXT i ENDFUNCTION
Last edited by piratesephiroth on Fri Jan 13, 2012 10:10 am, edited 2 times in total.
Sorry to bump an old thread. Wasn't sure if i should make a new one. Can someone make a script that can do the opposite of this? Make it import files instead of export.
- Posts: 54
- Joined: Fri Aug 05, 2011 5:53 am
- Has thanked: 86 times
- Been thanked: 15 times
peronmls wrote:Sorry to bump an old thread. Wasn't sure if i should make a new one. Can someone make a script that can do the opposite of this? Make it import files instead of export.
from QuickBMS readme
Code: Select all
=============================== 3) Reimport the extracted files =============================== As already said QuickBMS is primarly an extraction tool, anyway from version 0.4.9 it supports also the -r option that transforms the tool in a simple reimporter/reinjector and so could be useful in some cases for who wants to mod or translate a game. The idea consists in being able to reimport ("injecting back") the modified files in the majority archives without touching a single line of the script, yeah just reusing the same bms scripts that already exist!