Pl**.dat - general model information
Pl**Nr.dat - model data (also includes files with other color designation besides 'Nr')
Pl**Aj.dat - animation data
if i remember correctly.
Pl**.dat - general model information
Pl**Nr.dat - model data (also includes files with other color designation besides 'Nr')
Pl**Aj.dat - animation data
if i remember correctly.
The dat file have a weirdly structured layout. The 32-byte header structure i outlined earlier contains an offset to a list of offset values, the count of which is also listed in the header. This list of offsets point to small structures of information within the files, which themselves also begin with another offset to the actual data, along with possibly some data about the intent of the information at that offset. The actual data within the files may or may not be in order, but these offset lists usually are in a specific ordering. Usually for models this would be: texture/material information, vertex information, then mesh information. Determining what is what and the actual counts and what not are things i am still looking into, but once you parse the header information and list of offset values to offset values, you can technically tell where everything in the file is located...even if you cannot tell what that information at those offsets actually is (well you can visually, which may be enough for the things some people are attempting to do, but there is still the information in those substructures to find the remaining designators of what data is what and other properties). i originally stopped once i got to that point as other things came up that took priority, but now that i am getting back into looking into things i will hopefully be able to make the connections to what is what and hopefully finalize a general way of reading the data for each sub-type of dat file. Will have to see. i will attempt to get the binary template file i had for some of the header and offset information rewritten and post it when i can. if anything that will definitely help those looking to just find file offsets for hacking and what not, and may even allow them to test changing values that will even further verify what information in the files are used for what purpose.
This info is impressive...
how long have you been doing this??
i started on the Melee formats around the same time i started on the Metroid Prime formats mentioned in another thread in this section (which was around September last year i think). Just didn't get to work on things as much as i had wanted, and hadn't really touched it until recently when some things came up regarding Brawl (which i also plan on looking into) in addition to your interest in the formats. Overall i have probably only really invested about a week or so of active work on the Melee formats though, before now anyways. i believe a lot of the information left comes down to flag values that determine data type, data sizes, and in cases where it cannot be determined from some other method, data counts.
i have a lot of formats i am working on or towards, so i tend to jump around a lot between them. Hope to get caught up eventually though, only time will tell.
Last edited by revel8n; February 11th, 2010 at 18:41.
OMG RLY... o.O
SRSLY...
I've been working on the Melee formats for a few years... go figure
and here I get showed up by you... again, go figure
that makes me look bad...
but I'm not offended...
tell me your sorces (if you can rmbr them)
I want to know what you know.
Nice info on the animation file, I'm definitely going to look into that (It'd be so awesome to have custom animations!).
hey Milun...
for deciphering the faces...
what was that equation you used??
hey revel8n...
you were talking about the header having offset values that linked to certain offset values wich linked those to the ~ final values...
do you know of a good way to convert that??
if you could maybe give me an equation or something to go by...
that would be nice
I've got somewhat of a code here that I've worked on...
it just goes straight down to the face hex... (after converting the vert hex of course.)Code:import struct as S off = open("import.dat", 'rb') out = open("export.obj", 'w') t0 = off.read(32)#header a = 0 while (a == 0): h = S.pack("<HHH", int(off.read(2).encode('hex'), 16), int(off.read(2).encode('hex'), 16), int(off.read(2).encode('hex'), 16)) h = S.unpack("<hhh", h) v = "v "+(float(h[0]) * 0.01).__str__()+" "+(float(h[1]) * 0.01).__str__()+" "+(float(h[2]) * 0.01).__str__() if (v == 'v 0.0 0.0 0.0'): a = 1 while (a == 1): h = off.read(1).encode('hex')+off.read(1).encode('hex') print h if (h == '9800'): a = 2 #face code will be put here off.close() out.close() else: #print v #out.write(v+"\n")
but I'm sure there will be a mis-hap with other dat files.
that '9800' ain't always gonna be in the same place.
Last edited by Tcll; February 12th, 2010 at 01:06.