ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Tue Mar 28, 2017 2:21 am

All times are UTC




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Fri Dec 16, 2016 5:24 am 
User avatar

Joined: Mon Nov 07, 2016 5:49 am
Posts: 31
I need help on making a compiler for EA's .big archives, becausese im currently modding a mobile fifa game which doesnt support reading extracted files ,i need to get all the previously extracted data files into a .big archive because recompiling won't work(files sizes has changed). We already got a working extract/recompile script,but as u already know, it cant create new .big files, only repack inside original ones.
So please ,any help would be appreciated ;)
http://aluigi.altervista.org/bms/fightnight.bms


Top
   
PostPosted: Sun Jan 15, 2017 12:23 pm 

Joined: Sun Jul 10, 2016 11:07 am
Posts: 44
I believe aluigi made a code for a simple repack script, but you have to modify it to suit your big file since every game archive is different, cant find the thread where he posted it but I still have the script saved on my pc.

here
Code:
# 1) script.bms
# 2) the input file is ignored, select the same script
# 3) the output folder is the folder containing the files to pack

set OUTPUT_ARCHIVE string "dump.pak"

# init the buffers
log MEMORY_FILE  0 0
log MEMORY_FILE2 0 0

# placeholders
put 0 long MEMORY_FILE  # BASE_OFF
put 0 long MEMORY_FILE  # FILES

for FILES = 0

    # copy&paste code
    scanDir "." NAME SIZE       # get the file from the current folder
    if NAME == ""               # no other files are available so append index
        break
    endif
    open "." NAME
    string NAME << 2            # remove ".\"
    if NAME != OUTPUT_ARCHIVE   # in case the archive already exists
        # end of copy&paste code

        # add information to the index table
        string NAME R \ /
        strlen NAMESZ NAME
        put NAMESZ long MEMORY_FILE
        putdstring NAME NAMESZ MEMORY_FILE
        put SIZE long MEMORY_FILE
        get OFFSET asize MEMORY_FILE2
        put OFFSET long MEMORY_FILE

        # add the file to the archive
        append
        log MEMORY_FILE2 0 SIZE
        append
        math FILES + 1
    endif

next

get BASE_OFF asize MEMORY_FILE
putvarchr MEMORY_FILE 0 BASE_OFF long   # BASE_OFF
putvarchr MEMORY_FILE 4 FILES    long   # FILES

get SIZE asize MEMORY_FILE2
append
log MEMORY_FILE 0 SIZE MEMORY_FILE2
append

get SIZE asize MEMORY_FILE
log OUTPUT_ARCHIVE 0 SIZE MEMORY_FILE


Top
   
PostPosted: Thu Jan 19, 2017 4:25 am 
User avatar

Joined: Mon Nov 07, 2016 5:49 am
Posts: 31
So, excuse my noob question but, u say that i can create(not repack in an existing one) a .big file from scratch using this script?!


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

All times are UTC


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:
Powered by phpBB® Forum Software © phpBB Limited