• 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!

Melee dat format...

wahabthesmasher

Smash Rookie
Joined
Mar 30, 2014
Messages
14
I am a complete noob, all i was able to do is find a file named TyPurin.dat and I think I want that model... If it is a model... When someone has time, or if it is possible right now, can you give me a download of Jigglypuff's model from Melee with the crown, that is all I want, all this stuff don't make sense to me, I even tried going to the Wiki which is what leads me to believe that TyPurin.dat in Jigglypuff's model, but how do I extract it and get the crown on it?

JUST READ THIS IF YOU DONT WANT TO READ THAT ON THE TOP: me want jigglypuff with crown 3d model from melee plz me want download
 
Last edited:

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
I'm having trouble building a complete converter (data is not what I expect) or I'd have a model for ya...
but right now I can't even import the model correctly as I keep getting non-invertable matrices from the LRS coords.
I don't even have any form of a decent exporter built yet because of this... heh

I think the model you want is PlPnGd (only guessing: Player Purin Gold, Yellow might also be the name which might be either Yl or Yw).

Ty stands for Toy which is likely a short form of Trophy

so you're not wrong when you say it's Jigg's model, but it's probably not the model you were expecting :p
 
Last edited:

SuperShus

Smash Journeyman
Joined
Oct 21, 2013
Messages
267
Location
MD/VA
Slippi.gg
East#694
Tcll, what is keeping you from creating the converter?

I've read the OP but I only started doing texture mods a few weeks ago and sound mods yesterday so this is still pretty over my head.
Is it possible for someone to make a video explaining this stuff a bit better than text can?

Either way I'd like to understand what's going on. :o
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
well, I don't think I could make a decent video, but the best I got is this:
http://wiki.tockdom.com/wiki/HAL_DAT_(File_Format)

as for the converter:
http://smashboards.com/threads/universal-model-converter-side-development-thread.334292/page-13
I'd finally fixed the UT data transformer, just to find out Sm4sh models are PT...
in any case, yea, I don't know too much about game development, so I'm working off what I learn as I go...
I graduated 12th grade at Algebra level (my school held me back for being slow), and I never took college.

so anyways... UMC is slowely getting closer to a release...
I've been the only one actually working on the main code, though I'm finally getting a few members to help... (Matt Sitton abd BrawlNub)
I have other helpers who are just forwarding resources or helping me figure out how to code something...

it's not easy to design a purely extendable cross-platform interface with a frontend and scripting system simplified for noobs while also making it self-managable...
the thing is close enough to being considered it's own AI.

and this is all built by someone who can't read math:

but can read code:
<math>\mathbf v=\frac{m_a \mathbf u_a + m_b \mathbf u_b}{m_a + m_b}</math>

so yea, follow my thread for the latest updates on UMC...
I'm only 1 person doing what I can with little knowledge and a logical mind
(my mind works by 3D representation of anything)
^ I remember pictures of logic better than I remember logical names
 
Last edited:

wahabthesmasher

Smash Rookie
Joined
Mar 30, 2014
Messages
14
This is awesome, everything is there (bone thingy, textures, crown)
Ok so I exported the model and used every script and I ended up with a bunch of files (textures[png], dummy, pmd, ses) and I have no idea how to use any of those files to open the model in Blender

btw thanks :p
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
I see you downloaded my latest repo... lol

I'll talk about it, but any further convo about UMC should be taken here:
http://smashboards.com/threads/universal-model-converter-side-development-thread.334292

one of the reasons UMC is not released yet is it's scripts currently suck. :p
(I'm the only one working on the stuff and I can't work on everything)
^ currently I'm working on an NTFS recovery program that can actually recover the needed data for building UMC
(any other program recovers 0KB)
^ the problem is those worthless recovery programs (such as Recuva which can't operate on img files) only look at the MFT and don't attempt to actually analyze the data.

so out of what you have exported, the:
- SES is UMC's native format, and is currently the only exportable format that holds proper model data
- PMD is capable of holding model data, but currently the script is blank so it exports an empty file (Blender can import these)
<<< look into installing PyMeshIO for Blender (the same library I'm using with UMC) ;)
- dummy is created by the hacky PNG export script (once I have the PMD export script finished, you won't need the PNG script)
<<< really I built this for a friend who just needed the images from an import

I'm working on some scripts, and hope to have some legit ones by the release :)
 

wahabthesmasher

Smash Rookie
Joined
Mar 30, 2014
Messages
14
Oh.. the scripts suck... skrub ( jk :p )

The NTFS thing I did read what you posted... and I from what i understood files are there but are not showing up (basically how computers "delete" files, I think) so wouldn't programs like EaseUS be able to recover them (I'm not the brightest). Also is their downsides to using ExFAT?

So UMC in the end is supposed to be able to read all model formats (because its opensource people can make their own scripts even after you abandon it). It's going to be awesome (especially the newer models like 3ds, wiiu)
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
lol pleeeeeeease carry this over on my thread

and no, this image will better explain:


the only downsides I know to ExFAT is it's still slow for being faster than NTFS, and isn't widely supported across all windows platforms (because MS wants you to use NTFS)

and yep, that was the idea ;)
and I'm not stopping at just models :D
if you'll notice in the new scripting standard, all backend functions begin with 'uge'
UGE (Universal Game Editor) is my final project which is to take place over many major updates to UMC.

by then it should have interfaces to support and be extendable with many different types of model formatting standards, including my own for drawing models without vertices. ;)
I mean, I'm not working on my own visual scripting language (UGESL) for nothing :)


obtw, next post you make here, I'm quoting it and replying to it on my thread.
 
Last edited:

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
The purpose of this thread is mainly so that post about the dat file structure isnt lost in the melee hacks thread.

Unknown Structure referenced by the texture structure. Its literally magic, I cant explain. But it has similar effects to that of the shaders in the mdl0 files. It has the ability to completely cover an image in a color, or make the textures transparent and some other stuff I cant quite explain. Tcll Tcll might be able to.
Heres some examples.




Notes of animation files (pl**aj.dat)

Every animation in the file is formatted as its own dat file in a way and the next animation dat header is on the next line directly after the end of the previous animation.
There seems to be only 1 root node and its entry in the string table is the name of the animation.
The root node - General animation info
0x00 - unknown (possible int for number of animations (always 0x00000001)
0x04 - unknown (always 0x00000000)
0x08- frame count (float: the character will go on to the next animation as soon as this is over. If it is greater the character will just freeze until then)
0x0C- pointer to bone index table (no idea what to call this)
0x10- animation info

bone index table (0x1*number of bones- length)
The number of bones can be gotten by just counting up the bones in the pl**.dat or looking at the joint matanim section and counting those up.
0x1- number of sections (possibly animations). Bone index is given by the position from the start of the table.
Terminated by 0xFF

animation info (0x0C*(total number of sections in the bone index table)-length)
0x00- length of animation data (0x02 bytes)
0x04- unknown (my speculation is that it works like the animation format word in the chr0 file for the brawl format)
0x0C- pointer to animation data

This is as far as my ability to pattern recognize goes. Anything more would require I actually know what Im talking about and have any idea how animations work to confirm.
As far as my assumption about the animation data format. I believe the format is encoded in the bits like in the chr0 files. However the bits would be reversed, and melee bone transformations are ordered by rotation, scale, translation whereas brawls is ordered by scale, rotation, translation.

Gr files

Map Head:
Not sure what the structures do here but the 3 files I looked at all seem to follow a pattern. The number of pointers in the referenced structures are all 0x4 from the pointer.
0x00 Pointer to unknown struct
0x08 Pointer to root structures
0x10 Pointer to more unknown stuff
...

Root structures: 0x34 long. (What we really care about anyways.)
0x00 Bone structure
0x04 Joint Matanim root
0x08 Image swapping struct?

Joint matanim root: I think if theres more than 1 pointer here then the second one is the Joint matanim pointer.
0x00 Joint matanim structure

Joint Matanim:
0x00 Child bone pointer
0x04 sibling bone pointer
0x0c object group pointer
0x14 unknown flags

Object Group:
0x00 pointer to next object
0x04 unknown flags
0x08 unknown flags
0x0c unknown struct pointer
...
The bone structures can be anything from item spawns, camera, player spawn. But if it has the joint matanim structure it has object groups. Probably.
From testing this is not always the case. Ive encountered a bone or 2 that has a single object group without the joint matanim section as well as a root with a joint matanim section and no object groups. These are probably exceptions though.
If you follow the image swapping struct pointers all the way down you should get to the image structs.




This should give us a structured way of going through the stage files rather then going to the map head and looking at every pointer or searching for 3f800000 3f800000 3f800000 (although it works 99% of the time you still have a lot of go through and determine whats a texture struct and whats a bone struct.)



Pl files

General structure of the joint matanim section:

Bones: The root node points here. There should be just as many bones here as in the share joint root
0x00 Child Bone pointer
0x04 Sibling Bone pointer
0x08 Object group pointer

Object Groups: The number of groups here should match up with the object groups for that bone.
0x00 Next object group pointer
0x08 Texture struct

Texture struct: Those blinking eyes. Basically texture swapping
0x08 Unknown struct pointer
0x0C Image struct array
0x10 Pallet structs array
0x14 Halfword for number for textures.
0x16 Halfword for number of palettes


The unknown struct seems like a hierarchy for the swapping animations. Looking at jiggs her right eye has more structs here which I assume is because of the winking. Leaving it to @ Tcll Tcll to figure out the rest lol. From the pattern I would have expected marth to have a different pointer in the object group for object swapping his sword/sheathe but no luck there. Maybe its just a hierachy and the aj files is responsible for picking which one.
If all goes well I means I can change the order of object groups and add some to bones without the game fussing. Possibly add bones if the aj file doesnt mind.

Also steelia might have messed up of some of the locations. Looking at it the pattern here doesnt matchup perfectly with the offsets he listed. I only looked at one file, and havent tested it yet but the pattern is really promising and when I went to that offset it appeared to be referenced by what looked like a pallet structure.
 
Last edited:

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
this page will help cover the basic structure of Pl joint root-node structure :)
http://wiki.tockdom.com/wiki/HAL_DAT_(File_Format)

of course though for anything else found, please edit the page, it ain't a wiki for nothing ;)
Gonna just post some unknown flags here.
Material Struct
0x4: unk flags
{
Alpha/Transparency flag
Shininess/Transparency value
}

unk pointer at 0x14:
{
Transparency struct?
}

Test arent really conclusive but further test should be easy from here on out.
Playing with unk flags 0x000000XX have this effect
http://smashboards.com/threads/melee-hacks-and-you-updated-5-21-2015.247119/page-122#post-20094756

Playing with unk flags 0x600000XX have this effect (0x600000XX has only been spotted when there is a pointer at 0x14)
http://smashboards.com/threads/melee-hacks-and-you-updated-5-21-2015.247119/page-123#post-20136010
http://smashboards.com/threads/melee-hacks-and-you-updated-5-21-2015.247119/page-123#post-20136399

unk flags 0x400000XX seems to support alpha, but may not be needed.
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
eh, I'm inclined to believe the flags deal with more than just transparency, and the shininess itself is a color-struct value... however, what you're dealing with may be the method used for Blender's toon-shading material settings which may seem like shininess...
comparing this to MDL0, that seems very likely. ;)
 

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
eh, I'm inclined to believe the flags deal with more than just transparency, and the shininess itself is a color-struct value... however, what you're dealing with may be the method used for Blender's toon-shading material settings which may seem like shininess...
comparing this to MDL0, that seems very likely. ;)
Well the term may be wrong, but looking at the swords one is reflecting light as if a smooth surface and the other isnt.
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
this page will help cover the basic structure of Pl joint root-node structure :)
http://wiki.tockdom.com/wiki/HAL_DAT_(File_Format)

of course though for anything else found, please edit the page, it ain't a wiki for nothing ;)
I don't feel like making an account.

Bone Structures
0x3C = pointer = unknown

I can tell it is a pointer by looking at the functions that read object data.
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
thanks, have you found any structure used by it by chance?? :)
I can look into it if you can give me a file to look at. ;)
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
thanks, have you found any structure used by it by chance?? :)
I can look into it if you can give me a file to look at. ;)
I have not. I set a breakpoint in the function that would use the pointer if it does not equal 0 and tried starting a few matches. The breakpoint never never got executed.
 
Last edited:

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
alright thanks, I'll keep watch here if you ever find something ;)

EDIT:
could also test it with KAR, most of the data structures are the same in that game ;)
 
Last edited:

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
I don't feel like making an account.

Bone Structures
0x3C = pointer = unknown

I can tell it is a pointer by looking at the functions that read object data.
Do you know of a file that has a pointer here.

Also that image swapping struct I said was in the root section of the Gr files, I think its actually mipmaps. Ill have to look more into it.
 
Last edited:

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
Do you know of a file that has a pointer here.

Also that image swapping struct I said was in the root section of the Gr files, I think its actually mipmaps. Ill have to look more into it.
I have not. I set a breakpoint in the function that would use the pointer if it does not equal 0 and tried starting a few matches. The breakpoint never never got executed.
lol Z zankyou , I just asked this :p
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
I didn't really look into anything any further but I did notice that if the Bone Structures flag word contains the vaue (0x00001000), so has bit 19 set on, then it does something along the lines of skipping the check for child bone structures.
 
Last edited:

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
I didn't really look into anything any further but I did notice that if the Bone Structures flag word contains the vaue (0x00001000), so has bit 19 set on, then it does something along the lines of skipping the check for child bone structures.
Huh, Ive noticed that it seems the first byte is responsible for children and the second byte was responsible for siblings. And the last byte was responsible for objects. Ive never seen the 3 byte set but I just assumed it was part of the objects.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Huh, Ive noticed that it seems the first byte is responsible for children and the second byte was responsible for siblings. And the last byte was responsible for objects. Ive never seen the 3 byte set but I just assumed it was part of the objects.
Capture.PNG


I don't actually know what this function controls btw.
 

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
ok, 2 questions:

1: how are you actually viewing that??
2: do you have or know of any resources that could help me understand that?? (since I know it's not Macro ASM *cringes*)
Debug version of dolphin.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Is it not part of the loading cycle?
Interesting. That function seems to be executed anytime a new object is to be loaded on-screen. So if you have characters standing in a match not doing anything, the function is not executed. But the moment I make a new object appear (like a cloud puff from running) then it gets hit.

ok, 2 questions:

1: how are you actually viewing that??
2: do you have or know of any resources that could help me understand that?? (since I know it's not Macro ASM *cringes*)
Go to the Assembly resources in the Melee Codes subforum.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Cool. So I can use that function to find the RAM location for the start of any object or bone or whatever you call it. r4 is one of the inputs to that function and holds the Bone Structure start.

3x scale Fox Up-B
Capture.PNG
 
Last edited:

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
Cool. So I can use that function to find the RAM location for the start of any object or bone or whatever you call it. r4 is one of the inputs to that function and holds the Bone Structure start.

3x scale Fox Up-B
View attachment 74158
I generally call it a bone and a bone is a type of root structure. Objects are referenced by bones.
Also thats interesting. I wonder if I can use it to find out what object is on the screen.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
The Mystery of the [Red] Laser Ring Color

14 years have passed and the ability to edit the laser blast ring color still eludes us.

Due to the discovery of the recently posted function, I present new information that still does not answer the question.

Capture.PNG

Figure 1: 3x scale laser ring

Modifying the "scale" values in either "Bone Structure" in red text below will result in the graphic modification. Bone structure starts are highlighted in blue.

Capture2.PNG

Figure 2: EfFxData.dat Bone Structure offsets

I tried following the "Object Struct Offset" of the second bone structure to the "Material Struct Offset" and then to the "Texture Struct Offset" which led me to the color data at offset 0x1d368. Changing it did nothing. Zankyou...you're up.
 
Last edited:

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
The Mystery of the [Red] Laser Ring Color

14 years have passed and the ability to edit the laser blast ring color still eludes us.

Due to the discovery of the recently posted function, I present new information that still does not answer the question.

View attachment 74546
Figure 1: 3x scale laser ring

Modifying the "scale" values in either "Bone Structure" in red text below will result in the graphic modification. Bone structure starts are highlighted in blue.

View attachment 74547
Figure 2: EfFxData.dat Bone Structure offsets

I tried following the "Object Struct Offset" of the second bone structure to the "Material Struct Offset" and then to the "Texture Struct Offset" which led me to the color data at offset 0x1d368. Changing it did nothing. Zankyou...you're up.
Quick glances without actually testing the file. Not sure if I posted about this yet but the unknown structure in the texture struct operates similarly to the color node. The color node applies to all images tied to that image while the unk struct colors just 1 texture. That being said, the unk for this material is at 0x1d2ec. Grabbing the word at 0x10 in the struct we see FF 00 4C. Plug that into a rgba color picker and youd see thats red.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Yo Achilles do you think you could find the function that removes meshes with that method. Really using dolphin to figure out what flags do brilliant. Although I dont know how you found that function.
Removes meshes...as in after it displays a mesh on screen, you want the function that takes it off-screen?

I found that function by doing a memory read breakpoint on the flags of the jungle japes main stage platform bone structure, lol. Just some arbitrary bone structure.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Quick glances without actually testing the file. Not sure if I posted about this yet but the unknown structure in the texture struct operates similarly to the color node. The color node applies to all images tied to that image while the unk struct colors just 1 texture. That being said, the unk for this material is at 0x1d2ec. Grabbing the word at 0x10 in the struct we see FF 00 4C. Plug that into a rgba color picker and youd see thats red.
I tried changing that as well and got nothing.
 
Top Bottom