• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

Important Melee, Hacks, and You -- New Hackers Start Here, in the OP!

Zyx

Smash Journeyman
Joined
May 16, 2006
Messages
257
Location
France
Pokémon Stadium without transformation : http://www.megaupload.com/?d=7UMQJ727

@Milun : How can I find the collision data ? Randomly, trying everywhere ?..
I spend hours to find the position data of the part I want (to many position data O_o) and I think finding collision data is something like impossible to me...
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
hey revel...
I still don't exactly understand how root nodes work :/

but I've thought maybe root nodes are offset indexes

such as, if a root node was set at '80', then it initiates at offset[128] and so on,
until it hits another node index such as 'F0',
then node '80' is terminated and node 'F0' takes it's place (reading from offset[240] and so on)

also, you never replied to my Q about the 16bit hex before the root node offsets...
it's only either '00 00' for normal costumes, or '00 01' for colord costumes...
what is that, and what does it do??
 

Milun

Smash Ace
Joined
Oct 29, 2009
Messages
516
Location
Australia
Pokémon Stadium without transformation : http://www.megaupload.com/?d=7UMQJ727

@Milun : How can I find the collision data ? Randomly, trying everywhere ?..
I spend hours to find the position data of the part I want (to many position data O_o) and I think finding collision data is something like impossible to me...
Well collision data is always a bit of a scroll above the magnifier. You can tell you've found it when you see a relocation table, a.k.a the thing I put a green X over on this page.

Hope that helps.
 

Teczer0

Research Assistant
Premium
BRoomer
Joined
Mar 25, 2007
Messages
16,861
Location
Convex Cone, Positive Orthant
Now that is pretty awesome. is there any way this thread and the music/texture threads could be moved to that subforum?
Hehe, I just did so xD

I'm going to move a few more threads into this forum for you guys.

If you guys can please inform Jungle/Me/Victra of any threads that belong here to speed the process up. We'll gladly move it here for you.
 

DtJ Jungle

Check out my character in #GranblueFantasy
BRoomer
Joined
Jul 29, 2008
Messages
24,020
Location
Grancypher
We're still working on some stuff and theres a few things we need to clear up with you guys when we're ready to go. Still need to talk to JV about some stuff.
 

Steelia

Smash Champion
Joined
Sep 23, 2007
Messages
2,523
Location
Home.
I think I speak for all of the melee hacking community when I say: BIG THANKS to everyone (mods, admins, etc.) who made this possible :)
Most definitely. I MUST make a topic or two in there now. Hopefully it gets the hacking scene a little more attention. =)
 

revel8n

Smash Cadet
Joined
Dec 1, 2009
Messages
51
Melee dat format...

Pokémon Stadium without transformation : http://www.megaupload.com/?d=7UMQJ727

@Milun : How can I find the collision data ? Randomly, trying everywhere ?..
I spend hours to find the position data of the part I want (to many position data O_o) and I think finding collision data is something like impossible to me...
hey revel...
I still don't exactly understand how root nodes work :/

but I've thought maybe root nodes are offset indexes

such as, if a root node was set at '80', then it initiates at offset[128] and so on,
until it hits another node index such as 'F0',
then node '80' is terminated and node 'F0' takes it's place (reading from offset[240] and so on)

also, you never replied to my Q about the 16bit hex before the root node offsets...
it's only either '00 00' for normal costumes, or '00 01' for colord costumes...
what is that, and what does it do??
Well collision data is always a bit of a scroll above the magnifier. You can tell you've found it when you see a relocation table, a.k.a the thing I put a green X over on this page.

Hope that helps.
i guess i'll explain it again here and see if any others can pick it up and understand it further.

dat, usd, and certain other formats derived from the same format are all structured in a similar way. The file layout goes:

File Header
Data Block
Relocation Table
Root Nodes (2)
String Table

The file starts with a 0x20 (32) byte header which gives information on how to access the general archive structure.

Code:
struct DAT_HEADER
{
	// 0x00
	uint32 fileSize0x00                 <format = hex>;
	uint32 dataBlockSize0x04            <format = hex>; // size of main data block
	uint32 relocationTableCount0x08;
	uint32 rootCount0x0C;
	// 0x10
	uint32 rootCount0x10;
	uint32 unknown0x14;                                 // '001B' in main Pl*.dat files
	uint32 unknown0x18;
	uint32 unknown0x1C;
	// 0x20
};
The start of the header starts with the 32-bit (4-byte) size of the file upon creation, which can be used to verify the file is the correct length.

The next value is 32-bit as well and gives the length of the data section that follows directly after the header. Given that main data section starts immediately after the header, the base offset within the file is 0x20 bytes from the beginning of the file. All file offsets found later in the file start from the beginning of this data section, so taking the entire file into account all offsets will be 0x20 bytes less than you would expect (as you have to add the base data offset). If this is too confusing, copying all data from directly after the header, for the size given in the header, and placing it in a separate file will allow all the offsets in the file to be treated without modification.

Now that you have the header and data sections sorted out, they are not much use without knowing where various information begins within the data.

Starting directly after the relocation table is a list of file offsets. The number of which is given in the header by relocationTableCount. Each file offset is 32-bit and is relative to the beginning of the data section. The purpose of the relocation table is not to give access to specific data structures, but to show the location of every other file offset located within the data section. This is done because when the file is loaded into memory by the game the memory location assigned by the main operating system will not be based on a zero offset like loading the file simply in a hex editor. As such all file offset within the data will still be relative to the beginning of the data and not absolute addresses in memory. Using the relocation table all file offsets within the file can easily be modified to be absolute instead of relative. If you are not planning on doing any real coding with this format, or have no issue using the other file offsets in a relative manner, then this information can be ignored entirely in most cases. The main benefit this data provides for those not using it to convert absolute memory addresses, is that it gives the location of every other file offset within the data. Given knowledge of how structures work in code, it is highly unlikely for an offset/pointer to jump into the middle of a structure. Given this very strong assumption, it can be assumed that any file offset is going to point to the location of the beginning of another data structure. This can be very useful in determining the start and end of a particular data structure, as they should not overlap. So if you start at the beginning of a structure you do not know yet and happen to cross an address that is accessed through another file offset, you have a strong indicator of where the structure should stop. If there is a count somewhere you can divide the size of the area by it and get individual structure lengths and so on.

After the relocation table there are two lists of 8-byte structures i have simply termed root nodes. These structures contain 2 values, a file offset followed by a string table offset.

Code:
struct ROOT_NODE
{
	uint32 rootOffset0x00        <format = hex>;
	uint32 stringTableOffset0x04 <format = hex>; // offset to name string
};
The number of the structures in the two lists is given by the counts, rootCount0x0C and rootCount0x10, the latter often being 0 in some files.

The rootOffset is relative to the beginning of the data section, while the stringTableOffset is relative to the beginning of the string table that follows directly after the root node lists.

As stated the string table is located directly after the root node lists. The size is arbitrary and not specified in the file. You could subtract the size of the other sections combined from the total file size if desired, as the files are terminated by the string table information. The number of strings in the table is given by rootCount0x0C + rootCount0x10, though the main way of accessing data from this area is through the offsets given in the root nodes.

Some equations for the various file relative start offsets for clarification:
Code:
local int64 dataOffset  = 0x20;
local int64 relocOffset = dataOffset + fileHeader.dataBlockSize0x04;
local int64 rootOffset0 = relocOffset + (fileHeader.relocationTableCount0x08 * 4);
local int64 rootOffset1 = rootOffset0 + (fileHeader.rootCount0x0C * 8);
local int64 tableOffset = rootOffset1 + (fileHeader.rootCount0x10 * 8);
Now, on to the interpretation of the data the root nodes point to.

So far i have found no other identifying information for the starting structures other than a naming scheme followed by the names of the root nodes given by their string table offset.

For instance:
Pl*.dat - The main player data files, usually contain a root node whose name begins with "ftData".
Pl*Aj.dat - Player animation related files (Which actually are containers for multiple sub dat files reference through the main Pl*.dat file), usually contain a root node name that contains "figatree".
Ty*.dat, Pl*Nr.dat - And other player color related files, can contain multiple nodes usually ending with "_joint" with other possible sub-strings being "matanim", "shapeanim" or assumed MATerial and SHAPE ANIMation respectively.
Gr*.dat - Stage related files can contain a large number of nodes with sub names like "_image" (which you may note contain a format identifier as well), "_tlut", "_tlut_desc", "coll_data", "map_head", and a number of others.

As an example:
Code:
if (Strstr(nodeName, "_joint") != -1 &&
	Strstr(nodeName, "shapeanim") == -1 &&
	Strstr(nodeName, "matanim") == -1)
{
	// NOTE: Used for Ty*.dat and Pl*Nr.dat files
	struct
	{
		DumpJObj(rootOffset0x00);
	} jobjData;
}
else if (Strstr(nodeName, "ftData") != -1)
{
	// NOTE: Used for Pl*.dat files
	DumpFighter(rootOffset0x00);
}
else if (Strstr(nodeName, "map_head") != -1)
{
	// NOTE: Used for Gr*.dat files
	struct MAP_HEAD stageData;
}
else if (Strstr(nodeName, "figatree") != -1)
{
	// NOTE: Used for Pl*Aj.dat files
	struct FIGATREE_DATA animationData;
}
else if (Strstr(nodeName, "coll_data") != -1)
{
	// NOTE: Used for Gr*.dat files
	struct COLL_DATA animationData;
}
i have only investigated a number of these sections so far, mainly those related to gaining access to joint information which contains the hierarchy and also branches off into various data structures related to materials, textures, palettes, geometry and mesh information. All of which can give you access to data like the location, width, height, and format information of image data. The format and number of colors found in palette data. The vertex attributes, joint weighting, and other mesh parameters. And so on...

Code:
struct JOBJ_DATA
{
	// 0x00
	uint32 unknownOffset0x00 <format = hex>;
	uint32 flags             <format = hex>;
	uint32 childOffset       <format = hex>; // child jobj structure
	uint32 nextOffset        <format = hex>; // next jobj structure
	// 0x10
	uint32 dobjOffset        <format = hex>; // dobj structure - object information?
	float3 rotation;                         // rotation
	float3 scale;                            // scale
	float3 translation;                      // translation
	uint32 transformOffset   <format = hex>; // inverse transform
	uint32 unknown0x3C;
	// 0x40
};
This is the main Joint object structure, this can usually be found on root nodes that end with "_joint" that do not contain "matanim" or "shapeanim" (usually with "TopN" or "Share" instead). Following this hierarchy of structures you can obtain all the information i am currently using to produce the screenshots i have posted.

As for the collision data mentioned, i had not looked into it until recently and have not deciphered any more than has already been posted. The data is found on the "coll_data" root node and the main structure follows this layout:
Code:
struct COLL_DATA
{
	uint32 vertexOffset <format = hex>;
	uint32 vertexCount;
	uint32 indexOffset  <format = hex>;
	uint32 indexCount;
	struct
	{
		uint16 indexStart;
		uint16 indexCount;
	} unknownData0x10[5];
	uint32 unknownOffset0x24 <format = hex>;
	uint32 unknownCount0x28;
};
The offset i have termed vertexOffset points to the data outline in Milun's information (i have only given it that name, not actually investigated any further). The data is 2 float values per entry which i am guess as outlined are 2D position values.

The indexOffset points to the data crossed out in Milun's explanations, the other offset points to somewhat similar information, but i have not gone deeper than this yet.

Well, overall that is the main information you need to at least start accessing any data you want within the files. i have posted more information between here and the emutalk thread, as well as a template file that outlines this information. i will see if i can accompany this post with pictures and further explanations. Feel free to ask for any other specifics i may have already deciphered. You can get a good idea of what that is from what i have posted in my screenshots. As always any help deciphering and/or placing more know information is greatly appreciated.

Hope it helps.
 

nuro

Smash Lord
Joined
Jan 1, 2006
Messages
1,101
Location
Somerville/Lowell, Massachusetts USA
Well I'm happy for you. Personally I would have made it so it stayeed on the neutral version less than it did on the transformations, but that's just me.
Done. I made a transformations only stage. You can download it here. http://www.mediafire.com/?n1fsugqmrjd28n0





Tthe area circled in green is the minimum time for the default cloudy stage to be up. The area circled in red is the maximum time for the default stage to be up. The game will randomly pick a time in between or equal to those two times. If you set both of those times to be equal than the stage will transform on that exact time. Also if you set it to a high number like Zyx did it will take forever to start the transformation.

The area circled in blue is the minimum time for a random transformation to occur and the area circled in purple is the maximum time. Same rule applies as above.

The area circled in orange is the time it takes for the transformation itself to occur. If you set it to a low number that transformation will happen instantly. Likewise if you set it really high the transformation will take forever.

Unfortunately it is impossible to set the timer for a specific transformation i.e. the water transformation as the game will just randomly pick the transformations. I was trying to make it so the rock and fire transformations didn't occur but that isn't possible unless were able to find the hex for the randomizer.


Hehe, I just did so xD

I'm going to move a few more threads into this forum for you guys.

If you guys can please inform Jungle/Me/Victra of any threads that belong here to speed the process up. We'll gladly move it here for you.
Sup teczero. ;p

can i suggest that you guys make a sticky for rules and make one of the rules to post new hacks in this thread. It will be very hard to find the new hacks if there is a threads made for every new hack that comes out.
 

Teczer0

Research Assistant
Premium
BRoomer
Joined
Mar 25, 2007
Messages
16,861
Location
Convex Cone, Positive Orthant
Actually, I'm not sure I follow. Probably because I'm studying for my RF/Optics exam but yea....

But go ahead and make the thread and I'll sticky it if I can see why it would be useful etc.

I also don't wanna spam the thread and such so if you guys have more suggestions contact us through like PMs/VMs and stuff you know the deal =3
 

nuro

Smash Lord
Joined
Jan 1, 2006
Messages
1,101
Location
Somerville/Lowell, Massachusetts USA
Actually, I'm not sure I follow. Probably because I'm studying for my RF/Optics exam but yea....

But go ahead and make the thread and I'll sticky it if I can see why it would be useful etc.

I also don't wanna spam the thread and such so if you guys have more suggestions contact us through like PMs/VMs and stuff you know the deal =3
It has been really easy to keep track of the all the hacks since they are all here in one place.

The subforum should only be used for things like guides, bulk hacks, bulk textures, etc. Otherwise I don't see the need for it, especially since most of the hacks are already in this thread.

Also this thread should be stickied obviously
 

Milun

Smash Ace
Joined
Oct 29, 2009
Messages
516
Location
Australia
Hm... now I'm wondering if this is the right place to post this.

Anyway:

I am SO not doing that again!

Ok, most importantly, I did not rip this. All I did was rip the vertices, then manually add the faces and textures. You can use this to alter vertice positions in the stage, but that's about it.

One more thing to mention, you gotta use my crappy vert converter to get the .obj's to hex (because it's set to that particular scale). After exporting the .obj, open it in a text editor and remove the first two lines (Blender leaves a watermark starting with a # there sometimes).

http://www.megaupload.com/?d=RBR8FPFU

And nuro, BRAVO! is all I can say to that. When I can get around to it, I'll definitely have to add that to my site (with your permission and credit of course). Now if you'll excuse me, I'm going to set that transformation timer really high and see what kind of crazy stuff happens.
 

nube

Smash Apprentice
Joined
Jun 20, 2010
Messages
166
[Sticky]Compilation Thread me and Godfed are working on (little how-to's on ALLLL facets of melee hacking)
[Sticky]Official Texture Hacks Thread (downloads and discussion)
[Sticky]Official Audio Hacks Thread (downloads and discussion)
[Sticky]Official Model/Vertex/Stage Hacks Thread (downloads, development, discussion)
[Sticky]Technical Difficulties Thread (for nubs lol)
Melee, Hacks and You (central hub for general hacks discussion, like usual)
Suggestions Thread
random thread
Ideally, the forum would look something like that :)
 

Milun

Smash Ace
Joined
Oct 29, 2009
Messages
516
Location
Australia
Um... I don't know for sure, as I haven't tried it, but the chances there are 50/50. You just need to find how to make the certain Pokemon appear at a certain time, move it into position, and make it motionless. Don't ask me, I tend not to touch stages like that. This sort of thing sounds like it would be annoying to achieve.
 

revel8n

Smash Cadet
Joined
Dec 1, 2009
Messages
51
@revel:

well...
you havn't really told me anything I didn't already know, or would've figured out...

I want to know what this is:
http://lh3.ggpht.com/_IteXPmeC6ek/TPa6NTpn5qI/AAAAAAAACJU/BICfOVaUr9g/unk.jpg
can you please tell me...

16bit unknown '00 01' <- I had it backwards :p (0001 for normal costumes 0000 for colored)
8bit node index[0]
8bit node index[1]
Well the entire message was not directed at you, but i guess it may help you t re-read it heh. The data you have point to is in the root node structure. And as listed contains two (2), 32-bit (4-byte) offsets. The first being an offset to the start of the data structure represented by the node, and the second an offset from the beginning of the sting table. The part you are referring to is simply nothing more than the high-word or upper 2-bytes of the 4-byte offset for that root node structures data offset.

0x00012B88 - root node offset
0x00000000 - string table offset

Since the file pictured has 2 root nodes, the second would be:

0x00017FE8 - root node offset
0x00000019 - string table offset

i have broken this off into a separate thread and will be going through the various data structures starting with Pl*Nr.dat and Ty*.dat files as they are the simplest of the dat formats.
 

S l o X

Smash Champion
Joined
Aug 17, 2009
Messages
2,838
Location
bridgeport, ct
;_; I need a Ubuntu compatible burner.
(zz got it to burn and work but now when i use gc it just goes black screen)
I hate Ubuntu.
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
Well the entire message was not directed at you, but i guess it may help you t re-read it heh. The data you have point to is in the root node structure. And as listed contains two (2), 32-bit (4-byte) offsets. The first being an offset to the start of the data structure represented by the node, and the second an offset from the beginning of the sting table. The part you are referring to is simply nothing more than the high-word or upper 2-bytes of the 4-byte offset for that root node structures data offset.

0x00012B88 - root node offset
0x00000000 - string table offset

Since the file pictured has 2 root nodes, the second would be:

0x00017FE8 - root node offset
0x00000019 - string table offset

i have broken this off into a separate thread and will be going through the various data structures starting with Pl*Nr.dat and Ty*.dat files as they are the simplest of the dat formats.
oh...
OOOOHHHH...
dang...
I was completely missing it :p

although I got the offset thing from you,
and you can see how it (or so I thought) kinda worked :p

alright...
well there's a real HURR DURR moment for me XD
 

Zyx

Smash Journeyman
Joined
May 16, 2006
Messages
257
Location
France
So, I've been trying to understand for hours how position/collision datas work...
Here are the results :

I can grab the edges : http://ssb-fan.fr/upload/folder02/try1.PNG
Then, I can walk on the platform : http://ssb-fan.fr/upload/folder02/try2.PNG
But when I jump, I fall through the platform... Why ? ;_;
I've just moved the platform (model+collisions) without changing its angles... Can you help me to understand please !?
 

L-a-t-e-r-a-l-u-s

Smash Ace
Joined
Dec 18, 2009
Messages
811
Uh, I'm not sure where to ask this... But, if I'm asking in the wrong place, please remove my post or PM me.

I'm wondering if there is anything for the Gamecube that allows launching backups from an SD card or flashdrive or some kind of portable media storage device. I intend on modding the shell of my gamecube (will post pics when I get to it ;P) and I'd like to do a total overhaul and possibly get the Action Replay SD Launcher thing... anyway, if anyone knows about this sort of launching isos from the sd card, let me know.
 

Milun

Smash Ace
Joined
Oct 29, 2009
Messages
516
Location
Australia
Zyx, that used to have me stumped too. What you need to do, is change the maximums. Look here, in the part of the hex under the Green X. I'm doing my best to write up descriptions for particular stages (not going as quickly as hoped).

Anyway, you need to change the maximum size for that platform. When I edited Great Bay, I neglected to do any major collision hacks, so I don't know exactly where the max data for that platform is, but what you want will be in the vicinity of here:

 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
Uh, I'm not sure where to ask this... But, if I'm asking in the wrong place, please remove my post or PM me.

I'm wondering if there is anything for the Gamecube that allows launching backups from an SD card or flashdrive or some kind of portable media storage device. I intend on modding the shell of my gamecube (will post pics when I get to it ;P) and I'd like to do a total overhaul and possibly get the Action Replay SD Launcher thing... anyway, if anyone knows about this sort of launching isos from the sd card, let me know.
can't you get it to work on wii?? :/

I don't think there is any softmods to do this this...
^but that's just me...

oh btw, yes this is in the wrong place :p
 

SleepyK

Banned via Administration
Joined
Mar 26, 2006
Messages
5,871
you can run burned discs via the sd media launcher.
not too sure about the hardmods. i'm sure you could find something with some googling.
 

L-a-t-e-r-a-l-u-s

Smash Ace
Joined
Dec 18, 2009
Messages
811
you can run burned discs via the sd media launcher.
not too sure about the hardmods. i'm sure you could find something with some googling.
Googled for like, 2 days. Not really, but I just get Wii stuff. Anyway, I apologize for getting us off topic. Lets please get back to the Melee Hacking.
 

SleepyK

Banned via Administration
Joined
Mar 26, 2006
Messages
5,871
i did some googling and it seems like the short answer is no, no one actually made a gc HDD loader.
the longer answer is that it's possible, perhaps via usb gecko..
 

Zef

Smash Ace
Joined
Oct 19, 2010
Messages
993
Location
Mississauga, Ontario
lmao im too stupid to get this to work, i give up
cant get sd media launcher.:[

cmios freezes
mios black screen

homebrew hates my *** lol
 

TheDekuNut

Smash Journeyman
Joined
May 27, 2010
Messages
413
Location
NJ
lol face palm. but it looks like you could get a good likeness of porygon. his coloring isnt very complicated. but yah i think in order to get this extreme with vertexing someone first needs to figure out how to add vertexes, make dats sizes larger (good luck with that). making ash's cap on fox was a pain for me cause i can't get the detail that i want. but dude that is truly amazing what you did there.
 

Milun

Smash Ace
Joined
Oct 29, 2009
Messages
516
Location
Australia
Oh no, I took textures into consideration. It's just that I can't texture this, because I suck at texture hacking (especially with _8 and _9, I can't get those colours to work at all).
 

SleepyK

Banned via Administration
Joined
Mar 26, 2006
Messages
5,871
zef

google "modify any wii"
and follow the first link that comes up
 
Top Bottom