- — File Parsing Boot Camp — - (Some file structures added)

Started by Xiggah, January 24, 2012, 06:26:26 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

okay, here we go with the header of the REFF file

First Header:
0x00 (4) REFF, the type file
0x04 (2) always FE FF,  unknown. possible Fileidex/id ect
0x06 (2) unknown, always 00 07
0x08 (4) How big the file is
0x0C (2) unknown, think it's a jump to "next REFF header"
0x0E (2) possible ID

Second Header:
0x00 (4) REFF, the type file again!
0x04 (4) how big the file is again but 18 shorter
0x08 (4) offset to the special "String Table Link section!" or how big this header is, often set as 18.
0x0C (4) unknown
0x10 (4) unknown
0x14 (2) unknown, always set on 6

String Table Link Section:
this is hard to write since it's pretty messed up D:
first it's the REFF name example "purin" or "yoshi",
after the name the "String Table Link Section" length and after that it's how many entries it is in.

then it's using that follow on the rest of the REFF part/names ect.
First it's the "sections" name example "PtcPurinKorogaru", after that it's the offset (This offset + the beginning of STLS (30) = the offset!)
and after it its how big the file are (Offset before + this offset  = how big that file is)

and repeat on every "file"/entries


Stupid Tinypic :C

Quote from: pikazz on January 25, 2012, 10:40:43 AM
okay, here we go with the header of the REFF file

First Header:
0x00 (4) REFF, the type file
0x04 (2) always FE FF,  unknown. possible Fileidex/id ect
0x06 (2) unknown, always 00 07
0x08 (4) How big the file is
0x0C (2) unknown, think it's a jump to "next REFF header"
0x0E (2) possible ID

Second Header:
0x00 (4) REFF, the type file again!
0x04 (4) how big the file is again but 18 shorter
0x08 (4) offset to the special "String Table Link section!" or how big this header is, often set as 18.
0x0C (4) unknown
0x10 (4) unknown
0x14 (2) unknown, always set on 6

String Table Link Section:
this is hard to write since it's pretty messed up  :kdance:
first it's the REFF name example "purin" or "yoshi",
after the name the "String Table Link Section" length and after that it's how many entries it is in.

then it's using that follow on the rest of the REFF part/names ect.
First it's the "sections" name example "PtcPurinKorogaru", after that it's the offset (This offset + the beginning of STLS (28) = the offset!)
and after it its how big the file are (Offset before + this offset  = how big that file is)

and repeat on every "file"/entries

hmm... but how exactly does it work with the REFT files?
https://privateladyescorts.com - Free Local Dating - No Selfie - Anonymous Casual Dating -   Video Chat Private Lady

Quote from: Nymph on January 25, 2012, 10:42:16 AMhmm... but how exactly does it work with the REFT files?
cause REFT using the "same" method in the header, I looked between those 2 and saw no diffirens xD

but exactly how they are "connected" are still a mistery, I believe it's EFLS file that connecting those 2 together or REFF holding it in deeper :/
Stupid Tinypic :C

Quote from: pikazz on January 25, 2012, 10:46:45 AM
cause REFT using the "same" method in the header, I looked between those 2 and saw no diffirens xD

but exactly how they are "connected" are still a mistery, I believe it's EFLS file that connecting those 2 together or REFF holding it in deeper :/
well u did say its a big mess.... hmm :srs:
https://privateladyescorts.com - Free Local Dating - No Selfie - Anonymous Casual Dating -   Video Chat Private Lady

Quote from: Nymph on January 25, 2012, 10:48:20 AMwell u did say its a big mess.... hmm :srs:
this is what I meant:

Blackbox: REFFs name
Greenbox: how big the "entries" is in STLS
Bluebox: How many entries

Redbox: the REFF sections name
purplebox: Offset to it
pinkbox: how big the REFF section/entrie is

and repeat on each entrie with Redbox, PurpleBox and Pinkbox

EDIT: I found out how the REFF is connected with each other :happy: but I haven't found out the offset or something like that lol.
I am still cuseious houw REFF and REFT are connected

EDIT2: allI know how the REFF and REFT are connected is that REFF entrie having the REFT name in it if it using them :srs:
Stupid Tinypic :C

you know...
I do have an REFT template released on Brawl Imports...
(I think it needs a small update though)

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

Quote from: pikazz on January 25, 2012, 10:46:45 AM
cause REFT using the "same" method in the header, I looked between those 2 and saw no diffirens xD

but exactly how they are "connected" are still a mistery, I believe it's EFLS file that connecting those 2 together or REFF holding it in deeper :/
sry for D-Post...

all I can say is I've seen REFT image names in the REFF file...

I've also noticed a small hex patteren in one of the datas...
(I'll have to find it again) X(
but it follows a count exactly

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

Quote from: Tcll on January 25, 2012, 11:39:18 AMyou know... I do have an REFT template released on Brawl Imports... (I think it needs a small update though)
I know but it wasn't wrote like this I did.
also, I started before Xiggah gave me the link to it D:
Stupid Tinypic :C

btw...

I found out what the '0xFEFF' ment...

FEFF = little endian
FFFF = big endian

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

Quote from: Tcll on January 25, 2012, 11:50:31 AMbtw... I found out what the '0xFEFF' ment... FEFF = little endian FFFF = big endian
that's good :3

update: I found out that "Unk6" in the REFFs entries is frames!
I am 95% sure!
Stupid Tinypic :C

January 25, 2012, 11:58:15 PM #55 Last Edit: January 26, 2012, 12:04:27 AM by Eternal Yoshi
I'll join the party so I can complete the Event Match and Classic mode formats.

Also stuff from MGS2.
Event Match format

Header Size - 0x50

0x08 = Match Type(Value is at 2 for Coin event match)
0x0C = Time Limit
0x1F = Stage ID
0x38 = Game Speed
0x3C = Camera Shaking control
0x46 = Music ID

PlayerData Size = 0x38
---------------------------------
0x00  = byte CharacterID
0x01  = byte Status (Normal,Metal,Invisible,BEEP?)
0x04  = float Size(Scaling)
0x08  = Team Flag
0x0C  = ?????(Easy)
0x0F  = Offense Ratio(Easy)
0x11  = Defense Ratio(Easy)
0x14  = Stock count(Easy)
0x18  = Starting Damage(Easy)
0x1B  = ?????(Normal)
0x1D  = Offense Ratio(Normal)
0x1F  = Defense Ratio(Normal)
0x22  = Stock count(Normal)
0x26  = Starting Damage(Normal)
0x28  = ?????(Hard)
0x2B  = Offense Ratio(Hard)
0x2D  = Defense Ratio(Hard)
0x30  = Stock count(Hard)
0x34  = Starting Damage(Hard)


http://www.smashboards.com/showthread.php?t=288062

You guys... REFT and REFF rebuilding is COMPLETE.
All I need figured out is the actual DATA contained in the REFF. Not the string relocation offsets. Just the data.
REFT is 100% rebuildable, but the texture importer needs a few tweaks to work right with it. I've replaced Peach's hearts with stars as a test and it looked fine in BB, but they appeared swizzled in-game.

That's good to know. Now we can focus on other things, like SHP0 and the event match files.

For the most part, All that remains for the event matches is part of the header which dictates success and failure conditions.

For those who don't have a memo, You can edit Event Matches in MiscData[6] via common2.pac ONLY WITH TABUU.

Event Matches sounds like a nice thing to edit. I think I could find a few nice things in Event files if I get any good at file parsing.

Oh, and would anyone be interested if I posted the file structures of files already defined from Brawlbox? BJ made them nice and readable in the source code.

Quote from: Xiggah on January 26, 2012, 01:31:44 AM
Event Matches sounds like a nice thing to edit. I think I could find a few nice things in Event files if I get any good at file parsing.

Oh, and would anyone be interested if I posted the file structures of files already defined from Brawlbox? BJ made them nice and readable in the source code.
go for it ;D

actually, it'd be real helpful :)

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.