Page 3 of 4

Re: Smackdown vs Raw 2010 - bpe again

Posted: Sat Nov 28, 2009 3:59 am
by chrrox
I sent a message asking for the files o be split up also as it will be easier to mod them separated rather than in one big file.

Re: Smackdown vs Raw 2010 - bpe again

Posted: Sat Nov 28, 2009 4:04 am
by brienj
chrrox wrote:I sent a message asking for the files o be split up also as it will be easier to mod them separated rather than in one big file.
The scripts that I made will split the files up. ;)

Split files will make it easier to change the files, but the way he has it makes it easier to see the whole "picture" and what the file is supposed to be. Both type of scripts would be useful, and now that I see how the offsets work, I will be working on revising my script some.

Re: Smackdown vs Raw 2010 - bpe again

Posted: Sat Nov 28, 2009 4:11 am
by chrrox
I am looking at the file formats from a 3d model perspective and the developers must have split the files up in memory due to the fact that all the offsets are based on if each file ws seperated rather than one big file. but it is interesting to see it as one big file.

Re: Smackdown vs Raw 2010 - bpe again

Posted: Sat Nov 28, 2009 6:46 am
by brienj
chrrox wrote:I am looking at the file formats from a 3d model perspective and the developers must have split the files up in memory due to the fact that all the offsets are based on if each file ws seperated rather than one big file. but it is interesting to see it as one big file.
I updated the script for the chXXX.pac files, now that I see how the offsets and sizes are stored, thanks to aluigi, it is scripted better, and it also extracts files into seperated files, just like you want.

I'll update the other ones too, but all my scripts extract each individual pac file, then it extracts all the compressed files out of the pac file into seperate compressed files, then it decompresses each of those files (if it is BPE format) and put those files seperately in a different folder. If you haven't tried one yet, it does exactly like you want. ;)

Re: Smackdown vs Raw 2010 - bpe again

Posted: Sat Nov 28, 2009 8:23 am
by NMCM
I've been reading through topics looking for a tool that can extract model textures or anything from the .bpe files from wwf smackdown 2 know your roles(Ps1). I've downloaded both the quickbms and the unrrbpe. Nothing seems to work when I try to open the pac files or the .bpe files themselves with the extractor. Could someone help me?

Re: Smackdown vs Raw 2010 - bpe again

Posted: Sat Nov 28, 2009 12:27 pm
by aluigi
fixed both the bug of MEMORY_FILE (because one of the file had size 0) and the compatibility with the EPK8 archives (names of 8 bytes instead of 4)
released script 0.1.2

Re: Smackdown vs Raw 2010 - bpe again

Posted: Sat Nov 28, 2009 6:23 pm
by chrrox
The script works great :)
Image

Re: Smackdown vs Raw 2010 - bpe again

Posted: Sat Nov 28, 2009 8:13 pm
by aluigi
for anyone, the latest version of the script is 0.2.1 (thanx to chrrox and brienj for the testing eh eh eh)

Re: Smackdown vs Raw 2010 - bpe again

Posted: Sat Nov 28, 2009 8:13 pm
by brienj
What is the format of the model files?

Re: Smackdown vs Raw 2010 - bpe again

Posted: Sat Nov 28, 2009 8:50 pm
by chrrox
Here is the converter
viewtopic.php?f=16&t=3903

Re: Smackdown vs Raw 2010 - bpe again

Posted: Sun Nov 29, 2009 1:18 am
by brienj
The yukes.bms that aluigi made misses some DDS files, it doesn't give them a .dds extension, so I changed it to rename those properly. The lines I added say "# added by me" at the end of them. Maybe there is a better way to fix it?

Code: Select all

# Yuke games: EPAC/EPK8 archives, PACH files and BPE chunks (script 0.2.1)
#   note that this script is really big and chaotic and the function
#   which guesses the extension simply "guesses" it so don't consider it much
# script for QuickBMS http://aluigi.org/papers.htm#quickbms

comtype yuke_bpe
putarray 0 0 0

# the following is only for being able to handle all the 3 files
get NAME filename
string NAME += ".unpacked"
getdstring SIGN 4
if SIGN == "PACH"
    print "PACH file"
    get SIZE asize
    log MEMORY_FILE 0 SIZE
    callfunction pach_unpack
    cleanexit
elif SIGN == "BPE "
    print "BPE chunk"
    get DUMMY long
    get ZSIZE long
    get SIZE long
    savepos OFFSET
    clog NAME OFFSET ZSIZE SIZE
    cleanexit
endif

set NAMESZ long 4
if SIGN == "EPAC"
    set NAMESZ long 4
elif SIGN == "EPK8"
    set NAMESZ long 8
else
    cleanexit
endif

#idstring "EPAC"
print "EPAC archive"
goto 0x800
for
    savepos OFFSET
    getdstring SIGN 4
    if SIGN == ""
        cleanexit
    endif
    string SIGN -= 1
    if SIGN == "EMD"
        get DUMMY long
        get DUMMY long
    elif SIGN == "EVP"
        get DUMMY long
        get DUMMY long
    elif SIGN == "EVT"
        get DUMMY long
        get DUMMY long
    else
        goto OFFSET
        getdstring NAME NAMESZ
        get OFFSET long
        get SIZE long
        math OFFSET += 8    # 0x4000
        math OFFSET *= 0x800
        math SIZE   *= 0x100
        log MEMORY_FILE OFFSET SIZE
        callfunction pach_unpack
    endif
next

startfunction pach_unpack
    set FOLDER string NAME
    getarray GLOBAL_COUNTER 0 0
    if SIZE == 0    # will be fixed in the next quickbms
        # they are empty folders, so skip them
        #log NAME 0 SIZE
    elif SIZE < 8
        log MEMORY_FILE2 0 SIZE MEMORY_FILE
        string NAME -= " "
        string NAME += /
        string NAME += GLOBAL_COUNTER
        callfunction gimme_a_name
        math GLOBAL_COUNTER += 1
        putarray 0 0 GLOBAL_COUNTER
    else
        getdstring SIGN 4 MEMORY_FILE
        if SIGN == "PACH"
            get CHUNKS long MEMORY_FILE
            savepos INFO_OFF MEMORY_FILE
            math BASE_OFF = CHUNKS
            math BASE_OFF *= 12
            math BASE_OFF += 8
            for j = 0 < CHUNKS
                set NAME string FOLDER
                string NAME -= " "
                string NAME += /
                string NAME += GLOBAL_COUNTER
                goto INFO_OFF MEMORY_FILE
                get DUMMY long MEMORY_FILE
                get CHUNK_OFF long MEMORY_FILE
                get CHUNK_SIZE long MEMORY_FILE
                savepos INFO_OFF MEMORY_FILE
                math CHUNK_OFF += BASE_OFF
                goto CHUNK_OFF MEMORY_FILE
                getdstring SIGN 4 MEMORY_FILE
                if SIGN == "BPE "
                    get DUMMY long MEMORY_FILE
                    get ZSIZE long MEMORY_FILE
                    get SIZE long MEMORY_FILE
                    savepos OFFSET MEMORY_FILE
                    clog MEMORY_FILE2 OFFSET ZSIZE SIZE MEMORY_FILE
                else
                    log MEMORY_FILE2 CHUNK_OFF CHUNK_SIZE MEMORY_FILE
                    math SIZE = CHUNK_SIZE
                endif
                callfunction gimme_a_name

                math GLOBAL_COUNTER += 1
                putarray 0 0 GLOBAL_COUNTER
            next j
        else
            string NAME -= " "
            string NAME += /
            string NAME += GLOBAL_COUNTER
            log MEMORY_FILE2 0 SIZE MEMORY_FILE
            callfunction gimme_a_name
            math GLOBAL_COUNTER += 1
            putarray 0 0 GLOBAL_COUNTER
        endif
    endif
endfunction

startfunction gimme_a_name
    get SIGN long MEMORY_FILE2
    get SIGN2 long MEMORY_FILE2
    if SIGN == 0x594f424a
        string NAME += ".YOBJ"
        log NAME 0 SIZE MEMORY_FILE2
    elif SIGN == 0x20455042
        string NAME += ".DAT"
        #get DUMMY long MEMORY_FILE2
        get ZSIZE long MEMORY_FILE2
        get SIZE long MEMORY_FILE2
        savepos OFFSET MEMORY_FILE2
        clog NAME OFFSET ZSIZE SIZE MEMORY_FILE2
    elif SIGN == 0x34425346
        string NAME += ".fsb"
        log NAME 0 SIZE MEMORY_FILE2
    elif SIGN == 0x48434150 # memory_files are not recursive
        string NAME += ".PACH"
        log NAME 0 SIZE MEMORY_FILE2
    elif SIGN == 0x20534444  # added by me
        string NAME += ".dds" # added by me
        log NAME 0 SIZE MEMORY_FILE2 # added by me
    elif SIGN & 0xffff0000  # guessed, should be good for the 99,9% of files
        string NAME += ".POF0"
        log NAME 0 SIZE MEMORY_FILE2
    elif SIGN2 == 0x00000100
        goto 0 MEMORY_FILE2
        get TEXTURES long MEMORY_FILE2
        goto 16 MEMORY_FILE2
        for z = 0 < TEXTURES
            getdstring TEX_NAME 16 MEMORY_FILE2
            if TEX_NAME == ""
                string NAME += ".TEX"
                log NAME 0 SIZE MEMORY_FILE2
                math z = TEXTURES
            else
                getdstring TEX_EXT 4 MEMORY_FILE2
                set TMP_NAME string FOLDER
                string TMP_NAME += /
                string TMP_NAME += TEX_NAME
                string TMP_NAME += "."
                string TMP_NAME += TEX_EXT
                get TEX_SIZE long MEMORY_FILE2
                get TEX_OFFSET long MEMORY_FILE2
                get DUMMY long MEMORY_FILE2
                log TMP_NAME TEX_OFFSET TEX_SIZE MEMORY_FILE2
            endif
        next z
    else
        string NAME += ".DAT"
        log NAME 0 SIZE MEMORY_FILE2
    endif
endfunction

Re: Smackdown vs Raw 2010 - bpe again

Posted: Sun Nov 29, 2009 12:39 pm
by aluigi
the following lines:

Code: Select all

    if SIGN == "EMD"
        get DUMMY long
        get DUMMY long
    elif SIGN == "EVP"
        get DUMMY long
        get DUMMY long
    elif SIGN == "EVT"
        get DUMMY long
        get DUMMY long
can be substituited with:

Code: Select all

    string SIGN -= 3
    if SIGN == "E"  # EMD, EVP, EVT, ED1 and so on
because all these separators/subfolders start with 'E' avoiding problems with the EPK8 archives, you can do a comparison with the script 0.2.1a

Re: Smackdown vs Raw 2010 - bpe again

Posted: Sun Nov 29, 2009 6:37 pm
by JBP
I'd like to try and figure out the burning method for this a little better. I think I read earlier that the game can read compressed and uncompressed data. If someone can explain in a little more detail about how to burn the game after the edits that would be great! For example let's say I edit John Cenas ch139.pac (I think that's his) when putting the newly edited files into the iso do I need to put everything in the ch folder, or do I need to put everything in a new folder inside the ch folder. Thanks in advance!

Also brienj have you got blender working yet?

Re: Smackdown vs Raw 2010 - bpe again

Posted: Mon Nov 30, 2009 4:02 am
by NMCM
I've read up on the subject in the smackdown vs raw 2010 .bpe again topic. I've downloaded the tools that were posted but am not too sure on how to use them. I tried opening the .bpe files that were extracted from my C2.PAC and DENT.PAC files with quickbms and unrrbpe but nothing happens. I would like to upload some files and have them tested if someone cares to help. I would really like to find something.

Edit:It works but I think I need someone to make a script compatible with SD!2. Someone please test this and tell me what happens.
Here's my Dent.PAC
http://www.megaupload.com/?d=LPX86EPJ

Re: Smackdown vs Raw 2010 - bpe again

Posted: Mon Nov 30, 2009 10:49 am
by JBP
Alright well adding a folder to the iso was harder than it sounds. Actually with modio and xbox backup creator I had zero luck. So I figure I'm not using the right program or something.....