The Forum is up for sale: XeNTaX Forum looking for new owner

Brutal Legend .~h and .~p files format ( Xbox360 )

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Hevon
beginner
Posts: 28
Joined: Mon Dec 17, 2007 2:19 am
Has thanked: 2 times
Been thanked: 1 time

Brutal Legend .~h and .~p files format ( Xbox360 )

Post by Hevon »

Hi
I'm trying to find a way to get the model and texture for mod them or just for take a view.. i have compressed 2 files in a rar and uploaded http://www.sendspace.com/file/xiefx9 so if someone can help me :) that would be awesome cause its a great game and hope to see all the models and texture from it.
( sorry for my bad english )
User avatar
aluigi
VVIP member
VVIP member
Posts: 1916
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 661 times
Contact:

Re: Brutal Legend .~h and .~p files format ( Xbox360 )

Post by aluigi »

really a horrible format but I guess to have figured it:
*edit* watch the next posts
tell me if it works also with all the other files you have there.
Last edited by aluigi on Fri Oct 30, 2009 11:02 pm, edited 1 time in total.
Insomniac
beginner
Posts: 22
Joined: Fri Apr 24, 2009 4:11 am
Has thanked: 4 times

Re: Brutal Legend .~h and .~p files format ( Xbox360 )

Post by Insomniac »

I seem to be getting the following error with the script:

Code: Select all

- start the scanning of the input folder: bl
- open input file RgB_Faction.~h
- open script BL.bms

Error: invalid endian value big\par

Error: invalid datatype long\par at line 10

User avatar
aluigi
VVIP member
VVIP member
Posts: 1916
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 661 times
Contact:

Re: Brutal Legend .~h and .~p files format ( Xbox360 )

Post by aluigi »

are you using the current version of quickbms?
have you saved the file correctly?
that one is the same script I have used here.

then as first test try the script on single files instead of the input folder directly
Hevon
beginner
Posts: 28
Joined: Mon Dec 17, 2007 2:19 am
Has thanked: 2 times
Been thanked: 1 time

Re: Brutal Legend .~h and .~p files format ( Xbox360 )

Post by Hevon »

work verywell with the files i uploaded but not the others

Image
User avatar
aluigi
VVIP member
VVIP member
Posts: 1916
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 661 times
Contact:

Re: Brutal Legend .~h and .~p files format ( Xbox360 )

Post by aluigi »

that error means that happened a possible overflow, so I guess that one was a xmemcompressed file.
you can try adding the following command before the "clog" one
math SIZE += 1000

so:

Code: Select all

...
    else
        math SIZE += 1000
        clog NAME OFFSET ZSIZE SIZE 1
    endif
    ...
let me know if the extraction continues correctly
Hevon
beginner
Posts: 28
Joined: Mon Dec 17, 2007 2:19 am
Has thanked: 2 times
Been thanked: 1 time

Re: Brutal Legend .~h and .~p files format ( Xbox360 )

Post by Hevon »

work very nice now but only crash with the bigger file i have ( 400mo ).
quickbms start extracting and after 5sec it crash.
User avatar
aluigi
VVIP member
VVIP member
Posts: 1916
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 661 times
Contact:

Re: Brutal Legend .~h and .~p files format ( Xbox360 )

Post by aluigi »

the crash is a typical effect of the XMemDecompress function when used on data not compressed with that algorithm.
uhmmm can you paste here the latest lines showed by quickbms before the crash?
Insomniac
beginner
Posts: 22
Joined: Fri Apr 24, 2009 4:11 am
Has thanked: 4 times

Re: Brutal Legend .~h and .~p files format ( Xbox360 )

Post by Insomniac »

aluigi wrote: have you saved the file correctly?
This was my problem... for some reason the text file I pasted the script in was causing the problem.

Now, the QuickBMS script works perfectly for most of the files... but I get the same crash as Hevon for a couple of the larger files (240+ mb and 400+ mb).

Image
User avatar
aluigi
VVIP member
VVIP member
Posts: 1916
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 661 times
Contact:

Re: Brutal Legend .~h and .~p files format ( Xbox360 )

Post by aluigi »

that's definitely the crash of XMemDecompress.
so the only explanation is that this file "a01_avatar" is not compressed with xmemdecompress but with zlib (if was in plain-text the clog function wasn't called).

can you upload the ~h file?
probably is useful also the first megabyte of the ~p one
Insomniac
beginner
Posts: 22
Joined: Fri Apr 24, 2009 4:11 am
Has thanked: 4 times

Re: Brutal Legend .~h and .~p files format ( Xbox360 )

Post by Insomniac »

The contents of this post was deleted because of possible forum rules violation.
User avatar
aluigi
VVIP member
VVIP member
Posts: 1916
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 661 times
Contact:

Re: Brutal Legend .~h and .~p files format ( Xbox360 )

Post by aluigi »

ok was still the problem with the SIZE value so I have decided to remove the "math SIZE >>= 1" operation, that's the complete script:

Code: Select all

# Brutal Legend
# script for QuickBMS http://aluigi.org/papers.htm#quickbms

open FDDE "~h" 0
open FDDE "~p" 1

endian big
idstring dfpf
get DUMMY long
get DUMMY long
get DUMMY long  # align?
get DUMMY long
get NAME_OFF long
get DUMMY long
get DUMMY long
get FILES long

math INFO_SIZE = FILES
math INFO_SIZE <<= 4
math INFO_OFF = NAME_OFF
math INFO_OFF -= INFO_SIZE
goto INFO_OFF

for i = 0 < FILES
    get SIZE threebyte
    get DUMMY short
    get ZSIZE threebyte
    get OFFSET threebyte
    get DUMMY byte
    get NAMEX threebyte
    get COMTYPE byte

    savepos INFO_OFF
    math NAMEX >>= 3
    math NAMEX += NAME_OFF
    goto NAMEX
    get NAME string
    goto INFO_OFF

    if COMTYPE & 2
        comtype XMemDecompress
    else
        comtype zlib
    endif

    if SIZE & 0x800000
        math SIZE -= 0x800000
    endif
    if ZSIZE & 0x800000
        math ZSIZE -= 0x800000
    endif

    #math SIZE >>= 1
    math ZSIZE >>= 1
    math OFFSET <<= 5
    if SIZE == ZSIZE
        log NAME OFFSET SIZE 1
    else
        clog NAME OFFSET ZSIZE SIZE 1
    endif
    math OFFSET += ZSIZE
next i
now I'm sure it will work perfectly :)
if yes remember to re-extract also the other archives extracted previously.
Hevon
beginner
Posts: 28
Joined: Mon Dec 17, 2007 2:19 am
Has thanked: 2 times
Been thanked: 1 time

Re: Brutal Legend .~h and .~p files format ( Xbox360 )

Post by Hevon »

A New error while extracting a 235mo file

Image

By the way the 400mo one was extracted perfectly with the new script :D
User avatar
aluigi
VVIP member
VVIP member
Posts: 1916
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 661 times
Contact:

Re: Brutal Legend .~h and .~p files format ( Xbox360 )

Post by aluigi »

that one is not an error of the script or of quickbms, it's just an invalid filename.
on a file system can't exist a file and a folder with the same name while as you can see there is the file particles/textures/fire/beastfire and then the file beastfire located in a folder with the same name of the previous one.

an idea would be to skip that file hoping there are not other invalid names.
you can do it adding the following commands before "#math SIZE >>= 1":

Code: Select all

if NAME == "particles/textures/fire/beastfire"
    set NAME string "particles/textures/fire/beastfire2"
endif
#math SIZE >>= 1
unfortunately there is not much else to do
Hevon
beginner
Posts: 28
Joined: Mon Dec 17, 2007 2:19 am
Has thanked: 2 times
Been thanked: 1 time

Re: Brutal Legend .~h and .~p files format ( Xbox360 )

Post by Hevon »

aluigi wrote:that one is not an error of the script or of quickbms, it's just an invalid filename.
on a file system can't exist a file and a folder with the same name while as you can see there is the file particles/textures/fire/beastfire and then the file beastfire located in a folder with the same name of the previous one.

an idea would be to skip that file hoping there are not other invalid names.
you can do it adding the following commands before "#math SIZE >>= 1":

Code: Select all

if NAME == "particles/textures/fire/beastfire"
    set NAME string "particles/textures/fire/beastfire2"
endif
#math SIZE >>= 1
unfortunately there is not much else to do
I tried this code and still have the error so i changed by this

Code: Select all

    if NAME == "particles/textures/fire/beastfire/beastfire"
    set NAME string "particles/textures/fire/beastfire2"
    endif

    #math SIZE >>= 1
And worked :]
Thanks a lot !
Now trying to find how to view the model.. find the file type and texture type but dunno how to do this :scaredy:
Post Reply