Kitty Corp Meow Mix Forums

Super Smash Bros. Brawl Hacking => General Hacking Discussion => Topic started by: TheShyGuy on September 13, 2010, 05:57:53 PM



Title: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on September 13, 2010, 05:57:53 PM
Beta DownLoad (http://www.mediafire.com/?kwc98887gk3udgz)

V1.1 DownLoad (http://www.mediafire.com/?ug66z5qqnu6837p)

beta tut.

How to use:

export model into startup folder of this program
rename file to input.mdl0
open the program
Enter the TopNoffset mdl0 offset
either plain edit with the table or use the move up/down button
when done either close it or save - difference is that the save makes another copy

Move Up/Down:
ehh theres a tab that shows you multiple choices to put in that box to use.

Start from Scratch:
All it does is make every bone not have a parent or child.
Rotations and translations are removed also

Polygon deleter:
Self explanatory when you open it
Deletes either the vertices or the polygons(zeroes em out)
-can delete all/single/multiple polygons at once
multiple - From To - deletes the first polygon you want to the next polygon you want
multiple - Specific - can delete multiple polygons/vertices that aren't next to each other(can be though)

Plain editing:
Well i didn't write a good tutorial yet. I wrote a bad one and its included in the program's 3rd tab

Changes Since the first version....
-Polygon/vertices deleter(zero out)
-"start" from scratch"
-Textboxes are letter proof making it less error proof
-save
-restore last save > didn't add an undo button so this is good enough for me

Plan to add:
-make bone a child of the previous bone
-undo/redo button

Problems:
None that i know of


Version 1 Tut:
open exe
file -> load file -> choose mdl0 file
TopNOffset window opens -> enter top n offset
press the load tree buttton

- Tree View-
just as easy as drag and dropping nodes onto other nodes
..pretty self explanatory...

problems:
sometimes when you click and hover over a node, the name turns transparent...no biggie lol

-Version 1.1 Tut-
File-load-Choose Mdl0

- Tree View-
just as easy as drag and dropping nodes onto other nodes
..pretty self explanatory...
[/color]
problems:
sometimes when you click and hover over a node, the name turns transparent...no biggie lol

change log:

v1.1
auto load tree
filter for mdl0 files
close file button added
save fixed
auto load extra bones
loading bug fixed


Title: Re: Bone Editor
Post by: Pik on September 14, 2010, 04:51:36 AM
BrawlBox can already do this. Just edit the values in the lower right-hand corner while selecting an animation and the bone you want to change.

Unless you mean rebuilding someone's bone structure altogether, which isn't possible. But it should be.


Title: Re: Bone Editor
Post by: Pinutkā„¢ on September 14, 2010, 02:02:29 PM
@Pik/Marty
So thats why whenever I try to edit a charcater it just freezes DX
Wow I feel stupid... I guess vertex editing is better than bone editing anyway. Oh and Marty's bad ass ;D


Title: Re: Bone Editor
Post by: TheShyGuy on September 17, 2010, 02:07:26 PM
http://www.mediafire.com/?iwy3g3d1noqqr3v

rebuilding bone structure is actually simple....this is mario with a quick edit to his fingers... its possible to move bones where ever you want...if you want me to change some other bones for proof i will...but not immediately since i don't check up on this site much anymore - just wanted to share this so its not a waste lol



Title: Re: Bone Editor
Post by: Snoopy on September 18, 2010, 09:20:09 PM
this intrigues me, and i must know how to do this.  i see with the Mario example that the fingers all have the L/RHandN as the parent bone, instead of finger a is the parent of finger b like it normally is.  i've used Fortwaffle's bone structure moving program, but after the model saves in BrawlBox it reverts to normal, and i haven't had much success hexing it myself, probably because i'm unsure of what exactly i need to change.  this could really help in making model swaps become one slot swaps, which just changing indexes wont help.  so, tutorial please?


Title: Re: Bone Editor
Post by: TheShyGuy on November 07, 2010, 09:06:10 PM
Heres the program.  Not the best but its good enough...if anyone wants to suggest anything go ahead...

http://www.mediafire.com/?czp74rrl73vny7a

How to use:

open texture up in BrawlBox and export the MDL0 to the start up folder of this program.
 open it in HxD and search for(in hex) 00 00 00 d.
  Look at the offset and convert that to decimal.
 close hxd.
rename the MDL0 to input.mdl0
open my program
in the top left corner put the numbers in the box next to topN offset - hit go(not really needed)
go to the choices tab...self explanatory
when you find your number/choice go to main. Go under advanced and put your number in.
press either up/down
and boom you moved some bones.

I will make a tut on how to do it manually incase the choices aren't good enough for what you need....when i remember how it works lol.  I made this program before i stopped hacking so yehh i can't remember everything but i will hopefully make it better with suggestions and help.

- i put a tutorial(months ago...so don't bother reading it...unless you want to...) in the read me tab.  It tells a bit about how to do it through plain hexing.

- sorry for the wait...had laptop issues lol


Title: Re: Bone Editor - release
Post by: Eternal Yoshi on November 07, 2010, 09:14:36 PM
Would it be possible to rig the bones we added to the bone adder?
I had taunt and victory pose ideas, but I can't do them since Gray Fox's Sword doesn't have it's own bone and is controlled by his right hand.

Since they are controlled by the same bone, both scaling and the model changer event are not options.


Title: Re: Bone Editor - release
Post by: TheShyGuy on November 07, 2010, 09:17:57 PM
Would it be possible to rig the bones we added to the bone adder?


lol huh...i don't really understand what your saying...Did you mean " can you move bones that you added..." i would say no because i remember looking at the added bones through hex a long time ago and theyre separate from the real ones - theyre in separate sections....not next to eachother like a list ...etc lol

edit: i think i remember something so that you can attach the sword polygon to any other bone you want...if thats better then ask and ill try and tell you how


Title: Re: Bone Editor - release
Post by: Eternal Yoshi on November 07, 2010, 09:31:19 PM
Yes. Gray Fox has a RHave bone that is begging to have the Sword Attached to it.
For an example of what I mean, see Lyn's RhaveN bone as her Katana(that's what the game calls it, not being decisive at whether it's the Mani Katti or the Sol Katti). moves WITH the RhaveN bone.


Title: Re: Bone Editor - release
Post by: TheShyGuy on November 08, 2010, 06:56:42 PM
snd me the file and ill move the sword to the rhave bone


Title: Re: Bone Tree EditorV2
Post by: TheShyGuy on December 04, 2010, 03:58:08 PM
bump


Title: Re: Bone Tree EditorV2
Post by: BlackJax96 on December 04, 2010, 05:01:14 PM
V1 was confusing, but it still worked for me (after lots of trial and error)
BUT V2? Awesome!


Title: Re: Bone Tree EditorV2
Post by: TheShyGuy on December 04, 2010, 05:59:01 PM
anything i should add or explain so that its not as confusing?


Title: Re: Bone Tree EditorV2
Post by: BlackJax96 on December 04, 2010, 06:37:49 PM
Well the explanations for each choice doesn't exactly match up to what it does. It would be great if there was a preview tree and an undo/redo button somewhere so that you didn't have to close the program, check output.mdl0 and then restart.

I have to make a change and if it works, rename the old input to input1 as a backup and rename output to input. Then by the time I'm done rearranging the whole top of the tree (which I'm doing), I have around 20 or more mdl0s as progress backups. It takes a long time this way :-\


Title: Re: Bone Tree EditorV2
Post by: TheShyGuy on December 04, 2010, 07:28:43 PM
-Which don't match up? ill fix em then reupload the program.
-i was planning on making a preview tree but...well basically i couldnt figure it out how
- im going to make a undo/redo button -> should be pretty simple
-thats why i added the save button and restore from last save. So you can open the saved in bb (my program just uses the output file, even after using the restore save....just don't save while the save is open in bb lol).


Title: Re: Bone Tree EditorV2
Post by: DarkPikachu on December 05, 2010, 12:21:56 AM
@theshyguy:
just curious...
do you edit the bones through the relocation table??

I tried your program, and well...
it wasn't exactly the life-saver I was hoping for :/

if you don't know how to use the relocation table, but know how to edit the bones themselves,
I have a template thet may help you out ;)
note: you need HexEdit to use the template (it's a free, no trial program)

EDIT:
for the layout, can you make it look like Brawlbox??
or is that a little too complicated...
^it is for me :/ (can't prog GUI's)


Title: Re: Bone Tree EditorV2
Post by: TheShyGuy on December 05, 2010, 01:09:37 AM
- I dunno what the relocation table is lol...i edit the bones themselves...each individually lol...changing one bone affects others so that's why I made a program.

I know it's not the easiest to understand but it works...any suggestions will be nice. I would like to make a preview tree, but I gotta learn how to make a node wrapper or something.

what's the relocation table anyways? If you explain then maybe I can figure a way 2 edit bones from there...or something


Title: Re: Bone Tree EditorV2
Post by: BlackJax96 on December 05, 2010, 01:30:30 AM
oh I see how to use the save function now, that helps a lot but you really need to make that undo/redo button lol.


Title: Re: Bone Tree EditorV2
Post by: DarkPikachu on December 05, 2010, 09:04:00 AM
- I dunno what the relocation table is lol...i edit the bones themselves...each individually lol...changing one bone affects others so that's why I made a program.

interesting...
so the method you do does work in-game??

I know it's not the easiest to understand but it works...any suggestions will be nice. I would like to make a preview tree, but I gotta learn how to make a node wrapper or something.

ah...
so you're not there yet either :P

what's the relocation table anyways? If you explain then maybe I can figure a way 2 edit bones from there...or something

it'd be better to show you...
my template is unfinished, but I got the basic structures outlined...
the bones are almost done :/ (thought they were done)
just found they overlap each other by 32bytes
give me a moment to fix that and then I'll post the XML
I'll tell you where to put it when I post it ;)

oh I see how to use the save function now, that helps a lot but you really need to make that undo/redo button lol.

heh...
I think he's more like me :P (don't think he knows how to use the clipboard)
that's how undo/redo/cut/copy/paste works (it's all stored in the clipboard)

EDIT: @theshyguy:
you may want to get HexEdit if you don't have it ;)
here's an easy link to get it: http://www.smashboards.com/showpost.php?p=11656041&postcount=2778


Title: Re: Bone Tree EditorV2
Post by: TheShyGuy on December 05, 2010, 09:22:04 AM
- of course it works in game lol or else the program would be fail lol
-lol yeh...it would be so easy 2 make a preview tree if you can put in their offsets....(for c# anyways)

-skip lol
-what do you mean it's stored in the clip board? Can voids/methods be stored in there? My idea of making one would be to make a dictionary or list. Each index included which method was used the values changed, the top n offset, and bone id. when the undo is pressed it puts the old values back in(as well as the other needed values) into the right places/txt boxes then changes them back as if you put em in. Anyways so the clipboard also records what you do?

edit: I have a hxd editor- same one thats in bv.  The way I edit bones through my program Is the same way I would in hxd.  Instead of seeing hex values like in hxd, you see regular numbers that represent them easily. To edit bones...just make sure everything makes sense(matches up accuratley) basically.


Title: Re: Bone Tree EditorV2
Post by: DarkPikachu on December 05, 2010, 09:35:14 AM
I fixed the prob...
I was using a forth float when there was only three :P

so here's the template (so far):
Code:
<?xml version="1.0"?>
<!DOCTYPE binary_file_format SYSTEM "BinaryFileFormat.dtd">
<binary_file_format name="MDL0" type_name="" comment="" expr="" default_byte_order="big" default_read_only="false" default_char_set="ansi">
<define_struct type_name="offset_name" comment="" expr=""><data type="int" name="str_len" format="unsigned" len="1" display=""/><data type="string" name="name" format="ascii" len="str_len" display=""/></define_struct><define_struct type_name="bounds" comment="" expr=""><data type="int" name="min_X" format="unsigned" len="4" display=""/><data type="int" name="min_Y" format="unsigned" len="4" display=""/><data type="int" name="min_Z" format="unsigned" len="4" display=""/><data type="int" name="max_X" format="unsigned" len="4" display=""/><data type="int" name="max_Y" format="unsigned" len="4" display=""/><data type="int" name="max_Z" format="unsigned" len="4" display=""/><data type="none" name="pad" len="8"/></define_struct><define_struct type_name="relocation_group" comment="" expr="">
<data type="int" name="block_len" format="unsigned" len="4" display=""/>
<data type="int" name="num_offsets" format="unsigned" len="4" display=""/>
<data type="int" name="tag" format="unsigned" len="4" display="hex"/>
<data type="int" name="unk1" format="unsigned" len="2" display="hex"/>
<data type="int" name="unk2" format="unsigned" len="2" display="hex"/>
<data type="int" name="pad" format="unsigned" len="8" display="hex"/>
</define_struct>
<define_struct type_name="relocation_offset" comment="" expr="">
<data type="int" name="ID" format="unsigned" len="2" display=""/>
<data type="int" name="unk1" format="unsigned" len="2" display="hex"/>
<data type="int" name="unk2" format="unsigned" len="2" display="hex"/>
<data type="int" name="unk3" format="unsigned" len="2" display="hex"/>
<data type="int" name="string_offset" format="unsigned" len="4" display=""/>
<data type="int" name="data_offset" format="unsigned" len="4" display=""/>
</define_struct>
<define_struct type_name="Definitions" comment="" expr="">
<struct name="definition_header" type_name="" comment="" expr="">
<data type="none" name="tmp" len="4"/>
</struct>
</define_struct>
<define_struct type_name="Bones" comment="" expr="">
<struct name="bone_header" type_name="" comment="" expr="">
<data type="int" name="header_len" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="bone_index" len="4" format="unsigned" display=""/>
<data type="int" name="node_ID" len="4" format="unsigned" display=""/>
<data type="int" name="flags" len="4" format="unsigned" display=""/>
<data type="int" name="pad" len="8" format="unsigned" display=""/>
<struct name="loc_rot_sca" type_name="" comment="" expr="">
<data type="int" name="sca_X" format="unsigned" len="4" display=""/><data type="int" name="sca_Y" len="4" format="unsigned" display=""/>
<data type="int" name="sca_Z" len="4" format="unsigned" display=""/>
<data type="int" name="rot_X" len="4" format="unsigned" display=""/>
<data type="int" name="rot_Y" len="4" format="unsigned" display=""/>
<data type="int" name="rot_Z" len="4" format="unsigned" display=""/>
<data type="int" name="loc_X" len="4" format="unsigned" display=""/>
<data type="int" name="loc_Y" len="4" format="unsigned" display=""/>
<data type="int" name="loc_Z" len="4" format="unsigned" display=""/>
</struct>
<struct name="bound" type_name="" comment="" expr="">
<data type="int" name="min_X" len="4" format="unsigned" display=""/>
<data type="int" name="min_Y" len="4" format="unsigned" display=""/>
<data type="int" name="min_Z" len="4" format="unsigned" display=""/>
<data type="int" name="max_X" len="4" format="unsigned" display=""/>
<data type="int" name="max_Y" len="4" format="unsigned" display=""/>
<data type="int" name="max_Z" len="4" format="unsigned" display=""/>
</struct>
<data type="int" name="parent" len="4" format="signed" display=""/>
<data type="int" name="child" len="4" format="unsigned" display=""/>
<data type="int" name="next" len="4" format="unsigned" display=""/>
<data type="int" name="prev" len="4" format="unsigned" display=""/>
<data type="int" name="part2" len="4" format="unsigned" display=""/>
</struct>
<struct name="frame_matrix" type_name="" comment="" expr="">
<data type="int" name="s_1_1" format="signed" len="4" display=""/>
<data type="int" name="s_2_1" format="signed" len="4" display=""/>
<data type="int" name="s_3_1" format="signed" len="4" display=""/>
<data type="int" name="s_4_1" format="signed" len="4" display=""/>
<data type="int" name="s_1_2" format="signed" len="4" display=""/>
<data type="int" name="s_2_2" format="signed" len="4" display=""/>
<data type="int" name="s_3_2" format="signed" len="4" display=""/>
<data type="int" name="s_4_2" format="signed" len="4" display=""/>
<data type="int" name="s_1_3" format="signed" len="4" display=""/>
<data type="int" name="s_2_3" format="signed" len="4" display=""/>
<data type="int" name="s_3_3" format="signed" len="4" display=""/>
<data type="int" name="s_4_3" format="signed" len="4" display=""/>
</struct>
<struct name="inverse_matrix" type_name="" comment="" expr="">
<data type="int" name="s_1_1" format="signed" len="4" display=""/>
<data type="int" name="s_2_1" format="signed" len="4" display=""/>
<data type="int" name="s_3_1" format="signed" len="4" display=""/>
<data type="int" name="s_4_1" format="signed" len="4" display=""/>
<data type="int" name="s_1_2" format="signed" len="4" display=""/>
<data type="int" name="s_2_2" format="signed" len="4" display=""/>
<data type="int" name="s_3_2" format="signed" len="4" display=""/>
<data type="int" name="s_4_2" format="signed" len="4" display=""/>
<data type="int" name="s_1_3" format="signed" len="4" display=""/>
<data type="int" name="s_2_3" format="signed" len="4" display=""/>
<data type="int" name="s_3_3" format="signed" len="4" display=""/>
<data type="int" name="s_4_3" format="signed" len="4" display=""/>
</struct>
</define_struct>
<define_struct type_name="Vertices" comment="" expr="">
<struct name="vertice_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="unsigned" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="isXYZ" len="4" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="modifier" len="1" format="unsigned" display=""/>
<data type="int" name="entry_stride" len="1" format="unsigned" display=""/>
<data type="int" name="num_vertices" len="2" format="unsigned" display=""/>
<if test="isXYZ == 1" comment=""><use_struct name="bounds" expr="" type_name="bounds" comment=""/></if></struct>
<data type="string" name="vertices" len="vertice_header.entry_stride * vertice_header.num_vertices" format="default" display="vert structures"/><data type="none" name="pad" len="vertice_header.block_size - (vertice_header.entry_stride*vertice_header.num_vertices) - 64"/></define_struct>
<define_struct type_name="Normals" comment="" expr="">
<struct name="normal_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="unsigned" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="isXYZ" len="4" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="modifier" len="1" format="unsigned" display=""/>
<data type="int" name="entry_stride" len="1" format="unsigned" display=""/>
<data type="int" name="num_normals" len="2" format="unsigned" display=""/>
<if test="isXYZ == 1" comment=""><use_struct name="bounds" expr="" type_name="bounds" comment=""/></if></struct>
<data type="string" name="normals" format="default" display="normal structures" len="normal_header.entry_stride*normal_header.num_normals"/><data type="none" name="pad" len="normal_header.block_size - (normal_header.entry_stride*normal_header.num_normals) - 32"/></define_struct>
<define_struct type_name="Colors" comment="" expr="">
<struct name="color_header" type_name="" comment="" expr="">
<data type="none" name="tmp" len="4"/>
</struct>
</define_struct>
<define_struct type_name="UV_Points" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="none" name="block_size" len="4"/>
</struct>
</define_struct>
<define_struct type_name="Materials1" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="unk1" len="4" format="unsigned" display=""/>
<data type="int" name="textures" len="1" format="unsigned" display=""/>
<data type="int" name="num_layers" len="1" format="unsigned" display=""/>
<data type="int" name="Flag3" len="1" format="unsigned" display=""/>
<data type="int" name="Flag4" len="1" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="Flag5" len="1" format="unsigned" display=""/>
<data type="int" name="Flag6" len="1" format="unsigned" display=""/>
<data type="int" name="Flag7" len="1" format="unsigned" display=""/>
<data type="int" name="Flag8" len="1" format="unsigned" display=""/>
<data type="int" name="unk3" format="unsigned" len="4" display=""/><data type="int" name="unk4" format="signed" len="4" display=""/><data type="int" name="data_offset" format="signed" len="4" display=""/><data type="int" name="num_textures" format="signed" len="4" display=""/><data type="int" name="P3_offset" format="signed" len="4" display=""/><data type="int" name="P4_offset" format="signed" len="4" display=""/><data type="int" name="P5_offset" format="signed" len="4" display=""/><data type="int" name="unk6" format="signed" len="4" display=""/></struct>
<jump offset="header.P3_offset+(header.MDL0_offset*-1)" comment="" origin="start"><struct name="texture_ref" type_name="" comment="" expr=""><data type="int" name="unk" format="unsigned" len="4" display=""/></struct></jump></define_struct>
<define_struct type_name="Materials2" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="none" name="tmp" len="4"/>
</struct>
</define_struct>
<define_struct type_name="Polygons" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="none" name="tmp" len="4"/>
</struct>
</define_struct>
<define_struct type_name="Textures1" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="none" name="tmp" len="4"/>
</struct>
</define_struct>
<define_struct type_name="Textures2" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="none" name="tmp" len="4"/>
</struct>
</define_struct>
<struct name="header" type_name="" comment="" expr="">
<data type="string" name="magic" len="4" format="ascii" display=""/>
<data type="int" name="filesize" format="unsigned" len="4" display=""/>
<data type="int" name="sections" format="unsigned" len="4" display=""/>
<data type="int" name="nodes" format="signed" len="4" display=""/>
<struct name="lists" type_name="" comment="" expr="">
<data type="int" name="Definitions" format="unsigned" len="4" display=""/>
<data type="int" name="Bones" format="unsigned" len="4" display=""/>
<data type="int" name="Vertices" format="unsigned" len="4" display=""/>
<data type="int" name="Normals" format="unsigned" len="4" display=""/>
<data type="int" name="Colors" format="unsigned" len="4" display=""/>
<data type="int" name="UV_Points" format="unsigned" len="4" display=""/>
<data type="int" name="Materials1" format="unsigned" len="4" display=""/>
<data type="int" name="Materials2" format="unsigned" len="4" display=""/>
<data type="int" name="Polygons" format="unsigned" len="4" display=""/>
<data type="int" name="Textures1" format="unsigned" len="4" display=""/>
<data type="int" name="Textures2" format="unsigned" len="4" display=""/>
</struct>
<data type="int" name="name_offset" format="unsigned" len="4" display=""/>
<data type="int" name="header_len" format="unsigned" len="4" display=""/>
<data type="int" name="header_offset" format="signed" len="4" display=""/>
<data type="int" name="unk1" format="unsigned" len="4" display=""/>
<data type="int" name="unk2" format="unsigned" len="4" display=""/>
<data type="int" name="num_verticies" format="unsigned" len="4" display=""/>
<data type="int" name="num_faces" format="unsigned" len="4" display=""/>
<data type="int" name="unk3" format="unsigned" len="4" display=""/>
<data type="int" name="num_nodes" format="unsigned" len="4" display=""/>
<data type="int" name="version" format="unsigned" len="4" display=""/>
<data type="int" name="unk4" format="unsigned" len="2" display=""/>
<data type="int" name="unk5" format="unsigned" len="2" display=""/>
<struct name="bounds" type_name="" comment="" expr=""><data type="int" name="min_X" format="unsigned" len="4" display=""/><data type="int" name="min_Y" format="unsigned" len="4" display=""/><data type="int" name="min_Z" format="unsigned" len="4" display=""/><data type="int" name="max_X" format="unsigned" len="4" display=""/><data type="int" name="max_Y" format="unsigned" len="4" display=""/><data type="int" name="max_Z" format="unsigned" len="4" display=""/></struct></struct>
<jump offset="header.nodes * -1" comment="" origin="start">
<struct name="nodes" type_name="" comment="" expr="">
<data type="int" name="num_nodes" format="signed" len="4" display=""/>
<for name="node" count="num_nodes || num_nodes - 1" stop_test="num_nodes == 0" type_name="" comment="">
<data type="int" name="node" format="signed" len="4" display=""/>
</for>
</struct>
</jump>
<if test="header.sections >= 0" comment="">
<jump offset="header.lists.Definitions" comment="" origin="start">
<struct name="Definitions" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Definitions" comment="" origin="start">
<use_struct name="Definitions" expr="" type_name="Definitions" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Definitions - 1" comment="" origin="start"><use_struct name="offset_name" expr="" type_name="offset_name" comment=""/></jump></struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 1" comment="">
<jump offset="header.lists.Bones" comment="" origin="start">
<struct name="Bones" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Bones" comment="" origin="start">
<use_struct name="Bone_data" expr="" type_name="Bones" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Bones - 1" comment="" origin="start"><use_struct name="offset_name" expr="" type_name="offset_name" comment=""/></jump></struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 2" comment="">
<jump offset="header.lists.Vertices" comment="" origin="start">
<struct name="Vertices" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Vertices" comment="" origin="start">
<use_struct name="Vertices" expr="" type_name="Vertices" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Vertices - 1" comment="" origin="start"><use_struct name="offset_name" expr="" type_name="offset_name" comment=""/></jump></struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 3" comment="">
<jump offset="header.lists.Normals" comment="" origin="start">
<struct name="Normals" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Normals" comment="" origin="start">
<use_struct name="Normals" expr="" type_name="Normals" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Normals - 1" comment="" origin="start"><use_struct name="offset_name" expr="" type_name="offset_name" comment=""/></jump></struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 4" comment="">
<jump offset="header.lists.Colors" comment="" origin="start">
<struct name="Colors" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset || relocation_offset.data_offset + header.lists.Colors" comment="" origin="start">
<use_struct name="Colors" expr="" type_name="Colors" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Colors - 1" comment="" origin="start"><use_struct name="offset_name" expr="" type_name="offset_name" comment=""/></jump></struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 5" comment="">
<jump offset="header.lists.UV_Points" comment="" origin="start">
<struct name="UV_Points" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.UV_Points" comment="" origin="start">
<use_struct name="UV_Points" expr="" type_name="UV_Points" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 6" comment="">
<jump offset="header.lists.Materials1" comment="" origin="start">
<struct name="Materials1" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Materials1" comment="" origin="start">
<use_struct name="Materials1" expr="" type_name="Materials1" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 7" comment="">
<jump offset="header.lists.Materials2" comment="" origin="start">
<struct name="Materials2" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Materials2" comment="" origin="start">
<use_struct name="Materials2" expr="" type_name="Materials2" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 8" comment="">
<jump offset="header.lists.Polygons" comment="" origin="start">
<struct name="Polygons" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Polygons" comment="" origin="start">
<use_struct name="Polygons" expr="" type_name="Polygons" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 9" comment="">
<jump offset="header.lists.Textures1" comment="" origin="start">
<struct name="Textures1" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Textures1" comment="" origin="start">
<use_struct name="Textures1" expr="" type_name="Textures1" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 10" comment="">
<jump offset="header.lists.Textures2" comment="" origin="start">
<struct name="Textures2" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Textures2" comment="" origin="start">
<use_struct name="Textures2" expr="" type_name="Textures2" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<data type="none" name="none"/>
</binary_file_format>

copy that and paste it in:
C:/Documents and Settings\*user*\Application Data\ECSoftware\HexEdit\_mdl0.xml
and open an mdl0 file in HexEdit...

now, the template doesn't initiate automatically :/
when you open the mdl0,
go to 'view'-'template'-'split window'
and be sure to turn the auto sync on as well (looklike 3 red arrows "back, forth, back")

that should teach you the relocation table ;)


Title: Re: Bone Tree EditorV2
Post by: DarkPikachu on December 05, 2010, 09:36:41 AM
edit: I have a hxd editor- same one thats in bv.  The way I edit bones through my program Is the same way I would in hxd.  Instead of seeing hex values like in hxd, you see regular numbers that represent them easily. To edit bones...just make sure everything makes sense(matches up accuratley) basically.

HxD doesn't highlight hex values defined in a template
(I needed something better)

EDIT:
the template should show you how to use the reloc table to find the bone offsets
(as well as anything else in the file)

also, I'm actually quite surprised your method worked... O.O
does that mean brawl doesn't use the relocation table to find the bones?? (retorical Q)

EDIT2:
heh, that above would explain why there's 2 of every locator data :/
and also sub-values that arn't neccesary for the reloc table alone


Title: Re: Bone Tree EditorV2
Post by: TheShyGuy on December 05, 2010, 09:42:20 AM
xml....i kinda know how to read and use it(not really use it..but not the point)... I never knew you can make stuff to use in hxd...ill take a look when I get  home. What's it basically tell you?

edit: I know it was retorical but I don't "move" bone data around - just edit/switch the offsets and nodelds around so they "seem" to have been moved(well yeh doing that is moving  it lol). The main thing to change are offsets and nodeld(polygons attach to bones with these). So the relocation table points to the same place...it just that that place has changed values...uhh yeh that's obvious lol...starting to think I misunderstood what you said...


Title: Re: Bone Tree EditorV2
Post by: DarkPikachu on December 05, 2010, 09:46:19 AM
xml....i kinda know how to read and use it(not really use it..but not the point)... I never knew you can make stuff to use in hxd...ill take a look when I get  home. What's it basically tell you?

that's not for HxD...
that's for HexEdit...

HxD doesn't use templates...


Title: Re: Bone Tree EditorV2
Post by: TheShyGuy on December 05, 2010, 09:56:21 AM
I'm not home so I'm not sure but I think I have something called hexedit but the trial ended...hopefully there different. I would check but I'm on my phone and dun feel likeclicking it lol


Title: Re: Bone Tree EditorV2
Post by: DarkPikachu on December 05, 2010, 10:01:25 AM
I'm not home so I'm not sure but I think I have something called hexedit but the trial ended...hopefully there different. I would check but I'm on my phone and dun feel likeclicking it lol

*cough*
I did mention in the program was trial free :P
@theshyguy:
just curious...
do you edit the bones through the relocation table??

I tried your program, and well...
it wasn't exactly the life-saver I was hoping for :/

if you don't know how to use the relocation table, but know how to edit the bones themselves,
I have a template thet may help you out ;)
note: you need HexEdit to use the template (it's a free, no trial program)

EDIT:
for the layout, can you make it look like Brawlbox??
or is that a little too complicated...
^it is for me :/ (can't prog GUI's)

that's the one I'm using and it's been over 30 days now :P
and I gave you the link already...

EDIT:
well, the newer versions have a trial on them :/


Title: Re: Bone Tree EditorV2
Post by: TheShyGuy on December 05, 2010, 10:07:32 AM
o lol mustve not have fully read it lol. Then yeh i ll take a look at it when I get back.hmm so it tells all the data offsets? Niiiice maybe I'll be able to make it so that you don't have to input a topnoffset in my program...


Title: Re: Bone Tree EditorV2
Post by: DarkPikachu on December 05, 2010, 10:55:45 AM
heh...

hey, at least yur ahead of me :D
I wanted to make this exact program, but you just got to it before I did :P

*cough* and I'm bad at GUI progging *cough cough*
note: I prog in Py and TKinter's a pain to use

why Tk?
it comes with the Py installation...
(tired of DL-ing sub-installations such as WxPy or PyCard)


Title: Re: Bone Tree EditorV2
Post by: TheShyGuy on December 05, 2010, 11:05:39 AM
c# is pretty good...ofcourse it's the first and only programming lang I used...you can do so much with it. Making a gui is...is..eaaaasy lol.

-so you were going to make the same/similar thing? What were you going to do to edit the tree?


Title: Re: Bone Tree EditorV2
Post by: DarkPikachu on December 05, 2010, 11:44:18 AM
c# is pretty good...ofcourse it's the first and only programming lang I used...you can do so much with it. Making a gui is...is..eaaaasy lol.

-so you were going to make the same/similar thing? What were you going to do to edit the tree?

I kinda wanted to set something up like brawlbox...

tree on the left, data on the right,
but an advanced R-Click menu which allows you to add a bone in a specific area of the tree
as well as delete bones and what not...

unlike BrBx all the data on the left will be editable,
and I wanted to have an update feature that automatically re-indexes the bones and sets the parent/child structures.

may need to use internal memory to do that :/

so C# is supposedly easy hmm...
can I get a copy of your src??
I have Dev C++ and I want to see if it'll compile...
(screw Mirosoft and all it's glory) *evil grin*


Title: Re: Bone Tree EditorV2
Post by: TheShyGuy on December 05, 2010, 11:58:33 AM
hmm do you know how to add/delete REAL  bones?
-my source code is MESSY all of it is in one file. I gotta separate them later.
....i need to learn how to make a tree node wrapper...or look at bb bawl lib lol


Title: Re: Bone Tree EditorV2
Post by: DarkPikachu on December 05, 2010, 12:19:19 PM
hmm do you know how to add/delete REAL  bones?
-my source code is MESSY all of it is in one file. I gotta separate them later.
....i need to learn how to make a tree node wrapper...or look at bb bawl lib lol

that's how I like my code (all in 1 file) :D
^it's easier to work with

anyways, yea, I can add bones, but by hand...
it's not hard (excluding the transform and inverse matrices)


Title: Re: Bone Tree EditorV2
Post by: BlackJax96 on December 05, 2010, 12:28:10 PM
I can get you the source pretty easily, one of the downsides of C# is it can be reflected


Title: Re: Bone Tree EditorV2
Post by: TheShyGuy on December 05, 2010, 12:29:14 PM
when i say REAL bones, I mean bones that you can attach hitboxes/gfx  to and still shows up in game...if that's the case then can you tell me how?(or mssg me). I'd like to add it to my editor.  if you don't want me to release it publicly, I'll make a personal program for me( and you if you want).

-about the matrices, do you need to know how they're set up or what they do?

edit: you can give the sc but the main thing it does is multiplies the number by 208 and turns it into  4 bytes. Then rewrites the 4 bytes with the new ones.


Title: Re: Bone Tree EditorV2
Post by: DarkPikachu on December 05, 2010, 12:36:06 PM
when i say REAL bones, I mean bones that you can attach hitboxes/gfx  to and still shows up in game...if that's the case then can you tell me how?(or mssg me). I'd like to add it to my editor.  if you don't want me to release it publicly, I'll make a personal program for me( and you if you want).

-about the matrices, do you need to know how they're set up or what they do?


I prbly would've found out soon but yea, what do they do??
I know how they're set up and all :/

1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1

and I see what you mean...
I know the matrices link to the weights in the polygons,
but I'm not sure how they work entirely

I don't really know how to reference library objects (items in brawl)
but I'm sure I'll figure it out :/

I have my chat if you want speedy convos: http://tcll5850.webfreehosting.net/


Title: Re: Bone Tree EditorV2
Post by: BlackJax96 on December 05, 2010, 12:40:33 PM
you can give the src but the main thing it does is multiplies the number by 208 and turns it into  4 bytes. Then rewrites the 4 bytes with the new ones.
you lost me after src so imma drop out of the convo now lol
thanks for the bone editor, keep working on it
Maybe you could help me rearrange this bone structure


Title: Re: Bone Tree EditorV2
Post by: TheShyGuy on December 05, 2010, 12:48:02 PM
well I'm not sure if this helps or whether you lnow this or not....

matrices are used to calculate the "real world" cordinates of the object(scale, translation, rotation and something else)..not sure if it's the same thing for inverse and ?binary?

not sure if the above is helpful but it's something....

-knowing how to add a bone is a start atleast

edit: tcll - I would join the chat but I'm on my phone lol

black - I mean that's how it coverts values to hex.  The rest(move up/down code) just changes the rest of the bones to match up correctly


Title: Re: Bone Tree EditorV2
Post by: DarkPikachu on December 05, 2010, 12:58:33 PM
yea... didn't really tell me anything out of the ordinary there -_-

collada files actually use both the transform and inverse matrices
(more of the inverse though)

I know the inverse matrix is used for weights and repositioning
mdl0/dat models tend to look like this without the matrices applied:
(https://jump.matthewevan.xyz/i2p/pxbcwxbhxj2wusliwhrb6ym4vcwpihztuf2tfjejrcdzqrmnjuoa.b32/_/d3799a88f741f328f216b2c9d15fee6b5fdf4003974da6e496ee4d7e9dbb2ec3)


Title: Re: Bone Tree EditorV2
Post by: TheShyGuy on December 05, 2010, 01:02:48 PM
o well then I guess when I get bak I'll mess with the values and see what they do


Title: Re: Bone Tree EditorV2
Post by: DarkPikachu on December 05, 2010, 01:14:57 PM
o well then I guess when I get bak I'll mess with the values and see what they do


alright, and please inform me of this too :)
I'm quite busy with other stuff around this or I'd look into it myself

out of curiosity, where are you anyways :/
don't answer that if you feel I shouldn't know :)


Title: Re: Bone Tree EditorV2
Post by: TheShyGuy on December 05, 2010, 01:19:24 PM
friends playn blk ops lol


Title: Re: Bone Tree EditorV2
Post by: DarkPikachu on December 05, 2010, 01:52:39 PM
friends playn blk ops lol

lawlz ^_^

I'm bout ready to hook up my XBox to play an old game of destruction :D
^ever played Whiplash??

heh...
yea...
sometimes looking at data get's on my nervs and a break is needed :P


Title: Re: Bone Tree EditorV2
Post by: TheShyGuy on December 05, 2010, 02:01:29 PM
no dunno what whiplash is(if you mean like a game)

-yeh that's why I took like a 2-3 month break...looking at data is just  boooring...until you figure it out =p

edit: i think ill TRY to quickly make that redo/undo button


Title: Re: Bone Tree EditorV2
Post by: DarkPikachu on December 05, 2010, 08:25:46 PM
hey, you wanna turn this into a dev thread :)
(may help boost me in Tk as well as learning more about the MDL0 format)

^yes, I'll try this in Py
if I get this, then maybe I can get my converter ;)


Title: Re: Bone Tree EditorV2
Post by: TheShyGuy on December 05, 2010, 09:25:11 PM
Yeh sure...sorry for late response..got home a fell asleep as soon as i sat down lol..just woke =p.

edit: lol failed modify....i guess ill TRY to make a undo/redo button real quick

edit2: i didn't download  this -MFC71.dll: http://www.dll-files.com/pop.php?dll=mfc71- but i can still open the hex edit.  I read the thing when it installed saying that it uses it but does not install it.  If i need it just reply.

edit3:
-wheres autosync.....
-i copied your code into an xml(though c#) and then saved it as _mdl0.xml.....i put it in the startup as hex edit and it doesn't show in the template list

edit4: ill try to clean up my code then give you it. It might take a while because its a bit of  code;


Title: Re: Bone Tree EditorV2
Post by: DarkPikachu on December 06, 2010, 01:40:18 PM
I fixed the prob...
I was using a forth float when there was only three :P

so here's the template (so far):
...
copy that and paste it in:
C:/Documents and Settings\*user*\Application Data\ECSoftware\HexEdit\_mdl0.xml
and open an mdl0 file in HexEdit...

now, the template doesn't initiate automatically :/
when you open the mdl0,
go to 'view'-'template'-'split window'
and be sure to turn the auto sync on as well (looklike 3 red arrows "back, forth, back")

that should teach you the relocation table ;)

I forget how to get the 'auto sync' button...
I think you have to turn on the navigation toolbar :/
and cool  :af2:
just try to keep it as single file...
I hate multifiles DX


Title: Re: Bone Tree EditorV2
Post by: TheShyGuy on December 06, 2010, 03:19:57 PM
edit: looool found it..=p


Title: Re: Bone Tree EditorV2
Post by: DarkPikachu on December 06, 2010, 04:20:08 PM
heh :P

hey, you wanna turn this into a dev thread :)
(may help boost me in Tk as well as learning more about the MDL0 format)

^yes, I'll try this in Py
if I get this, then maybe I can get my converter ;)

btw, when I posted this,
it was just a few minutes before my bro turned his cpu off and I lost net...

so yea,
I couldn't have replied to your post after that because I was either in bed,
or at school... DX

I only get little time to actually use my cpu before losing net (6 hrs)
^I need at least 10-12 for what I do (another reson development is slow)


Title: Re: Bone Tree EditorV2
Post by: TheShyGuy on December 06, 2010, 07:49:52 PM
just got back from stuff and am going to look at mario mdl0 using your template....it looks like you know alot....all i know are bones(mainly) 0.o.....what should the title of the dev thread be about? bones or fully editing mdl0s?

edit: lol....its confusing...ill wait till tomoro i guess to talk about it..


Title: Re: Bone Tree EditorV2
Post by: DarkPikachu on December 07, 2010, 01:26:16 PM
yea...
I know it's confusing...
sry bout that :P

I can give you what I have of my notes (which are still growing)

note: polygons are not fully understood yet (you'll see why in the notes)

and I was just saying to use this page as a dev thread :/
can't hurt much there...


Title: Re: Bone Tree EditorV2
Post by: TheShyGuy on December 07, 2010, 02:13:03 PM
yeh notes would be nice...atm im making that undo button but i gotta fix this one thing....keeps screwing up lol


Title: Re: Bone Tree EditorV2
Post by: DarkPikachu on December 07, 2010, 02:43:41 PM
alright ^_^

they're a bit messy though...
Code:
mdl0 header:

0x00(4): MDL0 Identifier
0x04(4): MDL0 Size
0x08(4): Sections
0x0C(4): Model Nodes Offset

0x10(4): Definitions List
0x14(4): Bones List
0x18(4): Vertices List
0x1C(4): Normals List
0x20(4): Colors List
0x24(4): UV Points List
0x28(4): Materials 1 List
0x2C(4): Materials 2 List
0x30(4): Polygons List
0x34(4): Textures 1 List
0x38(4): Textures 2 List

0x3C(4): Model Name Offset
0x40(4): Header Length
0x44(4): Header Offset

0x48(4): ??
0x4C(4): ??
0x50(4): num Vertices
0x54(4): num Faces
0x58(4): ??
0x5C(4): num Nodes
0x60(4): Version
0x62(2): ??
0x64(2): ??
0x68(4): Box Min. X
0x6C(4): Box Min. Y
0x70(4): Box Min. Z
0x74(4): Box Max. X
0x78(4): Box Max. Y
0x7C(4): Box Max. Z
0x80(4): num Nodes (Copy??)

nodes... (num nodes * 4)

relocation table header: (group list)

0x00(4): block length
0x04(4): number of offsets
0x08(4): 'FFFF0000'
0x0C(2): ?? (maybe flags)
0x0E(2): ??
0x10(4): pad1
0x14(4): pad2

relocation table offset:

0x00(2): model ID
0x02(2): '0000'
0x04(2): ??
0x06(2): ??
0x08(4): string offset (- group list)
0x0C(4): data offset (- group list)

Definition data header: id(1)
--

Bone data header: id(2)

0x00(4): Header Length (Usually 000000D0)
0x04(4): MDL0 Offset
0x08(4): String Offset (- mdl0 offset)
0x0C(4): Bone Index
0x10(4): Node ID
0x14(4): Flags
0x18(4): Pad 1
0x1C(4): Pad 2
0x20(4): Scale X
0x24(4): Scale Y
0x28(4): Scale Z
0x2C(4): Rotation X
0x30(4): Rotation Y
0x34(4): Rotation Z
0x38(4): Translation X
0x3C(4): Translation Y
0x40(4): Translation Z
0x44(4): Box Min. X
0x48(4): Box Min. Y
0x4C(4): Box Min. Z
0x50(4): Box Max. X
0x54(4): Box Max. Y
0x58(4): Box Max. Z
0x5C(4): Parent Offset
0x60(4): First Child Offset
0x64(4): Next Offset
0x68(4): Previous Offset
0x6C(4): Bone Strings/Properties Offset (part2)

Uint32:
0x70(4): FrameMatrix Set 1 Float 1
0x74(4): FrameMatrix Set 2 Float 1
0x78(4): FrameMatrix Set 3 Float 1
0x7C(4): FrameMatrix Set 4 Float 1
0x80(4): FrameMatrix Set 1 Float 2
0x84(4): FrameMatrix Set 2 Float 2
0x88(4): FrameMatrix Set 3 Float 2
0x8C(4): FrameMatrix Set 4 Float 2
0x90(4): FrameMatrix Set 1 Float 3
0x94(4): FrameMatrix Set 2 Float 3
0x98(4): FrameMatrix Set 3 Float 3
0x9C(4): FrameMatrix Set 4 Float 3
0xA0(4): InverseBindMatrix Set 1 Float 1
0xA4(4): InverseBindMatrix Set 2 Float 1
0xA8(4): InverseBindMatrix Set 3 Float 1
0xAC(4): InverseBindMatrix Set 4 Float 1
0xB0(4): InverseBindMatrix Set 1 Float 2
0xB4(4): InverseBindMatrix Set 2 Float 2
0xB8(4): InverseBindMatrix Set 3 Float 2
0xBC(4): InverseBindMatrix Set 4 Float 2
0xC0(4): InverseBindMatrix Set 1 Float 3
0xC4(4): InverseBindMatrix Set 2 Float 3
0xC8(4): InverseBindMatrix Set 3 Float 3
0xCC(4): InverseBindMatrix Set 4 Float 3

flags:
0x0001 - NoTransform
0x0002 - FixedTranslation
0x0004 - FixedRotation
0x0008 - FixedScale
0x0010 - ??
0x0100 - ??
0x0200 - HasGeometry

vertex data header: id(3)

0x00(4): Block size
0x04(4): MDL0 Offset
0x08(4): Data Offset
0x0C(4): String Offset (- mdl0 offset)
0x10(4): Index ID
0x14(4): Bounding Box (1 == true)
0x18(4): Data type (4 == float)
0x1C(1): Modifier (always 0 for floats)
0x1D(1): Entry size
0x1E(2): Number of entries
0x20(4): Box Min. X
0x24(4): Box Min. Y
0x28(4): Box Min. Z
0x2C(4): Box Max. X
0x30(4): Box Max. Y
0x34(4): Box Max. Z
0x38(4): pad1
0x3C(4): pad2
0x40(?): Vertex data (usu 32bit)

Colors: id(5)

in image... (will edit)

polygon data header: id(9)

0x00(4): Size
0x04(4): MDL0 offset
0x08(4): Mesh weight/transform [NodeID] (-1)
0x0C(4): Vertex descriptor 1 (See Bits0)
0x10(4): Vertex descriptor 2 (See Bits1)
0x14(4): Number of uvs, colors, and normals per vertex (See Bits2)
0x18(4): Vertex descriptor position, normal, color source layout
0x1C(4): Vertex descriptor uv source layout
0x20(4): Offset to shader intructions
0x24(4): Size of data block
0x28(4): Size of data block (copy??)
0x2C(4): Offset to data block
0x30(4): Vetrex descriptor source layput
0x34(4): Unknown (Always 0x00000000)
0x38(4): String offset
0x3C(4): Index
0x40(4): Number of vertices
0x44(4): Number of faces

0x48(2): Position input
0x4A(2): Normal input
0x4C(2): Color0 input
0x4E(2): Color1 input
0x50(2): Coord0 input
0x52(2): Coord1 input
0x54(2): Coord2 input
0x56(2): Coord3 input
0x58(2): Coord4 input
0x5A(2): Coord5 input
0x5C(2): Coord6 input
0x5E(2): Coord7 input
0x60(4): Weights offset


Weight List
0x00(4): Number of weights
0x##(2): Weight index


Primitive Types
0x20 - Position matrix
0x28 - Normal matrix
0x30 - Texture matrix
0x38 - Light matrix

0x80 - Quads
0x90 - Triangles
0x98 - Tristrip
0xA0 - Trian
0xA8 - Lines
0xB0 - Linestrip
0xB8 - Points


 _______
|       \
| Bits0  \
|_________\___________________________________
|                                             |
| 0000 0000  0000 000A   ABBC CDDE  FGHI JKLM |
|_____________________________________________|
|                                             |
| A = Color1                                  |
| B = Color0                                  |
| C = Normals                                 |
| D = Posiions                                |
| E = Texture transform0                      |
| F = Texture transform1                      |
| G = Texture transform2                      |
| H = Texture transform3                      |
| I = Texture transform4                      |
| J = Texture transform5                      |
| K = Texture transform6                      |
| L = Texture transform7                      |
| M = Position transform                      |
|_____________________________________________|

 _______
|       \
| Bits1  \
|_________\___________________________________
|                                             |
| 0000 0000  0000 0000   AABB CCDD  EEFF GGHH |
|_____________________________________________|
|                                             |
| A = Coord7                                  |
| B = Coord6                                  |
| C = Coord5                                  |
| D = Coord4                                  |
| E = Coord3                                  |
| F = Coord2                                  |
| G = Coord1                                  |
| H = Coord0                                  |
|_____________________________________________|

 _______
|       \
| Bits2  \
|_________\___________________________________
|                                             |
| 0000 0000  0000 0000   0000 0000  AAAA BBCC |
|_____________________________________________|
|                                             |
| A = UV                                      |
| B = Normals                                 |
| C = Colors                                  |
|_____________________________________________|



* 0 = none, 1 = normal, 2 = nbt

------------------------------------------------------

other useful data: these notes are kind of out of date.

All data is big endian.

BRES header:
u32 magic = 'bres'
u32 unknown
u32 filesize
u32 unknown
u32 other_magic = 'root'
u32 root directory length

BRES root directory @0x18:
u32 unknown
u32 ndirents
16 bytes unknown = ff ff 00 00 00 01 00 00
ndirents * struct {
u16 unknown[2]
u16 unknown[2]
u32 offset to dirname from start of directory
dirname is a null terminated string
u32 offset to data for entry from start of dir


}


MDL0 header:
u32 magic = 'MDL0'
u32 filesize
u32 (one less than offset index count?)
u32 unknown
u32 offsets to data block index blocks[]

data block index block { (0x260)
u32 index block length
u32 entry count (10 @ 0x264)
u32 unknown[2]
u32 zero[2]

0x278 - 0x378: array {
u16 model_id -- maps position blocks to normal blocks?
u16 zero
u16 unknown
u16 unknown
uint32 unknown (like 0x001a2f34):
model id? when added to start offset of this data block -- consistent between positions and normals...
uint32 offset to vertex position data block from start of this data block
} [10]
}

another data block index at 0x118, unknown0 = 0x0148, count=13

NodeMix block {
stream:
u8 nexttype {
00: done
02: mapping data, u16 -> u16
03: weighting data
}
nexttype == 02: {
u16 unknown1
u16 unknown2
}
nexttype == 03: {
u16 (some id?)
u8 number of weights
struct {
u16 transform_id
float weight
}[] weight_set
}
}

vertex position data block {
0x40 byte header {
uint32_t length of this block
int32_t offset to beginning of file (always negative)
...
uint32_t at 0x10:
index # of block (starts at 0, should be no gaps)

uint32_t at 0x14: {
0x01 = positions, has bounding box + zero pad
0x00 = normals, no bounding box data + zero pad
}
...
uint16_t at 0x1c: bytes per vertex (0x04 * #components) {
0x08 = UVs
0x0c = vertex and normal data
}
uint16_t at 0x1e = number of vertices to follow

0x20 {
float[6] (bounding box?)
uint32_t[2] zero
} (not present for normals)
}
component data follows: #vertices * #components float32
}


vertex array header: {
0x140 bytes long, almost completely unknown
u8 @ 0x0e {
0x14 or 0x54 for u8 datas
0x5e for u16 datas
}
u16 @ 0x1e (vertex count for a position data block) is:
0x80 for a 4 or 7 byte vertex struct layout
0xc0 for an 8 byte vertex struct layout
u16 @ 0x94 = byte length of 3rd component in the struct
only if @0x1e != 0xc0 and @0x0e != 0x14
}
vertex array data: {
u8 list type to follow {
0x00 == stop processing
0xB8 == points
0xA8 == lines
0xB0 == line strip
0x90 == triangles
0x98 == triangle strip
0xA0 == triangle fan
0x80 == quads
}
u16 = #verts to follow
if (@0x1e in header == 0xc0) {
u8 position idx
u8 unknown1
u16 unknown2
u8[4] more unknowns
} else {
component lengths defined in header (@0x0e, @0x94):
position idx
(uv or normal idx)
(uv or normal idx)
}
}

texture block: {
u32 entry count
entry (8 bytes) {
u32 unknown
u32 rel_offset to rel_offset to texture name (useless...)
}
}


and here's the image for the colors:
(https://jump.matthewevan.xyz/i2p/pxbcwxbhxj2wusliwhrb6ym4vcwpihztuf2tfjejrcdzqrmnjuoa.b32/_/07d0dcb36c211bb486f70e627235555f8b4224d124ce84da2de44503e9a1c730) (https://jump.matthewevan.xyz/i2p/pxbcwxbhxj2wusliwhrb6ym4vcwpihztuf2tfjejrcdzqrmnjuoa.b32/_/07d0dcb36c211bb486f70e627235555f8b4224d124ce84da2de44503e9a1c730)


Title: Re: Bone Tree EditorV2
Post by: TheShyGuy on December 07, 2010, 05:39:27 PM
almost done making the undo button(technically i am) but i just need to make it so it records if you use the move up/down buttons...but im taking a break atm sooo ima look at this for a while^

the redo button is basically the same as undo so yeh it won't take as long for the redo


Title: Re: Bone Tree EditorV2
Post by: DarkPikachu on December 07, 2010, 05:44:10 PM
template UD:

everything from bones to uv's works now
mat1 still needs to be finished :/

oh and everything displays names now :P

Code:
<?xml version="1.0"?>
<!DOCTYPE binary_file_format SYSTEM "BinaryFileFormat.dtd">
<binary_file_format name="MDL0" type_name="" comment="" expr="" default_byte_order="big" default_read_only="false" default_char_set="ansi">
<define_struct type_name="offset_name" comment="" expr="">
<data type="int" name="str_len" format="unsigned" len="1" display=""/>
<data type="string" name="name" format="ascii" len="str_len" display=""/>
</define_struct>
<define_struct type_name="bounds" comment="" expr="">
<data type="int" name="min_X" format="unsigned" len="4" display=""/>
<data type="int" name="min_Y" format="unsigned" len="4" display=""/>
<data type="int" name="min_Z" format="unsigned" len="4" display=""/>
<data type="int" name="max_X" format="unsigned" len="4" display=""/>
<data type="int" name="max_Y" format="unsigned" len="4" display=""/>
<data type="int" name="max_Z" format="unsigned" len="4" display=""/>
<data type="none" name="pad" len="8"/>
</define_struct>
<define_struct type_name="relocation_group" comment="" expr="">
<data type="int" name="block_len" format="unsigned" len="4" display=""/>
<data type="int" name="num_offsets" format="unsigned" len="4" display=""/>
<data type="int" name="tag" format="unsigned" len="4" display="hex"/>
<data type="int" name="unk1" format="unsigned" len="2" display="hex"/>
<data type="int" name="unk2" format="unsigned" len="2" display="hex"/>
<data type="int" name="pad" format="unsigned" len="8" display="hex"/>
</define_struct>
<define_struct type_name="relocation_offset" comment="" expr="">
<data type="int" name="ID" format="unsigned" len="2" display=""/>
<data type="int" name="unk1" format="unsigned" len="2" display="hex"/>
<data type="int" name="unk2" format="unsigned" len="2" display="hex"/>
<data type="int" name="unk3" format="unsigned" len="2" display="hex"/>
<data type="int" name="string_offset" format="unsigned" len="4" display=""/>
<data type="int" name="data_offset" format="unsigned" len="4" display=""/>
</define_struct>
<define_struct type_name="Definitions" comment="" expr="">
<struct name="definition_header" type_name="" comment="" expr="">
<data type="none" name="tmp" len="4"/>
</struct>
</define_struct>
<define_struct type_name="Bones" comment="" expr="">
<struct name="bone_header" type_name="" comment="" expr="">
<data type="int" name="header_len" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="bone_index" len="4" format="unsigned" display=""/>
<data type="int" name="node_ID" len="4" format="unsigned" display=""/>
<data type="int" name="flags" len="4" format="unsigned" display=""/>
<data type="int" name="pad" len="8" format="unsigned" display=""/>
<struct name="loc_rot_sca" type_name="" comment="" expr="">
<data type="int" name="sca_X" format="unsigned" len="4" display=""/>
<data type="int" name="sca_Y" len="4" format="unsigned" display=""/>
<data type="int" name="sca_Z" len="4" format="unsigned" display=""/>
<data type="int" name="rot_X" len="4" format="unsigned" display=""/>
<data type="int" name="rot_Y" len="4" format="unsigned" display=""/>
<data type="int" name="rot_Z" len="4" format="unsigned" display=""/>
<data type="int" name="loc_X" len="4" format="unsigned" display=""/>
<data type="int" name="loc_Y" len="4" format="unsigned" display=""/>
<data type="int" name="loc_Z" len="4" format="unsigned" display=""/>
</struct>
<struct name="bound" type_name="" comment="" expr="">
<data type="int" name="min_X" len="4" format="unsigned" display=""/>
<data type="int" name="min_Y" len="4" format="unsigned" display=""/>
<data type="int" name="min_Z" len="4" format="unsigned" display=""/>
<data type="int" name="max_X" len="4" format="unsigned" display=""/>
<data type="int" name="max_Y" len="4" format="unsigned" display=""/>
<data type="int" name="max_Z" len="4" format="unsigned" display=""/>
</struct>
<data type="int" name="parent" len="4" format="signed" display=""/>
<data type="int" name="child" len="4" format="unsigned" display=""/>
<data type="int" name="next" len="4" format="unsigned" display=""/>
<data type="int" name="prev" len="4" format="unsigned" display=""/>
<data type="int" name="part2" len="4" format="unsigned" display=""/>
</struct>
<struct name="frame_matrix" type_name="" comment="" expr="">
<data type="int" name="s_1_1" format="signed" len="4" display=""/>
<data type="int" name="s_2_1" format="signed" len="4" display=""/>
<data type="int" name="s_3_1" format="signed" len="4" display=""/>
<data type="int" name="s_4_1" format="signed" len="4" display=""/>
<data type="int" name="s_1_2" format="signed" len="4" display=""/>
<data type="int" name="s_2_2" format="signed" len="4" display=""/>
<data type="int" name="s_3_2" format="signed" len="4" display=""/>
<data type="int" name="s_4_2" format="signed" len="4" display=""/>
<data type="int" name="s_1_3" format="signed" len="4" display=""/>
<data type="int" name="s_2_3" format="signed" len="4" display=""/>
<data type="int" name="s_3_3" format="signed" len="4" display=""/>
<data type="int" name="s_4_3" format="signed" len="4" display=""/>
</struct>
<struct name="inverse_matrix" type_name="" comment="" expr="">
<data type="int" name="s_1_1" format="signed" len="4" display=""/>
<data type="int" name="s_2_1" format="signed" len="4" display=""/>
<data type="int" name="s_3_1" format="signed" len="4" display=""/>
<data type="int" name="s_4_1" format="signed" len="4" display=""/>
<data type="int" name="s_1_2" format="signed" len="4" display=""/>
<data type="int" name="s_2_2" format="signed" len="4" display=""/>
<data type="int" name="s_3_2" format="signed" len="4" display=""/>
<data type="int" name="s_4_2" format="signed" len="4" display=""/>
<data type="int" name="s_1_3" format="signed" len="4" display=""/>
<data type="int" name="s_2_3" format="signed" len="4" display=""/>
<data type="int" name="s_3_3" format="signed" len="4" display=""/>
<data type="int" name="s_4_3" format="signed" len="4" display=""/>
</struct>
</define_struct>
<define_struct type_name="Vertices" comment="" expr="">
<struct name="vertice_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="unsigned" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="isXYZ" len="4" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="modifier" len="1" format="unsigned" display=""/>
<data type="int" name="entry_stride" len="1" format="unsigned" display=""/>
<data type="int" name="num_vertices" len="2" format="unsigned" display=""/>
<if test="isXYZ == 1" comment="">
<use_struct name="bounds" expr="" type_name="bounds" comment=""/>
</if>
</struct>
<data type="string" name="vertices" len="vertice_header.entry_stride * vertice_header.num_vertices" format="default" display="vert structures" comment="I could've put a 'FOR' here,
but it'd take too long when loading the file"/>
<data type="none" name="pad" len="vertice_header.block_size - (vertice_header.entry_stride*vertice_header.num_vertices) - 64"/>
</define_struct>
<define_struct type_name="Normals" comment="" expr="">
<struct name="normal_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="unsigned" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="isXYZ" len="4" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="modifier" len="1" format="unsigned" display=""/>
<data type="int" name="entry_stride" len="1" format="unsigned" display=""/>
<data type="int" name="num_normals" len="2" format="unsigned" display=""/>
<if test="isXYZ == 1" comment="">
<use_struct name="bounds" expr="" type_name="bounds" comment=""/>
</if>
</struct>
<data type="string" name="normals" format="default" display="normal structures" len="normal_header.entry_stride*normal_header.num_normals" comment="I could've put a 'FOR' here,
but it'd take too long when loading the file"/>
<data type="none" name="pad" len="normal_header.block_size - (normal_header.entry_stride*normal_header.num_normals) - 32"/>
</define_struct>
<define_struct type_name="Colors" comment="" expr="">
<struct name="color_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="signed" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="signed" display=""/>
<data type="int" name="string_offset" len="4" format="signed" display=""/>
<data type="int" name="ID" len="4" format="signed" display=""/>
<data type="int" name="isRGBA" len="4" format="signed" display=""/>
<data type="int" name="type" len="4" format="signed" display=""/>
<data type="int" name="entry_stride" len="1" format="signed" display=""/>
<data type="int" name="modifier" len="1" format="signed" display=""/>
<data type="int" name="num_colors" len="2" format="signed" display=""/>
</struct>
<for name="color" count="color_header.num_colors || color_header.num_colors - 1" stop_test="color_header.num_colors == 0" type_name="" comment="">
<data type="none" name="color" len="color_header.entry_stride"/>
</for>
<data type="none" name="pad" len="color_header.block_size - (color_header.num_colors*color_header.entry_stride) - 32"/>
</define_struct>
<define_struct type_name="UV_Points" comment="" expr="">
<struct name="UV_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="unsigned" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="isXY" len="4" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="modifier" len="1" format="unsigned" display=""/>
<data type="int" name="entry_stride" len="1" format="unsigned" display=""/>
<data type="int" name="num_UVs" len="2" format="unsigned" display=""/>
<if test="isXY == 1" comment="">
<struct name="bounds" expr="" type_name="" comment="">
<data type="int" name="min_X" format="unsigned" len="4" display=""/>
<data type="int" name="min_Y" format="unsigned" len="4" display=""/>
<data type="int" name="max_X" format="unsigned" len="4" display=""/>
<data type="int" name="max_Y" format="unsigned" len="4" display=""/>
<data type="none" name="pad" len="16"/></struct>
</if>
</struct>
<data type="string" name="UVs" len="UV_header.entry_stride * UV_header.num_UVs" format="default" display="uv structures" comment="I could've put a 'FOR' here,
but it'd take too long when loading the file"/>
<data type="none" name="pad" len="UV_header.block_size - (UV_header.entry_stride*UV_header.num_UVs) - 64"/>
</define_struct>
<define_struct type_name="Materials1" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="unk1" len="4" format="unsigned" display=""/>
<data type="int" name="textures" len="1" format="unsigned" display=""/>
<data type="int" name="num_layers" len="1" format="unsigned" display=""/>
<data type="int" name="Flag3" len="1" format="unsigned" display=""/>
<data type="int" name="Flag4" len="1" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="Flag5" len="1" format="unsigned" display=""/>
<data type="int" name="Flag6" len="1" format="unsigned" display=""/>
<data type="int" name="Flag7" len="1" format="unsigned" display=""/>
<data type="int" name="Flag8" len="1" format="unsigned" display=""/>
<data type="int" name="unk3" format="unsigned" len="4" display=""/>
<data type="int" name="unk4" format="signed" len="4" display=""/>
<data type="int" name="data_offset" format="signed" len="4" display=""/>
<data type="int" name="num_textures" format="signed" len="4" display=""/>
<data type="int" name="P3_offset" format="signed" len="4" display=""/>
<data type="int" name="P4_offset" format="signed" len="4" display=""/>
<data type="int" name="P5_offset" format="signed" len="4" display=""/>
<data type="int" name="unk6" format="signed" len="4" display=""/>
</struct>
<jump offset="header.P3_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<struct name="texture_ref" type_name="" comment="" expr="">
<data type="int" name="unk" format="unsigned" len="4" display=""/>
</struct>
</jump>
</define_struct>
<define_struct type_name="Materials2" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="none" name="tmp" len="4"/>
</struct>
</define_struct>
<define_struct type_name="Polygons" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="none" name="tmp" len="4"/>
</struct>
</define_struct>
<define_struct type_name="Textures1" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="none" name="tmp" len="4"/>
</struct>
</define_struct>
<define_struct type_name="Textures2" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="none" name="tmp" len="4"/>
</struct>
</define_struct>
<struct name="header" type_name="" comment="" expr="">
<data type="string" name="magic" len="4" format="ascii" display=""/>
<data type="int" name="filesize" format="unsigned" len="4" display=""/>
<data type="int" name="sections" format="unsigned" len="4" display=""/>
<data type="int" name="nodes" format="signed" len="4" display=""/>
<struct name="lists" type_name="" comment="" expr="">
<data type="int" name="Definitions" format="unsigned" len="4" display=""/>
<data type="int" name="Bones" format="unsigned" len="4" display=""/>
<data type="int" name="Vertices" format="unsigned" len="4" display=""/>
<data type="int" name="Normals" format="unsigned" len="4" display=""/>
<data type="int" name="Colors" format="unsigned" len="4" display=""/>
<data type="int" name="UV_Points" format="unsigned" len="4" display=""/>
<data type="int" name="Materials1" format="unsigned" len="4" display=""/>
<data type="int" name="Materials2" format="unsigned" len="4" display=""/>
<data type="int" name="Polygons" format="unsigned" len="4" display=""/>
<data type="int" name="Textures1" format="unsigned" len="4" display=""/>
<data type="int" name="Textures2" format="unsigned" len="4" display=""/>
</struct>
<data type="int" name="name_offset" format="unsigned" len="4" display=""/>
<data type="int" name="header_len" format="unsigned" len="4" display=""/>
<data type="int" name="header_offset" format="signed" len="4" display=""/>
<data type="int" name="unk1" format="unsigned" len="4" display=""/>
<data type="int" name="unk2" format="unsigned" len="4" display=""/>
<data type="int" name="num_verticies" format="unsigned" len="4" display=""/>
<data type="int" name="num_faces" format="unsigned" len="4" display=""/>
<data type="int" name="unk3" format="unsigned" len="4" display=""/>
<data type="int" name="num_nodes" format="unsigned" len="4" display=""/>
<data type="int" name="version" format="unsigned" len="4" display=""/>
<data type="int" name="unk4" format="unsigned" len="2" display=""/>
<data type="int" name="unk5" format="unsigned" len="2" display=""/>
<struct name="bounds" type_name="" comment="" expr="">
<data type="int" name="min_X" format="unsigned" len="4" display=""/>
<data type="int" name="min_Y" format="unsigned" len="4" display=""/>
<data type="int" name="min_Z" format="unsigned" len="4" display=""/>
<data type="int" name="max_X" format="unsigned" len="4" display=""/>
<data type="int" name="max_Y" format="unsigned" len="4" display=""/>
<data type="int" name="max_Z" format="unsigned" len="4" display=""/>
</struct>
</struct>
<jump offset="header.nodes * -1" comment="" origin="start">
<struct name="nodes" type_name="" comment="" expr="">
<data type="int" name="num_nodes" format="signed" len="4" display=""/>
<for name="node" count="num_nodes || num_nodes - 1" stop_test="num_nodes == 0" type_name="" comment="">
<data type="int" name="node" format="signed" len="4" display=""/>
</for>
</struct>
</jump>
<if test="header.sections >= 0 && header.lists.Definitions != 0" comment="">
<jump offset="header.lists.Definitions" comment="" origin="start">
<struct name="Definitions" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Definitions" comment="" origin="start">
<use_struct name="Definitions" expr="" type_name="Definitions" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Definitions - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 1 && header.lists.Bones != 0" comment="">
<jump offset="header.lists.Bones" comment="" origin="start">
<struct name="Bones" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Bones" comment="" origin="start">
<use_struct name="Bone_data" expr="" type_name="Bones" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Bones - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 2 && header.lists.Vertices != 0" comment="">
<jump offset="header.lists.Vertices" comment="" origin="start">
<struct name="Vertices" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Vertices" comment="" origin="start">
<use_struct name="Vertices" expr="" type_name="Vertices" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Vertices - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 3 && header.lists.Normals != 0" comment="">
<jump offset="header.lists.Normals" comment="" origin="start">
<struct name="Normals" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Normals" comment="" origin="start">
<use_struct name="Normals" expr="" type_name="Normals" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Normals - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 4 && header.lists.Colors != 0" comment="">
<jump offset="header.lists.Colors" comment="" origin="start">
<struct name="Colors" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Colors" comment="" origin="start">
<use_struct name="Colors" expr="" type_name="Colors" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Colors - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 5 && header.lists.UV_Points != 0" comment="">
<jump offset="header.lists.UV_Points" comment="" origin="start">
<struct name="UV_Points" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.UV_Points" comment="" origin="start">
<use_struct name="UV_Points" expr="" type_name="UV_Points" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.UV_Points - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 6 && header.lists.Materials1 != 0" comment="">
<jump offset="header.lists.Materials1" comment="" origin="start">
<struct name="Materials1" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Materials1" comment="" origin="start">
<use_struct name="Materials1" expr="" type_name="Materials1" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Materials1 - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 7 && header.lists.Materials2 != 0" comment="">
<jump offset="header.lists.Materials2" comment="" origin="start">
<struct name="Materials2" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Materials2" comment="" origin="start">
<use_struct name="Materials2" expr="" type_name="Materials2" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Materials2 - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 8 && header.lists.Polygons != 0" comment="">
<jump offset="header.lists.Polygons" comment="" origin="start">
<struct name="Polygons" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Polygons" comment="" origin="start">
<use_struct name="Polygons" expr="" type_name="Polygons" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Polygons - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 9 && header.lists.Textures1 != 0" comment="">
<jump offset="header.lists.Textures1" comment="" origin="start">
<struct name="Textures1" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Textures1" comment="" origin="start">
<use_struct name="Textures1" expr="" type_name="Textures1" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Textures1 - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 10 && header.lists.Textures2 != 0" comment="">
<jump offset="header.lists.Textures2" comment="" origin="start">
<struct name="Textures2" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Textures2" comment="" origin="start">
<use_struct name="Textures2" expr="" type_name="Textures2" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Textures2 - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<data type="none" name="none"/>
</binary_file_format>

replace your existing _mdl0.xml with this^
enjoy


Title: Re: Bone Tree EditorV2
Post by: TheShyGuy on December 07, 2010, 05:46:13 PM
lol..you definitely know more than me about mdl0s....

edit: ill look  at the mdl0 stuff in prob an hour...gonna take a break lol


Title: Re: Bone Tree EditorV2
Post by: DarkPikachu on December 07, 2010, 06:54:51 PM
lol..you definitely know more than me about mdl0s....

edit: ill look  at the mdl0 stuff in prob an hour...gonna take a break lol


heh...
try being a game developer :P

I know how models work...
the thing I'm trying to figure out is the MDL0 shaders...

heh...
if I can figure those out, I could actually give Pikachu fur and make him look real :D

just look at this image:
(http://upload.wikimedia.org/wikipedia/commons/3/3b/Blender3D_FurWithParticles-Finished-2.48a.jpg)


Title: Re: Bone Tree EditorV2
Post by: TheShyGuy on December 07, 2010, 07:28:03 PM
niiicce...soo if you do add fur like that to pikachu wouldn't that mean rewriting the mdl0?...which means if I want to help I gotta figure out how they're set up...

game developer huh? Have you used anything yet to create one? Ex I tried xna(indie games) and it was pretty fun...i wanted to make a shyguy fighting game...but that'd be copyright =p.


Title: Re: Bone Tree EditorV2
Post by: DarkPikachu on December 07, 2010, 07:47:09 PM
niiicce...soo if you do add fur like that to pikachu wouldn't that mean rewriting the mdl0?...which means if I want to help I gotta figure out how they're set up...
well, there really wouldn't be too much to re-wire once the format is figured out :/

my main goal right now is getting Pichu in brawl :D (from melee)

game developer huh? Have you used anything yet to create one? Ex I tried xna(indie games) and it was pretty fun...
I use blender... although I havn't really came out with any games...
but at least I know what to do, so that's a start... :P
(I'm only 19, I'll get better, well... faster as I get older)

i wanted to make a shyguy fighting game...but that'd be copyright =p.
who cares...
if that's true then my video would be copywrite
title: "Pikachu vs Dark Pikachu"

or my main vid (WIP) "Super Smash Bros. Revenge of the Forgotton"
info: the vid includes the brawl chars, the 5 missing melee chars, and bomberman
(BM was in brawl)


Title: Re: Bone Tree EditorV2
Post by: TheShyGuy on December 07, 2010, 07:51:58 PM
lol i don't think they care much about vids no offense....but with xna you can sell your games on xbox 360 live market place ->indie games lol that why i wouldnt be able...id probably get sued =p

edit: you got some errors in your newest code


Title: Re: Bone Tree EditorV2
Post by: DarkPikachu on December 07, 2010, 08:02:11 PM
lol i don't think they care much about vids no offense....but with xna you can sell your games on xbox 360 live market place ->indie games lol that why i wouldnt be able...id probably get sued =p

I see...

I'm not sure how yet, but you can compile your blender games into a single exe file :/
(instead of having the blender player with a bunch of dll files and at least a single .blend file)

heh, I know how to edit the exe to change the directory of the loaded .blend file :D
I learned how when I was trying to build my 3D-MUGEN game engine...

it was supposed to be the exact same thing as MUGEN, but with a few extra features (excluding 3D)


Title: Re: Bone Tree EditorV2
Post by: TheShyGuy on December 07, 2010, 08:17:46 PM
nice...i tried to make a 2d physics engine(when I was still very new to xna and c#...faiiil lool

how far did you get on that engine and btw your code has errors


Title: Re: Bone Tree EditorV2
Post by: DarkPikachu on December 07, 2010, 08:30:21 PM
nice...i tried to make a 2d physics engine(when I was still very new to xna and c#...faiiil lool

how far did you get on that engine and btw your code has errors

I failed... (got caught up in this crap) :P

and errors you say :o
like what errors??

also, don't forget, the code is unfinished ;)
I guess yur kinda a beta tester :P


Title: Re: Bone Tree EditorV2
Post by: TheShyGuy on December 07, 2010, 08:31:40 PM
lemme put it back in c# ill edit this post in a sec
Code:
Error 1 Character '&', hexadecimal value 0x26 is illegal in an XML name. C:\Users\\_mdl0.xml 283 35 Miscellaneous Files
Error 4 Character '&', hexadecimal value 0x26 is illegal in an XML name. C:\Users\\_mdl0.xml 301 35 Miscellaneous Files
Error 7 Character '&', hexadecimal value 0x26 is illegal in an XML name. C:\Users\\_mdl0.xml 319 35 Miscellaneous Files
Error 10 Character '&', hexadecimal value 0x26 is illegal in an XML name. C:\Users\\_mdl0.xml 337 35 Miscellaneous Files
Error 13 Character '&', hexadecimal value 0x26 is illegal in an XML name. C:\Users\\_mdl0.xml 355 35 Miscellaneous Files
Error 16 Character '&', hexadecimal value 0x26 is illegal in an XML name. C:\Users\\_mdl0.xml 373 35 Miscellaneous Files
Error 19 Character '&', hexadecimal value 0x26 is illegal in an XML name. C:\Users\\_mdl0.xml 391 35 Miscellaneous Files
Error 22 Character '&', hexadecimal value 0x26 is illegal in an XML name. C:\Users\\_mdl0.xml 409 35 Miscellaneous Files
Error 25 Character '&', hexadecimal value 0x26 is illegal in an XML name. C:\Users\\_mdl0.xml 427 35 Miscellaneous Files
Error 28 Character '&', hexadecimal value 0x26 is illegal in an XML name. C:\Users\\_mdl0.xml 445 35 Miscellaneous Files
Error 31 Character '&', hexadecimal value 0x26 is illegal in an XML name. C:\Users\\_mdl0.xml 463 36 Miscellaneous Files
Error 3 Entity '&' not defined. C:\Users\\_mdl0.xml 283 35 Miscellaneous Files
Error 6 Entity '&' not defined. C:\Users\\_mdl0.xml 301 35 Miscellaneous Files
Error 9 Entity '&' not defined. C:\Users\\_mdl0.xml 319 35 Miscellaneous Files
Error 12 Entity '&' not defined. C:\Users\\_mdl0.xml 337 35 Miscellaneous Files
Error 15 Entity '&' not defined. C:\Users\\_mdl0.xml 355 35 Miscellaneous Files
Error 18 Entity '&' not defined. C:\Users\\_mdl0.xml 373 35 Miscellaneous Files
Error 21 Entity '&' not defined. C:\Users\\_mdl0.xml 391 35 Miscellaneous Files
Error 24 Entity '&' not defined. C:\Users\\_mdl0.xml 409 35 Miscellaneous Files
Error 27 Entity '&' not defined. C:\Users\\_mdl0.xml 427 35 Miscellaneous Files
Error 30 Entity '&' not defined. C:\Users\\_mdl0.xml 445 35 Miscellaneous Files
Error 33 Entity '&' not defined. C:\Users\\_mdl0.xml 463 36 Miscellaneous Files
Error 2 Expecting ';'. C:\Users\\_mdl0.xml 283 36 Miscellaneous Files
Error 5 Expecting ';'. C:\Users\\_mdl0.xml 301 36 Miscellaneous Files
Error 8 Expecting ';'. C:\Users\\_mdl0.xml 319 36 Miscellaneous Files
Error 11 Expecting ';'. C:\Users\\_mdl0.xml 337 36 Miscellaneous Files
Error 14 Expecting ';'. C:\Users\\_mdl0.xml 355 36 Miscellaneous Files
Error 17 Expecting ';'. C:\Users\\_mdl0.xml 373 36 Miscellaneous Files
Error 20 Expecting ';'. C:\Users\\_mdl0.xml 391 36 Miscellaneous Files
Error 23 Expecting ';'. C:\Users\\_mdl0.xml 409 36 Miscellaneous Files
Error 26 Expecting ';'. C:\Users\\_mdl0.xml 427 36 Miscellaneous Files
Error 29 Expecting ';'. C:\Users\\_mdl0.xml 445 36 Miscellaneous Files
Error 32 Expecting ';'. C:\Users\\_mdl0.xml 463 37 Miscellaneous Files


it goes

error/description/file/line/column/project

edit: btw why is bounds relocation offset and relocation group all the same but you gave em different names?


Title: Re: Bone Tree EditorV2
Post by: DarkPikachu on December 07, 2010, 08:46:56 PM
I don't see why you don't just edit the xml using notepad :/

as for those 3 things:
(https://jump.matthewevan.xyz/i2p/pxbcwxbhxj2wusliwhrb6ym4vcwpihztuf2tfjejrcdzqrmnjuoa.b32/_/ff0acb1b635f03b98485e64f35c7a9cad407012413214bbfd571e8471bc1e05c) (https://jump.matthewevan.xyz/i2p/pxbcwxbhxj2wusliwhrb6ym4vcwpihztuf2tfjejrcdzqrmnjuoa.b32/_/ff0acb1b635f03b98485e64f35c7a9cad407012413214bbfd571e8471bc1e05c)

also, I'm gonna lose net in a few moments so don't be surprise if I don't reply for a while...

EDIT: this is how those 3 things are used:
(https://jump.matthewevan.xyz/i2p/pxbcwxbhxj2wusliwhrb6ym4vcwpihztuf2tfjejrcdzqrmnjuoa.b32/_/22837280312e3479fb461b37bb9218200a01471bfdc3077139eb6600e510f67e) (https://jump.matthewevan.xyz/i2p/pxbcwxbhxj2wusliwhrb6ym4vcwpihztuf2tfjejrcdzqrmnjuoa.b32/_/22837280312e3479fb461b37bb9218200a01471bfdc3077139eb6600e510f67e)


Title: Re: Bone Tree EditorV2
Post by: DarkPikachu on December 08, 2010, 02:08:10 PM
hey, a little something I figured out:

the P3 offset is the textures used by the material

the P4 offset is for IDK yet

the data offset prbly contains the colors :D
(Green thunder, here I come) >:3


Title: Re: Bone Tree EditorV2
Post by: TheShyGuy on December 08, 2010, 03:04:57 PM
how do you figure out whats for what?...would help to know where or atleast how your figuring out the mdl0..btw im not working on the editor or looking at the mdl0 right now...just animating a bit for my psa


Title: Re: Bone Tree EditorV2
Post by: DarkPikachu on December 08, 2010, 03:36:16 PM
how do you figure out whats for what?
...would help to know where or atleast how your figuring out the mdl0...

Pharrox (along with about 2 others) and scattered notes were a big help...
I figured out the colors on my own

I'm working on materials right now (the most complicated thing)
^I'm using only knowledge of what I know about dev-ing games to figure the out unknown stuff

and the rest of the stuff I know just simply comes from working with other 3D formats such as .obj or .dae
I think I may have found the ambient, diffuse, and specular colors :af2:
(https://jump.matthewevan.xyz/i2p/pxbcwxbhxj2wusliwhrb6ym4vcwpihztuf2tfjejrcdzqrmnjuoa.b32/_/73a0a18af608fa3710828a59b101c9be409e882aac1537887d0053735355dc52) (https://jump.matthewevan.xyz/i2p/pxbcwxbhxj2wusliwhrb6ym4vcwpihztuf2tfjejrcdzqrmnjuoa.b32/_/73a0a18af608fa3710828a59b101c9be409e882aac1537887d0053735355dc52)

I'm still trying to figure out the P4 and P5 offset stuff
P4 is nonexistant '00 00 00 00' while P5 offsets to bare data (no defined header)

also, all this data is mixed in with eachother due to it being called by the materials using it...
so material extension data isn't lined up over-top of one another like the rest of the file data

EDIT:
materials2 (prbly shaders) will be a tough and painful one to figure out DX


Title: Re: Bone Tree Editor - Closed/not working on anymore
Post by: DarkPikachu on December 08, 2010, 05:55:43 PM
here's what I know of materials so far:
(https://jump.matthewevan.xyz/i2p/pxbcwxbhxj2wusliwhrb6ym4vcwpihztuf2tfjejrcdzqrmnjuoa.b32/_/bd4bd0108fc96c24b74e5281610d457a23c1fc63e6d44440d27e55a09f6aa8b9) (https://jump.matthewevan.xyz/i2p/pxbcwxbhxj2wusliwhrb6ym4vcwpihztuf2tfjejrcdzqrmnjuoa.b32/_/bd4bd0108fc96c24b74e5281610d457a23c1fc63e6d44440d27e55a09f6aa8b9)

it's easier to explain with images :P


Title: Re: Bone Tree Editor - Closed/not working on anymore
Post by: TheShyGuy on December 08, 2010, 06:07:02 PM
i wrote in a notepad...and it looks like my new idea might work =)... there wont be a need for move up/down or editing from txt boxes for the bone offset...just plain moving it within the (sortof) tree...


Title: Re: Bone Tree Editor - Closed/not working on anymore
Post by: DarkPikachu on December 08, 2010, 06:13:50 PM
O.o
you mean like a fully interactive index change?? (click/drag)

I need to add bones to my char though
^(TopN, HipN, ThrowN, etc... (all the important bones))


Title: Re: Bone Tree Editor - Closed/not working on anymore
Post by: TheShyGuy on December 08, 2010, 06:21:12 PM
yeah basically you can move your bone anywhere you want...ill work on figuring adding bones...but that would mean redoing the mdl0 right?->fortwaffles made a bone(fake) adder and it doubles the mdl0 size. I think i read that he just repointed some data around or something

edit: lol new idea shouldnt take long to make


Title: Re: Bone Tree Editor - Closed/not working on anymore
Post by: DarkPikachu on December 08, 2010, 06:28:10 PM
yeah basically you can move your bone anywhere you want...ill work on figuring adding bones...but that would mean redoing the mdl0 right?->fortwaffles made a bone(fake) adder and it doubles the mdl0 size. I think i read that he just repointed some data around or something

didn't you say you've added bones?? :/
or did I mistake that for you just simply editing the existing ones??

and I tried fortwaffles...
I couldn't work with that...
granted they did show up as editable bones:
(https://jump.matthewevan.xyz/i2p/pxbcwxbhxj2wusliwhrb6ym4vcwpihztuf2tfjejrcdzqrmnjuoa.b32/_/aa747c9444ff3c15dfb37e0e512264dea7fd30439b4cb74329e996a5155251ac) (https://jump.matthewevan.xyz/i2p/pxbcwxbhxj2wusliwhrb6ym4vcwpihztuf2tfjejrcdzqrmnjuoa.b32/_/aa747c9444ff3c15dfb37e0e512264dea7fd30439b4cb74329e996a5155251ac)

but when I checked the data, there was nothing there :/
I think it may have just modded the number of bones without physically adding them...


Title: Re: Bone Tree Editor - Closed/not working on anymore
Post by: TheShyGuy on December 08, 2010, 06:30:57 PM
the bone tree that you see is farther down in the data. It looks like any other bone(i think..been a while since i looked at it)

i don't think ive ever said i can add bones lol...you know the mdl0 so you should know what makes them real lol


Title: Re: Bone Tree Editor - Closed/not working on anymore
Post by: DarkPikachu on December 08, 2010, 06:42:34 PM
the bone tree that you see is farther down in the data. It looks like any other bone(i think..been a while since i looked at it)

i don't think ive ever said i can add bones lol...you know the mdl0 so you should know what makes them real lol

heh... yea :P

I guess what I originally thought was right then :P
*comes to realization* DERP!

so you wern't talking about physically adding bones,
which would be a good reason for you not understanding what the relocation table is...
...I have so derp'd... XDD

so yea...
with that understood :P
you'd have to modify the following data offsets after the added bone...
...aw crap...
(practically redoing the entire MDL0 (editing the offsets))... :(

none of us are that far yet... DX>
dang...

well...
I say we learn then :P
since I don't have a clue about C# and can't prog a GUI for crap,
^but understand most of the MDL0 format (still not everything though)
while you don't get anything but bones, but can prog GUI's for crap :D

guess I'd better get busy =3=


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 08, 2010, 07:50:52 PM
hey, can you maybe help me out a little??
(I'll be in bed or in skool before you can really do anything) :P

I have some C# code, and I was wondering if you couldn't take a look at it...
maybe add descriptive comments and what not and send it back...

anyways:
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using BrawlLib.SSBBTypes;
using BrawlLib.OpenGL;
using System.IO;
using BrawlLib.IO;
using BrawlLib.Imaging;
using BrawlLib.Modeling;
using BrawlLib.Wii.Models;

namespace BrawlLib.SSBB.ResourceNodes
{
Ā  Ā  public unsafe class MDL0Node : BRESEntryNode
Ā  Ā  {
Ā  Ā  Ā  Ā  internal MDL0* Header { get { return (MDL0*)WorkingUncompressed.Address; } }

Ā  Ā  Ā  Ā  public override ResourceType ResourceType { get { return ResourceType.MDL0; } }

Ā  Ā  Ā  Ā  public override int DataAlign { get { return 0x20; } }

Ā  Ā  Ā  Ā  private int _unk1, _unk2, _unk3, _unk4, _version;
Ā  Ā  Ā  Ā  private int _numVertices, _numFaces, _numNodes;
Ā  Ā  Ā  Ā  private Vector3 _min, _max;

Ā  Ā  Ā  Ā  [Category("MDL0 Def")]
Ā  Ā  Ā  Ā  public int Unknown1 { get { return _unk1; } set { _unk1 = value; } }
Ā  Ā  Ā  Ā  [Category("MDL0 Def")]
Ā  Ā  Ā  Ā  public int Unknown2 { get { return _unk2; } set { _unk2 = value; } }
Ā  Ā  Ā  Ā  [Category("MDL0 Def")]
Ā  Ā  Ā  Ā  public int NumVertices { get { return _numVertices; } set { _numVertices = value; } }
Ā  Ā  Ā  Ā  [Category("MDL0 Def")]
Ā  Ā  Ā  Ā  public int NumFaces { get { return _numFaces; } set { _numFaces = value; } }
Ā  Ā  Ā  Ā  [Category("MDL0 Def")]
Ā  Ā  Ā  Ā  public int Unknown3 { get { return _unk3; } set { _unk3 = value; } }
Ā  Ā  Ā  Ā  [Category("MDL0 Def")]
Ā  Ā  Ā  Ā  public int NumNodes { get { return _numNodes; } set { _numNodes = value; } }
Ā  Ā  Ā  Ā  [Category("MDL0 Def")]
Ā  Ā  Ā  Ā  public int Version { get { return _version; } set { _version = value; } }
Ā  Ā  Ā  Ā  [Category("MDL0 Def")]
Ā  Ā  Ā  Ā  public int Unknown4 { get { return _unk4; } set { _unk4 = value; } }
Ā  Ā  Ā  Ā  [Category("MDL0 Def")]
Ā  Ā  Ā  Ā  public BVec3 BoxMin { get { return _min; } set { _min = value; } }
Ā  Ā  Ā  Ā  [Category("MDL0 Def")]
Ā  Ā  Ā  Ā  public BVec3 BoxMax { get { return _max; } set { _max = value; } }

Ā  Ā  Ā  Ā  //internal List<ResourceNode> _bones;
Ā  Ā  Ā  Ā  //private List<MDL0PolygonNode> _polygons;
Ā  Ā  Ā  Ā  public T FindResource<T>(int index) where T : ResourceNode
Ā  Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  Ā  Ā  ResourceNode group = null;
Ā  Ā  Ā  Ā  Ā  Ā  if (typeof(T) == typeof(MDL0PolygonNode))
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  group = FindChild("Polygons", false) as ResourceNode;
Ā  Ā  Ā  Ā  Ā  Ā  else if (typeof(T) == typeof(MDL0VertexNode))
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  group = FindChild("Vertices", false) as ResourceNode;
Ā  Ā  Ā  Ā  Ā  Ā  else if (typeof(T) == typeof(MDL0NormalNode))
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  group = FindChild("Normals", false) as ResourceNode;
Ā  Ā  Ā  Ā  Ā  Ā  else if (typeof(T) == typeof(MDL0UVNode))
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  group = FindChild("UV Points", false) as ResourceNode;
Ā  Ā  Ā  Ā  Ā  Ā  else if (typeof(T) == typeof(MDL0ColorNode))
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  group = FindChild("Colors", false) as ResourceNode;
Ā  Ā  Ā  Ā  Ā  Ā  else if (typeof(T) == typeof(MDL0BoneNode))
Ā  Ā  Ā  Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  int count = -1;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  if ((group = FindChild("Bones", false) as MDL0GroupNode) != null)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  return FindBone(group, index, ref count) as T;
Ā  Ā  Ā  Ā  Ā  Ā  }

Ā  Ā  Ā  Ā  Ā  Ā  if (group == null)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  return null;

Ā  Ā  Ā  Ā  Ā  Ā  if (group.Children.Count <= index)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  return null;

Ā  Ā  Ā  Ā  Ā  Ā  return group.Children[index] as T;
Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  Ā  private ResourceNode FindBone(ResourceNode node, int index, ref int count)
Ā  Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  Ā  Ā  if (count++ >= index)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  return node;

Ā  Ā  Ā  Ā  Ā  Ā  foreach (ResourceNode n in node.Children)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  if ((node = FindBone(n, index, ref count)) != null)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  return node;

Ā  Ā  Ā  Ā  Ā  Ā  return null;
Ā  Ā  Ā  Ā  }

Ā  Ā  Ā  Ā  protected override bool OnInitialize()
Ā  Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  Ā  Ā  base.OnInitialize();

Ā  Ā  Ā  Ā  Ā  Ā  if ((_name == null) && (Header->_stringOffset != 0))
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  _name = Header->ResourceString;

Ā  Ā  Ā  Ā  Ā  Ā  _unk1 = Header->_modelDef._unk1;
Ā  Ā  Ā  Ā  Ā  Ā  _unk2 = Header->_modelDef._unk2;
Ā  Ā  Ā  Ā  Ā  Ā  _numVertices = Header->_modelDef._numVertices;
Ā  Ā  Ā  Ā  Ā  Ā  _numFaces = Header->_modelDef._numFaces;
Ā  Ā  Ā  Ā  Ā  Ā  _unk3 = Header->_modelDef._unk3;
Ā  Ā  Ā  Ā  Ā  Ā  _numNodes = Header->_modelDef._numNodes;
Ā  Ā  Ā  Ā  Ā  Ā  _version = Header->_modelDef._version;
Ā  Ā  Ā  Ā  Ā  Ā  _unk4 = Header->_modelDef._unk4;
Ā  Ā  Ā  Ā  Ā  Ā  _min = Header->_modelDef._minExtents;
Ā  Ā  Ā  Ā  Ā  Ā  _max = Header->_modelDef._maxExtents;

Ā  Ā  Ā  Ā  Ā  Ā  return true;
Ā  Ā  Ā  Ā  }

Ā  Ā  Ā  Ā  private List<IMatrixProvider> _nodes = new List<IMatrixProvider>();
Ā  Ā  Ā  Ā  internal List<ResourceNode> _bones = new List<ResourceNode>();
Ā  Ā  Ā  Ā  internal List<TextureRef> _texRefs = new List<TextureRef>();

Ā  Ā  Ā  Ā  protected override void OnPopulate()
Ā  Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  Ā  Ā  ResourceGroup* group;
Ā  Ā  Ā  Ā  Ā  Ā  for (int i = 0; i < 11; i++)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  if ((group = Header->GetEntry(i)) != null)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  new MDL0GroupNode().Initialize(this, new DataSource(group, 0), i);

Ā  Ā  Ā  Ā  Ā  Ā  MDL0GroupNode bNode = FindChild("Bones", false) as MDL0GroupNode;
Ā  Ā  Ā  Ā  Ā  Ā  MDL0GroupNode pNode = FindChild("Polygons", false) as MDL0GroupNode;
Ā  Ā  Ā  Ā  Ā  Ā  MDL0GroupNode mNode = FindChild("Materials1", false) as MDL0GroupNode;
Ā  Ā  Ā  Ā  Ā  Ā  MDL0GroupNode t1Node = FindChild("Textures1", false) as MDL0GroupNode;
Ā  Ā  Ā  Ā  Ā  Ā  MDL0GroupNode t2Node = FindChild("Textures2", false) as MDL0GroupNode;
Ā  Ā  Ā  Ā  Ā  Ā  MDL0DefNode nodeMix = FindChild("Definitions/NodeMix", false) as MDL0DefNode;
Ā  Ā  Ā  Ā  Ā  Ā  MDL0DefNode drawOpa = FindChild("Definitions/DrawOpa", false) as MDL0DefNode;
Ā  Ā  Ā  Ā  Ā  Ā  MDL0DefNode drawXlu = FindChild("Definitions/DrawXlu", false) as MDL0DefNode;

Ā  Ā  Ā  Ā  Ā  Ā  //IMatrixProvider[] nodeCache = new IMatrixProvider[NumNodes];
Ā  Ā  Ā  Ā  Ā  Ā  _nodes = new List<IMatrixProvider>(new IMatrixProvider[NumNodes]);

Ā  Ā  Ā  Ā  Ā  Ā  //Pull out bones
Ā  Ā  Ā  Ā  Ā  Ā  //foreach (MDL0BoneNode bone in _boneCache)
Ā  Ā  Ā  Ā  Ā  Ā  //Ā  Ā  nodeCache[bone.NodeId] = bone;
Ā  Ā  Ā  Ā  Ā  Ā  if (bNode != null)
Ā  Ā  Ā  Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  _bones = bNode.Children;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  foreach (MDL0BoneNode b in bNode._nodeCache)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  _nodes[b.NodeId] = new NodeRef(b);

Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  //Pull out node groups
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  if (nodeMix != null)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  foreach (object o in nodeMix.Items)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  if (o is MDL0Node3Class)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  MDL0Node3Class d = o as MDL0Node3Class;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  NodeRef nref = new NodeRef();

Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  foreach (MDL0NodeType3Entry e in d._entries)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  nref._entries.Add(new NodeWeight(_nodes[e._id], e._value));

Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  _nodes[d._id] = nref;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  }

Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  //Attach opaque textures
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  if (drawOpa != null)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  foreach (object o in drawOpa.Items)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  if (o is MDL0NodeType4)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  MDL0NodeType4 d = (MDL0NodeType4)o;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  MDL0PolygonNode poly = pNode.Children[d._polygonIndex] as MDL0PolygonNode;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  poly._material = mNode.Children[d._materialIndex] as MDL0MaterialNode;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  }

Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  //Attach transparent textures
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  //Parse entry 4?
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  if (drawXlu != null)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  foreach (object o in drawXlu.Items)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  if (o is MDL0NodeType4)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  MDL0NodeType4 d = (MDL0NodeType4)o;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  MDL0PolygonNode poly = pNode.Children[d._polygonIndex] as MDL0PolygonNode;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  poly._material = mNode.Children[d._materialIndex] as MDL0MaterialNode;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  }

Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  bNode._nodeCache = null;
Ā  Ā  Ā  Ā  Ā  Ā  }


Ā  Ā  Ā  Ā  Ā  Ā  //Link polygons to nodes
Ā  Ā  Ā  Ā  Ā  Ā  if (pNode != null)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  foreach (MDL0PolygonNode n in pNode.Children)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  if (n.NodeId >= 0)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  n._singleBind = _nodes[n.NodeId];

Ā  Ā  Ā  Ā  Ā  Ā  //Get texture references and attach them to texture nodes
Ā  Ā  Ā  Ā  Ā  Ā  if (t1Node != null)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  foreach (MDL0TextureNode t in t1Node.Children)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  _texRefs.Add(t._textureReference = new TextureRef(t.Name));
Ā  Ā  Ā  Ā  Ā  Ā  if (t2Node != null)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  foreach (MDL0TextureNode t in t2Node.Children)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  TextureRef tref = null;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  foreach (TextureRef tr in _texRefs)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  if (tr.Name == t.Name)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  { tref = tr; break; }
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  if (tref == null)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  _texRefs.Add(tref = new TextureRef(t.Name));
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  t._textureReference = tref;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  }

Ā  Ā  Ā  Ā  Ā  Ā  //Attach material refs to texture refs
Ā  Ā  Ā  Ā  Ā  Ā  if (mNode != null)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  foreach (MDL0MaterialNode mat in mNode.Children)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  foreach (MDL0MaterialRefNode mref in mat.Children)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  foreach (TextureRef tref in _texRefs)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  if (tref.Name == mref.Name)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  mref._textureReference = tref;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  break;
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  }

Ā  Ā  Ā  Ā  Ā  Ā  //Attach texture nodes to materials


Ā  Ā  Ā  Ā  Ā  Ā  //Clear caches
Ā  Ā  Ā  Ā  Ā  Ā  //_boneCache.Clear();

Ā  Ā  Ā  Ā  }

Ā  Ā  Ā  Ā  internal override void GetStrings(StringTable table)
Ā  Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  Ā  Ā  table.Add(Name);
Ā  Ā  Ā  Ā  Ā  Ā  foreach (MDL0GroupNode n in Children)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  n.GetStrings(table);
Ā  Ā  Ā  Ā  }

Ā  Ā  Ā  Ā  public override unsafe void Export(string outPath)
Ā  Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  Ā  Ā  if (outPath.EndsWith(".dae"))
Ā  Ā  Ā  Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  //Model model = GetModel();
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  //Collada.Serialize(new object[] { model }, outPath);
Ā  Ā  Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  Ā  Ā  Ā  else
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  base.Export(outPath);
Ā  Ā  Ā  Ā  }

Ā  Ā  Ā  Ā  protected internal override void PostProcess(VoidPtr bresAddress, VoidPtr dataAddress, int dataLength, StringTable stringTable)
Ā  Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  Ā  Ā  base.PostProcess(bresAddress, dataAddress, dataLength, stringTable);

Ā  Ā  Ā  Ā  Ā  Ā  MDL0* header = (MDL0*)dataAddress;
Ā  Ā  Ā  Ā  Ā  Ā  header->ResourceStringAddress = stringTable[Name] + 4;

Ā  Ā  Ā  Ā  Ā  Ā  foreach (MDL0GroupNode node in Children)
Ā  Ā  Ā  Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  VoidPtr addr = dataAddress + header->Offsets[node._index];
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  node.PostProcess(addr, stringTable);
Ā  Ā  Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  Ā  }

Ā  Ā  Ā  Ā  #region Rendering

Ā  Ā  Ā  Ā  internal bool _bound = false;
Ā  Ā  Ā  Ā  internal bool _renderPolygons = true;
Ā  Ā  Ā  Ā  internal bool _renderPolygonsWireframe = false;
Ā  Ā  Ā  Ā  internal bool _renderBones = true;

Ā  Ā  Ā  Ā  internal void Render(GLContext ctx)
Ā  Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  Ā  Ā  if (!_bound)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Bind(ctx);

Ā  Ā  Ā  Ā  Ā  Ā  ResourceNode group;

Ā  Ā  Ā  Ā  Ā  Ā  if (_renderPolygons)
Ā  Ā  Ā  Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  ctx.glEnable(GLEnableCap.Lighting);
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  ctx.glEnable(GLEnableCap.DepthTest);
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  if (_renderPolygonsWireframe)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  ctx.glPolygonMode(GLFace.FrontAndBack, GLPolygonMode.Line);
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  else
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  ctx.glPolygonMode(GLFace.FrontAndBack, GLPolygonMode.Fill);

Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  if ((group = FindChild("Polygons", false)) != null)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  foreach (MDL0PolygonNode poly in group.Children)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  poly.Render(ctx);
Ā  Ā  Ā  Ā  Ā  Ā  }

Ā  Ā  Ā  Ā  Ā  Ā  if (_renderBones)
Ā  Ā  Ā  Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  ctx.glDisable((uint)GLEnableCap.Lighting);
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  ctx.glDisable((uint)GLEnableCap.DepthTest);
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  ctx.glPolygonMode(GLFace.FrontAndBack, GLPolygonMode.Line);

Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  if ((group = FindChild("Bones", false)) != null)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  foreach (MDL0BoneNode bone in group.Children)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  bone.Render(ctx);
Ā  Ā  Ā  Ā  Ā  Ā  }
Ā  Ā  Ā  Ā  }

Ā  Ā  Ā  Ā  internal void ApplyCHR(CHR0Node node, int index)
Ā  Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  Ā  Ā  //Transform bones
Ā  Ā  Ā  Ā  Ā  Ā  ResourceNode group = FindChild("Bones", false);
Ā  Ā  Ā  Ā  Ā  Ā  if (group != null)
Ā  Ā  Ā  Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  foreach (MDL0BoneNode b in group.Children)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  b.ApplyCHR0(node, index);
Ā  Ā  Ā  Ā  Ā  Ā  }

Ā  Ā  Ā  Ā  Ā  Ā  //Transform nodes
Ā  Ā  Ā  Ā  Ā  Ā  foreach (NodeRef nr in _nodes)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  nr.CalcBase();
Ā  Ā  Ā  Ā  Ā  Ā  foreach (NodeRef nr in _nodes)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  nr.CalcWeighted();

Ā  Ā  Ā  Ā  Ā  Ā  //Weight vertices
Ā  Ā  Ā  Ā  Ā  Ā  if ((group = FindChild("Polygons", false)) != null)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  foreach (MDL0PolygonNode poly in group.Children)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  poly.WeightVertices(_nodes);
Ā  Ā  Ā  Ā  }

Ā  Ā  Ā  Ā  private void Bind(GLContext ctx)
Ā  Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  Ā  Ā  _bound = true;
Ā  Ā  Ā  Ā  Ā  Ā  foreach (MDL0GroupNode g in Children)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  g.Bind(ctx);
Ā  Ā  Ā  Ā  }

Ā  Ā  Ā  Ā  internal void Unbind(GLContext ctx)
Ā  Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  Ā  Ā  _bound = false;
Ā  Ā  Ā  Ā  Ā  Ā  foreach (MDL0GroupNode g in Children)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  g.Unbind(ctx);
Ā  Ā  Ā  Ā  }

Ā  Ā  Ā  Ā  #endregion

Ā  Ā  Ā  Ā  internal static ResourceNode TryParse(DataSource source) { return ((MDL0*)source.Address)->_entry._tag == MDL0.Tag ? new MDL0Node() : null; }

Ā  Ā  Ā  Ā  internal void ResetTextures()
Ā  Ā  Ā  Ā  {
Ā  Ā  Ā  Ā  Ā  Ā  foreach (TextureRef tref in _texRefs)
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  tref.Reload();
Ā  Ā  Ā  Ā  }
Ā  Ā  }
}

do what you can ;)
any help is good :D
(btw, this is another way I figure out stuff)

note: I can't understand C... code
so I kinda have to have someone translate it or comment it so I can read it...

EDIT:
hey, this'll prbly help with some stuff: (maybe not) :/
http://www.mediafire.com/?61mtbcgqv3la19s (modset 4.0)


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 08, 2010, 08:08:50 PM
not done with the new editor lol... but sure i can help you out wherever i can...after a bit more coding lol


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 08, 2010, 08:29:57 PM
HMMM...
I've just found an undescribed data

did you know that unknown6 in materials1 is an offset  8)
where it goes is just directly after the "decal textures" used by the material
(when it's not 0)

but, like P5 offset, is just nothing but bare data at the start -_-

EDIT:
sry bout dragging this thread off topic :P


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 08, 2010, 08:42:06 PM
lol..
-your looking at brawl lib lol....kyral and bero are the people to ask if you need help on it...Most of the things you probably are wanting to know are probably explained(atleast to the point where you know what hes really doing) in different classes...which i don't feel like going through..If you can't figure it out tonight then ill search it tomorow...


edit2:...i checked and only figured out the frame and inverse bind matrix(except for the last one for some reason stays 0...) ->(x,x,x,0)

also where is the inverse frame matrix data at?(or do you not need?)


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 09, 2010, 01:07:41 PM
lol..
-your looking at brawl lib lol....kyral and bero are the people to ask if you need help on it...Most of the things you probably are wanting to know are probably explained(atleast to the point where you know what hes really doing) in different classes...which i don't feel like going through..If you can't figure it out tonight then ill search it tomorow...
that was them!... :D
Pharrox, Kryal, and Bero
they havn't been active enough to help me lately :/

edit2:...i checked and only figured out the frame and inverse bind matrix(except for the last one for some reason stays 0...) ->(x,x,x,0)
O.o
wait, wut??

also where is the inverse frame matrix data at?(or do you not need?)
it should be just stacked below the transform (frame) matrix

my template could've told you that :P

also about my template,
well, more like findings...
the 'data offset' in 'Materials1' points to the 'Materials2' offsets

unknown6 (which I've renamed to P6) points to the same location as P5 however,
P6 is for Pachi while P5 is for Pika

I think Pachi's P5 and P6 are switched :/

still got more to look into though :P

EDIT:
BTW:
Materials1 == Shaders
Materials2 == Materials


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 09, 2010, 02:02:31 PM
not home...
-for some reason I can't changethe fourth value of the frame or inverse bind matrices
-oh lol...
-nice
-i would be done with the new editor but I'm having a problem(prob n easy fix) which I'll fix when I get bak.


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 09, 2010, 02:12:17 PM
hmm...
so wait...
you figured out how the values work for the matrices?? :/

also, if there was a forth set, the matrix would look like this:

3F 80 00 00 80 00 00 00 00 00 00 00 00 00 00 00
80 00 00 00 3F 80 00 00 80 00 00 00 00 00 00 00
00 00 00 00 80 00 00 00 3F 80 00 00 00 00 00 00
00 00 00 00 00 00 00 00 80 00 00 00 3F 80 00 00

I think it may use the first 3 floats to figure out the 4th...
but I'm not sure... (don't go by that as I've never looked at it) :/


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 09, 2010, 02:35:08 PM
Template UD:
Code:
<?xml version="1.0"?>
<!DOCTYPE binary_file_format SYSTEM "BinaryFileFormat.dtd">
<binary_file_format name="MDL0" type_name="" comment="" expr="" default_byte_order="big" default_read_only="false" default_char_set="ansi">
<define_struct type_name="offset_name" comment="" expr="">
<data type="int" name="str_len" format="unsigned" len="1" display=""/>
<data type="string" name="name" format="ascii" len="str_len" display=""/>
</define_struct>
<define_struct type_name="bounds" comment="" expr="">
<data type="int" name="min_X" format="unsigned" len="4" display=""/>
<data type="int" name="min_Y" format="unsigned" len="4" display=""/>
<data type="int" name="min_Z" format="unsigned" len="4" display=""/>
<data type="int" name="max_X" format="unsigned" len="4" display=""/>
<data type="int" name="max_Y" format="unsigned" len="4" display=""/>
<data type="int" name="max_Z" format="unsigned" len="4" display=""/>
<data type="none" name="pad" len="8"/>
</define_struct>
<define_struct type_name="relocation_group" comment="" expr="">
<data type="int" name="block_len" format="unsigned" len="4" display=""/>
<data type="int" name="num_offsets" format="unsigned" len="4" display=""/>
<data type="int" name="tag" format="unsigned" len="4" display="hex"/>
<data type="int" name="unk1" format="unsigned" len="2" display="hex"/>
<data type="int" name="unk2" format="unsigned" len="2" display="hex"/>
<data type="int" name="pad" format="unsigned" len="8" display="hex"/>
</define_struct>
<define_struct type_name="relocation_offset" comment="" expr="">
<data type="int" name="ID" format="unsigned" len="2" display=""/>
<data type="int" name="unk1" format="unsigned" len="2" display="hex"/>
<data type="int" name="unk2" format="unsigned" len="2" display="hex"/>
<data type="int" name="unk3" format="unsigned" len="2" display="hex"/>
<data type="int" name="string_offset" format="unsigned" len="4" display=""/>
<data type="int" name="data_offset" format="unsigned" len="4" display=""/>
</define_struct>
<define_struct type_name="Definitions" comment="" expr="">
<struct name="definition_header" type_name="" comment="" expr="">
<data type="none" name="tmp" len="4"/>
</struct>
</define_struct>
<define_struct type_name="Bones" comment="" expr="">
<struct name="bone_header" type_name="" comment="" expr="">
<data type="int" name="header_len" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="bone_index" len="4" format="unsigned" display=""/>
<data type="int" name="node_ID" len="4" format="unsigned" display=""/>
<data type="int" name="flags" len="4" format="unsigned" display=""/>
<data type="int" name="pad" len="8" format="unsigned" display=""/>
<struct name="loc_rot_sca" type_name="" comment="" expr="">
<data type="int" name="sca_X" format="unsigned" len="4" display=""/>
<data type="int" name="sca_Y" len="4" format="unsigned" display=""/>
<data type="int" name="sca_Z" len="4" format="unsigned" display=""/>
<data type="int" name="rot_X" len="4" format="unsigned" display=""/>
<data type="int" name="rot_Y" len="4" format="unsigned" display=""/>
<data type="int" name="rot_Z" len="4" format="unsigned" display=""/>
<data type="int" name="loc_X" len="4" format="unsigned" display=""/>
<data type="int" name="loc_Y" len="4" format="unsigned" display=""/>
<data type="int" name="loc_Z" len="4" format="unsigned" display=""/>
</struct>
<struct name="bound" type_name="" comment="" expr="">
<data type="int" name="min_X" len="4" format="unsigned" display=""/>
<data type="int" name="min_Y" len="4" format="unsigned" display=""/>
<data type="int" name="min_Z" len="4" format="unsigned" display=""/>
<data type="int" name="max_X" len="4" format="unsigned" display=""/>
<data type="int" name="max_Y" len="4" format="unsigned" display=""/>
<data type="int" name="max_Z" len="4" format="unsigned" display=""/>
</struct>
<data type="int" name="parent" len="4" format="signed" display=""/>
<data type="int" name="child" len="4" format="unsigned" display=""/>
<data type="int" name="next" len="4" format="unsigned" display=""/>
<data type="int" name="prev" len="4" format="unsigned" display=""/>
<data type="int" name="part2" len="4" format="unsigned" display=""/>
</struct>
<struct name="frame_matrix" type_name="" comment="" expr="">
<data type="int" name="s_1_1" format="signed" len="4" display=""/>
<data type="int" name="s_2_1" format="signed" len="4" display=""/>
<data type="int" name="s_3_1" format="signed" len="4" display=""/>
<data type="int" name="s_4_1" format="signed" len="4" display=""/>
<data type="int" name="s_1_2" format="signed" len="4" display=""/>
<data type="int" name="s_2_2" format="signed" len="4" display=""/>
<data type="int" name="s_3_2" format="signed" len="4" display=""/>
<data type="int" name="s_4_2" format="signed" len="4" display=""/>
<data type="int" name="s_1_3" format="signed" len="4" display=""/>
<data type="int" name="s_2_3" format="signed" len="4" display=""/>
<data type="int" name="s_3_3" format="signed" len="4" display=""/>
<data type="int" name="s_4_3" format="signed" len="4" display=""/>
</struct>
<struct name="inverse_matrix" type_name="" comment="" expr="">
<data type="int" name="s_1_1" format="signed" len="4" display=""/>
<data type="int" name="s_2_1" format="signed" len="4" display=""/>
<data type="int" name="s_3_1" format="signed" len="4" display=""/>
<data type="int" name="s_4_1" format="signed" len="4" display=""/>
<data type="int" name="s_1_2" format="signed" len="4" display=""/>
<data type="int" name="s_2_2" format="signed" len="4" display=""/>
<data type="int" name="s_3_2" format="signed" len="4" display=""/>
<data type="int" name="s_4_2" format="signed" len="4" display=""/>
<data type="int" name="s_1_3" format="signed" len="4" display=""/>
<data type="int" name="s_2_3" format="signed" len="4" display=""/>
<data type="int" name="s_3_3" format="signed" len="4" display=""/>
<data type="int" name="s_4_3" format="signed" len="4" display=""/>
</struct>
</define_struct>
<define_struct type_name="Vertices" comment="" expr="">
<struct name="vertice_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="unsigned" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="isXYZ" len="4" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="modifier" len="1" format="unsigned" display=""/>
<data type="int" name="entry_stride" len="1" format="unsigned" display=""/>
<data type="int" name="num_vertices" len="2" format="unsigned" display=""/>
<if test="isXYZ == 1" comment="">
<use_struct name="bounds" expr="" type_name="bounds" comment=""/>
</if>
</struct>
<data type="string" name="vertices" len="vertice_header.entry_stride * vertice_header.num_vertices" format="default" display="vert structures" comment="I could've put a 'FOR' here,
but it'd take too long when loading the file"/>
<data type="none" name="pad" len="vertice_header.block_size - (vertice_header.entry_stride*vertice_header.num_vertices) - vertice_header.data_offset"/>
</define_struct>
<define_struct type_name="Normals" comment="" expr="">
<struct name="normal_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="unsigned" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="isXYZ" len="4" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="modifier" len="1" format="unsigned" display=""/>
<data type="int" name="entry_stride" len="1" format="unsigned" display=""/>
<data type="int" name="num_normals" len="2" format="unsigned" display=""/>
<if test="isXYZ == 1" comment="">
<use_struct name="bounds" expr="" type_name="bounds" comment=""/>
</if>
</struct>
<data type="string" name="normals" format="default" display="normal structures" len="normal_header.entry_stride*normal_header.num_normals" comment="I could've put a 'FOR' here,
but it'd take too long when loading the file"/>
<data type="none" name="pad" len="normal_header.block_size - (normal_header.entry_stride*normal_header.num_normals) - normal_header.data_offset"/>
</define_struct>
<define_struct type_name="Colors" comment="" expr="">
<struct name="color_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="signed" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="signed" display=""/>
<data type="int" name="string_offset" len="4" format="signed" display=""/>
<data type="int" name="ID" len="4" format="signed" display=""/>
<data type="int" name="isRGBA" len="4" format="signed" display=""/>
<data type="int" name="type" len="4" format="signed" display=""/>
<data type="int" name="entry_stride" len="1" format="signed" display=""/>
<data type="int" name="modifier" len="1" format="signed" display=""/>
<data type="int" name="num_colors" len="2" format="signed" display=""/>
</struct>
<for name="color" count="color_header.num_colors || color_header.num_colors - 1" stop_test="color_header.num_colors == 0" type_name="" comment="">
<data type="none" name="color" len="color_header.entry_stride"/>
</for>
<data type="none" name="pad" len="color_header.block_size - (color_header.num_colors*color_header.entry_stride) - 32"/>
</define_struct>
<define_struct type_name="UV_Points" comment="" expr="">
<struct name="UV_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="unsigned" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="isXY" len="4" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="modifier" len="1" format="unsigned" display=""/>
<data type="int" name="entry_stride" len="1" format="unsigned" display=""/>
<data type="int" name="num_UVs" len="2" format="unsigned" display=""/>
<if test="isXY == 1" comment="">
<struct name="bounds" expr="" type_name="" comment="">
<data type="int" name="min_X" format="unsigned" len="4" display=""/>
<data type="int" name="min_Y" format="unsigned" len="4" display=""/>
<data type="int" name="max_X" format="unsigned" len="4" display=""/>
<data type="int" name="max_Y" format="unsigned" len="4" display=""/>
<data type="none" name="pad" len="16"/>
</struct>
</if>
</struct>
<data type="string" name="UVs" len="UV_header.entry_stride * UV_header.num_UVs" format="default" display="uv structures" comment="I could've put a 'FOR' here,
but it'd take too long when loading the file"/>
<data type="none" name="pad" len="UV_header.block_size - (UV_header.entry_stride*UV_header.num_UVs) - UV_header.data_offset"/>
</define_struct>
<define_struct type_name="Shaders" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="unk1" len="4" format="unsigned" display=""/>
<data type="int" name="textures" len="1" format="unsigned" display=""/>
<data type="int" name="num_layers" len="1" format="unsigned" display=""/>
<data type="int" name="Flag3" len="1" format="unsigned" display=""/>
<data type="int" name="Flag4" len="1" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="Flag5" len="1" format="unsigned" display=""/>
<data type="int" name="Flag6" len="1" format="unsigned" display=""/>
<data type="int" name="Flag7" len="1" format="unsigned" display=""/>
<data type="int" name="Flag8" len="1" format="unsigned" display=""/>
<data type="int" name="unk3" format="unsigned" len="4" display=""/>
<data type="int" name="unk4" format="signed" len="4" display=""/>
<data type="int" name="material_offset" format="signed" len="4" display=""/>
<data type="int" name="num_textures" format="signed" len="4" display=""/>
<data type="int" name="textures_offset" format="signed" len="4" display=""/>
<data type="int" name="P4_offset" format="signed" len="4" display=""/>
<data type="int" name="P5_offset" format="signed" len="4" display=""/>
<data type="int" name="P6_offset" format="signed" len="4" display=""/>
</struct>
<jump offset="header.material_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<use_struct name="Material_Reference" expr="" type_name="Materials" comment=""/>
</jump>
<if test="header.textures_offset != 0" comment="">
<jump offset="header.textures_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<for name="texture" count="header.textures || header.textures -1" stop_test="header.textures == 0" type_name="" comment="">
<struct name="texture" type_name="" comment="" expr="{this.offset_name.name}">
<data type="int" name="string_offset" format="signed" len="4" display=""/>
<data type="int" name="pad" len="4" format="signed" display=""/>
<data type="int" name="unk1" format="signed" len="4" display=""/>
<data type="int" name="unk2" format="signed" len="4" display=""/>
<data type="int" name="unk3" format="signed" len="4" display=""/>
<data type="int" name="unk4" format="signed" len="4" display=""/>
<data type="int" name="layerID1" format="signed" len="4" display=""/>
<data type="int" name="layerID2" format="signed" len="4" display=""/>
<data type="int" name="unk5" format="signed" len="4" display=""/>
<data type="int" name="unk6" format="signed" len="4" display=""/>
<data type="int" name="float" format="unsigned" len="4" display=""/>
<data type="int" name="unk7" format="signed" len="4" display=""/>
<data type="int" name="unk8" format="signed" len="4" display=""/>
<jump offset="string_offset -53" comment="" origin="current">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</jump>
</if>
<if test="header.P4_offset != 0" comment="">
<jump offset="header.P4_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<struct name="P4" type_name="" comment="" expr="">
<data type="int" name="tmp" format="signed" len="4" display=""/>
</struct>
</jump>
</if>
<if test="header.P5_offset != 0" comment="">
<jump offset="header.P5_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<struct name="P5" type_name="" comment="" expr="">
<data type="none" name="tmp" len="384"/>
</struct>
</jump>
</if>
<if test="header.P6_offset != 0" comment="">
<jump offset="header.P6_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<struct name="P6" type_name="" comment="" expr="">
<data type="none" name="tmp" len="384"/>
</struct>
</jump>
</if>
</define_struct>
<define_struct type_name="Materials" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="int" name="block_length" format="signed" len="4" display=""/>
<data type="int" name="MDL0_offset" format="signed" len="4" display=""/>
<data type="int" name="ID" format="signed" len="4" display=""/>
<data type="int" name="unk" format="unsigned" len="1" display=""/>
</struct>
<data type="none" name="tmp" len="header.block_length - 13"/>
</define_struct>
<define_struct type_name="Polygons" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="none" name="tmp" len="4"/>
</struct>
</define_struct>
<define_struct type_name="Textures1" comment="" expr="">
<data type="int" name="testures" format="signed" len="4" display=""/>
<for name="texture" count="testures || testures - 1" stop_test="testures == 0" type_name="" comment="">
<struct name="texture" type_name="" comment="" expr="X: {this.X}, Y: {this.Y}">
<data type="int" name="X" format="unsigned" len="4" display=""/>
<data type="int" name="Y" format="unsigned" len="4" display=""/>
</struct>
</for>
</define_struct>
<define_struct type_name="Textures2" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="none" name="tmp" len="4"/>
</struct>
</define_struct>
<struct name="header" type_name="" comment="" expr="">
<data type="string" name="magic" len="4" format="ascii" display=""/>
<data type="int" name="filesize" format="unsigned" len="4" display=""/>
<data type="int" name="sections" format="unsigned" len="4" display=""/>
<data type="int" name="nodes" format="signed" len="4" display=""/>
<struct name="lists" type_name="" comment="" expr="">
<data type="int" name="Definitions" format="unsigned" len="4" display=""/>
<data type="int" name="Bones" format="unsigned" len="4" display=""/>
<data type="int" name="Vertices" format="unsigned" len="4" display=""/>
<data type="int" name="Normals" format="unsigned" len="4" display=""/>
<data type="int" name="Colors" format="unsigned" len="4" display=""/>
<data type="int" name="UV_Points" format="unsigned" len="4" display=""/>
<data type="int" name="Shaders" format="unsigned" len="4" display=""/>
<data type="int" name="Materials" format="unsigned" len="4" display=""/>
<data type="int" name="Polygons" format="unsigned" len="4" display=""/>
<data type="int" name="Textures1" format="unsigned" len="4" display=""/>
<data type="int" name="Textures2" format="unsigned" len="4" display=""/>
</struct>
<data type="int" name="name_offset" format="unsigned" len="4" display=""/>
<data type="int" name="header_len" format="unsigned" len="4" display=""/>
<data type="int" name="header_offset" format="signed" len="4" display=""/>
<data type="int" name="unk1" format="unsigned" len="4" display=""/>
<data type="int" name="unk2" format="unsigned" len="4" display=""/>
<data type="int" name="num_verticies" format="unsigned" len="4" display=""/>
<data type="int" name="num_faces" format="unsigned" len="4" display=""/>
<data type="int" name="unk3" format="unsigned" len="4" display=""/>
<data type="int" name="num_nodes" format="unsigned" len="4" display=""/>
<data type="int" name="version" format="unsigned" len="4" display=""/>
<data type="int" name="unk4" format="unsigned" len="2" display=""/>
<data type="int" name="unk5" format="unsigned" len="2" display=""/>
<struct name="bounds" type_name="" comment="" expr="">
<data type="int" name="min_X" format="unsigned" len="4" display=""/>
<data type="int" name="min_Y" format="unsigned" len="4" display=""/>
<data type="int" name="min_Z" format="unsigned" len="4" display=""/>
<data type="int" name="max_X" format="unsigned" len="4" display=""/>
<data type="int" name="max_Y" format="unsigned" len="4" display=""/>
<data type="int" name="max_Z" format="unsigned" len="4" display=""/>
</struct>
</struct>
<jump offset="header.nodes * -1" comment="" origin="start">
<struct name="nodes" type_name="" comment="" expr="">
<data type="int" name="num_nodes" format="signed" len="4" display=""/>
<for name="node" count="num_nodes || num_nodes - 1" stop_test="num_nodes == 0" type_name="" comment="">
<data type="int" name="node" format="signed" len="4" display=""/>
</for>
</struct>
</jump>
<if test="header.sections >= 0 && header.lists.Definitions != 0" comment="">
<jump offset="header.lists.Definitions" comment="" origin="start">
<struct name="Definitions" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Definitions" comment="" origin="start">
<use_struct name="Definitions" expr="" type_name="Definitions" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Definitions - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 1 && header.lists.Bones != 0" comment="">
<jump offset="header.lists.Bones" comment="" origin="start">
<struct name="Bones" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Bones" comment="" origin="start">
<use_struct name="Bone_data" expr="" type_name="Bones" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Bones - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 2 && header.lists.Vertices != 0" comment="">
<jump offset="header.lists.Vertices" comment="" origin="start">
<struct name="Vertices" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Vertices" comment="" origin="start">
<use_struct name="Vertices" expr="" type_name="Vertices" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Vertices - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 3 && header.lists.Normals != 0" comment="">
<jump offset="header.lists.Normals" comment="" origin="start">
<struct name="Normals" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Normals" comment="" origin="start">
<use_struct name="Normals" expr="" type_name="Normals" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Normals - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 4 && header.lists.Colors != 0" comment="">
<jump offset="header.lists.Colors" comment="" origin="start">
<struct name="Colors" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Colors" comment="" origin="start">
<use_struct name="Colors" expr="" type_name="Colors" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Colors - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 5 && header.lists.UV_Points != 0" comment="">
<jump offset="header.lists.UV_Points" comment="" origin="start">
<struct name="UV_Points" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.UV_Points" comment="" origin="start">
<use_struct name="UV_Points" expr="" type_name="UV_Points" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.UV_Points - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 6 && header.lists.Shaders != 0" comment="">
<jump offset="header.lists. Shaders" comment="" origin="start">
<struct name="Shaders" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Shaders" comment="" origin="start">
<use_struct name="Shaders" expr="" type_name="Shaders" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Shaders - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 7 && header.lists.Materials != 0" comment="">
<jump offset="header.lists.Materials" comment="" origin="start">
<struct name="Materials" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Materials" comment="" origin="start">
<use_struct name="Materials" expr="" type_name="Materials" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Materials - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 8 && header.lists.Polygons != 0" comment="">
<jump offset="header.lists.Polygons" comment="" origin="start">
<struct name="Polygons" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Polygons" comment="" origin="start">
<use_struct name="Polygons" expr="" type_name="Polygons" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Polygons - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 9 && header.lists.Textures1 != 0" comment="">
<jump offset="header.lists.Textures1" comment="" origin="start">
<struct name="Textures1" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Textures1" comment="" origin="start">
<use_struct name="Textures1" expr="" type_name="Textures1" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Textures1 - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.sections >= 10 && header.lists.Textures2 != 0" comment="">
<jump offset="header.lists.Textures2" comment="" origin="start">
<struct name="Textures2" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Textures2" comment="" origin="start">
<use_struct name="Textures2" expr="" type_name="Textures2" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Textures2 - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<data type="none" name="none"/>
</binary_file_format>


I had to go through quite a bit in order to find out what was what :/
but until I get any further info, this is where I stand now...

enjoy :)


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 09, 2010, 02:40:48 PM
nice ill look at it when/if i can get this done before i gotta go again lol...


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 09, 2010, 03:13:39 PM
KK...

note: there's alot of 'unk' and 'tmp'

the tmp is for temporary (for what is known, but not entirely figured out)
the unk is unknown... just like the P4, 5, and 6 offsets :P

EDIT:
heh...
nother UD coming soon :P
Textures1 == Textures
Textures2 == Pallets

although, tex2 has an XY position :/
gonna have to look into that...

EDIT2:
and Definitions


Title: Re: Bone Tree Editor
Post by: ??_? on December 09, 2010, 06:04:11 PM
Tcll do you have any thing to add to this? http://forums.kc-mm.com/index.php?topic=14690.0
I was planning on labeling all of them in brawlbox and sending it to Bero but it might be awhile


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 09, 2010, 08:04:00 PM
update:
Code:
<?xml version="1.0"?>
<!DOCTYPE binary_file_format SYSTEM "BinaryFileFormat.dtd">
<binary_file_format name="MDL0" type_name="" comment="" expr="" default_byte_order="big" default_read_only="false" default_char_set="ansi">
<define_struct type_name="offset_name" comment="" expr="">
<data type="int" name="str_len" format="unsigned" len="1" display=""/>
<data type="string" name="name" format="ascii" len="str_len" display=""/>
</define_struct>
<define_struct type_name="bounds" comment="" expr="">
<data type="int" name="min_X" format="unsigned" len="4" display=""/>
<data type="int" name="min_Y" format="unsigned" len="4" display=""/>
<data type="int" name="min_Z" format="unsigned" len="4" display=""/>
<data type="int" name="max_X" format="unsigned" len="4" display=""/>
<data type="int" name="max_Y" format="unsigned" len="4" display=""/>
<data type="int" name="max_Z" format="unsigned" len="4" display=""/>
<data type="none" name="pad" len="8"/>
</define_struct>
<define_struct type_name="relocation_group" comment="" expr="">
<data type="int" name="block_len" format="unsigned" len="4" display=""/>
<data type="int" name="num_offsets" format="unsigned" len="4" display=""/>
<data type="int" name="tag" format="unsigned" len="4" display="hex"/>
<data type="int" name="unk1" format="unsigned" len="2" display="hex"/>
<data type="int" name="unk2" format="unsigned" len="2" display="hex"/>
<data type="int" name="pad" format="unsigned" len="8" display="hex"/>
</define_struct>
<define_struct type_name="relocation_offset" comment="" expr="">
<data type="int" name="ID" format="unsigned" len="2" display=""/>
<data type="int" name="unk1" format="unsigned" len="2" display="hex"/>
<data type="int" name="unk2" format="unsigned" len="2" display="hex"/>
<data type="int" name="unk3" format="unsigned" len="2" display="hex"/>
<data type="int" name="string_offset" format="unsigned" len="4" display=""/>
<data type="int" name="data_offset" format="unsigned" len="4" display=""/>
</define_struct>
<define_struct type_name="Definitions" comment="" expr="">
<for name="type" count="" stop_test="this.type == 1" type_name="" comment="">
<struct name="" type_name="" comment="" expr="type{this.type}">
<data type="int" name="type" format="unsigned" len="1" display=""/>
<if test="type == 2" comment="">
<struct name="t2" type_name="" comment="" expr="({this.ID1},{this.ID2})">
<data type="int" name="ID1" format="unsigned" len="2" display=""/>
<data type="int" name="ID2" format="unsigned" len="2" display=""/>
</struct>
</if>
<if test="type == 4" comment="">
<struct name="t4" type_name="" comment="" expr="({this.ID1},{this.ID2},{this.ID3},{this.ID4})">
<data type="int" name="ID1" format="unsigned" len="2" display=""/>
<data type="int" name="ID2" format="unsigned" len="2" display=""/>
<data type="int" name="ID3" format="unsigned" len="2" display=""/>
<data type="int" name="ID4" format="unsigned" len="1" display=""/>
</struct>
</if>
</struct>
</for>
</define_struct>
<define_struct type_name="Bones" comment="" expr="">
<struct name="bone_header" type_name="" comment="" expr="">
<data type="int" name="header_len" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="bone_index" len="4" format="unsigned" display=""/>
<data type="int" name="node_ID" len="4" format="unsigned" display=""/>
<data type="int" name="flags" len="4" format="unsigned" display=""/>
<data type="int" name="pad" len="8" format="unsigned" display=""/>
<struct name="loc_rot_sca" type_name="" comment="" expr="">
<data type="int" name="sca_X" format="unsigned" len="4" display=""/>
<data type="int" name="sca_Y" len="4" format="unsigned" display=""/>
<data type="int" name="sca_Z" len="4" format="unsigned" display=""/>
<data type="int" name="rot_X" len="4" format="unsigned" display=""/>
<data type="int" name="rot_Y" len="4" format="unsigned" display=""/>
<data type="int" name="rot_Z" len="4" format="unsigned" display=""/>
<data type="int" name="loc_X" len="4" format="unsigned" display=""/>
<data type="int" name="loc_Y" len="4" format="unsigned" display=""/>
<data type="int" name="loc_Z" len="4" format="unsigned" display=""/>
</struct>
<struct name="bound" type_name="" comment="" expr="">
<data type="int" name="min_X" len="4" format="unsigned" display=""/>
<data type="int" name="min_Y" len="4" format="unsigned" display=""/>
<data type="int" name="min_Z" len="4" format="unsigned" display=""/>
<data type="int" name="max_X" len="4" format="unsigned" display=""/>
<data type="int" name="max_Y" len="4" format="unsigned" display=""/>
<data type="int" name="max_Z" len="4" format="unsigned" display=""/>
</struct>
<data type="int" name="parent" len="4" format="signed" display=""/>
<data type="int" name="child" len="4" format="unsigned" display=""/>
<data type="int" name="next" len="4" format="unsigned" display=""/>
<data type="int" name="prev" len="4" format="unsigned" display=""/>
<data type="int" name="part2" len="4" format="unsigned" display=""/>
</struct>
<struct name="frame_matrix" type_name="" comment="" expr="">
<data type="int" name="s_1_1" format="signed" len="4" display=""/>
<data type="int" name="s_2_1" format="signed" len="4" display=""/>
<data type="int" name="s_3_1" format="signed" len="4" display=""/>
<data type="int" name="s_4_1" format="signed" len="4" display=""/>
<data type="int" name="s_1_2" format="signed" len="4" display=""/>
<data type="int" name="s_2_2" format="signed" len="4" display=""/>
<data type="int" name="s_3_2" format="signed" len="4" display=""/>
<data type="int" name="s_4_2" format="signed" len="4" display=""/>
<data type="int" name="s_1_3" format="signed" len="4" display=""/>
<data type="int" name="s_2_3" format="signed" len="4" display=""/>
<data type="int" name="s_3_3" format="signed" len="4" display=""/>
<data type="int" name="s_4_3" format="signed" len="4" display=""/>
</struct>
<struct name="inverse_matrix" type_name="" comment="" expr="">
<data type="int" name="s_1_1" format="signed" len="4" display=""/>
<data type="int" name="s_2_1" format="signed" len="4" display=""/>
<data type="int" name="s_3_1" format="signed" len="4" display=""/>
<data type="int" name="s_4_1" format="signed" len="4" display=""/>
<data type="int" name="s_1_2" format="signed" len="4" display=""/>
<data type="int" name="s_2_2" format="signed" len="4" display=""/>
<data type="int" name="s_3_2" format="signed" len="4" display=""/>
<data type="int" name="s_4_2" format="signed" len="4" display=""/>
<data type="int" name="s_1_3" format="signed" len="4" display=""/>
<data type="int" name="s_2_3" format="signed" len="4" display=""/>
<data type="int" name="s_3_3" format="signed" len="4" display=""/>
<data type="int" name="s_4_3" format="signed" len="4" display=""/>
</struct>
</define_struct>
<define_struct type_name="Vertices" comment="" expr="">
<struct name="vertice_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="unsigned" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="isXYZ" len="4" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="modifier" len="1" format="unsigned" display=""/>
<data type="int" name="entry_stride" len="1" format="unsigned" display=""/>
<data type="int" name="num_vertices" len="2" format="unsigned" display=""/>
<if test="isXYZ == 1" comment="">
<use_struct name="bounds" expr="" type_name="bounds" comment=""/>
</if>
</struct>
<data type="string" name="vertices" len="vertice_header.entry_stride * vertice_header.num_vertices" format="default" display="vert structures" comment="I could've put a 'FOR' here,
but it'd take too long when loading the file"/>
<data type="none" name="pad" len="vertice_header.block_size - (vertice_header.entry_stride*vertice_header.num_vertices) - vertice_header.data_offset"/>
</define_struct>
<define_struct type_name="Normals" comment="" expr="">
<struct name="normal_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="unsigned" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="isXYZ" len="4" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="modifier" len="1" format="unsigned" display=""/>
<data type="int" name="entry_stride" len="1" format="unsigned" display=""/>
<data type="int" name="num_normals" len="2" format="unsigned" display=""/>
<if test="isXYZ == 1" comment="">
<use_struct name="bounds" expr="" type_name="bounds" comment=""/>
</if>
</struct>
<data type="string" name="normals" format="default" display="normal structures" len="normal_header.entry_stride*normal_header.num_normals" comment="I could've put a 'FOR' here,
but it'd take too long when loading the file"/>
<data type="none" name="pad" len="normal_header.block_size - (normal_header.entry_stride*normal_header.num_normals) - normal_header.data_offset"/>
</define_struct>
<define_struct type_name="Colors" comment="" expr="">
<struct name="color_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="signed" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="signed" display=""/>
<data type="int" name="string_offset" len="4" format="signed" display=""/>
<data type="int" name="ID" len="4" format="signed" display=""/>
<data type="int" name="isRGBA" len="4" format="signed" display=""/>
<data type="int" name="type" len="4" format="signed" display=""/>
<data type="int" name="entry_stride" len="1" format="signed" display=""/>
<data type="int" name="modifier" len="1" format="signed" display=""/>
<data type="int" name="num_colors" len="2" format="signed" display=""/>
</struct>
<for name="color" count="color_header.num_colors || color_header.num_colors - 1" stop_test="color_header.num_colors == 0" type_name="" comment="">
<data type="none" name="color" len="color_header.entry_stride"/>
</for>
<data type="none" name="pad" len="color_header.block_size - (color_header.num_colors*color_header.entry_stride) - 32"/>
</define_struct>
<define_struct type_name="UV_Points" comment="" expr="">
<struct name="UV_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="unsigned" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="isXY" len="4" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="modifier" len="1" format="unsigned" display=""/>
<data type="int" name="entry_stride" len="1" format="unsigned" display=""/>
<data type="int" name="num_UVs" len="2" format="unsigned" display=""/>
<if test="isXY == 1" comment="">
<struct name="bounds" expr="" type_name="" comment="">
<data type="int" name="min_X" format="unsigned" len="4" display=""/>
<data type="int" name="min_Y" format="unsigned" len="4" display=""/>
<data type="int" name="max_X" format="unsigned" len="4" display=""/>
<data type="int" name="max_Y" format="unsigned" len="4" display=""/>
<data type="none" name="pad" len="16"/>
</struct>
</if>
</struct>
<data type="string" name="UVs" len="UV_header.entry_stride * UV_header.num_UVs" format="default" display="uv structures" comment="I could've put a 'FOR' here,
but it'd take too long when loading the file"/>
<data type="none" name="pad" len="UV_header.block_size - (UV_header.entry_stride*UV_header.num_UVs) - UV_header.data_offset"/>
</define_struct>
<define_struct type_name="Shaders" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="unk1" len="4" format="unsigned" display=""/>
<data type="int" name="textures" len="1" format="unsigned" display=""/>
<data type="int" name="num_layers" len="1" format="unsigned" display=""/>
<data type="int" name="Flag3" len="1" format="unsigned" display=""/>
<data type="int" name="Flag4" len="1" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="Flag5" len="1" format="unsigned" display=""/>
<data type="int" name="Flag6" len="1" format="unsigned" display=""/>
<data type="int" name="Flag7" len="1" format="unsigned" display=""/>
<data type="int" name="Flag8" len="1" format="unsigned" display=""/>
<data type="int" name="unk3" format="unsigned" len="4" display=""/>
<data type="int" name="unk4" format="signed" len="4" display=""/>
<data type="int" name="material_offset" format="signed" len="4" display=""/>
<data type="int" name="num_textures" format="signed" len="4" display=""/>
<data type="int" name="textures_offset" format="signed" len="4" display=""/>
<data type="int" name="P4_offset" format="signed" len="4" display=""/>
<data type="int" name="P5_offset" format="signed" len="4" display=""/>
<data type="int" name="P6_offset" format="signed" len="4" display=""/>
</struct>
<jump offset="header.material_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<use_struct name="Material_Reference" expr="" type_name="Materials" comment=""/>
</jump>
<if test="header.textures_offset != 0" comment="">
<jump offset="header.textures_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<for name="texture" count="header.textures || header.textures -1" stop_test="header.textures == 0" type_name="" comment="">
<struct name="texture" type_name="" comment="" expr="{this.offset_name.name}">
<data type="int" name="string_offset" format="signed" len="4" display=""/>
<data type="int" name="pad" len="4" format="signed" display=""/>
<data type="int" name="unk1" format="signed" len="4" display=""/>
<data type="int" name="unk2" format="signed" len="4" display=""/>
<data type="int" name="unk3" format="signed" len="4" display=""/>
<data type="int" name="unk4" format="signed" len="4" display=""/>
<data type="int" name="layerID1" format="signed" len="4" display=""/>
<data type="int" name="layerID2" format="signed" len="4" display=""/>
<data type="int" name="unk5" format="signed" len="4" display=""/>
<data type="int" name="unk6" format="signed" len="4" display=""/>
<data type="int" name="float" format="unsigned" len="4" display=""/>
<data type="int" name="unk7" format="signed" len="4" display=""/>
<data type="int" name="unk8" format="signed" len="4" display=""/>
<jump offset="string_offset -53" comment="" origin="current">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</jump>
</if>
<if test="header.P4_offset != 0" comment="">
<jump offset="header.P4_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<struct name="P4" type_name="" comment="" expr="">
<data type="int" name="tmp" format="signed" len="4" display=""/>
</struct>
</jump>
</if>
<if test="header.P5_offset != 0" comment="">
<jump offset="header.P5_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<struct name="P5" type_name="" comment="" expr="">
<data type="none" name="tmp" len="384"/>
</struct>
</jump>
</if>
<if test="header.P6_offset != 0" comment="">
<jump offset="header.P6_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<struct name="P6" type_name="" comment="" expr="">
<data type="none" name="tmp" len="384"/>
</struct>
</jump>
</if>
</define_struct>
<define_struct type_name="Materials" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="int" name="block_length" format="signed" len="4" display=""/>
<data type="int" name="MDL0_offset" format="signed" len="4" display=""/>
<data type="int" name="ID" format="signed" len="4" display=""/>
<data type="int" name="unk" format="unsigned" len="1" display=""/>
</struct>
<data type="none" name="tmp" len="header.block_length - 13"/>
</define_struct>
<define_struct type_name="Polygons" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="none" name="tmp" len="4"/>
</struct>
</define_struct>
<define_struct type_name="Textures" comment="" expr="">
<data type="int" name="textures" format="signed" len="4" display=""/>
<for name="texture" count="textures || textures - 1" stop_test="textures == 0" type_name="" comment="">
<struct name="texture" type_name="" comment="" expr="X: {this.X}, Y: {this.Y}">
<data type="int" name="X" format="unsigned" len="4" display=""/>
<data type="int" name="Y" format="unsigned" len="4" display=""/>
</struct>
</for>
</define_struct>
<define_struct type_name="Pallets" comment="" expr="">
<data type="int" name="pallets" format="signed" len="4" display=""/>
<for name="pallet" count="pallets || pallets - 1" stop_test="pallets == 0" type_name="" comment="">
<struct name="texture" type_name="" comment="" expr="X: {this.X}, Y: {this.Y}">
<data type="int" name="X" format="unsigned" len="4" display=""/>
<data type="int" name="Y" format="unsigned" len="4" display=""/>
</struct>
</for>
</define_struct>
<struct name="header" type_name="" comment="" expr="">
<data type="string" name="magic" len="4" format="ascii" display=""/>
<data type="int" name="filesize" format="unsigned" len="4" display=""/>
<data type="int" name="sections" format="unsigned" len="4" display=""/>
<data type="int" name="nodes" format="signed" len="4" display=""/>
<struct name="lists" type_name="" comment="" expr="">
<data type="int" name="Definitions" format="unsigned" len="4" display=""/>
<data type="int" name="Bones" format="unsigned" len="4" display=""/>
<data type="int" name="Vertices" format="unsigned" len="4" display=""/>
<data type="int" name="Normals" format="unsigned" len="4" display=""/>
<data type="int" name="Colors" format="unsigned" len="4" display=""/>
<data type="int" name="UV_Points" format="unsigned" len="4" display=""/>
<data type="int" name="Shaders" format="unsigned" len="4" display=""/>
<data type="int" name="Materials" format="unsigned" len="4" display=""/>
<data type="int" name="Polygons" format="unsigned" len="4" display=""/>
<data type="int" name="Textures" format="unsigned" len="4" display=""/>
<data type="int" name="Pallets" format="unsigned" len="4" display=""/>
</struct>
<data type="int" name="name_offset" format="unsigned" len="4" display=""/>
<data type="int" name="header_len" format="unsigned" len="4" display=""/>
<data type="int" name="header_offset" format="signed" len="4" display=""/>
<data type="int" name="unk1" format="unsigned" len="4" display=""/>
<data type="int" name="unk2" format="unsigned" len="4" display=""/>
<data type="int" name="num_verticies" format="unsigned" len="4" display=""/>
<data type="int" name="num_faces" format="unsigned" len="4" display=""/>
<data type="int" name="unk3" format="unsigned" len="4" display=""/>
<data type="int" name="num_nodes" format="unsigned" len="4" display=""/>
<data type="int" name="version" format="unsigned" len="4" display=""/>
<data type="int" name="unk4" format="unsigned" len="2" display=""/>
<data type="int" name="unk5" format="unsigned" len="2" display=""/>
<struct name="bounds" type_name="" comment="" expr="">
<data type="int" name="min_X" format="unsigned" len="4" display=""/>
<data type="int" name="min_Y" format="unsigned" len="4" display=""/>
<data type="int" name="min_Z" format="unsigned" len="4" display=""/>
<data type="int" name="max_X" format="unsigned" len="4" display=""/>
<data type="int" name="max_Y" format="unsigned" len="4" display=""/>
<data type="int" name="max_Z" format="unsigned" len="4" display=""/>
</struct>
</struct>
<jump offset="header.nodes * -1" comment="" origin="start">
<struct name="nodes" type_name="" comment="" expr="">
<data type="int" name="num_nodes" format="signed" len="4" display=""/>
<for name="node" count="num_nodes || num_nodes - 1" stop_test="num_nodes == 0" type_name="" comment="">
<data type="int" name="node" format="signed" len="4" display=""/>
</for>
</struct>
</jump>
<if test="header.lists.Definitions != 0" comment="">
<jump offset="header.lists.Definitions" comment="" origin="start">
<struct name="Definitions" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Definitions" comment="" origin="start">
<use_struct name="Definitions" expr="" type_name="Definitions" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Definitions - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Bones != 0" comment="">
<jump offset="header.lists.Bones" comment="" origin="start">
<struct name="Bones" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Bones" comment="" origin="start">
<use_struct name="Bone_data" expr="" type_name="Bones" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Bones - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Vertices != 0" comment="">
<jump offset="header.lists.Vertices" comment="" origin="start">
<struct name="Vertices" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Vertices" comment="" origin="start">
<use_struct name="Vertices" expr="" type_name="Vertices" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Vertices - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Normals != 0" comment="">
<jump offset="header.lists.Normals" comment="" origin="start">
<struct name="Normals" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Normals" comment="" origin="start">
<use_struct name="Normals" expr="" type_name="Normals" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Normals - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Colors != 0" comment="">
<jump offset="header.lists.Colors" comment="" origin="start">
<struct name="Colors" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Colors" comment="" origin="start">
<use_struct name="Colors" expr="" type_name="Colors" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Colors - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.UV_Points != 0" comment="">
<jump offset="header.lists.UV_Points" comment="" origin="start">
<struct name="UV_Points" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.UV_Points" comment="" origin="start">
<use_struct name="UV_Points" expr="" type_name="UV_Points" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.UV_Points - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Shaders != 0" comment="">
<jump offset="header.lists. Shaders" comment="" origin="start">
<struct name="Shaders" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Shaders" comment="" origin="start">
<use_struct name="Shaders" expr="" type_name="Shaders" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Shaders - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Materials != 0" comment="">
<jump offset="header.lists.Materials" comment="" origin="start">
<struct name="Materials" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Materials" comment="" origin="start">
<use_struct name="Materials" expr="" type_name="Materials" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Materials - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Polygons != 0" comment="">
<jump offset="header.lists.Polygons" comment="" origin="start">
<struct name="Polygons" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Polygons" comment="" origin="start">
<use_struct name="Polygons" expr="" type_name="Polygons" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Polygons - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Textures != 0" comment="">
<jump offset="header.lists.Textures" comment="" origin="start">
<struct name="Textures" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Textures" comment="" origin="start">
<use_struct name="Textures" expr="" type_name="Textures" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Textures - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Pallets != 0" comment="">
<jump offset="header.lists.Pallets" comment="" origin="start">
<struct name="Pallets" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Pallets" comment="" origin="start">
<use_struct name="Pallets" expr="" type_name="Pallets" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Pallets - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<data type="none" name="none"/>
</binary_file_format>


Pallets and Definitions are now displayed.


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 09, 2010, 08:21:36 PM
havent been working on it much today..

but im having so much trouble with this grid lol...I need to figure out a new way to assign cells the indexes...its fine until it gets to the code where the first = 0 and next is > 1...ima think of a new idea to assign em...


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 09, 2010, 08:42:21 PM
havent been working on it much today..

but im having so much trouble with this grid lol...I need to figure out a new way to assign cells the indexes...its fine until it gets to the code where the first = 0 and next is > 1...ima think of a new idea to assign em...

lol...
wish I knew how to use them :/
(I know what they do, just not how they work entirely)


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 10, 2010, 01:47:58 PM
finally the weekend...i failed at using the grid lol but i got one more idea to use with the grid..hope it works 0.o


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 10, 2010, 01:58:51 PM
heh... the weekend...

I'm going to a tourney from today until sunday


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 10, 2010, 02:08:58 PM
what kind of tourney?


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 10, 2010, 02:24:03 PM
SSB64
Melee
Brawl
Brawl+
Brawl-
etc.


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 10, 2010, 03:48:02 PM
F I N A L L Y...got the grid to accurately show each bone in there correct spots =p....now to code for when you rearrange everything and stuff 0.o

edit: thanks for the notes...they help =p

edit2:lol...im trying to figure out how to assign the parents,first,next, and previous offsets..(within a grid)I know how to figure out the parents and first offsets...but figuring out if it has previous or next offsets(basically opposites) is tough....  It would be easy if i just make it so that you can manually input them(which i can do....)but it would make the program less efficient...beats moveup/down buttons lol.  I might be able to figure it out later times to take eh behreeek.

So ive made:

-new .exe
-projects each bone representative(?) to a grid
- shows each bone by index(or name ->checkbox)
-you can move  bones around by just click the cell and choosing another cell
-you can change a bones attributes or w/e in txt boxes
-you can choose the file you want instead of the input/output thing


still not done though like i said above...


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 11, 2010, 11:40:41 AM
edit2:lol...im trying to figure out how to assign the parents,first,next, and previous offsets..(within a grid)I know how to figure out the parents and first offsets...but figuring out if it has previous or next offsets(basically opposites) is tough....  It would be easy if i just make it so that you can manually input them(which i can do....)but it would make the program less efficient...beats moveup/down buttons lol.  I might be able to figure it out later times to take eh behreeek.


the next/previous offset applies to the offset in the same group and blah...
(not sure how to state what they do...) :/

| 0, 0
.| +2, 0
..| 0, 0
.| 0, -2

the parent/child offsets simply push it up to the next level

may not have needed to state that :P


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 11, 2010, 12:31:09 PM
lol i know that the parent and child just push em up a lvl..thats why they were so easy...But within a grid it would be hard to know which bone SHOULD be a next and a previous after all the editing... ill give an ex in a sec...gotta open my exe

edit:
ex: the throw bone is a next of the hip bone which is sooo far away from eachother..(bad ex actually)...the toes are in the same column but  arent offseted to eachothere

edit2:
i can just figure out the next and prev if they are next to eachother(and if a child is between the two) but then the user would have to do the others. 


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 11, 2010, 12:55:01 PM

you know what...
just use the parent/child offsets...

don't worry about the next/prev offsets because-
*rethinks* wait a minute

next * 208 || prev * 208 (think about it in hex)

the parent/child will append the tree...
the next/prev offsets are to the bone data
(each bone is 208 bytes in length)


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 11, 2010, 01:03:30 PM
lol i don't think your getting what im trying to say....if you were to rearrange the WHOLE tree...so whatever was in hex before doesn't matter because right now they  are useless.  Based on a grid you cannot figure out the next/prev without them being more than two bones apart..


next * 208 || prev * 208 (think about it in hex)

the parent/child will append the tree...
the next/prev offsets are to the bone data
(each bone is 208 bytes in length)


i know what you said(already knew that?)...just not what your trying to say lol


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 11, 2010, 01:37:04 PM
I think I may understand actually...

"if you were to rearrange the table" (after loading)

you don't need the next/prev offsets right now, unless you're editing :/
build the table using the parent/child offsets
(the next/prev offsets have nothing to do with the table)

fist off though, what... or where are you at with this right now?? :/


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 11, 2010, 02:05:52 PM
this is how it(will) work

you open the mdl0...enter the topn and click a button to load the bones into a grid.
you move the cells with the indexes/names around until your done.
then you click a button that will check through every cell with an index to figure out there offsets.

i think that you thought that it was making the changes to the file as you edited the grid..which it doesnt.


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 11, 2010, 03:12:16 PM
this is how it(will) work

you open the mdl0...enter the topn and click a button to load the bones into a grid.
you move the cells with the indexes/names around until your done.
then you click a button that will check through every cell with an index to figure out there offsets.

i think that you thought that it was making the changes to the file as you edited the grid..which it doesnt.
actually...
you were ahead of what I was thinking :/

anyways...

so how-... you-...
you load a file into memory right??

how do you split the data??


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 11, 2010, 03:35:04 PM
-i load the file
-then I get each bones stuff/info
-and i put that info into each cell index(so if you move a bone/cell the data is still the same)
-when you click a bone/cell the data stored inside will appear into the  table at the right where you can edit its data manually

basically i store the memory into cells and lists

edit: ima take a break and do some animation lol.....look at this 0.o

http://www.youtube.com/watch?v=Sdx1O9lhR1k


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 11, 2010, 04:29:37 PM
I mean...
IDK how to use internal mem :P

I kinda need that for converting formats...

as for animation...
I have to completely animate Pachirisu from scratch...
heh, at least it'll be easy with Brawlbox modset 4.1 :D
^you get to rotate the bones ^_^


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 11, 2010, 05:28:28 PM
i was messing with a mdl0...and i know how the relocation  table works now(thanks)...now i really see why adding/deleting bones would mean rewriting the mdl0 lol. If you were to add a bone you'd have to also add its relocation data....then change all the other relocation data after that one....loool after all the reloc data is found out...the person who attempts to make an .exe to add bones might have a hard(hmmm maybe) time =p


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 11, 2010, 05:59:44 PM
exactly :P

once I learn how to write the seperate portions to memory
(once I learn how to use memory) lol
I'll be able to write an MDL0 easily

but yea... need to learn how to use mem :(


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 11, 2010, 11:50:53 PM
hey...

template UD while at tourneys :P
finished type3 definitions:
Code:
<?xml version="1.0"?>
<!DOCTYPE binary_file_format SYSTEM "BinaryFileFormat.dtd">
<binary_file_format name="MDL0" type_name="" comment="" expr="" default_byte_order="big" default_read_only="false" default_char_set="ansi">
<define_struct type_name="offset_name" comment="" expr="">
<data type="int" name="str_len" format="unsigned" len="1" display=""/>
<data type="string" name="name" format="ascii" len="str_len" display=""/>
</define_struct>
<define_struct type_name="bounds" comment="" expr="">
<data type="int" name="min_X" format="unsigned" len="4" display=""/>
<data type="int" name="min_Y" format="unsigned" len="4" display=""/>
<data type="int" name="min_Z" format="unsigned" len="4" display=""/>
<data type="int" name="max_X" format="unsigned" len="4" display=""/>
<data type="int" name="max_Y" format="unsigned" len="4" display=""/>
<data type="int" name="max_Z" format="unsigned" len="4" display=""/>
<data type="none" name="pad" len="8"/>
</define_struct>
<define_struct type_name="relocation_group" comment="" expr="">
<data type="int" name="block_len" format="unsigned" len="4" display=""/>
<data type="int" name="num_offsets" format="unsigned" len="4" display=""/>
<data type="int" name="tag" format="unsigned" len="4" display="hex"/>
<data type="int" name="unk1" format="unsigned" len="2" display="hex"/>
<data type="int" name="unk2" format="unsigned" len="2" display="hex"/>
<data type="int" name="pad" format="unsigned" len="8" display="hex"/>
</define_struct>
<define_struct type_name="relocation_offset" comment="" expr="">
<data type="int" name="ID" format="unsigned" len="2" display=""/>
<data type="int" name="unk1" format="unsigned" len="2" display="hex"/>
<data type="int" name="unk2" format="unsigned" len="2" display="hex"/>
<data type="int" name="unk3" format="unsigned" len="2" display="hex"/>
<data type="int" name="string_offset" format="unsigned" len="4" display=""/>
<data type="int" name="data_offset" format="unsigned" len="4" display=""/>
</define_struct>
<define_struct type_name="Definitions" comment="" expr="">
<for name="type" count="" stop_test="this.type == 1" type_name="" comment="">
<struct name="" type_name="" comment="" expr="type{this.type}">
<data type="int" name="type" format="unsigned" len="1" display=""/>
<if test="type == 2" comment="">
<struct name="t2" type_name="" comment="" expr="({this.ID1},{this.ID2})">
<data type="int" name="ID1" format="unsigned" len="2" display=""/>
<data type="int" name="ID2" format="unsigned" len="2" display=""/>
</struct>
</if>
<if test="type == 3" comment="">
<struct name="t3" type_name="" comment="" expr="({this.ID}) ({this.count})">
<data type="int" name="ID" format="unsigned" len="2" display=""/>
<data type="int" name="count" format="unsigned" len="1" display=""/>
<for name="tmp" count="count || count - 1" stop_test="count == 0" type_name="" comment="">
<data type="none" name="" len="6"/>
</for>
</struct>
</if>
<if test="type == 4" comment="">
<struct name="t4" type_name="" comment="" expr="({this.ID1},{this.ID2},{this.ID3},{this.ID4})">
<data type="int" name="ID1" format="unsigned" len="2" display=""/>
<data type="int" name="ID2" format="unsigned" len="2" display=""/>
<data type="int" name="ID3" format="unsigned" len="2" display=""/>
<data type="int" name="ID4" format="unsigned" len="1" display=""/>
</struct>
</if>
<if test="type == 5" comment="">
<struct name="t5" type_name="" comment="" expr="({this.ID1},{this.ID2})">
<data type="int" name="ID1" format="unsigned" len="2" display=""/>
<data type="int" name="ID2" format="unsigned" len="2" display=""/>
</struct>
</if>
</struct>
</for>
</define_struct>
<define_struct type_name="Bones" comment="" expr="">
<struct name="bone_header" type_name="" comment="" expr="">
<data type="int" name="header_len" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="bone_index" len="4" format="unsigned" display=""/>
<data type="int" name="node_ID" len="4" format="unsigned" display=""/>
<data type="int" name="flags" len="4" format="unsigned" display=""/>
<data type="int" name="pad" len="8" format="unsigned" display=""/>
<struct name="loc_rot_sca" type_name="" comment="" expr="">
<data type="int" name="sca_X" format="unsigned" len="4" display=""/>
<data type="int" name="sca_Y" len="4" format="unsigned" display=""/>
<data type="int" name="sca_Z" len="4" format="unsigned" display=""/>
<data type="int" name="rot_X" len="4" format="unsigned" display=""/>
<data type="int" name="rot_Y" len="4" format="unsigned" display=""/>
<data type="int" name="rot_Z" len="4" format="unsigned" display=""/>
<data type="int" name="loc_X" len="4" format="unsigned" display=""/>
<data type="int" name="loc_Y" len="4" format="unsigned" display=""/>
<data type="int" name="loc_Z" len="4" format="unsigned" display=""/>
</struct>
<struct name="bound" type_name="" comment="" expr="">
<data type="int" name="min_X" len="4" format="unsigned" display=""/>
<data type="int" name="min_Y" len="4" format="unsigned" display=""/>
<data type="int" name="min_Z" len="4" format="unsigned" display=""/>
<data type="int" name="max_X" len="4" format="unsigned" display=""/>
<data type="int" name="max_Y" len="4" format="unsigned" display=""/>
<data type="int" name="max_Z" len="4" format="unsigned" display=""/>
</struct>
<data type="int" name="parent" len="4" format="signed" display=""/>
<data type="int" name="child" len="4" format="unsigned" display=""/>
<data type="int" name="next" len="4" format="unsigned" display=""/>
<data type="int" name="prev" len="4" format="unsigned" display=""/>
<data type="int" name="part2" len="4" format="unsigned" display=""/>
</struct>
<struct name="frame_matrix" type_name="" comment="" expr="">
<data type="int" name="s_1_1" format="signed" len="4" display=""/>
<data type="int" name="s_2_1" format="signed" len="4" display=""/>
<data type="int" name="s_3_1" format="signed" len="4" display=""/>
<data type="int" name="s_4_1" format="signed" len="4" display=""/>
<data type="int" name="s_1_2" format="signed" len="4" display=""/>
<data type="int" name="s_2_2" format="signed" len="4" display=""/>
<data type="int" name="s_3_2" format="signed" len="4" display=""/>
<data type="int" name="s_4_2" format="signed" len="4" display=""/>
<data type="int" name="s_1_3" format="signed" len="4" display=""/>
<data type="int" name="s_2_3" format="signed" len="4" display=""/>
<data type="int" name="s_3_3" format="signed" len="4" display=""/>
<data type="int" name="s_4_3" format="signed" len="4" display=""/>
</struct>
<struct name="inverse_matrix" type_name="" comment="" expr="">
<data type="int" name="s_1_1" format="signed" len="4" display=""/>
<data type="int" name="s_2_1" format="signed" len="4" display=""/>
<data type="int" name="s_3_1" format="signed" len="4" display=""/>
<data type="int" name="s_4_1" format="signed" len="4" display=""/>
<data type="int" name="s_1_2" format="signed" len="4" display=""/>
<data type="int" name="s_2_2" format="signed" len="4" display=""/>
<data type="int" name="s_3_2" format="signed" len="4" display=""/>
<data type="int" name="s_4_2" format="signed" len="4" display=""/>
<data type="int" name="s_1_3" format="signed" len="4" display=""/>
<data type="int" name="s_2_3" format="signed" len="4" display=""/>
<data type="int" name="s_3_3" format="signed" len="4" display=""/>
<data type="int" name="s_4_3" format="signed" len="4" display=""/>
</struct>
</define_struct>
<define_struct type_name="Vertices" comment="" expr="">
<struct name="vertice_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="unsigned" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="isXYZ" len="4" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="modifier" len="1" format="unsigned" display=""/>
<data type="int" name="entry_stride" len="1" format="unsigned" display=""/>
<data type="int" name="num_vertices" len="2" format="unsigned" display=""/>
<if test="isXYZ == 1" comment="">
<use_struct name="bounds" expr="" type_name="bounds" comment=""/>
</if>
</struct>
<data type="string" name="vertices" len="vertice_header.entry_stride * vertice_header.num_vertices" format="default" display="vert structures" comment="I could've put a 'FOR' here,
but it'd take too long when loading the file"/>
<data type="none" name="pad" len="vertice_header.block_size - (vertice_header.entry_stride*vertice_header.num_vertices) - vertice_header.data_offset"/>
</define_struct>
<define_struct type_name="Normals" comment="" expr="">
<struct name="normal_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="unsigned" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="isXYZ" len="4" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="modifier" len="1" format="unsigned" display=""/>
<data type="int" name="entry_stride" len="1" format="unsigned" display=""/>
<data type="int" name="num_normals" len="2" format="unsigned" display=""/>
<if test="isXYZ == 1" comment="">
<use_struct name="bounds" expr="" type_name="bounds" comment=""/>
</if>
</struct>
<data type="string" name="normals" format="default" display="normal structures" len="normal_header.entry_stride*normal_header.num_normals" comment="I could've put a 'FOR' here,
but it'd take too long when loading the file"/>
<data type="none" name="pad" len="normal_header.block_size - (normal_header.entry_stride*normal_header.num_normals) - normal_header.data_offset"/>
</define_struct>
<define_struct type_name="Colors" comment="" expr="">
<struct name="color_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="signed" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="signed" display=""/>
<data type="int" name="string_offset" len="4" format="signed" display=""/>
<data type="int" name="ID" len="4" format="signed" display=""/>
<data type="int" name="isRGBA" len="4" format="signed" display=""/>
<data type="int" name="type" len="4" format="signed" display=""/>
<data type="int" name="entry_stride" len="1" format="signed" display=""/>
<data type="int" name="modifier" len="1" format="signed" display=""/>
<data type="int" name="num_colors" len="2" format="signed" display=""/>
</struct>
<for name="color" count="color_header.num_colors || color_header.num_colors - 1" stop_test="color_header.num_colors == 0" type_name="" comment="">
<data type="none" name="color" len="color_header.entry_stride"/>
</for>
<data type="none" name="pad" len="color_header.block_size - (color_header.num_colors*color_header.entry_stride) - 32"/>
</define_struct>
<define_struct type_name="UV_Points" comment="" expr="">
<struct name="UV_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="unsigned" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="isXY" len="4" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="modifier" len="1" format="unsigned" display=""/>
<data type="int" name="entry_stride" len="1" format="unsigned" display=""/>
<data type="int" name="num_UVs" len="2" format="unsigned" display=""/>
<if test="isXY == 1" comment="">
<struct name="bounds" expr="" type_name="" comment="">
<data type="int" name="min_X" format="unsigned" len="4" display=""/>
<data type="int" name="min_Y" format="unsigned" len="4" display=""/>
<data type="int" name="max_X" format="unsigned" len="4" display=""/>
<data type="int" name="max_Y" format="unsigned" len="4" display=""/>
<data type="none" name="pad" len="16"/>
</struct>
</if>
</struct>
<data type="string" name="UVs" len="UV_header.entry_stride * UV_header.num_UVs" format="default" display="uv structures" comment="I could've put a 'FOR' here,
but it'd take too long when loading the file"/>
<data type="none" name="pad" len="UV_header.block_size - (UV_header.entry_stride*UV_header.num_UVs) - UV_header.data_offset"/>
</define_struct>
<define_struct type_name="Shaders" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="unk1" len="4" format="unsigned" display=""/>
<data type="int" name="textures" len="1" format="unsigned" display=""/>
<data type="int" name="num_layers" len="1" format="unsigned" display=""/>
<data type="int" name="Flag3" len="1" format="unsigned" display=""/>
<data type="int" name="Flag4" len="1" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="Flag5" len="1" format="unsigned" display=""/>
<data type="int" name="Flag6" len="1" format="unsigned" display=""/>
<data type="int" name="Flag7" len="1" format="unsigned" display=""/>
<data type="int" name="Flag8" len="1" format="unsigned" display=""/>
<data type="int" name="unk3" format="unsigned" len="4" display=""/>
<data type="int" name="unk4" format="signed" len="4" display=""/>
<data type="int" name="material_offset" format="signed" len="4" display=""/>
<data type="int" name="num_textures" format="signed" len="4" display=""/>
<data type="int" name="textures_offset" format="signed" len="4" display=""/>
<data type="int" name="P4_offset" format="signed" len="4" display=""/>
<data type="int" name="P5_offset" format="signed" len="4" display=""/>
<data type="int" name="P6_offset" format="signed" len="4" display=""/>
</struct>
<jump offset="header.material_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<use_struct name="Material_Reference" expr="" type_name="Materials" comment=""/>
</jump>
<if test="header.textures_offset != 0" comment="">
<jump offset="header.textures_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<for name="texture" count="header.textures || header.textures -1" stop_test="header.textures == 0" type_name="" comment="">
<struct name="texture" type_name="" comment="" expr="{this.offset_name.name}">
<data type="int" name="string_offset" format="signed" len="4" display=""/>
<data type="int" name="pad" len="4" format="signed" display=""/>
<data type="int" name="unk1" format="signed" len="4" display=""/>
<data type="int" name="unk2" format="signed" len="4" display=""/>
<data type="int" name="unk3" format="signed" len="4" display=""/>
<data type="int" name="unk4" format="signed" len="4" display=""/>
<data type="int" name="layerID1" format="signed" len="4" display=""/>
<data type="int" name="layerID2" format="signed" len="4" display=""/>
<data type="int" name="unk5" format="signed" len="4" display=""/>
<data type="int" name="unk6" format="signed" len="4" display=""/>
<data type="int" name="float" format="unsigned" len="4" display=""/>
<data type="int" name="unk7" format="signed" len="4" display=""/>
<data type="int" name="unk8" format="signed" len="4" display=""/>
<jump offset="string_offset -53" comment="" origin="current">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</jump>
</if>
<if test="header.P4_offset != 0" comment="">
<jump offset="header.P4_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<struct name="P4" type_name="" comment="" expr="">
<data type="int" name="tmp" format="signed" len="4" display=""/>
</struct>
</jump>
</if>
<if test="header.P5_offset != 0" comment="">
<jump offset="header.P5_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<struct name="P5" type_name="" comment="" expr="">
<data type="none" name="tmp" len="384"/>
</struct>
</jump>
</if>
<if test="header.P6_offset != 0" comment="">
<jump offset="header.P6_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<struct name="P6" type_name="" comment="" expr="">
<data type="none" name="tmp" len="384"/>
</struct>
</jump>
</if>
</define_struct>
<define_struct type_name="Materials" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="int" name="block_length" format="signed" len="4" display=""/>
<data type="int" name="MDL0_offset" format="signed" len="4" display=""/>
<data type="int" name="ID" format="signed" len="4" display=""/>
<data type="int" name="unk" format="unsigned" len="1" display=""/>
</struct>
<data type="none" name="tmp" len="header.block_length - 13"/>
</define_struct>
<define_struct type_name="Polygons" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="none" name="tmp" len="4"/>
</struct>
</define_struct>
<define_struct type_name="Textures" comment="" expr="">
<data type="int" name="textures" format="signed" len="4" display=""/>
<for name="texture" count="textures || textures - 1" stop_test="textures == 0" type_name="" comment="">
<struct name="texture" type_name="" comment="" expr="X: {this.X}, Y: {this.Y}">
<data type="int" name="X" format="unsigned" len="4" display=""/>
<data type="int" name="Y" format="unsigned" len="4" display=""/>
</struct>
</for>
</define_struct>
<define_struct type_name="Pallets" comment="" expr="">
<data type="int" name="pallets" format="signed" len="4" display=""/>
<for name="pallet" count="pallets || pallets - 1" stop_test="pallets == 0" type_name="" comment="">
<struct name="texture" type_name="" comment="" expr="X: {this.X}, Y: {this.Y}">
<data type="int" name="X" format="unsigned" len="4" display=""/>
<data type="int" name="Y" format="unsigned" len="4" display=""/>
</struct>
</for>
</define_struct>
<struct name="header" type_name="" comment="" expr="">
<data type="string" name="magic" len="4" format="ascii" display=""/>
<data type="int" name="filesize" format="unsigned" len="4" display=""/>
<data type="int" name="sections" format="unsigned" len="4" display=""/>
<data type="int" name="nodes" format="signed" len="4" display=""/>
<struct name="lists" type_name="" comment="" expr="">
<data type="int" name="Definitions" format="unsigned" len="4" display=""/>
<data type="int" name="Bones" format="unsigned" len="4" display=""/>
<data type="int" name="Vertices" format="unsigned" len="4" display=""/>
<data type="int" name="Normals" format="unsigned" len="4" display=""/>
<data type="int" name="Colors" format="unsigned" len="4" display=""/>
<data type="int" name="UV_Points" format="unsigned" len="4" display=""/>
<data type="int" name="Shaders" format="unsigned" len="4" display=""/>
<data type="int" name="Materials" format="unsigned" len="4" display=""/>
<data type="int" name="Polygons" format="unsigned" len="4" display=""/>
<data type="int" name="Textures" format="unsigned" len="4" display=""/>
<data type="int" name="Pallets" format="unsigned" len="4" display=""/>
</struct>
<data type="int" name="name_offset" format="unsigned" len="4" display=""/>
<data type="int" name="header_len" format="unsigned" len="4" display=""/>
<data type="int" name="header_offset" format="signed" len="4" display=""/>
<data type="int" name="unk1" format="unsigned" len="4" display=""/>
<data type="int" name="unk2" format="unsigned" len="4" display=""/>
<data type="int" name="num_verticies" format="unsigned" len="4" display=""/>
<data type="int" name="num_faces" format="unsigned" len="4" display=""/>
<data type="int" name="unk3" format="unsigned" len="4" display=""/>
<data type="int" name="num_nodes" format="unsigned" len="4" display=""/>
<data type="int" name="version" format="unsigned" len="4" display=""/>
<data type="int" name="unk4" format="unsigned" len="2" display=""/>
<data type="int" name="unk5" format="unsigned" len="2" display=""/>
<struct name="bounds" type_name="" comment="" expr="">
<data type="int" name="min_X" format="unsigned" len="4" display=""/>
<data type="int" name="min_Y" format="unsigned" len="4" display=""/>
<data type="int" name="min_Z" format="unsigned" len="4" display=""/>
<data type="int" name="max_X" format="unsigned" len="4" display=""/>
<data type="int" name="max_Y" format="unsigned" len="4" display=""/>
<data type="int" name="max_Z" format="unsigned" len="4" display=""/>
</struct>
</struct>
<jump offset="header.nodes * -1" comment="" origin="start">
<struct name="nodes" type_name="" comment="" expr="">
<data type="int" name="num_nodes" format="signed" len="4" display=""/>
<for name="node" count="num_nodes || num_nodes - 1" stop_test="num_nodes == 0" type_name="" comment="">
<data type="int" name="node" format="signed" len="4" display=""/>
</for>
</struct>
</jump>
<if test="header.lists.Definitions != 0" comment="">
<jump offset="header.lists.Definitions" comment="" origin="start">
<struct name="Definitions" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Definitions" comment="" origin="start">
<use_struct name="Definitions" expr="" type_name="Definitions" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Definitions - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Bones != 0" comment="">
<jump offset="header.lists.Bones" comment="" origin="start">
<struct name="Bones" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Bones" comment="" origin="start">
<use_struct name="Bone_data" expr="" type_name="Bones" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Bones - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Vertices != 0" comment="">
<jump offset="header.lists.Vertices" comment="" origin="start">
<struct name="Vertices" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Vertices" comment="" origin="start">
<use_struct name="Vertices" expr="" type_name="Vertices" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Vertices - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Normals != 0" comment="">
<jump offset="header.lists.Normals" comment="" origin="start">
<struct name="Normals" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Normals" comment="" origin="start">
<use_struct name="Normals" expr="" type_name="Normals" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Normals - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Colors != 0" comment="">
<jump offset="header.lists.Colors" comment="" origin="start">
<struct name="Colors" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Colors" comment="" origin="start">
<use_struct name="Colors" expr="" type_name="Colors" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Colors - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.UV_Points != 0" comment="">
<jump offset="header.lists.UV_Points" comment="" origin="start">
<struct name="UV_Points" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.UV_Points" comment="" origin="start">
<use_struct name="UV_Points" expr="" type_name="UV_Points" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.UV_Points - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Shaders != 0" comment="">
<jump offset="header.lists. Shaders" comment="" origin="start">
<struct name="Shaders" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Shaders" comment="" origin="start">
<use_struct name="Shaders" expr="" type_name="Shaders" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Shaders - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Materials != 0" comment="">
<jump offset="header.lists.Materials" comment="" origin="start">
<struct name="Materials" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Materials" comment="" origin="start">
<use_struct name="Materials" expr="" type_name="Materials" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Materials - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Polygons != 0" comment="">
<jump offset="header.lists.Polygons" comment="" origin="start">
<struct name="Polygons" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Polygons" comment="" origin="start">
<use_struct name="Polygons" expr="" type_name="Polygons" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Polygons - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Textures != 0" comment="">
<jump offset="header.lists.Textures" comment="" origin="start">
<struct name="Textures" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Textures" comment="" origin="start">
<use_struct name="Textures" expr="" type_name="Textures" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Textures - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Pallets != 0" comment="">
<jump offset="header.lists.Pallets" comment="" origin="start">
<struct name="Pallets" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Pallets" comment="" origin="start">
<use_struct name="Pallets" expr="" type_name="Pallets" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Pallets - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<data type="none" name="none"/>
</binary_file_format>

enjoy ;)


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 12, 2010, 08:11:00 AM
oh hey, make sure you click 'allow editing' when using the template...
(it works better) ^R-click on 'MDL0'

granted it does get a tad more confusing, but everything works as it should
(it takes a while to load though)


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 13, 2010, 03:41:18 PM
hmm...

so is progress coming along?? :/
did you get a reply on daniweb??


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 13, 2010, 04:03:47 PM
I dun think I got a reply yet...i haven't worked on it much due to animating =p...atm I'm not on my laptop so I can't see where I left off


Title: Re: Bone Tree Editor
Post by: SmashClash on December 13, 2010, 04:07:04 PM
I dun think I got a reply yet...i haven't worked on it much due to animating =p...atm I'm not on my laptop so I can't see where I left off
Kinda OfT, but how far are you(percentage-wise) towards completion of Galaxy Mario? ;D


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 13, 2010, 04:09:40 PM
@tsg:
I see...

I'll try for ya tomorrow then, if that suits ya :)

I'm getting information overload right now, and I feel like crap
(my head hurts, and I officially have a cold) :P


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 13, 2010, 07:17:07 PM
uhh technically all I gotta do is..hmm...i dun got much to do lol but I'm just looking for things to add. Technically it's just psa needed but that's gnna be quick for me...ill prob finish b4 friday


Title: Re: Bone Tree Editor
Post by: SmashClash on December 13, 2010, 07:28:13 PM
uhh technically all I gotta do is..hmm...i dun got much to do lol but I'm just looking for things to add. Technically it's just psa needed but that's gnna be quick for me...ill prob finish b4 friday
Cool and can't wait to see it!


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 13, 2010, 07:45:31 PM
yeh im also helping ssj with sasuke...

on topic: i just got a reply on msdn and im reading a sample code atm...ill edit this if it shows me how to re index the nodes


edit: thanks to the help i got off of msdn i can load a treeview with their bones =). Tomorrow im going to code for the navig. buttons(up,down,left right) to change the tree.

Im planning on allowing you to edit the tree this way:

nav. buttons:
       UP/Down - simply moves the bone up/down
       left - parent = parents parent(lol)
      right - child of previous bone

mouse:
       click 2 bones - swaps places

any ideas go ahead and post...i should/hopefully be done tomorrow


nooo more grids or buttons =p


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 14, 2010, 09:53:37 AM
nice :D

heh...
I guess thanx to me for helping you think of a re-design,
your progg will become moar famous :af2:


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 14, 2010, 01:44:09 PM
=p gnna start on it now

edit: i was hoping to be done today but i ran into things with the .exe that i didn't expect(not a problem). Its just taking longer, thats all.


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 15, 2010, 01:48:57 AM
I see... :o

so umm...
how exactly do you load a file into memory??


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 15, 2010, 07:31:43 AM
well if its a small file you can just read the memory into a txt file...i heard the databases are only good/neccesary for big files


Title: Re: Bone Tree Editor
Post by: BlueBrain on December 15, 2010, 01:05:28 PM
havent read all 8 pages sorry, but does this mean u could make a right handed link, left handed marth, etc...?


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 15, 2010, 01:07:46 PM
well if its a small file you can just read the memory into a txt file...i heard the databases are only good/neccesary for big files
?? what??
I think you're off topic...

I'm talking about how you load an mdl0 file into memory for say your bone editor...


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 15, 2010, 02:06:57 PM
@jokekid - you mean put the wep on the opposite hand? -> you can already do that in hxd...(maybe you just don't know how) =p.
- oh and if they don't have an opposite haven then you can move the haven bone to that position so yeh..again

@tcll - ohh you mean how i use the file to load...Well in c# is pretty straight forward...heres a code that i just made up that would load it into memory

void LoadFile(Stream input)
{
string path = "users\\blah*blah";
input = File.Open(path,Filemode.open); ->open

binarywriter bw = new binarywriter(input); -> uses the input file
binary reader br = new binaryreader(input); -> uses the input file

position = where to go
byte b = 123;
bw.seek(position,seekorgin.begin)
bw.writebytes( b); -> i could have just typed in 123..

input.close(); -> not reading file anymore->closed-> don't actually have to close...Unless you want to open the same file in a diff .exe
}



Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 15, 2010, 02:52:06 PM
ah...
KK...
hmm...

so you call the input file from a class function (I think) and then close the file

hmm...
not so sure how to do that in Py
your code is actually quite different as Py doesn't have binaryreader and binarywriter

Py loads a file as:

path = "input.mdl0"
input = open( path , 'rb' ) # r = read, rb = readbinary

or even simpler:

input = open( "input.mdl0" , 'rb' )

thing is...
that's not loading it to mem :/


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 15, 2010, 03:17:03 PM
i was going to go offtopic about how it actually works but i wont =p...

-are you reading it into a buffer? ex an array,list,another file...?Otherwise its reading the file into nothing(not keeping track of what is read)

ex: byte[] byteArray = br.readbytes(8 );

the string array will have the 8 bytes inside

if you don't then it  will basically just move the current position over 8 bytes



^ thats how it is in c#, hope it helps


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 15, 2010, 04:14:12 PM
eh... it's confusing...
but I see what you're doing:

list = [00 00 00 00 00 00 00 00 , 00 00 00 00 00 00 00 00 , ...]

the best way I can think of to do that would be:

filer = open('input.mdl0','rb')
list = []
a = 1
while a:
__r = filer.read(8)
__if r == '':
____a = 0
__else:
____list.append(r)

as you can see...
I'm really deep into reading from the file...
however...
I just had an idea on how to insert the file as a list...

list.append(filer.read(1).encode('hex'))

now the list will look something like:
list = [4D,44,4C,30,...] # [M,D,L,0,...]
now I can close the file and keep the data :D
while using the list indexes as bytes...
but I'll have to use an advance method of finding the bytes :/
(basic addition of multiplied numbers to give me the direct index)
and also...
list[ index : index+4 ] #32bit

you should get the rest and what not :P

heh...
this thread is getting off topic...
I should stop rambling XD


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 15, 2010, 04:26:46 PM
you should really try out c# lol...within a list you can load the whole thing into 1 index and search within that one index for offsets or specific text....

or just seek an offset within the file itself and read what you need at the time into a buffer...


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 15, 2010, 04:43:01 PM
lol...

C# I have to say is actually easier to read than C++
but it's confusing as all get out @_@

I wonder...
does C# have an interpreter as well as a compiler??
^that's why I like Py
I just don't know how to use the compiler XDD

I could do it your way (in py)...
I just don't know how to is all :P
same with buffers, classes, and for loops ;_;
I fail XD


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 15, 2010, 04:57:29 PM
lol i thought you were good at py...umm noob Q: what do you mean by interpreter? and yeh it has a compiler


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 15, 2010, 05:23:18 PM
lol i thought you were good at py...umm noob Q: what do you mean by interpreter? and yeh it has a compiler

I did mention I'm not the best at Py :P
multiple times on multiple threads though... lol

Py uses an interpreter...
basically just type and go
(go as in run the program without compiling) <3 <3
can C# do that?? (run the scripts before compiling)


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 15, 2010, 05:57:21 PM
lol i took that as your good but not great....not know how to create loops etc is...more like "im a beginner at py" lol =p

no..it has to compile(build) before running...but it has a check thing that checks if the code has any errors.   Theres a debugger...which is obvious as to what it does.  

edit:....ugh lol trying to get the treeview to scroll to...blah..blah...it doesn't work for some unknown reason....blah..blah going to just make the drag n drop stuff then attempt it again...blah .balh


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 15, 2010, 06:23:55 PM
well for loops is one of the basics yes...
but that's the only one holding me back...

I know what they do...
just not how to use them :/

Tkinter is my next downfall
if I could grasp the concept of that,
I would be able to progg GUI's in a snap
also...
why Tk and not Wx or PyCd
Tk comes with the distribution...
the others dont :/


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 16, 2010, 07:09:58 AM
drag and drop works fine...trying to dnd and add the bone right after the dest node...but it keeps adding it at (didn't look at pattern) places(under the right parent tho)...making it a childnode of the dest bone is already done


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 16, 2010, 07:28:45 AM
drag and drop works fine...trying to dnd and add the bone right after the dest node...but it keeps adding it at (didn't look at pattern) places(under the right parent tho)...making it a childnode of the dest bone is already done

hmm...
so you're saying you're having trouble getting it to do this:
[-] <- main bone
[-] <- added bone

because it keeps doing:
[-] <- main bone
 + [-] <- added bone

am I correct on that?? :/


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 16, 2010, 12:34:24 PM
no it ends up
[-] added bone
[-] main bone

but it doesnt always go on top...but neither does it become a child randomly...but that was before...

through lots of recurssive ive fixed it but i got one more glitch to fix lol...which ill do in a sec....


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 16, 2010, 12:43:32 PM
ah...

I see what you mean...
that's odd lol
heh...
looks like you've pretty much got things covered as well :P
can't wait to see when it's finished :D

oh and btw, I also understand what the nodes are...
the nodes are the transform indexes used by the Objects (Polygons)
it's basically an ID so the transforms get matched up correctly...
I'm still not understanding the node data though :/
(it's not always '00 00 00 00' or 'FF FF FF FF')


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 16, 2010, 12:51:20 PM
you mean the bone nodeIDs (lol used to think it was nodeLd-> doesnt even makes sense lol...) are ids that decide which polygon(through its nodeID) it (the polygon) attaches to?

lol already knew =p


also the node mix has something to do with i think certain \vertex points....if you wanna know a bit more just ask cuz i dun feel like typing it if you might know


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 16, 2010, 01:13:50 PM
ah...
no...
the definition and node stuff confuses me big time :P

so yea... IDK

EDIT:
lol...
you seem to me of more help to me around the bone areas XD


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 16, 2010, 01:28:45 PM
uhh u confused me lol do you not know about the nodemix? and was what i said about the nodeids was what you were saying?


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 16, 2010, 01:50:14 PM
lol yea...
the nodemix definition... I don't understand :P
and you were right about the nodes :)


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 17, 2010, 03:33:54 PM
yeh I'll tell you what I know about em when I get on my laptop....but there are 3 parts to it_ the 2nd affects certain vertex points I think

there are still a few things 2 fix with the .exe...actually if I were 2 give you that part of the code, u'd think it's simple buut it's a bit confusing

@smash...i didn't hav a chance 2 work on smg so it might be done by 2moro..if I can find my sd card =p\


edit: ugh its hard to make this work perfectly....if its ok with you i might just take some shortcuts =p. It will still be able to have D&D but it wont work the way you want everytime(youll see if you wnna test later) and you have to use the arrow keys to just move it up one.  Its not a big deal, just annoying to try and get it to work right.  Reply if you wnna test it.


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 18, 2010, 10:06:46 AM
eh... *interested*
it's KK...
thanx though...

I've got my converter that I'm working on...
I've finally gotton the plugin system to work :D
and I'm redoing the plugins...

instead of 1 import and 1 export...
it'll do both with functions...
some plugins will only export though...

progress on this can be seen on my forum:
http://tcll5850.proboards.com
(don't want to have to post in too many places)


Title: Re: Bone Tree Editor
Post by: Lecapria on December 19, 2010, 01:03:30 PM
my computer wont let me run it bc im missing .NET or something like that. does anyone know if you can change where a bone is attached to the bone tree? im trying to reattach Samus ponytail to her HipN bone


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 19, 2010, 01:39:43 PM
...thats the point of my program n go to msdn for the .net thing..atm I did a big update to it and am working on fixing up some stuff...instead of using buttons, it's like bb interface (its a whole diff prog basically)with the tree view on the left and it's info on the right - you can move bones just by drag n dropping...since I didn't release it or finish yet, I can do it for you later


Title: Re: Bone Tree Editor
Post by: Lecapria on December 19, 2010, 01:43:23 PM
THAT WOULD BE FANDAMN TASTIC


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 19, 2010, 01:52:06 PM
as for Brbx...
you need .net framework 3.5...

^I found that out the hard way =P


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 19, 2010, 02:32:13 PM
@lecapria - uhh you know the ponytail is attached to her head right? ill still move it tho (going to do in a sec)


Title: Re: Bone Tree Editor
Post by: Lecapria on December 19, 2010, 02:34:04 PM
yes i know. i need it detached from her head bone, and reattached to her hipbone


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 19, 2010, 02:39:34 PM
yes i know. i need it detached from her head bone, and reattached to her hipbone

he means by the poly's...

you'll have a stretching of poly's after moving it...


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 19, 2010, 02:40:59 PM
yeh what he said lol


Title: Re: Bone Tree Editor
Post by: Lecapria on December 19, 2010, 02:48:52 PM
i can probly just texture it out yeah?


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 19, 2010, 02:54:07 PM
lmoa never made a save button 0.o one sec


Title: Re: Bone Tree Editor
Post by: Lecapria on December 19, 2010, 02:56:12 PM
XD


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 19, 2010, 10:13:46 PM
hey srry i didnt get back to you...theres an error in my code and ive been searching for it...


Title: Re: Bone Tree Editor
Post by: Lecapria on December 20, 2010, 09:25:06 AM
ok


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 24, 2010, 09:54:16 AM
how's progress?? :)


Title: Re: Bone Tree Editor
Post by: Lecapria on December 24, 2010, 12:55:54 PM
nopthing on my end


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 24, 2010, 01:10:24 PM
nopthing on my end

lol
that was at TSG :P


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 24, 2010, 03:44:08 PM
sorry havent been working on  this...been working on something else lol...but i finished it and youll see it after i fininsh smg2 =)...sory lecapria ill try to get that samus before the end of the day


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 24, 2010, 04:47:07 PM
sorry havent been working on  this...been working on something else lol...but i finished it and youll see it after i fininsh smg2 =)...sory lecapria ill try to get that samus before the end of the day


lol

KK
your prog will be of a big help :)
I am gonna try something though using Brbx, FtWfls, and yur prog
see if I can't "add" a bone then move it... (hopefully making it physical)


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 25, 2010, 02:26:22 PM
I'm almost done with my new exe(not the tree editor) =p....technically I could release it,but There's just one more thing to figure out(not a bug)


Title: Re: Bone Tree Editor
Post by: BlackJax96 on December 25, 2010, 02:33:33 PM
Hey shyguy, this is sorta off-topic but would you know how to retrieve the values inside an xml element and save them in a variable in C#?

Like
<Collada>
<Element1>
<Element2>
<float_array>
0.553668 2.45318 -0.422029 0.634823 2.08738
</float_array>
</Element2>
</Element1>

How would I get the numbers inside of float_array


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 25, 2010, 03:10:06 PM
no srry, i dont know/use xml that much, but you can go to msdn for some help(if you didnt already go there...)


Title: Re: Bone Tree Editor
Post by: BlackJax96 on December 25, 2010, 03:12:21 PM
Dang ok thx, back to researching


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 25, 2010, 03:25:22 PM
didnt fully read this but does this help?

http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/0567c6a3-2314-479c-8475-0c1528fcca3f




Title: Re: Bone Tree Editor
Post by: BlackJax96 on December 25, 2010, 05:46:37 PM
Shoopdawoop:
http://msdn.microsoft.com/en-us/library/system.xml.xmlreader.readinnerxml.aspx
http://msdn.microsoft.com/en-us/library/system.xml.xmlreader.readouterxml%28v=vs.95%29.aspx
I gotz it.


Title: Re: Bone Tree Editor
Post by: Lecapria on December 26, 2010, 09:47:09 AM
~(*.*)~ jellyfish


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 26, 2010, 10:04:26 AM
~(*.*)~ jellyfish

... really :srs:


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 26, 2010, 10:35:58 AM
lol....srry ill try to get to it after finishing this new one..atm im just trying to find bugs and no luck...=)


Title: Re: Bone Tree Editor
Post by: BlueBrain on December 26, 2010, 11:05:01 AM
i have a question about this.
will this be noob-friendly?
xD


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 26, 2010, 11:11:50 AM
i have a question about this.
will this be noob-friendly?
xD

with my ideas he's using, it should be ;)
(just the layout for my ideas)
^he's doing all the progging :P


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 26, 2010, 11:22:17 AM
for the bone tree its is definitely noob friendly, all you do is drag and drop within a tree.  if you want, you can also change the attributes of the bone(index,nodeId, flag,etc) in a txt box to the right.-> not done

the other exe that im almost done with is just as noob friendly, its drag and dropping between to trees. ->I hopefully will release later today


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 26, 2010, 11:55:52 AM
for the bone tree its is definitely noob friendly, all you do is drag and drop within a tree.  if you want, you can also change the attributes of the bone(index,nodeId, flag,etc) in a txt box to the right.-> not done

the other exe that im almost done with is just as noob friendly, its drag and dropping between to trees. ->I hopefully will release later today

umm...
I'd have multiple labled textboxes containing the attribute data

just use a string var to fill them :)


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 26, 2010, 12:16:44 PM
o i meant multiple txt boxes to the right lol and yeh i use string vars that i get when i load the file


-almost done with the other one =)


Title: Re: Bone Tree Editor
Post by: BlueBrain on December 26, 2010, 12:25:19 PM
it wont open for me (that beta u have in ur sig) i have .net framework 4, it just says: bone editor test stopped functioning (typical windows message)


Title: Re: Bone Tree Editor
Post by: DarkPikachu on December 26, 2010, 12:26:26 PM
it wont open for me (that beta u have in ur sig) i have .net framework 4, it just says: bone editor test stopped functioning (typical windows message)

that's prbly his old one that's not very user friendly :|


Title: Re: Bone Tree Editor
Post by: BlueBrain on December 26, 2010, 12:29:52 PM
just being dumb myself, i didnt put the model in the folder -.-


Title: Re: Bone Tree Editor
Post by: TheShyGuy on December 26, 2010, 12:37:27 PM
im done with my new exe...need to find bugs, if i dun find any in 30 mins then im releasing lol. then ima get bak to the bone tree editor and my psa


Title: Re: Bone Tree Editor- development thread
Post by: DarkPikachu on December 26, 2010, 02:23:52 PM
im done with my new exe...need to find bugs, if i dun find any in 30 mins then im releasing lol. then ima get bak to the bone tree editor and my psa

speaking of PSA

one intention I have for some software is a logic brick editor...

I'm trying to get into GUI progging so I can do that, but yea...
not the easiest thing to do...

you should be able to reference to the modules (rel files) from the logic :)
they work like simple scripts basicallly :/
imaging captain falcon being able to use thunder :af2:


Title: Re: Bone Tree Editor- development thread
Post by: TheShyGuy on December 26, 2010, 02:36:59 PM
my new exe has been released  and lol


Title: Re: Bone Tree Editor- development thread
Post by: Oshtoby on December 26, 2010, 11:47:10 PM
my new exe has been released  and lol
Where is this new .EXE? I can't find it. I looked in your main post, but the old version is still there.


Title: Re: Bone Tree Editor- development thread
Post by: TheShyGuy on December 26, 2010, 11:49:12 PM
lmoa no i mean my new ext gfx editor lol, it might also be able to edit sfx(misc data 2) but i havent tested that


Title: Re: Bone Tree Editor- development thread
Post by: TheShyGuy on December 31, 2010, 02:39:19 PM
http://www.mediafire.com/?3ghn3659h1l4v46

Heres that zsuit with the ponytail connected to the hip bone...sorry it took so long..forgot that you req. it =p

progress = save is fixed, just a few more things to do before release


Title: Re: Bone Tree Editor- development thread
Post by: DarkPikachu on December 31, 2010, 10:58:00 PM
nice :D
I so can't wait for the DL :3

I'ma see if Brbx won't dynamically create a new bone after moving them :D
(using fort waffles to add the bones)


Title: Re: Bone Tree Editor- development thread
Post by: TheShyGuy on December 31, 2010, 11:04:25 PM
thnx,....lmao i accidently screwed up some good code and i cant remember what it was lol.. Theres only one more main thing to figure out and if i do tonight/tomoro i can prob release it


Title: Re: Bone Tree Editor- development thread
Post by: BlueBrain on January 01, 2011, 06:37:53 AM
that zsuit is kinda f*ckd up, due to being attached to the head... (the polygon itself)


Title: Re: Bone Tree Editor- development thread
Post by: TheShyGuy on January 01, 2011, 11:58:09 AM
yeh i know but thats what that one kid a few pages back wanted - a zsuit with the ponytail attached the the hip.  Tcll told him there would be stretching.

^fixed lol


Title: Re: Bone Tree Editor- development thread
Post by: DarkPikachu on January 01, 2011, 01:52:21 PM
yeh i know but thats what that one kid a few pages back wanted - a zsuit with the ponytail attached the the hip.  I told him there would be stretching.

I was the one who brought it up ;)
TSG just explained it is all :P


Title: Re: Bone Tree Editor- development thread
Post by: Lecapria on January 01, 2011, 09:32:50 PM
bump


Title: Re: Bone Tree Editor- development thread
Post by: TheShyGuy on January 01, 2011, 09:43:16 PM
[url]http://www.mediafire.com/?3ghn3659h1l4v46[/url]

Heres that zsuit with the ponytail connected to the hip bone...sorry it took so long..forgot that you req. it =p

progress = save is fixed, just a few more things to do before release


Title: Re: Bone Tree Editor- development thread
Post by: BlueBrain on January 02, 2011, 06:25:17 AM
lol at autoquote...


Title: Re: Bone Tree Editor- development thread
Post by: TheShyGuy on January 03, 2011, 03:32:26 PM
its not done yet, but is there anything i should add onto this? like from the old one or something.  Atm its just a bone tree editor without the multiple vertex/polygon deleter


Title: Re: Bone Tree Editor- development thread
Post by: Lecapria on January 04, 2011, 07:04:19 PM
nah just need the bone moved


Title: Re: Bone Tree Editor- development thread
Post by: DarkPikachu on January 04, 2011, 07:34:05 PM
multiple vertex/polygon deleter??

what would that be?? *curious*


Title: Re: Bone Tree Editor- development thread
Post by: TheShyGuy on January 05, 2011, 03:22:05 PM
it just deletes vertices and polygons(0's em out...but thinking about, i should just delete em...)

look at the front page for info


Title: Re: Bone Tree Editor- development thread
Post by: Oshtoby on January 07, 2011, 11:44:40 AM
Any update on this project? I very much want to use this new version you've been talking about.


Title: Re: Bone Tree Editor- development thread
Post by: TheShyGuy on January 07, 2011, 02:00:04 PM
it should be release later on today


Title: Re: Bone Tree Editor- development thread
Post by: BlackJax96 on January 07, 2011, 08:26:59 PM
it should be release later on today

...


Title: Re: Bone Tree Editor- development thread
Post by: TheShyGuy on January 07, 2011, 08:48:36 PM
sorry lol, sis is on comp.  Ill release today tho =p..Ill prob release when i get back on cuz i just gotta do the scroll if your dragging near the top/bottom

@tcll - still isnt working but its probably(is) my fault lol. Ima stop taking shortcuts when i do it.


Title: Re: Bone Tree Editor- development thread
Post by: DarkPikachu on January 07, 2011, 08:54:11 PM
sorry lol, sis is on comp.  Ill release today tho =p..Ill prob release when i get back on cuz i just gotta do the scroll if your dragging near the top/bottom

@tcll - still isnt working but its probably(is) my fault lol. Ima stop taking shortcuts when i do it.

do you know how to draw a canvas,
and draw a 1x1 rectangle for a pixel in the canvas??

that's what I'm doing...
youll notice I never commented on the code for the rectangle...


Title: Re: Bone Tree Editor- development thread
Post by: BlackJax96 on January 07, 2011, 09:04:18 PM
sorry lol, sis is on comp.  Ill release today tho =p..Ill prob release when i get back on cuz i just gotta do the scroll if your dragging near the top/bottom

Mmmmmk cool beanz


Title: Re: Bone Tree Editor- development thread
Post by: TheShyGuy on January 07, 2011, 09:26:02 PM
sorry lol, sis is on comp.  Ill release today tho =p..Ill prob release when i get back on cuz i just gotta do the scroll if your dragging near the top/bottom

@tcll - still isnt working but its probably(is) my fault lol. Ima stop taking shortcuts when i do it.

do you know how to draw a canvas,
and draw a 1x1 rectangle for a pixel in the canvas??

that's what I'm doing...
youll notice I never commented on the code for the rectangle...

I want to say yeh....but you make me wnna say no...i figured it was as simple as to just fill it it or sumtin I dunnoo...>.> confused


Title: Re: Bone Tree Editor- development thread
Post by: DarkPikachu on January 07, 2011, 09:39:42 PM
sorry lol, sis is on comp.  Ill release today tho =p..Ill prob release when i get back on cuz i just gotta do the scroll if your dragging near the top/bottom

@tcll - still isnt working but its probably(is) my fault lol. Ima stop taking shortcuts when i do it.

do you know how to draw a canvas,
and draw a 1x1 rectangle for a pixel in the canvas??

that's what I'm doing...
youll notice I never commented on the code for the rectangle...

I want to say yeh....but you make me wnna say no...i figured it was as simple as to just fill it it or sumtin I dunnoo...>.> confused

alright, well, the way my program works is:

when you D-click a tree-image-item, (skipping ahead to the conversion)
the program reads 1 pixel from the file (based on the format) and draws a 1x1 rectangle based on the color of the pixel, and the current position of the pixel being drawn...

the program draws 1 rectangle(pixel), and adds to the position after drawing...

the drawing order for I8 format goes as such:

_1 _2 _3 _4 _5 _6 _7 _8 _33 34 35 36 37 38 39 40
_9 10 11 12 13 14 15 16 _41 42 43 44 45 46 47 48
17 18 19 20 21 22 23 24 _49 50 51 52 53 54 55 56
25 26 27 28 29 30 31 32 _57 58 59 60 61 62 63 64

65 66 67 68 69 ...


Title: Re: Bone Tree Editor- development thread
Post by: TheShyGuy on January 07, 2011, 09:41:09 PM
kk I'll look into it l8er

edit: fail....was looking over code and realized i didnt convert the size from hex....

edit: thnx tcll, got it working a while ago.  Ima release the bte tomoro morning.  Just noticed some things wrong with it(tiny things)


Title: Re: Bone Tree Editor- development thread
Post by: DarkPikachu on January 08, 2011, 08:02:52 AM
kk I'll look into it l8er

edit: fail....was looking over code and realized i didnt convert the size from hex....

edit: thnx tcll, got it working a while ago.  Ima release the bte tomoro morning.  Just noticed some things wrong with it(tiny things)

stop procrastinating =P

release it whenever you know it works perfectly :)


Title: Re: Bone Tree Editor- development thread
Post by: DarkPikachu on January 14, 2011, 02:01:24 PM

hey...

just to save me time from looking...
how did you figure out the 4th level in the bone matrices??

if UDK, I'll go research it :)


Title: Re: Bone Tree Editor- development thread
Post by: TheShyGuy on January 14, 2011, 02:11:52 PM
go research it lol


Title: Re: Bone Tree Editor- development thread
Post by: DarkPikachu on January 14, 2011, 05:34:32 PM
found some really good info:
http://s9.zetaboards.com/Ultimate3D_community/topic/7104235/1/

^alot of really good info there :)


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: TheShyGuy on January 16, 2011, 06:39:27 PM
bump v1 released...feedback would be nice


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: BlackJax96 on January 16, 2011, 09:15:46 PM
I can't save without getting an error :/


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: DarkPikachu on January 16, 2011, 10:24:19 PM

nice job :D
the GUI is OK... (as in really good)

but I could think of quite a few ideas to spruce it up ;)

first off, get rid of the offset input...
use the relocation groups to find the offsets of the bones
(you can find out how to find and use the groups by using my template) ;)
^rip it apart, play around with it, there's always a copy avaliable :)

second...
make the tree auto-load... :P

*more ideas later*
^I'm not stating anything until I know it for fact ;)

and apperently, saving's an issue :/
I havn't tested it yet, but I will...


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: TheShyGuy on January 16, 2011, 10:37:59 PM
o srry about the error...like i said i made a few quick edits before uploading so that prob did it..ill just put the things back to how it was before, but it wont load extra bones right...well maybe...

it doesnt auto load, cuz it loads the file after pressing 'ok'...i forget y i didnt but ill try to do it again..  

offset thing...doable ill make the fixes right now

edit:...seems my mdl0 reft template has an error somewhere...can u give the updated cuz i cant even open mario or pikas mdl0 lol


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: BlackJax96 on January 16, 2011, 10:43:15 PM
Okay cool beanz ;D


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: TheShyGuy on January 16, 2011, 10:45:31 PM
seems my mdl0 reft template has an error somewhere...can u give the updated cuz i cant even open mario or pikas mdl0 lol


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: DarkPikachu on January 16, 2011, 10:59:21 PM
seems my mdl0 reft template has an error somewhere...can u give the updated cuz i cant even open mario or pikas mdl0 lol


alright... (next post)

btw, your matrices are off:

Brbx:
(1,0,5,0)(3,1,0,0)(0,0,1,0)(0,0,2,1)

1 3 0 0
0 1 0 0
5 0 1 2
0 0 0 1

btw, last row is always 0 0 0 1


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: DarkPikachu on January 16, 2011, 11:00:39 PM
Code:
<?xml version="1.0"?>
<!DOCTYPE binary_file_format SYSTEM "BinaryFileFormat.dtd">
<binary_file_format name="MDL0" type_name="" comment="" expr="" default_byte_order="big" default_read_only="false" default_char_set="ansi">
<define_struct type_name="geometries" comment="" expr="">
<data type="int" name="count" format="signed" len="2" display=""/>
<for name="point" count="count || count - 1" stop_test="count == 0" type_name="" comment="">
<struct name="" type_name="" comment="" expr="">
<if test="header.vtx_des2 == 2" comment="">
<data type="none" name="vtx2" len="4"/>
</if>
<!--
<if test="header.vtx_des2 == 3" comment="">
<data type="none" name="vtx3" len="9"/>
</if>
-->
</struct>
</for>
</define_struct>
<define_struct type_name="offset_name" comment="" expr="">
<data type="int" name="str_len" format="unsigned" len="1" display=""/>
<data type="string" name="name" format="ascii" len="str_len" display=""/>
</define_struct>
<define_struct type_name="bounds" comment="" expr="">
<data type="int" name="min_X" format="unsigned" len="4" display=""/>
<data type="int" name="min_Y" format="unsigned" len="4" display=""/>
<data type="int" name="min_Z" format="unsigned" len="4" display=""/>
<data type="int" name="max_X" format="unsigned" len="4" display=""/>
<data type="int" name="max_Y" format="unsigned" len="4" display=""/>
<data type="int" name="max_Z" format="unsigned" len="4" display=""/>
<data type="none" name="pad" len="8"/>
</define_struct>
<define_struct type_name="relocation_group" comment="" expr="">
<data type="int" name="block_len" format="unsigned" len="4" display=""/>
<data type="int" name="num_offsets" format="unsigned" len="4" display=""/>
<data type="int" name="tag" format="unsigned" len="4" display="hex"/>
<data type="int" name="unk1" format="unsigned" len="2" display="hex"/>
<data type="int" name="unk2" format="unsigned" len="2" display="hex"/>
<data type="int" name="pad" format="unsigned" len="8" display="hex"/>
</define_struct>
<define_struct type_name="relocation_offset" comment="" expr="">
<data type="int" name="ID" format="unsigned" len="2" display=""/>
<data type="int" name="unk1" format="unsigned" len="2" display="hex"/>
<data type="int" name="unk2" format="unsigned" len="2" display="hex"/>
<data type="int" name="unk3" format="unsigned" len="2" display="hex"/>
<data type="int" name="string_offset" format="unsigned" len="4" display=""/>
<data type="int" name="data_offset" format="unsigned" len="4" display=""/>
</define_struct>
<define_struct type_name="Definitions" comment="" expr="">
<for name="type" count="" stop_test="this.type == 1" type_name="" comment="">
<struct name="" type_name="" comment="" expr="type{this.type}">
<data type="int" name="type" format="unsigned" len="1" display=""/>
<if test="type == 2" comment="">
<struct name="t2" type_name="" comment="" expr="({this.ID1},{this.ID2})">
<data type="int" name="ID1" format="unsigned" len="2" display=""/>
<data type="int" name="ID2" format="unsigned" len="2" display=""/>
</struct>
</if>
<if test="type == 3" comment="">
<struct name="t3" type_name="" comment="" expr="({this.ID}) ({this.count})">
<data type="int" name="ID" format="unsigned" len="2" display=""/>
<data type="int" name="count" format="unsigned" len="1" display=""/>
<for name="tmp" count="count || count - 1" stop_test="count == 0" type_name="" comment="">
<data type="none" name="" len="6"/>
</for>
</struct>
</if>
<if test="type == 4" comment="">
<struct name="t4" type_name="" comment="" expr="({this.ID1},{this.ID2},{this.ID3},{this.ID4})">
<data type="int" name="ID1" format="unsigned" len="2" display=""/>
<data type="int" name="ID2" format="unsigned" len="2" display=""/>
<data type="int" name="ID3" format="unsigned" len="2" display=""/>
<data type="int" name="ID4" format="unsigned" len="1" display=""/>
</struct>
</if>
<if test="type == 5" comment="">
<struct name="t5" type_name="" comment="" expr="({this.ID1},{this.ID2})">
<data type="int" name="ID1" format="unsigned" len="2" display=""/>
<data type="int" name="ID2" format="unsigned" len="2" display=""/>
</struct>
</if>
</struct>
</for>
</define_struct>
<define_struct type_name="Bones" comment="" expr="">
<struct name="bone_header" type_name="" comment="" expr="">
<data type="int" name="header_len" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="bone_index" len="4" format="unsigned" display=""/>
<data type="int" name="node_ID" len="4" format="unsigned" display=""/>
<data type="int" name="flags" len="4" format="unsigned" display=""/>
<data type="int" name="pad" len="8" format="unsigned" display=""/>
<struct name="loc_rot_sca" type_name="" comment="" expr="">
<data type="int" name="sca_X" format="unsigned" len="4" display=""/>
<data type="int" name="sca_Y" len="4" format="unsigned" display=""/>
<data type="int" name="sca_Z" len="4" format="unsigned" display=""/>
<data type="int" name="rot_X" len="4" format="unsigned" display=""/>
<data type="int" name="rot_Y" len="4" format="unsigned" display=""/>
<data type="int" name="rot_Z" len="4" format="unsigned" display=""/>
<data type="int" name="loc_X" len="4" format="unsigned" display=""/>
<data type="int" name="loc_Y" len="4" format="unsigned" display=""/>
<data type="int" name="loc_Z" len="4" format="unsigned" display=""/>
</struct>
<struct name="bound" type_name="" comment="" expr="">
<data type="int" name="min_X" len="4" format="unsigned" display=""/>
<data type="int" name="min_Y" len="4" format="unsigned" display=""/>
<data type="int" name="min_Z" len="4" format="unsigned" display=""/>
<data type="int" name="max_X" len="4" format="unsigned" display=""/>
<data type="int" name="max_Y" len="4" format="unsigned" display=""/>
<data type="int" name="max_Z" len="4" format="unsigned" display=""/>
</struct>
<data type="int" name="parent" len="4" format="signed" display=""/>
<data type="int" name="child" len="4" format="unsigned" display=""/>
<data type="int" name="next" len="4" format="unsigned" display=""/>
<data type="int" name="prev" len="4" format="unsigned" display=""/>
<data type="int" name="part2" len="4" format="unsigned" display=""/>
</struct>
<struct name="frame_matrix" type_name="" comment="" expr="">
<data type="int" name="s_1_1" format="signed" len="4" display=""/>
<data type="int" name="s_2_1" format="signed" len="4" display=""/>
<data type="int" name="s_3_1" format="signed" len="4" display=""/>
<data type="int" name="s_4_1" format="signed" len="4" display=""/>
<data type="int" name="s_1_2" format="signed" len="4" display=""/>
<data type="int" name="s_2_2" format="signed" len="4" display=""/>
<data type="int" name="s_3_2" format="signed" len="4" display=""/>
<data type="int" name="s_4_2" format="signed" len="4" display=""/>
<data type="int" name="s_1_3" format="signed" len="4" display=""/>
<data type="int" name="s_2_3" format="signed" len="4" display=""/>
<data type="int" name="s_3_3" format="signed" len="4" display=""/>
<data type="int" name="s_4_3" format="signed" len="4" display=""/>
</struct>
<struct name="inverse_matrix" type_name="" comment="" expr="">
<data type="int" name="s_1_1" format="signed" len="4" display=""/>
<data type="int" name="s_2_1" format="signed" len="4" display=""/>
<data type="int" name="s_3_1" format="signed" len="4" display=""/>
<data type="int" name="s_4_1" format="signed" len="4" display=""/>
<data type="int" name="s_1_2" format="signed" len="4" display=""/>
<data type="int" name="s_2_2" format="signed" len="4" display=""/>
<data type="int" name="s_3_2" format="signed" len="4" display=""/>
<data type="int" name="s_4_2" format="signed" len="4" display=""/>
<data type="int" name="s_1_3" format="signed" len="4" display=""/>
<data type="int" name="s_2_3" format="signed" len="4" display=""/>
<data type="int" name="s_3_3" format="signed" len="4" display=""/>
<data type="int" name="s_4_3" format="signed" len="4" display=""/>
</struct>
</define_struct>
<define_struct type_name="Vertices" comment="" expr="">
<struct name="vertice_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="unsigned" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="isXYZ" len="4" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="modifier" len="1" format="unsigned" display=""/>
<data type="int" name="entry_stride" len="1" format="unsigned" display=""/>
<data type="int" name="num_vertices" len="2" format="unsigned" display=""/>
<if test="isXYZ == 1" comment="">
<use_struct name="bounds" expr="" type_name="bounds" comment=""/>
</if>
</struct>
<data type="string" name="vertices" len="vertice_header.entry_stride * vertice_header.num_vertices" format="default" display="vert structures" comment="I could've put a 'FOR' here,
but it'd take too long when loading the file"/>
<data type="none" name="pad" len="vertice_header.block_size - (vertice_header.entry_stride*vertice_header.num_vertices) - vertice_header.data_offset"/>
</define_struct>
<define_struct type_name="Normals" comment="" expr="">
<struct name="normal_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="unsigned" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="isXYZ" len="4" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="modifier" len="1" format="unsigned" display=""/>
<data type="int" name="entry_stride" len="1" format="unsigned" display=""/>
<data type="int" name="num_normals" len="2" format="unsigned" display=""/>
<if test="isXYZ == 1" comment="">
<use_struct name="bounds" expr="" type_name="bounds" comment=""/>
</if>
</struct>
<data type="string" name="normals" format="default" display="normal structures" len="normal_header.entry_stride*normal_header.num_normals" comment="I could've put a 'FOR' here,
but it'd take too long when loading the file"/>
<data type="none" name="pad" len="normal_header.block_size - (normal_header.entry_stride*normal_header.num_normals) - normal_header.data_offset"/>
</define_struct>
<define_struct type_name="Colors" comment="" expr="">
<struct name="color_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="signed" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="signed" display=""/>
<data type="int" name="string_offset" len="4" format="signed" display=""/>
<data type="int" name="ID" len="4" format="signed" display=""/>
<data type="int" name="isRGBA" len="4" format="signed" display=""/>
<data type="int" name="type" len="4" format="signed" display=""/>
<data type="int" name="entry_stride" len="1" format="signed" display=""/>
<data type="int" name="modifier" len="1" format="signed" display=""/>
<data type="int" name="num_colors" len="2" format="signed" display=""/>
</struct>
<for name="color" count="color_header.num_colors || color_header.num_colors - 1" stop_test="color_header.num_colors == 0" type_name="" comment="">
<data type="none" name="color" len="color_header.entry_stride"/>
</for>
<data type="none" name="pad" len="color_header.block_size - (color_header.num_colors*color_header.entry_stride) - 32"/>
</define_struct>
<define_struct type_name="UV_Points" comment="" expr="">
<struct name="UV_header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="unsigned" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="isXY" len="4" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="modifier" len="1" format="unsigned" display=""/>
<data type="int" name="entry_stride" len="1" format="unsigned" display=""/>
<data type="int" name="num_UVs" len="2" format="unsigned" display=""/>
<if test="isXY == 1" comment="">
<struct name="bounds" expr="" type_name="" comment="">
<data type="int" name="min_X" format="unsigned" len="4" display=""/>
<data type="int" name="min_Y" format="unsigned" len="4" display=""/>
<data type="int" name="max_X" format="unsigned" len="4" display=""/>
<data type="int" name="max_Y" format="unsigned" len="4" display=""/>
<data type="none" name="pad" len="16"/>
</struct>
</if>
</struct>
<data type="string" name="UVs" len="UV_header.entry_stride * UV_header.num_UVs" format="default" display="uv structures" comment="I could've put a 'FOR' here,
but it'd take too long when loading the file"/>
<data type="none" name="pad" len="UV_header.block_size - (UV_header.entry_stride*UV_header.num_UVs) - UV_header.data_offset"/>
</define_struct>
<define_struct type_name="Materials" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="unsigned" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="string_offset" len="4" format="unsigned" display=""/>
<data type="int" name="ID" len="4" format="unsigned" display=""/>
<data type="int" name="unk1" len="4" format="unsigned" display=""/>
<data type="int" name="textures" len="1" format="unsigned" display=""/>
<data type="int" name="num_layers" len="1" format="unsigned" display=""/>
<data type="int" name="Flag3" len="1" format="unsigned" display=""/>
<data type="int" name="Flag4" len="1" format="unsigned" display=""/>
<data type="int" name="type" len="4" format="unsigned" display=""/>
<data type="int" name="Flag5" len="1" format="unsigned" display=""/>
<data type="int" name="Flag6" len="1" format="unsigned" display=""/>
<data type="int" name="Flag7" len="1" format="unsigned" display=""/>
<data type="int" name="Flag8" len="1" format="unsigned" display=""/>
<data type="int" name="unk3" format="unsigned" len="4" display=""/>
<data type="int" name="unk4" format="signed" len="4" display=""/>
<data type="int" name="config" format="signed" len="4" display=""/>
<data type="int" name="num_textures" format="signed" len="4" display=""/>
<data type="int" name="textures_offset" format="signed" len="4" display=""/>
<data type="int" name="P4_offset" format="signed" len="4" display=""/>
<data type="int" name="P5_offset" format="signed" len="4" display=""/>
<data type="int" name="P6_offset" format="signed" len="4" display=""/>
</struct>
<data type="none" name="tmp" len="header.textures_offset - 64"/><jump offset="header.config+(header.MDL0_offset*-1)" comment="" origin="start">
<use_struct name="Shader_Config" expr="" type_name="Shader_Config" comment=""/>
</jump>
<if test="header.textures_offset != 0" comment="">
<jump offset="header.textures_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<for name="texture" count="header.textures || header.textures -1" stop_test="header.textures == 0" type_name="" comment="">
<struct name="texture" type_name="" comment="" expr="{this.offset_name.name}">
<data type="int" name="string_offset" format="signed" len="4" display=""/>
<data type="int" name="pad" len="4" format="signed" display=""/>
<data type="int" name="unk1" format="signed" len="4" display=""/>
<data type="int" name="unk2" format="signed" len="4" display=""/>
<data type="int" name="index1" format="signed" len="4" display=""/>
<data type="int" name="index2" format="signed" len="4" display=""/>
<data type="int" name="layerID1" format="signed" len="4" display=""/>
<data type="int" name="layerID2" format="signed" len="4" display=""/>
<data type="int" name="unk5" format="signed" len="4" display=""/>
<data type="int" name="unk6" format="signed" len="4" display=""/>
<data type="int" name="float" format="unsigned" len="4" display=""/>
<data type="int" name="unk7" format="signed" len="4" display=""/>
<data type="int" name="unk8" format="signed" len="4" display=""/>
<jump offset="string_offset -53" comment="" origin="current">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</jump>
</if>
<if test="header.P4_offset != 0" comment="">
<jump offset="header.P4_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<struct name="P4" type_name="" comment="" expr="">
<data type="int" name="tmp" format="signed" len="4" display=""/>
</struct>
</jump>
</if>
<if test="header.P5_offset != 0" comment="">
<jump offset="header.P5_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<struct name="P5" type_name="" comment="" expr="">
<data type="none" name="tmp" len="384"/>
</struct>
</jump>
</if>
<if test="header.P6_offset != 0" comment="">
<jump offset="header.P6_offset+(header.MDL0_offset*-1)" comment="" origin="start">
<struct name="P6" type_name="" comment="" expr="">
<data type="none" name="tmp" len="384"/>
</struct>
</jump>
</if>
</define_struct>
<define_struct type_name="Shader_Config" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="int" name="block_length" format="signed" len="4" display=""/>
<data type="int" name="MDL0_offset" format="signed" len="4" display=""/>
<data type="int" name="ID" format="signed" len="4" display=""/>
<data type="int" name="flag" format="unsigned" len="1" display=""/><data type="int" name="Res0" format="signed" len="1" display=""/><data type="int" name="Res1" format="signed" len="1" display=""/><data type="int" name="Res2" format="signed" len="1" display=""/><data type="int" name="Ref0" format="signed" len="1" display=""/><data type="int" name="Ref1" format="signed" len="1" display=""/><data type="int" name="Ref2" format="signed" len="1" display=""/><data type="int" name="Ref3" format="signed" len="1" display=""/><data type="int" name="Ref4" format="signed" len="1" display=""/><data type="int" name="Ref5" format="signed" len="1" display=""/><data type="int" name="Ref6" format="signed" len="1" display=""/><data type="int" name="Ref7" format="signed" len="1" display=""/><data type="none" name="pad" len="8"/></struct>
</define_struct>
<define_struct type_name="Objects" comment="" expr="">
<struct name="header" type_name="" comment="" expr="">
<data type="int" name="block_size" len="4" format="signed" display=""/>
<data type="int" name="MDL0_offset" len="4" format="signed" display=""/>
<data type="int" name="node_ID" len="4" format="signed" display=""/>
<data type="int" name="vtx_des1" len="4" format="signed" display=""/>
<data type="int" name="vtx_des2" len="4" format="signed" display=""/>
<data type="int" name="vtx_addons" len="4" format="signed" display=""/>
<data type="int" name="layout1" len="4" format="signed" display="" comment="vtx, nor, and clr"/>
<data type="int" name="layout2" len="4" format="signed" display="" comment="uv src"/>
<data type="int" name="shader_instr" len="4" format="signed" display=""/>
<data type="int" name="data_len" len="4" format="signed" display=""/>
<data type="int" name="data_len2" len="4" format="signed" display=""/>
<data type="int" name="data_offset" len="4" format="signed" display=""/>
<data type="int" name="layout3" len="4" format="signed" display="" comment="vtx src"/>
<data type="int" name="unk" len="4" format="signed" display=""/>
<data type="int" name="string_offset" len="4" format="signed" display=""/>
<data type="int" name="ID" len="4" format="signed" display=""/>
<data type="int" name="num_verts" len="4" format="signed" display=""/>
<data type="int" name="num_faces" len="4" format="signed" display=""/>
<data type="int" name="pos_inp" len="2" format="signed" display=""/>
<data type="int" name="nor_inp" len="2" format="signed" display=""/>
<data type="int" name="clr0_inp" len="2" format="signed" display=""/>
<data type="int" name="clr1_inp" len="2" format="signed" display=""/>
<data type="int" name="crd0_inp" len="2" format="signed" display=""/>
<data type="int" name="crd1_inp" len="2" format="signed" display=""/>
<data type="int" name="crd2_inp" len="2" format="signed" display=""/>
<data type="int" name="crd3_inp" len="2" format="signed" display=""/>
<data type="int" name="crd4_inp" len="2" format="signed" display=""/>
<data type="int" name="crd5_inp" len="2" format="signed" display=""/>
<data type="int" name="crd6_inp" len="2" format="signed" display=""/>
<data type="int" name="crd7_inp" len="2" format="signed" display=""/>
<data type="int" name="weights" len="4" format="signed" display=""/>
</struct>
<!--<jump offset="(header.MDL0_offset*-1) + header.data_offset +36" comment="" origin="start">
<for name="type" count="" stop_test="this.type == 0" type_name="" comment="">
<struct name="" type_name="" comment="" expr="{this.type}">
<data type="int" name="type" format="unsigned" len="1" display="hex"/>
<if test="type == 32" comment="">
<data type="none" name="pos_mtx" len="4"/>
</if>
<if test="type == 40" comment="">
<data type="none" name="nor_mtx" len="4"/>
</if>
<if test="type == 48" comment="">
<data type="none" name="tex_mtx" len="4"/>
</if>
<if test="type == 56" comment="">
<data type="none" name="lit_mtx" len="4"/>
</if>
<if test="type == 128" comment="">
<use_struct name="Quad" expr="" type_name="geometries" comment=""/>
</if>
<if test="type == 144" comment="">
<use_struct name="Tri" expr="" type_name="geometries" comment=""/>
</if>
<if test="type == 152" comment="">
<use_struct name="Tri_Strip" expr="" type_name="geometries" comment=""/>
</if>
<if test="type == 160" comment="">
<use_struct name="Tri_Fan" expr="" type_name="geometries" comment=""/>
</if>
<if test="type == 168" comment="">
<use_struct name="Line" expr="" type_name="geometries" comment=""/>
</if>
<if test="type == 176" comment="">
<use_struct name="Line_Strip" expr="" type_name="geometries" comment=""/>
</if>
<if test="type == 184" comment="">
<use_struct name="Point" expr="" type_name="geometries" comment=""/>
</if>
</struct>
</for>
</jump>-->
</define_struct>
<define_struct type_name="Textures" comment="" expr="">
<data type="int" name="textures" format="signed" len="4" display=""/>
<for name="texture" count="textures || textures - 1" stop_test="textures == 0" type_name="" comment="">
<struct name="texture" type_name="" comment="" expr="X: {this.X}, Y: {this.Y}">
<data type="int" name="X" format="unsigned" len="4" display=""/>
<data type="int" name="Y" format="unsigned" len="4" display=""/>
</struct>
</for>
</define_struct>
<define_struct type_name="Pallets" comment="" expr="">
<data type="int" name="pallets" format="signed" len="4" display=""/>
<for name="pallet" count="pallets || pallets - 1" stop_test="pallets == 0" type_name="" comment="">
<struct name="texture" type_name="" comment="" expr="X: {this.X}, Y: {this.Y}">
<data type="int" name="X" format="unsigned" len="4" display=""/>
<data type="int" name="Y" format="unsigned" len="4" display=""/>
</struct>
</for>
</define_struct>
<struct name="header" type_name="" comment="" expr="">
<data type="string" name="magic" len="4" format="ascii" display=""/>
<data type="int" name="filesize" format="unsigned" len="4" display=""/>
<data type="int" name="sections" format="unsigned" len="4" display=""/>
<data type="int" name="nodes" format="signed" len="4" display=""/>
<struct name="lists" type_name="" comment="" expr="">
<data type="int" name="Definitions" format="unsigned" len="4" display=""/>
<data type="int" name="Bones" format="unsigned" len="4" display=""/>
<data type="int" name="Vertices" format="unsigned" len="4" display=""/>
<data type="int" name="Normals" format="unsigned" len="4" display=""/>
<data type="int" name="Colors" format="unsigned" len="4" display=""/>
<data type="int" name="UV_Points" format="unsigned" len="4" display=""/>
<data type="int" name="Materials" format="unsigned" len="4" display=""/>
<data type="int" name="Shader_Config" format="unsigned" len="4" display=""/>
<data type="int" name="Objects" format="unsigned" len="4" display=""/>
<data type="int" name="Textures" format="unsigned" len="4" display=""/>
<data type="int" name="Pallets" format="unsigned" len="4" display=""/>
</struct>
<data type="int" name="name_offset" format="unsigned" len="4" display=""/>
<data type="int" name="header_len" format="unsigned" len="4" display=""/>
<data type="int" name="header_offset" format="signed" len="4" display=""/>
<data type="int" name="unk1" format="unsigned" len="4" display=""/>
<data type="int" name="unk2" format="unsigned" len="4" display=""/>
<data type="int" name="num_verticies" format="unsigned" len="4" display=""/>
<data type="int" name="num_faces" format="unsigned" len="4" display=""/>
<data type="int" name="unk3" format="unsigned" len="4" display=""/>
<data type="int" name="num_nodes" format="unsigned" len="4" display=""/>
<data type="int" name="version" format="unsigned" len="4" display=""/>
<data type="int" name="unk4" format="unsigned" len="2" display=""/>
<data type="int" name="unk5" format="unsigned" len="2" display=""/>
<struct name="bounds" type_name="" comment="" expr="">
<data type="int" name="min_X" format="unsigned" len="4" display=""/>
<data type="int" name="min_Y" format="unsigned" len="4" display=""/>
<data type="int" name="min_Z" format="unsigned" len="4" display=""/>
<data type="int" name="max_X" format="unsigned" len="4" display=""/>
<data type="int" name="max_Y" format="unsigned" len="4" display=""/>
<data type="int" name="max_Z" format="unsigned" len="4" display=""/>
</struct>
</struct>
<jump offset="header.nodes * -1" comment="" origin="start">
<struct name="nodes" type_name="" comment="" expr="">
<data type="int" name="num_nodes" format="signed" len="4" display=""/>
<for name="node" count="num_nodes || num_nodes - 1" stop_test="num_nodes == 0" type_name="" comment="">
<data type="int" name="node" format="signed" len="4" display=""/>
</for>
</struct>
</jump>
<if test="header.lists.Definitions == 0" comment="">
<jump offset="header.lists.Definitions" comment="" origin="start">
<struct name="Definitions" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Definitions" comment="" origin="start">
<use_struct name="Definitions" expr="" type_name="Definitions" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Definitions - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Bones != 0" comment="">
<jump offset="header.lists.Bones" comment="" origin="start">
<struct name="Bones" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Bones" comment="" origin="start">
<use_struct name="Bone_data" expr="" type_name="Bones" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Bones - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Vertices != 0" comment="">
<jump offset="header.lists.Vertices" comment="" origin="start">
<struct name="Vertices" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Vertices" comment="" origin="start">
<use_struct name="Vertices" expr="" type_name="Vertices" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Vertices - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Normals != 0" comment="">
<jump offset="header.lists.Normals" comment="" origin="start">
<struct name="Normals" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Normals" comment="" origin="start">
<use_struct name="Normals" expr="" type_name="Normals" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Normals - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Colors != 0" comment="">
<jump offset="header.lists.Colors" comment="" origin="start">
<struct name="Colors" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Colors" comment="" origin="start">
<use_struct name="Colors" expr="" type_name="Colors" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Colors - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.UV_Points != 0" comment="">
<jump offset="header.lists.UV_Points" comment="" origin="start">
<struct name="UV_Points" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.UV_Points" comment="" origin="start">
<use_struct name="UV_Points" expr="" type_name="UV_Points" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.UV_Points - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Materials != 0" comment="">
<jump offset="header.lists.Materials" comment="" origin="start">
<struct name="Materials" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Materials" comment="" origin="start">
<use_struct name="Materials" expr="" type_name="Materials" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Materials - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Shader_Config != 0" comment="">
<jump offset="header.lists.Shader_Config" comment="" origin="start">
<struct name="Shader_Config" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Shader_Config" comment="" origin="start">
<use_struct name="Shader_Config" expr="" type_name="Shader_Config" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Shader_Config - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Objects != 0" comment="">
<jump offset="header.lists.Objects" comment="" origin="start">
<struct name="Objects" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Objects" comment="" origin="start">
<use_struct name="Objects" expr="" type_name="Objects" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Objects - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>

there's a bit more yet...


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: DarkPikachu on January 16, 2011, 11:03:17 PM

here's the end:
Code:

<if test="header.lists.Textures != 0" comment="">
<jump offset="header.lists.Textures" comment="" origin="start">
<struct name="Textures" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Textures" comment="" origin="start">
<use_struct name="Textures" expr="" type_name="Textures" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Textures - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<if test="header.lists.Pallets != 0" comment="">
<jump offset="header.lists.Pallets" comment="" origin="start">
<struct name="Pallets" type_name="" comment="" expr="">
<use_struct name="relocation_group" expr="" type_name="relocation_group" comment=""/>
<for name="data" count="relocation_group.num_offsets || relocation_group.num_offsets - 1" stop_test="relocation_group.num_offsets == 0" type_name="" comment="">
<struct name="data" type_name="" comment="" expr="{this.offset_name.name}">
<use_struct name="relocation_offset" expr="" type_name="relocation_offset" comment=""/>
<jump offset="relocation_offset.data_offset + header.lists.Pallets" comment="" origin="start">
<use_struct name="Pallets" expr="" type_name="Pallets" comment=""/>
</jump>
<jump offset="relocation_offset.string_offset + header.lists.Pallets - 1" comment="" origin="start">
<use_struct name="offset_name" expr="" type_name="offset_name" comment=""/>
</jump>
</struct>
</for>
</struct>
</jump>
</if>
<data type="none" name="none"/>
</binary_file_format>


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: TheShyGuy on January 16, 2011, 11:04:06 PM
seems my mdl0 reft template has an error somewhere...can u give the updated cuz i cant even open mario or pikas mdl0 lol


alright... (next post)

btw, your matrices are off:

Brbx:
(1,0,5,0)(3,1,0,0)(0,0,1,0)(0,0,2,1)

1 3 0 0
0 1 0 0
5 0 1 2
0 0 0 1

btw, last row is always 0 0 0 1
? that how i did it lol... in columns..problems pile starting to grow lol
column1 = first (), 2nd column = 2nd ()...1st row = (this one,0,0,0)...2nd row = (0,this one,0,0) and theres no 4th row...the 4-6 row are for the inverse... Andi  didnt add a 4th digit cuz i couldnt edit it so i thought itd be useless


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: DarkPikachu on January 16, 2011, 11:20:32 PM
seems my mdl0 reft template has an error somewhere...can u give the updated cuz i cant even open mario or pikas mdl0 lol


alright... (next post)

btw, your matrices are off:

Brbx:
(1,0,5,0)(3,1,0,0)(0,0,1,0)(0,0,2,1)

1 3 0 0
0 1 0 0
5 0 1 2
0 0 0 1

btw, last row is always 0 0 0 1
? that how i did it lol... in columns..problems pile starting to grow lol
column1 = first (), 2nd column = 2nd ()...1st row = (this one,0,0,0)...2nd row = (0,this one,0,0) and theres no 4th row...the 4-6 row are for the inverse... Andi  didnt add a 4th digit cuz i couldnt edit it so i thought itd be useless

set it as a map in a var...
there's no defined W vector space, so 0 0 0 1 defines it as "just this"
so yea... it makes more sence that way :/

however,
the way you have it set now may actually prove to be better for editing purposes :/

also, I've added bones to Pachirisu using FW...
(I've fixed them in a hex editor as well)
they show up in Brbx just fine, but not in BTE... (not because I edited them)

I edited them to fix the strings...
their length was wrong...
1: positioned at the next string length
2: was a length of 5 instead of 9

btw, I was right >:3
FW add's to the relocation table, but somehow defines the data from the first bone...

here's the offsets:
00 22 00 00 00 11 00 13 | 00 00 C1 D4 00 00 14 68
00 22 00 00 00 11 00 13 | 00 00 C2 18 00 00 15 38
00 22 00 00 00 11 00 13 | 00 00 C2 28 00 00 16 08
00 22 00 00 00 11 00 13 | 00 00 C2 38 00 00 16 D8
00 22 00 00 00 11 00 13 | 00 00 C2 48 00 00 17 A8
00 22 00 00 00 11 00 13 | 00 00 C2 58 00 00 18 78
00 22 00 00 00 11 00 13 | 00 00 C2 68 00 00 19 48

^here we have 7 bones
the first is Tail4 (the end of the original list)
the rest are all ExtraBones...

however...
note, brbx deciphers the ExtraBones as index 0

but when I followed the offsets above,
they were actually indexes 19-24 (hex: 13-18)

EDIT:
oh and btw,
you'll notice I split the hex :/
before the split is still 4 16bit unks,
after the split is the string and data offsets :/


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: TheShyGuy on January 16, 2011, 11:25:14 PM
lmao...more...ill put the dl up when i fix these...

are you sure the extra bones dont show up right? as in you put the offset of the 2nd tree and when the topNoffset window showed, u checked off 'added bones'?


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: DarkPikachu on January 16, 2011, 11:30:13 PM
lmao...more...ill put the dl up when i fix these...

are you sure the extra bones dont show up right? as in you put the offset of the 2nd tree and when the topNoffset window showed, u checked off 'added bones'?

there's only 1 bone tree :/ (first bone offset: 1864)
and I did check off the added bones

but they're not showing up at all...

EDIT:
and the TopN window shows up right after selecting the file :/


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: DarkPikachu on January 16, 2011, 11:37:49 PM

also...
a little off-topic Q reguarding my converter:

how would I use these:

                    parent = l(fr.read(4))/208
                    First_child = ui(fr.read(4))/208
                    Next_child = ui(fr.read(4))/208
                    Prev_child = l(fr.read(4))/208
                    part2 = ui(fr.read(4))

to get me an X position from 0??


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: TheShyGuy on January 16, 2011, 11:38:10 PM
wuts wrong with the window opening after choosing the file lol...(besides the auto thing)

and the fw bone adder creates a 2nd tree..eg. mario (nothing added) topN = 9136..added = 281116...the first 1 still exists, but the bb treeview isnt even affected by the 1st one anymore, just the 2nd.. like i said before look for 00 00 00 d0 after the last bone of the first tree to get the 2nd


also...
a little off-topic Q reguarding my converter:

how would I use these:

                    parent = l(fr.read(4))/208
                    First_child = ui(fr.read(4))/208
                    Next_child = ui(fr.read(4))/208
                    Prev_child = l(fr.read(4))/208
                    part2 = ui(fr.read(4))

to get me an X position from 0??

uhh either do..X++ when theres a child. Or use the path eg. find the throwN -> path = TopN\\TransN\\XRot\\YRot\\HipN\\ThrowN so for each \\*bone\\ you add onto X..so the ex would = 6( or 5 if top = 0)


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: DarkPikachu on January 16, 2011, 11:41:08 PM
wuts wrong with the window opening after choosing the file lol...(besides the auto thing)

and the fw bone adder creates a 2nd tree..eg. mario (nothing added) topN = 9136..added = 281116...the first 1 still exists, but the bb treeview isnt even affected by the 1st one anymore, just the 2nd.. like i said before look for 00 00 00 d0 after the last bone of the first tree to get the 2nd

hmm...
KK I'll check that...

EDIT:
hmm, so they do have their own data's...
and yea, everything's screwed up...
the group offset is around the center of the file O.o
it should be close to the beginning

EDIT2:
hmm...
the MDL0 is like copied or something...
the bones list offset has been changed to the end of the file where the new list has been written...
wow...

I'ma have to look into this :/


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: TheShyGuy on January 16, 2011, 11:53:55 PM
hmm if they have their own datas,then why does editing one (in bb) affect the others? i can see why mine would cuz i just search for the name of the bone (or was it the index..cnt remember lol...dun feel like checking either)for the data, but not bb's..


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: DarkPikachu on January 16, 2011, 11:59:09 PM
hmm if they have their own datas,then why does editing one (in bb) affect the others? i can see why mine would cuz i just search for the name of the bone (or was it the index..cnt remember lol...dun feel like checking either)for the data, but not bb's..

I'm looking into it :/
I wanna see just how much FW screwed up the MDL0 :/

you know...
I'm using my template and highlighting the data to figure this out...

I've already highlighted the first and last bones...
and there's alot more data after the bones...

it's looks like there's definitions and crap as well...
what surprises me is the verts are still in the same position using the old string data...

this is so messed up D:

you know...
you should just say screw FW...

I'd suggest making your own adding method...
or you know...
maybe I will...

FW screws EVERYTHING up...
this file's so confusing my head's about to explode DX...

I can see why he kept the old data though :/
the mdl0 offsets of the rest of the file... and the data that wasn't messed with...


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: TheShyGuy on January 17, 2011, 12:15:23 AM
I can make an  attempt at a bone adder if your too very busy with alot of things .  Ill prob start fixing up the bte tomoro cuz its past midnight and i dun feel like it lol.

edit...still getn that error lol


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: DarkPikachu on January 17, 2011, 08:02:05 AM
actually, I've managed to get it saved (you get a popup 'Saved' with a button 'OK')

it took me a number of tries before I actually got it...
but I got it  :af2:

I'm redoing Pachi's entire MDL0 right now
FW messed it up, but I figured out what he did
he makes a copy of the entire MDL0 from the bone group header in the relocation table,
to the end of the mdl0,
that copy gets pasted at the end of the mdl0...

now,
since all the data in that block is useless,
he redirects the bone group offset to the original file end and edits the grouplist...
yes, each bone does have it's own data (they're not fake)  :af:
YAY!!! I was right on my assumption a long time ago :3

so anyways,
he copy's the last offset from the group (in the new block)
and adds it to the group (changing the offset count and block size)
he then edits the bone offsets and string offsets by adding the number of added bones * 16 to each offset
for the added bones, 'D0' gets added to the new offset ('D0' + last bone offset)

it's kinda the same for the bones (the last one gets copied and pasted at the end)

note: almost all the strings get changed in the new string table...

EDIT: BTW... MY SITE'S UP!!! :happy:
however, I expect it to cut at times :/


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: DarkPikachu on January 17, 2011, 08:15:08 AM
if you're wondering what I'm doing to the MDL0,
here's the steps I'm taking:

1: replace the old bone group
2: edit the group offsets in the MDL0 header from the bone group (don't change any 0's)
3: replace the old bone data's
4: replace the old string table
5: edit any and all main data and string offsets (there's quite alot)
6: (as an extra precautionary) edit the mdl0 offsets

EDIT:
why am I redoing the mdl0??
I tested it on brawl... it froze just after selecting the stage.


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: DarkPikachu on January 17, 2011, 09:14:19 AM
I can make an  attempt at a bone adder if your too very busy with alot of things .  Ill prob start fixing up the bte tomoro cuz its past midnight and i dun feel like it lol.

edit...still getn that error lol

KK, I guess...

yea...
I wanna try so freakin bad,
but *noticing my project list* I got those to hold me back... DX

also, changing all the offsets isn't as hard as I thought it would be :/

yes you do have to redo the entire relocation table, which is a pain... -_-
but really, there's not alot to deal with as far as changing them goes... :/

lol I was up until 5am working on figuring it out XD


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: DarkPikachu on January 18, 2011, 12:54:03 PM
hey TSG :/
I might just make a bone adder of my own...

it'll work the exact same as FW,
but deals with the data in a more apropriate matter :)


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: Oshtoby on January 18, 2011, 01:11:36 PM
I do not believe this is ever going to come out, and it's going to go the way of Sonic X-Treme. This makes me sad.

Please, prove me wrong.


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: DarkPikachu on January 18, 2011, 02:18:40 PM
I do not believe this is ever going to come out, and it's going to go the way of Sonic X-Treme. This makes me sad.

Please, prove me wrong.

there's a beta release already...
how do you think I got Pachi edited :/


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: TheShyGuy on January 18, 2011, 02:25:01 PM
I do not believe this is ever going to come out, and it's going to go the way of Sonic X-Treme. This makes me sad.

Please, prove me wrong.

? are you talking about the bone tree editor? i released v1 yesterday...but there was a problem, which i think i fixed but need to check again. And sorry for it taking so long..Was actually finished a few weeks ago, but never really added the final things/touches...lol =p

edit: yeh i thnk i fixed it. Now i just gotta figure out the reloc table to get the topN...and if you want it to load the extra bones...i guess ill put something so you can change the topN yourself afterwards.  And then finally auto load...gimmie like 30 mins n ill try n get it done


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: DarkPikachu on January 18, 2011, 03:23:44 PM
I do not believe this is ever going to come out, and it's going to go the way of Sonic X-Treme. This makes me sad.

Please, prove me wrong.

? are you talking about the bone tree editor? i released v1 yesterday...but there was a problem, which i think i fixed but need to check again. And sorry for it taking so long..Was actually finished a few weeks ago, but never really added the final things/touches...lol =p

edit: yeh i thnk i fixed it. Now i just gotta figure out the reloc table to get the topN...and if you want it to load the extra bones...i guess ill put something so you can change the topN yourself afterwards.  And then finally auto load...gimmie like 30 mins n ill try n get it done

0000 0000 0000 0000 00000000 00000000

0000 unk
0000 zero
0000 unk
0000 unk
00000000 string offset
00000000 data offset

^my template can tell you that... :P

and the extrabones will be loaded automatically...
but they're messed up...

look at the strings for the extrabones using my template ;)


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: TheShyGuy on January 18, 2011, 03:33:05 PM
lol i figured out how to auto find the topn...but not the extras but ill take a look


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: DarkPikachu on January 18, 2011, 03:37:56 PM
lol i figured out how to auto find the topn...but not the extras but ill take a look

my template offsets to the extras...
I keep telling you...
use that... :/

switch to edit mode (allow editing) and edit a data to figure out how to get to that place


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: TheShyGuy on January 18, 2011, 04:11:26 PM
lol i knew that...when i said i didnt know the extras i meant that i didnt look at it enough/thata much( i saw that it already offsets)....sorry lol

and i fixed a minor bug with loading twice...sooo

save - fixed
auto load - fixed
load extra automatically- doing...
loading bug - fixed

feedback is good lol...this is making it more efficient =p thnx


Title: Re: Bone Tree Editor- development thread : Version 1 released
Post by: DarkPikachu on January 18, 2011, 04:52:35 PM
lol i knew that...when i said i didnt know the extras i meant that i didnt look at it enough/thata much( i saw that it already offsets)....sorry lol

and i fixed a minor bug with loading twice...sooo

save - fixed
auto load - fixed
load extra automatically- doing...
loading bug - fixed

feedback is good lol...this is making it more efficient =p thnx

lol KK :P

and I will always provide feedback, if not new ideas :D

after I finish Pachi, I'ma start on my bone adder...
^(shouldn't be hard) :D

it'll actually do everything right ;)

also note:
FW Pachi: 98kb
my Pachi: 51kb
^both have the same number of bones

the size is set... I just need to edit the offsets ;)


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 18, 2011, 04:54:12 PM
done..just gnna update op


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: BlackJax96 on January 18, 2011, 04:58:32 PM
it still won't save D: I don't see why...


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 18, 2011, 05:01:47 PM
it still won't save D: I don't see why...

you are using the new one right??
he just now added the link


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: BlackJax96 on January 18, 2011, 05:04:57 PM
Yeah... it still won't save.


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: Fliptocat on January 18, 2011, 05:05:18 PM
I get an error as well. It said the index was out of range..... Oh, and does this not work for model imports? Because around half of the bones weren't visible. :/
I just downloaded the new version, so I don't think it's the old one.....


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 18, 2011, 05:06:06 PM
really?!?!? erg 1 sec


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 18, 2011, 05:07:19 PM
I get an error as well. It said the index was out of range..... Oh, and does this not work for model imports? Because around half of the bones weren't visible. :/
I just downloaded the new version, so I don't think it's the old one.....


is the import header-fixed??
I got Pachi to work just fine :/

I'll post an image of the bone tree :/


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: Fliptocat on January 18, 2011, 05:12:03 PM
^He works just fine in everything else...... The bones that aren't visible aren't important though..... They're just his cape and Hakama bones...... Maybe he has too many bones? He has 130 or so. :/


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 18, 2011, 05:19:03 PM
>.> can u gimmie the model flipticoat? ill take  look at it to see if its your model or my exe...as for the saving prob i found it...looking for a fix


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 18, 2011, 05:22:40 PM
as for the saving prob i found it...looking for a fix

lol,
can I get any info as to what it is?? *curious*


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: Fliptocat on January 18, 2011, 05:31:14 PM
Here you go: http://www.mediafire.com/?3g744lzzwoflqea


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 18, 2011, 05:38:58 PM
@tcll...it seems theres a prob with my recursive method that goes through each node....still looking for the main prob, it works the first time...tryn to figure out why it doesnt the next time.  Doesnt always happen tho. and also to get the topN offset, i got the offset at 0x20(4) + CurrentPos-> 0x36(4)...there was one model this didnt worked...didnt look at it tho..

@flipticoat i prob dun have to look at it since i just found another mdl0 with the same prob...

ugh with these bugs lol

edit:....actually the prob is in the dnd code...the part that i did soo much redoing on >.> hated this part


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 18, 2011, 06:03:36 PM
@tcll...it seems theres a prob with my recursive method that goes through each node....still looking for the main prob, it works the first time...tryn to figure out why it doesnt the next time.  Doesnt always happen tho. and also to get the topN offset, i got the offset at 0x20(4) + CurrentPos-> 0x36(4)...there was one model this didnt worked...didnt look at it tho..

bad move ma man... :/
never use 'current position' for absolute file positioning
always seek from 'start of file'

data_offset + Bone_group_offset = bone position

in my template:
relocation_offset.data_offset + header.lists.Bones


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 18, 2011, 06:09:13 PM
sorry i meant theyre all from the begining... when i said current i meant the number that 0x20(4)(beginning) equaled...soo 0x20(4) = (<-value)current...then you go to 'current' and do 0x36(4)...sorry for that lol


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 18, 2011, 06:15:00 PM
sorry i meant theyre all from the begining... when i said current i meant the number that 0x20(4)(beginning) equaled...soo 0x20(4) = (<-value)current...then you go to 'current' and do 0x36(4)...sorry for that lol


I'm confused O.o
0x20 and 0x36 are what now??

I was thinking you ment from the mdl0 header :/
now I'm not sure what you mean...


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 18, 2011, 06:21:23 PM
0x20(int) (from the beginning)-> bone reloc table offset.  0x36(from beginning of reloc. table) = topN bone offset.  Add the start of the reloc. offset and the topNbone offset = Actual TopNbone offset from the beginning...is that less confusing lol?


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 18, 2011, 06:32:23 PM
I think you're viewing the data a little wrong :/

here's an example group:
00 00 00 48 00 00 00 03
FF FF 00 00 00 02 00 00 00 00 00 00 00 00 00 00
00 96 00 00 00 03 00 01 00 01 81 EC 00 00 78 38
00 9E 00 00 00 01 00 02 00 01 82 1C 00 00 9D 58
00 8E 00 00 00 00 00 03 00 01 82 04 00 00 9F 58


now, look at the group like this:

00 00 00 48 - block size
00 00 00 03 - num offsets

FF FF
00 00
00 02
00 00  
00 00 00 00
00 00 00 00
^blank offset (usage unknown)

00 96
00 00
00 03
00 01
00 01 81 EC
00 00 78 38

00 9E
00 00
00 01
00 02
00 01 82 1C
00 00 9D 58

00 8E
00 00
00 00
00 03
00 01 82 04
00 00 9F 58

EDIT:
I know my template displays the data a little differently on that part...
that's just something I'll have to look into fixing :/


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 18, 2011, 06:45:58 PM
ill get to that...main focus is this(blackjax prob)part of code....did i mention this is the code that i had the most trouble with >.> buut i mightve figured out a way....


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: Lord_of_D: on January 18, 2011, 07:53:12 PM
so...this is like a more cool version of brawl box?


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 18, 2011, 08:06:18 PM
so...this is like a more cool version of brawl box?
umm... not really...
it just and only edits the bone tree...

brbx is like the Windows Explorer of brawl files XD


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 18, 2011, 08:29:14 PM
i hate this prob...i think i found the reason for black jax prob...and a few others but thats for a diff version(involves the '>.>' code lol....) black jax's prob has to do with an obv error i accidently put...but i ran into another one..........sooooooooo >.>.....atleast it sumwhat works.....ima get to that prob with reading the mdl0 then get back to w/e lol ....

edit: flips prob was with the string...fixing...
^i see....i have string lists that split with "_" and his bone names were filled with it lol..fixed that...and there was no prob with reading the mdl0...soo now its back to blackjax lol

ok i think i figured out this one prob..but the bte takes up some time to fix em up. So i might not finish this for a few days...depends
black jaxs prob = fixed?..havent had any saving problems yet...

.....who knew a treeview would be so complicated >.>


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 19, 2011, 10:52:17 AM
i hate this prob...i think i found the reason for black jax prob...and a few others but thats for a diff version(involves the '>.>' code lol....) black jax's prob has to do with an obv error i accidently put...but i ran into another one..........sooooooooo >.>.....atleast it sumwhat works.....ima get to that prob with reading the mdl0 then get back to w/e lol ....

edit: flips prob was with the string...fixing...
^i see....i have string lists that split with "_" and his bone names were filled with it lol..fixed that...and there was no prob with reading the mdl0...soo now its back to blackjax lol

ok i think i figured out this one prob..but the bte takes up some time to fix em up. So i might not finish this for a few days...depends
black jaxs prob = fixed?..havent had any saving problems yet...

.....who knew a treeview would be so complicated >.>

I've had 1 saving prob...
but it deals with another prob that caused it :/
sry I forgot to mention this earlier -_-

anyways,
I havn't had any probs when 'Is Child' is checked,
but when it's not checked and I move a bone to a higher place in the tree,
(closer to the first bone), it likes to duplucate the bone I drag, and it's children...

and it would've been nice to insert the extrabones before the first bone ('Pachirisu')

but yea...
just some feedback for ya


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: BlackJax96 on January 19, 2011, 04:14:42 PM
Download my Nel hack and see if you can save any changes... (That's the model I'm trying to edit)


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 19, 2011, 04:28:35 PM
yeh ur gnna get saving issues for this one thing that i messed up in the code....and i can make the '>.>' very simple and prob more bug proof, but it wont be as easy to move to get to the spot you want.... ill make a another update later on...dun even wnna look at that code lol...


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 19, 2011, 05:15:24 PM
yeh ur gnna get saving issues for this one thing that i messed up in the code....and i can make the '>.>' very simple and prob more bug proof, but it wont be as easy to move to get to the spot you want.... ill make a another update later on...dun even wnna look at that code lol...

BJ may be able to help you on his prob...

I think you should send him your src :/


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 19, 2011, 07:28:57 PM
well, I've tried loading Pachi in Brbx after finishing the reloc table,
I got an error... -_-*

turns out Brbx reads from the string offset in the data... (not from the relocation table)
so I've added a 2nd name-check for the data portion in my template...
it's only on bones right now though...

but it uses: (MDL0_offset * -1) + string_offset

^note: this is in the bone data...
it has nothing to do with the relocation table

so yea...
you can see I'm trying to add as many error checks and stuff as possible...
if you recieve an error in any mdl0, it's not because of my template >:3
(my template is being designed to meet brawl's exact format specs)


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 19, 2011, 07:37:08 PM
lol knew that about the bones(not the reloc tho)...and i saw ur post on smashboards and the actual tree view code is simple to understand. Each bone has a key/name..when your done(i do during) moving it does recursion to get the current tree node positions.


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 19, 2011, 08:04:18 PM
lol knew that about the bones(not the reloc tho)...and i saw ur post on smashboards and the actual tree view code is simple to understand. Each bone has a key/name..when your done(i do during) moving it does recursion to get the current tree node positions.

I've never used the string offsets from the data :/
^(they're not always accurate)

eg:
Origin had a string offset of 'HipN'
and HipN had a string offset of 'Origin'

I'm finally putting a use to those values now :/

note: the template you have utilizes the reloc strings...
it don't have support for the data strings yet :/

EDIT:
another thing I think I'll work on before my next release is the 0 offset...
'FFFF 0000 #### #### 00000000 00000000'
^it does make use of something, but I'm not sure what yet... P:

it'd be nice if the experts would help me figure this out :/
oh well...
once my thread builds up with tonza Q's and me figuring them out (in a great while)
they'll be the ones looking selfish and un-helpful... >_>
(unless they turn it around)


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 20, 2011, 03:13:32 PM
hmm...
I may have to hold off on my bone adder after all...

why:
materials
they have so many sub-offsets it's not funny D:
each sub-offset has at least 1 or 2 offsets that need to be fixed...

well, I've got alot of offsets to test before I can oven start working on my adder :/
(I'ma have to map them in a text editor to figure out how much to add)


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 20, 2011, 06:22:23 PM
hey TSG...
I think I know the error that BJ's getting...

'index out of range'

I think it might have to do with the bone indexes
I had a small amount of bones (why I didn't get the error)
now I'm using a large amount and getting the error

anyways...
just some feedback for ya ;)


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 20, 2011, 06:53:59 PM
lol i know why he gets the errors, it was a simple mistake in the code. there are still other errors i found, but ima take a break from it for a few days...And the number of bones will never cause a prob...



Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 21, 2011, 01:05:12 PM
hey...
here's some notes I made that should be pretty accurate (if not entirely)

it's notes for the MDL0 offset map (what values to change to what)
this may prove helpful for when you add the bone-add option to your prog ;)

Quote
addition1 = multiplier * 16 #total added offsets
addition2 = multiplier * 208 #total added bones

"""if offsets != 0:
if(before_bone , after_bone) #used for the following if() statments

offset types:
--reloc--:
    --data--:

Definits: (add the following)
df group: none
df strings: addition1 + addition2
df offsets: if(addition1 , addition1+addition2)
    df mdl0 offset: if(addition1 , addition1+addition2)
    df string offset: if(addition2 , none)

Bones:
bn group: none
bn strings: will get to
bn offsets: will get to
    bn mdl0 offset: will get to
    bn string offset: will get to

Verts:
vt group: addition1
vt strings: addition1 + addition2
vt offsets: if(addition1 , addition1+addition2)
    vt mdl0 offset: if(addition1 , addition1+addition2)
    vt string offset: if(addition2 , none)

Normals:
nr group: addition1
nr strings: addition1 + addition2
nr offsets: if(addition1 , addition1+addition2)
    nr mdl0 offset: if(addition1 , addition1+addition2)
    nr string offset: if(addition2 , none)

Colors:
cl group: addition1
cl strings: addition1 + addition2
cl offsets: if(addition1 , addition1+addition2)
    cl mdl0 offset: if(addition1 , addition1+addition2)
    cl string offset: if(addition2 , none)

UV's
uv group: addition1
uv strings: addition1 + addition2
uv offsets: if(addition1 , addition1+addition2)
    uv mdl0 offset: if(addition1 , addition1+addition2)
    uv string offset: if(addition2 , none)

Materials:
mt group: addition1
mt strings: addition1 + addition2
mt offsets: if(addition1 , addition1+addition2)
    mt mdl0 offset: if(addition1 , addition1+addition2)
    mt string offset: if(addition2 , none)

Configs: (shader definitions)
cf group: addition1
cf strings: addition1 + addition2
cf offsets: if(addition1 , addition1+addition2)
    cf mdl0 offset: if(addition1 , addition1+addition2)
    cf string offset: if(addition2 , none)

Objects:
ob group: addition1
ob strings: addition1 + addition2
ob offsets: if(addition1 , addition1+addition2)
    ob mdl0 offset: if(addition1 , addition1+addition2)
    ob string offset: if(addition2 , none)

Textures:
tx group: addition1
tx strings: addition1 + addition2
tx offsets: if(addition1 , addition1+addition2)
    tx mdl0 offset: if(addition1 , addition1+addition2)
    tx string offset: if(addition2 , none)

Pallets:
pl group: addition1
pl strings: addition1 + addition2
pl offsets: if(addition1 , addition1+addition2)
    pl mdl0 offset: if(addition1 , addition1+addition2)
    pl string offset: if(addition2 , none)
"""

 I hope everything works out for ya ;)

note: the multiplier is how many bones are added...


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 21, 2011, 09:31:00 PM
so basically if it says addition 1 -> i add that value to the offset. If its 2 then add that to the offset....and both = add both values? Just making sure, about to try it out


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 21, 2011, 10:33:46 PM
so basically if it says addition 1 -> i add that value to the offset. If its 2 then add that to the offset....and both = add both values? Just making sure, about to try it out


multiplier = 5 bones added

addition1 = 5 * 16
addition2 = 5 * 208

just be careful...
depending on certain offset positions by the bone offsets (1st to (last+208))


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 21, 2011, 10:42:36 PM
few more questions...

dunno xml sooo how does:

df offsets: if(addition1 , addition1+addition2)
 work?

and i understand the other stuff like ->

string(reloc table string offset)
offset(reloc table data offset)
mdl0 string -> obv...
mdl0 offset -> obv...

um o yea and this...

if(before_bone , after_bone) #used for the following if() statments

and the group thing...lol

srry...dun get xml lol


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 21, 2011, 10:56:37 PM
first off...
I don't understand what you mean by XML...

this has nothing to do with xml :/

if you're talkng about my template,
I told you to use hexedit and edit the data's (to see the equations)

anyways...
the data offsets offset to:
if before first_bone offset: addition1
if after last_bone offset: addition1 + addition2
^since addition1 is the total bytes of the added bone offsets (to offset by)
and addition2 is the tot bytes off all the added bones.


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 21, 2011, 10:58:54 PM
srry when i said xml, i was talking about the way u set up the ifs lol

and ur reply helps,thnx

edit: got most of the defs,bones,verts etc(lists) stuff done, only a few probs in my code....prob get to adding tomoro(1/22)

...noticed sum patterns in the template which REALLY helped me out...thnx lol

edit2:
=p got it reading the 11 (lists) right(didnt add the small things like bone rot,scale etc..mainly offsets and strings)..just need to clean up the code then get to adding


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: vontower on January 22, 2011, 08:12:41 AM
i don't mean to rush or anything, but i've been following along on this thread.

Any idea when the next version will come out? or at least a patched version?
I'm getting the same error, "Index out of range" or whatever.


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 22, 2011, 01:14:19 PM
prob within a week...gnna try and release it with (if) i can add a real bone...


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 22, 2011, 01:23:06 PM
hey...
I'm having a bit of trouble thinking up a bone-remapping code :/

whada you have in mind??
I'd like to compair it to mine :/


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 22, 2011, 01:36:27 PM
Code:
addition1 = multiplier * 16 #total added offsets
addition2 = multiplier * 208 #total added bones
addition3 = multiplier *  (bone_name_lens + 2)
Bones:
if before added bone:

bn group: none -> if thats the file offset then ->same->num_nodes += multiplier
bn strings: add 1 + add 2
bn offsets: add 1
    bn mdl0 offset: add 1
    bn string offset: add 1 + add 2

if after added bone:

bn group: none -> if thats the file offset then ->same->num_nodes += multiplier
bn strings: add 1 + add 2 + add 3
bn offsets: add 1 + add 2
    bn mdl0 offset: add 1 + add 2
    bn string offset: add 1 + add 2 + add 3

uhh just realized added bones would go after all the current bones..so just look at the if before added bone

edit: hmm no i dun think i did...


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 22, 2011, 01:43:54 PM
hmm...
for the idea I was suggesting,
I was gonna say add the bone after the selected node...

but adding it to theend of the list would be easier in your case,
then moving the added bone to it's desired position...

keep in mind, you'll have to edit the string offset and mdl0 offset (in the data)

thanx :)


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 22, 2011, 07:13:00 PM
hey tcll, i think i know why you got an error...heres a part of my code so far

Code:
i = list index  0 = definitions, 1= bones

                        if (i > 1 && i < 9)
                        {

                            // after bones

                            file_offset += add_1;

                            rg_lens_offset = file_offset;
                            rg_num_offsets_offset = file_offset + 4;

                            rg_string_offset += add_1 + add_2;
                            rg_data_offset += add_1 + add_2;

                            mdl0_offset += add_1 + add_2;
                            string_offset += add_1 + add_2;

                            //bw write data
                        }
                        else if (i == 1)
                        {
                           
                           // file_offset += add_1; same

                            rg_lens_offset = file_offset;
                            rg_num_offsets_offset = file_offset + 4;

                            rg_string_offset += add_1 + add_2;
                            rg_data_offset += add_1;

                            mdl0_offset += add_1;
                            string_offset += add_1 + add_2;

                            //bw write data
                       
                        }
                        else if (i == 0)//before added data
                        {
                           
                          //  file_offset += add_1; SAME

                           // rg_lens_offset = file_offset; same
                           
                          //  rg_num_offsets_offset = file_offset + 4; SAME

                            rg_string_offset += add_1 + add_2;
                            rg_data_offset += add_1;

                            mdl0_offset += add_1;
                            string_offset += add_1 + add_2;

                            //bw write data
                       
                        }
                        else if (i >= 9)
                        {

                            file_offset += add_1;

                            rg_lens_offset = file_offset;

                            rg_num_offsets_offset = file_offset + 4;

                            rg_string_offset += add_1 + add_2;
                            rg_data_offset += add_1 + add_2;

                          //mdl0_offset += add_1 + add_2;NONE
                          //string_offset += add_1 + add_2;NONE
                        }

Im still working on the code. Not sure if you did before, but you also gotta edit the bone reloc group lens, and number of offset...i also didnt add the extra string


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 22, 2011, 09:50:44 PM
hey tcll, i think i know why you got an error...heres a part of my code so far

Im still working on the code. Not sure if you did before, but you also gotta edit the bone reloc group lens, and number of offset...i also didnt add the extra string

lol...
I never said anything about an error =P
I was at a party, and needed a 2nd brain XD

anyways...
thanx :)

and yea...
I forgot to mention that... =P

block_size += addition1
num_offsets += multiplier


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: BlueBrain on January 24, 2011, 09:28:18 AM
will u sumtime be able to add a useful bone?
i mean that it affects the model instead of (http://i0.kym-cdn.com/photos/images/newsfeed/000/143/193/cad-20080602-358b1.jpg?1309710446) bones only usefull for ports and psa...


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 24, 2011, 01:04:15 PM
will u sumtime be able to add a useful bone?
i mean that it affects the model instead of ([url]http://i0.kym-cdn.com/photos/images/newsfeed/000/143/193/cad-20080602-358b1.jpg?1309710446[/url]) bones only usefull for ports and psa...

you'll have to define a vertex group (VGroup) to be able to do that...
^you'll need 3DS or blender


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: vontower on January 24, 2011, 05:31:07 PM
itll be useful for graphic effects and such though


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 24, 2011, 11:21:13 PM
hey tcll is there anything else im forgetting to change?...i got almost everything done except writing the actual bone data( i did it manually)...but bb and the template doesnt read it right.  Im not entire sure what im forgetting to change.

i changed the:

each file reloc group offsets(the lists)
file name offset

bone reloc group file offset
bone reloc group lens
bone reloc group num offsets

each reloc group data offset
each reloc group string offset

each data mdl0 offset
each data string offset


....your tmplate reads the name of the extra bone right and the data... but it has errors unlike the other ones with a good mdl0.  and bb doesnt even load the tree....just the mdl0 node. Soo you know what i might have forgotten to change?


edit:

heres the ones that i usually dont get:

Code:
the " count" attribute expression of the "for"tag must yield a + ve integer result

the jump address is past the end of the file

the jump address is before the start of the file

unexpected EOF

obv the jump addresses are prob my fault...eh w/e lol ill look at my code again tomoro...


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 25, 2011, 12:51:13 PM
hey tcll is there anything else im forgetting to change?...i got almost everything done except writing the actual bone data( i did it manually)...but bb and the template doesnt read it right.  Im not entire sure what im forgetting to change.

i changed the:

each file reloc group offsets(the lists)
file name offset

bone reloc group file offset
bone reloc group lens
bone reloc group num offsets

each reloc group data offset
each reloc group string offset

each data mdl0 offset
each data string offset


....your tmplate reads the name of the extra bone right and the data... but it has errors unlike the other ones with a good mdl0.  and bb doesnt even load the tree....just the mdl0 node. Soo you know what i might have forgotten to change?


edit:

heres the ones that i usually dont get:

Code:
the " count" attribute expression of the "for"tag must yield a + ve integer result

the jump address is past the end of the file

the jump address is before the start of the file

unexpected EOF

obv the jump addresses are prob my fault...eh w/e lol ill look at my code again tomoro...

hmm...
could you send me one of your edits?? :/

I could better tell you what's wrong by that...

EDIT:
btw, I' cancelling my bone adder idea, since you're working on that...
nobody will use mine once I release it... =P


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 25, 2011, 08:01:55 PM
http://www.mediafire.com/?3ue53jy0bchh81g

there...srry it took a while..fixed all the errors above.  Only one now is that brawlbox doesnt load the tree at all ( no errors when opening tho...)

edit 2:

i used the bb source...and found that it has to do with 'textures1' entry nodes...tryn to find where i messed up....other than that i think(since its the last treenode to actually make...) everything else if fine...My code for textures1 is just the rg string += add_2, rg_data += add_2... im prob missing an offset cuz it reads -10 bytes before it should......

..your template reads it fine btw...then again it doesnt read textures either

edit3:...mightve found the prob lol

edit4: WIIIN got it working and loaded right....fix was that texture1 data came right after the reloc table...lol so basically it doesnt get touched...bone shows up in bb too

....model viewer is messed up...>.> shows an X


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 26, 2011, 01:11:55 PM
[url]http://www.mediafire.com/?3ue53jy0bchh81g[/url]

there...srry it took a while..fixed all the errors above.  Only one now is that brawlbox doesnt load the tree at all ( no errors when opening tho...)

edit 2:

i used the bb source...and found that it has to do with 'textures1' entry nodes...tryn to find where i messed up....other than that i think(since its the last treenode to actually make...) everything else if fine...My code for textures1 is just the rg string += add_2, rg_data += add_2... im prob missing an offset cuz it reads -10 bytes before it should......

..your template reads it fine btw...then again it doesnt read textures either

edit3:...mightve found the prob lol

edit4: WIIIN got it working and loaded right....fix was that texture1 data came right after the reloc table...lol so basically it doesnt get touched...bone shows up in bb too

....model viewer is messed up...>.> shows an X

well, glad to see you figured it out :P
I'd just DL'd it and was about to test it XDD

keep in mind though...
everything in the data teble may not be organized accordingly...

everything's basically thrown on top of each other and then mapped to...
keep that in mind before you think textures are always before bones ;)


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 26, 2011, 07:20:36 PM
k...thought of a better idea lol...instead of just doing the addition stuff depending on wut i thought the order was...ima just do it by the data offset or w/e....


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 26, 2011, 08:50:38 PM
k...thought of a better idea lol...instead of just doing the addition stuff depending on wut i thought the order was...ima just do it by the data offset or w/e....

exactly :)

if data offsets to before bone, add this nuber to the offset
else, add this nuber (different number) to the offset


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 26, 2011, 09:18:15 PM
offset = BinaryWriter position
i_tmp = i_tmp value(read 4)

            if (i_tmp > lastBone_Mdl0_offset)
                i_tmp += add_2;

            if (offset > lastBone_rg_offset)
                i_tmp += add_1;

no need for 'if!' cuz itd be 0 anyways lol...gnna test this code after i fix sum other ones around it

edit:

ill prob finish this within this week


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 27, 2011, 11:35:28 AM
offset = BinaryWriter position
i_tmp = i_tmp value(read 4)

            if (i_tmp > lastBone_Mdl0_offset)
                i_tmp += add_2;

            if (offset > lastBone_rg_offset)
                i_tmp += add_1;

no need for 'if!' cuz itd be 0 anyways lol...gnna test this code after i fix sum other ones around it

edit:

ill prob finish this within this week

not sure how you have it set up :/
but in my case, it's never just add2 alone


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 27, 2011, 11:55:34 AM
? it wouldnt always add add_2 alone...if the current writer position is greater than the added data,add_2is added. If its after the relocation data, then it added 16.....it can be both.  Mdl0 offsets are changed depending on the bw positon, not on anything like add_1/add_2 cuz its easier and more error proof(shaders or sumtin share data), same for string(but a lil diff).  The only thing i actually need to change without really needing the current positon is the rg offsets.

ex. when add_2 is alone...when its doing the relocation group(after the bone list rg) offsets and its changing the string and data offsets. -> relocation group offset is already +16, so the offsets is added only add_2.



Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 28, 2011, 05:16:30 PM
hey TSG...
I'm still kinda lost on this...

would you happen to know a way to get values like these:
(https://jump.matthewevan.xyz/i2p/pxbcwxbhxj2wusliwhrb6ym4vcwpihztuf2tfjejrcdzqrmnjuoa.b32/_/bdcee4bec73dd0bf5ac8cad4616aacb2752909c2787df21c4542a9f7753f070a)
^notice the X,Y grid positioning

I'm working on objects in my converter,
and kinda can't concentrate on bones :P

could you help me out here??

these are the vars I need to do math on to get the right numbers:
                    parent = l(fr.read(4))/208
                    First_child = ui(fr.read(4))/208
                    Next_child = ui(fr.read(4))/208
                    Prev_child = l(fr.read(4))/208
                    part2 = ui(fr.read(4))


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 28, 2011, 05:24:05 PM
havent checked to see if i can do this in c#, but cant you just get the datatable(thats how i load my tree) row and column? or get the parent x,y..then the current bone index and the parents child count. then use that?

ex. parent = 5,5
      child count = 2
      current bone = X->parent(x) + 1
                               Y->parent(y) + child count + 1


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 30, 2011, 08:19:33 AM
hey :D
how's progress coming :)
I wanna test the bone adder ;)

havent checked to see if i can do this in c#, but cant you just get the datatable(thats how i load my tree) row and column? or get the parent x,y..then the current bone index and the parents child count. then use that?

ex. parent = 5,5
      child count = 2
      current bone = X->parent(x) + 1
                               Y->parent(y) + child count + 1

well...
Y = bone index
X gets added to...
but I just now got an idea,
which is prbly the idea you were trying to tell me: :P

define LASTX as a list before the for loop
in the for loop:

if len(LASTX): XPOS = LASTX[parent] + 1
else: XPOS = 0 #if len(XPOS) = 0 then set XPOS as 0
LASTX.append(XPOS) #add the current XPOS to the end of the list

^hows that look :)


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 30, 2011, 09:11:16 AM
progress = taking a break lol..for the past 2 day.  Had stuff to do and just wnted a break.

lets see:

Quote
if len(LASTX): XPOS = LASTX[parent] + 1
else: XPOS = 0 #if len(XPOS) = 0 then set XPOS as 0
LASTX.append(XPOS) #add the current XPOS to the end of the list

hmm wouldnt directly setting it to 0 not work? i mean the only time it would be 0 is for the topN(unless you had a model without that kinda of setup)?

wut im saying to maybe make a tag for each tree node as you create it.  Then:

y = index(obv)
x = depends on when the prev node created had a child or not

then in the loop, get the tag and your done.  Not sure if  this would work cuz i dunno how you create your tree nodes. Like i said  i do mine with a datatable, if you want the source code for it i can easily just post it


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 30, 2011, 09:18:09 AM
I GOT MY BONES WORKING PERFECTLY!!! :happy:

here's my code on them: http://www.pasteit4me.com/2172005 (http://www.pasteit4me.com/2172005)

and here's a sample bone from the tmp:
< bone Tail1 3,15 0 -3.9999999899e-06,0.0,-0.427565008402 0.0,0.0,-90.0 1.0,1.0,1.0 1.0,0.0,0.0,0.0|0.0,1.0,0.0,0.397000014782|0.0,0.0,1.0,-0.301451027393|0.0,0.0,0.0,1.0 1.0,-0.0,0.0,0.0|-0.0,1.0,-0.0,-0.397000014782|0.0,-0.0,1.0,0.301451027393|0.0,0.0,0.0,1.0 >

the format:
< bone bone_name parent,child(grid) is_connected(bool) locX,Y,Z rotX,Y,Z scaX,Y,Z bind inv_bind >

EDIT:
oh yea...
the is_connected (CONN) var doesn't work right :/

how could I set that accordingly??

EDIT2:
I think I might have an idea:

if parent < (0-1): CONN = 0
else: CONN = 1

EDIT3:
that worked perfectly :D
here's pachi's bone structure in blender:
(https://jump.matthewevan.xyz/i2p/pxbcwxbhxj2wusliwhrb6ym4vcwpihztuf2tfjejrcdzqrmnjuoa.b32/_/95504013f9f19d5d13809e8f285e070466b8f4e2af2e9fcccaf4fd692511ee1a) (https://jump.matthewevan.xyz/i2p/pxbcwxbhxj2wusliwhrb6ym4vcwpihztuf2tfjejrcdzqrmnjuoa.b32/_/95504013f9f19d5d13809e8f285e070466b8f4e2af2e9fcccaf4fd692511ee1a)

you can compair it to these:
Code:
< bone Pachirisu 0,0 1 0.0,0.0,0.0 0.0,0.0,0.0 1.0,1.0,1.0 1.0,0.0,0.0,0.0|0.0,1.0,0.0,0.0|0.0,0.0,1.0,0.0|0.0,0.0,0.0,1.0 1.0,-0.0,0.0,0.0|-0.0,1.0,-0.0,0.0|0.0,-0.0,1.0,0.0|0.0,0.0,0.0,1.0 >
< bone Origin 1,1 1 0.0,0.0,0.0 0.0,0.0,0.0 1.0,1.0,1.0 1.0,0.0,0.0,0.0|0.0,1.0,0.0,0.0|0.0,0.0,1.0,0.0|0.0,0.0,0.0,1.0 1.0,-0.0,0.0,0.0|-0.0,1.0,-0.0,0.0|0.0,-0.0,1.0,0.0|0.0,0.0,0.0,1.0 >
< bone Waist 2,2 1 0.0,0.397004008293,0.12611399591 0.0,0.0,90.0 1.0,1.0,1.0 0.0,-1.0,0.0,0.0|1.0,0.0,0.0,0.397004008293|0.0,0.0,1.0,0.12611399591|0.0,0.0,0.0,1.0 0.0,1.0,-0.0,-0.397004008293|-1.0,0.0,-0.0,0.0|0.0,-0.0,1.0,-0.12611399591|0.0,0.0,0.0,1.0 >
< bone LThigh 3,3 1 4.80000016978e-05,-0.285930007696,-0.0578869991004 -180.0,0.0,-90.0 1.0,1.0,1.0 1.0,-0.0,0.0,0.285930007696|0.0,-1.0,0.0,0.397052019835|0.0,0.0,-1.0,0.068226993084|0.0,0.0,0.0,1.0 1.0,-0.0,0.0,-0.285930007696|0.0,-1.0,-0.0,0.397052019835|0.0,-0.0,-1.0,0.068226993084|0.0,0.0,0.0,1.0 >
< bone LFoot 4,4 1 0.0,0.271604001522,0.0 0.0,0.0,0.0 1.0,1.0,1.0 1.0,0.0,0.0,0.285930007696|0.0,-1.0,0.0,0.125448018312|0.0,0.0,-1.0,0.068226993084|0.0,0.0,0.0,1.0 1.0,0.0,0.0,-0.285930007696|0.0,-1.0,-0.0,0.125448018312|0.0,-0.0,-1.0,0.068226993084|0.0,0.0,0.0,1.0 >
< bone RThigh 3,5 0 4.80000016978e-05,0.285930007696,-0.0578869991004 0.0,0.0,-90.0 1.0,1.0,1.0 1.0,0.0,0.0,-0.285930007696|0.0,1.0,0.0,0.397052019835|0.0,0.0,1.0,0.068226993084|0.0,0.0,0.0,1.0 1.0,-0.0,0.0,0.285930007696|-0.0,1.0,-0.0,-0.397052019835|0.0,-0.0,1.0,-0.068226993084|0.0,0.0,0.0,1.0 >
< bone RFoot 4,6 1 0.0,-0.271604001522,0.0 0.0,0.0,0.0 1.0,1.0,1.0 1.0,0.0,0.0,-0.285930007696|0.0,1.0,0.0,0.125448018312|0.0,0.0,1.0,0.068226993084|0.0,0.0,0.0,1.0 1.0,-0.0,0.0,0.285930007696|-0.0,1.0,-0.0,-0.125448018312|0.0,-0.0,1.0,-0.068226993084|0.0,0.0,0.0,1.0 >
< bone Spine 3,7 0 0.243059143424,0.0,0.0 0.0,0.0,0.0 1.0,1.0,1.0 0.0,-1.0,0.0,0.0|1.0,0.0,0.0,0.639819025993|0.0,0.0,1.0,0.12611399591|0.0,0.0,0.0,1.0 0.0,1.0,-0.0,-0.639819025993|-1.0,0.0,-0.0,0.0|0.0,-0.0,1.0,-0.12611399591|0.0,0.0,0.0,1.0 >
< bone Head 4,8 1 0.460072994232,0.0,0.0 0.0,0.0,-90.0 1.0,1.0,1.0 1.0,0.0,0.0,0.0|0.0,1.0,0.0,1.09989202023|0.0,0.0,1.0,0.12611399591|0.0,0.0,0.0,1.0 1.0,-0.0,0.0,0.0|-0.0,1.0,-0.0,-1.09989202023|0.0,-0.0,1.0,-0.12611399591|0.0,0.0,0.0,1.0 >
< bone LEar 5,9 1 0.433147013187,1.21945202351,-0.0354570001364 0.0,0.0,88.0054321289 1.0,1.0,1.0 0.0348026454449,-0.999320209026,0.0,0.433147013187|0.999320209026,0.0348026454449,0.0,2.31934404373|0.0,0.0,1.0,0.0906569957733|0.0,0.0,0.0,1.0 0.0348077937961,0.999468028545,-0.0,-2.33318710327|-0.999468028545,0.0348077937961,-0.0,0.352185338736|0.0,-0.0,1.0,-0.0906569957733|0.0,0.0,0.0,1.0 >
< bone REar 5,10 0 -0.433147013187,1.2194570303,-0.0354570001364 180.0,0.0,-88.0054321289 1.0,1.0,1.0 0.0348026454449,-0.999320209026,0.0,-0.433147013187|-0.999320209026,-0.0348026454449,0.0,2.31934905052|0.0,0.0,-1.0,0.0906569957733|0.0,0.0,0.0,1.0 0.0348077937961,-0.999468028545,0.0,2.33319211006|-0.999468028545,-0.0348077937961,-0.0,-0.352185159922|0.0,-0.0,-1.0,0.0906569957733|0.0,0.0,0.0,1.0 >
< bone LArm 4,11 0 0.289499014616,-0.319108009338,0.0859630033374 -180.0,0.0,-90.0 1.0,1.0,1.0 1.0,-0.0,0.0,0.319108009338|0.0,-1.0,0.0,0.929318070412|0.0,0.0,-1.0,0.212076991796|0.0,0.0,0.0,1.0 1.0,-0.0,0.0,-0.319108009338|0.0,-1.0,-0.0,0.929318070412|0.0,-0.0,-1.0,0.212076991796|0.0,0.0,0.0,1.0 >
< bone LHand 5,12 1 0.0,0.0,-0.28024199605 0.0,0.0,0.0 1.0,1.0,1.0 1.0,0.0,0.0,0.319108009338|0.0,-1.0,0.0,0.929318070412|0.0,0.0,-1.0,0.492318987846|0.0,0.0,0.0,1.0 1.0,0.0,0.0,-0.319108009338|0.0,-1.0,-0.0,0.929318070412|0.0,-0.0,-1.0,0.492318987846|0.0,0.0,0.0,1.0 >
< bone RArm 4,13 0 0.289499998093,0.319108009338,0.0859630033374 0.0,0.0,-90.0 1.0,1.0,1.0 1.0,0.0,0.0,-0.319108009338|0.0,1.0,0.0,0.929319024086|0.0,0.0,1.0,0.212076991796|0.0,0.0,0.0,1.0 1.0,-0.0,0.0,0.319108009338|-0.0,1.0,-0.0,-0.929319024086|0.0,-0.0,1.0,-0.212076991796|0.0,0.0,0.0,1.0 >
< bone RHand 5,14 1 0.0,0.0,0.28024199605 0.0,0.0,0.0 1.0,1.0,1.0 1.0,0.0,0.0,-0.319108009338|0.0,1.0,0.0,0.929319024086|0.0,0.0,1.0,0.492318987846|0.0,0.0,0.0,1.0 1.0,-0.0,0.0,0.319108009338|-0.0,1.0,-0.0,-0.929319024086|0.0,-0.0,1.0,-0.492318987846|0.0,0.0,0.0,1.0 >
< bone Tail1 3,15 0 -3.9999999899e-06,0.0,-0.427565008402 0.0,0.0,-90.0 1.0,1.0,1.0 1.0,0.0,0.0,0.0|0.0,1.0,0.0,0.397000014782|0.0,0.0,1.0,-0.301451027393|0.0,0.0,0.0,1.0 1.0,-0.0,0.0,0.0|-0.0,1.0,-0.0,-0.397000014782|0.0,-0.0,1.0,0.301451027393|0.0,0.0,0.0,1.0 >
< bone Tail2 4,16 1 0.0,0.0990779995918,-0.683709025383 90.0,78.5461120605,90.0 1.0,1.0,1.0 0.0,0.0,1.0,0.0|0.198571234941,0.980048000813,0.0,0.496078014374|-0.980048000813,0.198571234941,0.0,-0.985160052776|0.0,0.0,0.0,1.0 0.0,0.19858622551,-0.980121970177,-1.06409132481|-0.0,0.980121970177,0.19858622551,-0.290577739477|1.00000011921,-0.0,0.0,0.0|0.0,0.0,0.0,1.0 >
< bone Tail3 5,17 1 1.09466505051,0.0449969992042,0.0 0.0,0.0,-2.63988900185 1.0,1.0,1.0 0.0,0.0,1.0,0.0|0.153216540813,0.988122165203,0.0,0.757546246052|-0.988122165203,0.153216540813,0.0,-2.04904913902|0.0,0.0,0.0,1.0 0.0,0.153237894177,-0.988259851933,-2.14107775688|-0.0,0.988259851933,0.153237894177,-0.434660553932|1.0,-0.0,0.0,0.0|0.0,0.0,0.0,1.0 >
< bone Tail4 6,18 1 1.18681299686,0.0,0.0 0.0,0.0,12.5423269272 1.0,1.0,1.0 0.0,0.0,1.0,0.0|0.364133238792,0.931247830391,0.0,0.939385652542|-0.931247830391,0.364133238792,0.0,-3.22176527977|0.0,0.0,0.0,1.0 0.0,0.364200443029,-0.931419670582,-3.34294033051|-0.0,0.931419670582,0.364200443029,0.29840606451|1.0,-0.0,0.0,0.0|0.0,0.0,0.0,1.0 >

my UD'd bones code: http://www.pasteit4me.com/2165009 (http://www.pasteit4me.com/2165009)


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 30, 2011, 12:09:39 PM
gj man..cant w8...gnna go on a psa streak when this comes out lol


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 30, 2011, 01:02:53 PM
gj man..cant w8...gnna go on a psa streak when this comes out lol

DONT TOUCH MELEE PICHU!!! >:3
melee Pichu's mine >:3

Pachi is mine as well :3

and nobody can work on Riku but me. XDD
Riku's my game char
^I'm gonna try to actually render fur using the shaders >:3

here's what I mean:
(http://upload.wikimedia.org/wikipedia/commons/3/3b/Blender3D_FurWithParticles-Finished-2.48a.jpg)

^done entirely with shaders >:3
now imagine that in brawl


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 30, 2011, 02:25:12 PM
random...do you know the .mot format?


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 30, 2011, 02:27:50 PM
random...do you know the .mot format?

lightwave motion o.o

I havn't looked into it :/
but I can...


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 30, 2011, 02:32:27 PM
its ok.. ill try figuring it out, cuz u got alot to do. buut if i need help i might ask lol


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 30, 2011, 02:49:16 PM
its ok.. ill try figuring it out, cuz u got alot to do. buut if i need help i might ask lol
KK
hey, do you know Py at all??

I ask because you may be able to help me in building plugins :)


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: vontower on January 30, 2011, 03:03:31 PM
sooo... its coming out soon right? :P

I already have some ideas i want to impliment


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 30, 2011, 03:17:28 PM
@tcll...no but how hard can it be? lol. just gimmie the dl for py and ill see if i can figure out how to use it.

Oh and srry i havent been helping with ur converter...been busy with other stuff

brb l8er


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 30, 2011, 03:34:48 PM
@tcll...no but how hard can it be? lol. just gimmie the dl for py and ill see if i can figure out how to use it.

Oh and srry i havent been helping with ur converter...been busy with other stuff

brb l8er

KK...
but keep in mind, Py deals more with indexes instead of {}

but the language itself is very general...
I'll post the link to my mdl0 plugin src in my next post...

gotta catch up with commenting >_>

btw, meet me on my chat :/


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: Eternal Yoshi on January 30, 2011, 07:41:41 PM
WHere is the NodeTree?

TO put things into context, I used this editor to give the extra bones their own IDs.

This caused the normal bones to show up in Brawlbox .64.

Doesn't work over MK in the game yet which means I need to give entries for the new bones into the NodeTree.


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 30, 2011, 07:51:53 PM
just export the file, open up the mdl0 and search for a chunk of the node tree file.

unless u mean the 2nd tree -> just search for 00 00 00 d0 after the last bone of the first tree.  And um if you get that to work then GJ lol.  Atm im working on making a real bone adding exe, prob i got right now is just knowing which data comes after wut.  Ive taken a break for the past few days and will prob get this done within a week.


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on January 30, 2011, 08:09:30 PM
no...
follow the bone group offset in the header
0x14(4)


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on January 30, 2011, 08:19:33 PM
lol
on my first reply/answer i thought that he was literally looking for the node tree(Defs)

for the 2nd,...i just didnt feel like explaining it, and the search for 00000d0 was very simple imo.

anyways yeh, u might just wnna use tclls template to look for the bone stuff....


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: hughie on February 02, 2011, 05:38:15 AM
Sorry for not even taking a look at the tut(No time) but is it possible to change parent bones?


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on February 02, 2011, 07:11:16 AM
Sorry for not even taking a look at the tut(No time) but is it possible to change parent bones?

yea :P


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: Mewtwo2000 on February 02, 2011, 07:40:49 AM
I'm only interested on adding a bone to a single-boned model, and that both of them work. Is this already possible?


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: Oshtoby on February 02, 2011, 07:49:28 AM
I'm only interested on adding a bone to a single-boned model, and that both of them work. Is this already possible?
Well, with the current state of how things are looking, once his real bone adder comes out, you could ADD the bone, yes, but it would not effect anything, since the bone would not be anchored to any vertexes. So, adding it to a trophy (which is what I ASSUME you want to do) would not result in an entirely posing model.

I am interested in this because I have the Pichu model from PokePark Wii, and I want to add bones to it to put the bone structure in the shape of Pikachu's, and then see if Pika's animations will work. If so... well, there you go. The perfect Pichu. A little vertexing of that, and the Melee model can be restored.


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: vontower on February 02, 2011, 08:02:49 AM
do we have a release date yet?


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on February 02, 2011, 10:07:22 AM
I'm only interested on adding a bone to a single-boned model, and that both of them work. Is this already possible?
Well, with the current state of how things are looking, once his real bone adder comes out, you could ADD the bone, yes, but it would not effect anything, since the bone would not be anchored to any vertexes. So, adding it to a trophy (which is what I ASSUME you want to do) would not result in an entirely posing model.

I am interested in this because I have the Pichu model from PokePark Wii, and I want to add bones to it to put the bone structure in the shape of Pikachu's, and then see if Pika's animations will work. If so... well, there you go. The perfect Pichu. A little vertexing of that, and the Melee model can be restored.

I'm working on actually getting melee Pichu :af:
(I need the model for a series I intend to make)

the DAT format is even more complicated than the MDL0 format :/

and yea...
about Pokepark...

don't rig Pichu with Pikachu...
leave the bones seperate...
here's what I'm doing with Pachi:

bone rig:
TopN
-TransN
--XRotN
---YRotN
----HipN
-----origin (for scaling him to 4.2)
------waist
-------LThigh
--------LFoot
-------RThigh
--------RFoot
-------Spine
--------Head
---------LEar
---------REar
---------HaveN
--------LArm
---------LHand
--------RArm
---------RHand
-------Tail1
--------Tail2
---------Tail3
----------Tai4
----ThrowN

only the important bones are there...
everything else deals with Pachi

EDIT:
this was from a scrapp'd project:
(https://jump.matthewevan.xyz/i2p/pxbcwxbhxj2wusliwhrb6ym4vcwpihztuf2tfjejrcdzqrmnjuoa.b32/_/34466dcc66783874ecf8aa40642d73b3fe9fabeba65c2a9b60f7cd89da880d2c)
^it only worked well on a few trophies...
it didn't really work on players :/

EDIT2:
here's the furthest I got it before scrapping it:
(https://jump.matthewevan.xyz/i2p/pxbcwxbhxj2wusliwhrb6ym4vcwpihztuf2tfjejrcdzqrmnjuoa.b32/_/3c72a1a4ddfa7e976457692d13b39e6a53339be4b6aad8cc61fe8ef358950678)
^all the way to seperate objects and UV's
as you can see, UV indexing sucked DX


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: ??_? on February 02, 2011, 11:28:28 AM
I'm only interested on adding a bone to a single-boned model, and that both of them work. Is this already possible?
Well, with the current state of how things are looking, once his real bone adder comes out, you could ADD the bone, yes, but it would not effect anything, since the bone would not be anchored to any vertexes. So, adding it to a trophy (which is what I ASSUME you want to do) would not result in an entirely posing model.
I think he's thinking of scaling...if he were able to add a bone with the same name to all models within a brres, he would be able to scale the whole thing with one bone.  Would this be realistic?


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on February 02, 2011, 11:50:05 AM
I'm only interested on adding a bone to a single-boned model, and that both of them work. Is this already possible?
Well, with the current state of how things are looking, once his real bone adder comes out, you could ADD the bone, yes, but it would not effect anything, since the bone would not be anchored to any vertexes. So, adding it to a trophy (which is what I ASSUME you want to do) would not result in an entirely posing model.
I think he's thinking of scaling...if he were able to add a bone with the same name to all models within a brres, he would be able to scale the whole thing with one bone.  Would this be realistic?

keep note
you need a VGroup for the bones to move the model...
the only way for that to work properly is to use an editor like Blender or 3DS
that way you can define which verts go to what bones.
(wether it's for scaling or anything...)
otherwise they won't work

@TSG:
approx percentage of completion plz :P
(a little egar to work on Pachi)


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: Mewtwo2000 on February 02, 2011, 01:07:15 PM
I just want an added bone that affects everything below it. While the lower bone would affect the vertices (the model itself), the top (and newer) bone would affect the already affected model. Just like some 2D model's i've been using in stages lately.

As Noah said, this would allow me to move groups of models with a single animated bone. And block-based stages could be easily rotated or resized.


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: Eternal Yoshi on February 02, 2011, 03:01:55 PM
The closest thing you would get to that would be to fuse all the Mdl0's into one and have the added bone be the TopN with the TopN of the other models be the child bones of the added bone's TopN.


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on February 02, 2011, 05:08:58 PM
The closest thing you would get to that would be to fuse all the Mdl0's into one and have the added bone be the TopN with the TopN of the other models be the child bones of the added bone's TopN.


umm... wut??
I didn't make sence out of that :/

what I plan to do is simply use TSG's BTE to add bones to the end,
then move them to the beginning, and rename it to TopN...
simple enough :/


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: Mewtwo2000 on February 02, 2011, 05:22:55 PM
And they would work? If so, that would be awesome =)


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: Oshtoby on February 05, 2011, 12:04:32 PM
Well... any new info on this?


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on February 05, 2011, 12:31:31 PM
sorry i havent responded on this thread....atm im trying to figure out wut im doing(hacking wise). Right now im not working on the adding bones or even programming. But i will get back to this after im done with the other stuff. Im trying to not do multiple things at once right now so basically im just doing one thing atm and yeh lol


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on February 05, 2011, 12:36:07 PM
well...
keep in mind, Pachi will be released whenever you finish this ;)


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: vontower on February 05, 2011, 12:39:26 PM
could you release a working bone tree editor without the adding bones part then? i keep getting the same error when i try to use the current one and i need it :P
if not, no big deal. i can wait


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on February 05, 2011, 12:42:38 PM
sorry but your gonna have to wait till later today(maybe) cuz while i was working on it a week ago there was still sumtin in my code that was messing it up and not sure if it was the part of the code that made me go ">.>" lol or just sumtin i misseed.


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on February 05, 2011, 12:54:53 PM
@TSG:
this is what happens when you're knowledgable and know how to make a good program...
you get people knockin yelling at you and telling you "HURRY UP!"

it's called fame
don't you just love it *sarcasm*

I've got tonz of people screaming at me to release my converter,
when there's only alot of progress on the single plugin that actually works :P

sry...
had to post that XDD
I hate fame with a passion  :af:


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on February 05, 2011, 01:05:26 PM
well i WOULD like to help but i say that too much lol. I would like to but cant. Lol at your comment too. Also i never got around to it but do you know the order the data in the mdl0 comes in? not the rg order for the list, but the data within the lists.....umm ex: textures(cnt remember) come right after its reloc group, but its near the end of the list. This would help me finish the bone adder quicker cuz i think thats the only thing keeping me back from finishing it.


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on February 05, 2011, 02:06:06 PM
well i WOULD like to help but i say that too much lol. I would like to but cant. Lol at your comment too. Also i never got around to it but do you know the order the data in the mdl0 comes in? not the rg order for the list, but the data within the lists.....umm ex: textures(cnt remember) come right after its reloc group, but its near the end of the list. This would help me finish the bone adder quicker cuz i think thats the only thing keeping me back from finishing it.

there is no particular order of the data...
the texture's just usually happen to come before the definitions...
but there can be cases where it comes after...

use an if statment:
if data is before the bones, use this method
else use this other method


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DAO_Ibuki on February 07, 2011, 10:32:06 AM
sorry but i cant change the bones of pikachu to match over luigi y change te hip n to the same indexed of luigui and the pikachu model is deformed and some parts remain in the center of stage...o-oU any idea or solution? or this is imposible to do?


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on February 07, 2011, 03:56:43 PM
its not ment to move bones that are have polygons attached to it - you'd have to w8 for the converters for that.  Yes its impossible to do wut your doing without the model messing up. 

-uhh i kno i said i was gnna release a fixed save version but im still a bit busy srry


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: StarWaffle on February 10, 2011, 08:41:09 AM
alrighty, i have no idea how to use this program properly. 

Is it possible to change sheiks sword on her back to move with her chest instead of her hips?

i need it so i can release gallade D=  if not i'll have to find some other way.

(http://i47.photobucket.com/albums/f161/jeremie_1992/al_110210_0832binout.jpg)


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: KTH on February 10, 2011, 12:13:23 PM
Wow.... Epic.


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: xxmasal22xx on February 10, 2011, 12:50:43 PM
alrighty, i have no idea how to use this program properly. 

Is it possible to change sheiks sword on her back to move with her chest instead of her hips?

i need it so i can release gallade D=  if not i'll have to find some other way.

WARNING:
KEEP YOUNG CHILDREN AWAY FROM THIS MADMAN, FOR THEY MAY CATCH HIS EPICNESS


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on February 10, 2011, 01:48:21 PM
alrighty, i have no idea how to use this program properly.  

Is it possible to change sheiks sword on her back to move with her chest instead of her hips?

i need it so i can release gallade D=  if not i'll have to find some other way.
([url]http://i47.photobucket.com/albums/f161/jeremie_1992/al_110210_0832binout.jpg[/url])


sounds like you wnna move the sword polygon to a different bone.  Just change the NodeID of the polygon to the NodeID of the bone you want.  Hmm...not sure why it would be hard to use the program unless it was the beta.  anyways you have to change the ids in hex, you can use tclls mdl0 template for sum help if you need it.

edit:just realized, if the sword still isnt where you want, then you probably wnna attach it to an extra(not fake) bone that your not really using and isnt important(not attached to a polygon) and then move that bone to the chest and offset it a bit so its right on the back and how you want it.


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on February 10, 2011, 01:58:24 PM
you can use tclls mdl0 template for sum help if you need it.

here you go guys: :P
http://brawlimports.proboards.com/index.cgi?board=templates&action=display&thread=12&page=1

I'll be posting further UD's there...
so keep watch :)

EDIT @ TSG:
progress?? o_o


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: hughie on February 10, 2011, 03:57:11 PM
I need help on changing parent bones.
Can someone exlpain to me how to change Marth's Sword's parent bone from his right hand into hs left hand?


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: StarWaffle on February 10, 2011, 03:58:54 PM
Damn I feel dumb =[    

does anyone want to make it for me from a clean sheik model?  

I just need the SwordN bone to be attached to her BustN bone ;-;


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: StarWaffle on February 11, 2011, 07:56:28 AM
Alrighty, i cannot figure out how to use hexedit =[   how on earth do i get your template to work. I am so confused ;-;   

All I see is a big wall of text, am i supose to save it as a txt file?  if so how do i make it into an XML file to put it in the proper directory?
once its in there what am i supose to do?   just open up an mdl0 file with hexedit and there will be the mdl0 in hex format with definitions of what line does what? 

I'm so lost, can i add you on msn?


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: BlueBrain on February 11, 2011, 08:27:12 AM
what u wanna do is make the sword bone children from the bust bone right?


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: StarWaffle on February 11, 2011, 08:35:53 AM
yessir.    I also Need to change Falcos  HolsterSN bone to be connected to his TailNa bone.
I would be sooooo greatful to whoever can do this for me ;-;

But i don't wanna always have to ask for things from other people

y'know give a man a fish and he'll eat for a day  but teach a man to fish and he'll eat for the rest of his life.   D=   


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: TheShyGuy on February 11, 2011, 06:06:52 PM
^lol



@tcll - progress from before = same...buut im done taking a break.  gnna clean up my code then get to fixing the glitches.  Anything you guys want added?



@sw- if no one gets back to you, ill do it l8er and tell you how. Pretty easy to read hex after a while

^ got bored......


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on February 11, 2011, 06:36:56 PM
Alrighty, i cannot figure out how to use hexedit =[   how on earth do i get your template to work. I am so confused ;-;   

All I see is a big wall of text, am i supose to save it as a txt file?  if so how do i make it into an XML file to put it in the proper directory?
once its in there what am i supose to do?   just open up an mdl0 file with hexedit and there will be the mdl0 in hex format with definitions of what line does what? 

I'm so lost, can i add you on msn?

I just save a txt and rename the extension to xml

place it in the templates directory,
and open an mdl0

but that's not all...
you have to set it to 'split window' and turn on the autosync...
^I forgot where those were ;_;


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: StarWaffle on February 12, 2011, 02:06:02 AM
YAY i figured it out =] thanks guys for responding.


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: KTH on February 17, 2011, 10:35:11 AM
Something can help me with my Mister L please? I have a problem with some animation :

(http://i56.tinypic.com/ifpjso.jpg)

That happened only with some animation :

- Grab
- Charge Smash Up
- Second Jump

And another.

I have use for the base the hack by dingoberriz, Luigi with hair : http://forums.kc-mm.com/Gallery/BrawlView.php?Number=9445

Can you help me please?


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on February 17, 2011, 12:43:23 PM
first off...
are you talking about the spark or the yellow glow??
or is it something different entirely??


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: KTH on February 17, 2011, 12:56:51 PM
? I don't have understand....


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: Oshtoby on February 17, 2011, 01:05:47 PM
Well, since it's been almost a week now since thread activity, any update?

Sorry to annoy, I am REALLY pumped for the bone adder/mover. It will revolutionize Smash hacking. Think about it: you'll be able to take other MDL0s, and apply "HaveN" and "TransN" to them, and make it so that assist trophies can become costumes (I'm not big into PSAs)! It'll be awesome.


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: Eternal Yoshi on February 17, 2011, 02:18:17 PM
Yeah. And have them linked properly so I can squash all the bugs related to them so I can release Gray Fox and Lyn's updates.

In case no one knew, I bet he was waiting for Bero to update the depository, but Bero was away after porting the codes for Project:M.

Until then, I'll work on another PSA I'm doing and then get a USB drive.


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: BlueBrain on February 18, 2011, 07:38:10 AM
 may i make a little request?
in case u'd say give it a shot, here it is:
could u make a marth model with his chestplate attached to his headbone?
this could be not only usefull for me, but for everyone who wants to make a knight with a helmet...
thanks in advance for just reading this ^^

EDIT:
ive tried it out, and i just noticed the chestplate doesnt have his own bone... is this a problem?
anyway, ive tried to move the shoulder pads to his head instead, and it wont let me save, it gives an error...


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: Ghork on February 21, 2011, 07:15:50 AM
something you should add to the program, (at least I think it's necessary or I'm doing something wrong) is ability to increase/decrease all child-bones bone index with one click.
Right now, if I move one bone and therefor need to change bone index for the rest I need to go change it on each single of the 50+ bones.
Would be a very nice feature, if you still consider improving the program.


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: BlueBrain on February 21, 2011, 08:37:38 AM
can u save ur files?
cuz i cant T.T


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on February 21, 2011, 08:40:13 AM
something you should add to the program, (at least I think it's necessary or I'm doing something wrong) is ability to increase/decrease all child-bones bone index with one click.
Right now, if I move one bone and therefor need to change bone index for the rest I need to go change it on each single of the 50+ bones.
Would be a very nice feature, if you still consider improving the program.
I think it should just edit the indexes automatically when necessary :)

if you add a bone and move it to where index[1] should be, then
index[1:#] += 1

sry :P
index[1] through the last index has 1 added to it

I get a little carried away with programming and actually speak it sometimes :P

but yea...
an editor should be an editor with alot of capabilities ;)

perhapse I should take over the project :/
I'm no good at C#, and I'm not too bad at Py...
I could possibly do it :)

can u save ur files?
cuz i cant T.T
the only one I've had a successful save on would be Pachirisu...

I've tried Pikachu, Lucario, and Mario...
they won't save...

we should wait for the next release...


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: BlueBrain on February 22, 2011, 10:04:43 AM
im being sooooo ignored...
could sumeone plz help me?
i dont know if its cuz im using vista, i also tired it on a seven, so does this only work for XP??

i'll quote myself to not type everything again... xD

may i make a little request?
in case u'd say give it a shot, here it is:
could u make a marth model with his chestplate attached to his headbone?
this could be not only usefull for me, but for everyone who wants to make a knight with a helmet...
thanks in advance for just reading this ^^

EDIT:
ive tried it out, and i just noticed the chestplate doesnt have his own bone... is this a problem?
anyway, ive tried to move the shoulder pads to his head instead, and it wont let me save, it gives an error...


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on February 22, 2011, 12:20:45 PM
im being sooooo ignored...
could sumeone plz help me?
i dont know if its cuz im using vista, i also tired it on a seven, so does this only work for XP??

i'll quote myself to not type everything again... xD

may i make a little request?
in case u'd say give it a shot, here it is:
could u make a marth model with his chestplate attached to his headbone?
this could be not only usefull for me, but for everyone who wants to make a knight with a helmet...
thanks in advance for just reading this ^^

EDIT:
ive tried it out, and i just noticed the chestplate doesnt have his own bone... is this a problem?
anyway, ive tried to move the shoulder pads to his head instead, and it wont let me save, it gives an error...

it should be the same on whatever platform you're using...

and to tell the truth,
there should be parts in my last post that should give you an answer...
you weren't entirely ignored ;)


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: BlueBrain on February 22, 2011, 12:58:44 PM
oh sorry, didnt notice...
does anybody know how to hex it to his headbone?


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: ForOhFor Error on February 23, 2011, 01:03:39 PM
I'm actually learning a bit of Python (taking a course on it in school).
I'm only at reading/writing text files, but w/e
Maybe I could learn some more advanced techniques.


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: BlueBrain on February 23, 2011, 01:06:26 PM
ppl, ignore my question plz, drpanda hexed the chestplate for me ^^


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: Oshtoby on March 04, 2011, 07:53:53 AM
I do not think this Bone Adder will see the light of day, anymore. TheShyGuy was last active February 13, and the updates stopped before that. Meh. As excited as I was, I won't lose any sleep over it. (Unless he's on, like, vacation or something, which is what I am hoping.)

I want this post to act as one last bump to this awesome concept's thread.


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: DarkPikachu on March 04, 2011, 08:21:04 AM
I want this post to act as one last bump to this awesome concept's thread.

thank you for bumping this :)

I wanted to bump, but didn't really have anything good to say... heh :D

anyways...
I hope TSG will have a release soon <:/
IDK where he disappered to >.>

perhapse maybe he's having comp issues
eh... he'll respawn

like me...
the code in my converter is now 100% mine
but it isn't really as good as others:
http://brawlimports.proboards.com/index.cgi?action=gotopost&board=214666&thread=3&post=81
eh... it'll get there...

sry bout derailing a topic if I am... >.>


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: Anivernage on March 04, 2011, 09:24:29 PM
sorry to post this in the bone tree thread but i dont want to bump the other thread:
i have a possibly noob question with external gfx program:
if i export for example the fit ike.pac fire hunka ext gfx(that has his model and animation) and i put in a bowser.pac that doesnt have ext gfx models to replace i can add the fit ike hunka with his model and animation over him?
Thanks


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: BlackJax96 on March 04, 2011, 09:30:33 PM
eh... he'll respawn

lol


Title: Re: Bone Tree Editor- development thread : Version 1.1 released
Post by: E-scope12 on April 04, 2012, 06:30:42 AM
I tried to download the bone tree editor but the file was removed for violation


Post Merge: April 04, 2012, 12:50:55 PM
Beta DownLoad ([url]http://www.mediafire.com/?kwc98887gk3udgz[/url])

V1.1 DownLoad ([url]http://www.mediafire.com/?ug66z5qqnu6837p[/url])

beta tut.

How to use:

export model into startup folder of this program
rename file to input.mdl0
open the program
Enter the TopNoffset mdl0 offset
either plain edit with the table or use the move up/down button
when done either close it or save - difference is that the save makes another copy

Move Up/Down:
ehh theres a tab that shows you multiple choices to put in that box to use.

Start from Scratch:
All it does is make every bone not have a parent or child.
Rotations and translations are removed also

Polygon deleter:
Self explanatory when you open it
Deletes either the vertices or the polygons(zeroes em out)
-can delete all/single/multiple polygons at once
multiple - From To - deletes the first polygon you want to the next polygon you want
multiple - Specific - can delete multiple polygons/vertices that aren't next to each other(can be though)

Plain editing:
Well i didn't write a good tutorial yet. I wrote a bad one and its included in the program's 3rd tab

Changes Since the first version....
-Polygon/vertices deleter(zero out)
-"start" from scratch"
-Textboxes are letter proof making it less error proof
-save
-restore last save > didn't add an undo button so this is good enough for me

Plan to add:
-make bone a child of the previous bone
-undo/redo button

Problems:
None that i know of


Version 1 Tut:
open exe
file -> load file -> choose mdl0 file
TopNOffset window opens -> enter top n offset
press the load tree buttton

- Tree View-
just as easy as drag and dropping nodes onto other nodes
..pretty self explanatory...

problems:
sometimes when you click and hover over a node, the name turns transparent...no biggie lol

-Version 1.1 Tut-
File-load-Choose Mdl0

- Tree View-
just as easy as drag and dropping nodes onto other nodes
..pretty self explanatory...
[/color]
problems:
sometimes when you click and hover over a node, the name turns transparent...no biggie lol

change log:

v1.1
auto load tree
filter for mdl0 files
close file button added
save fixed
auto load extra bones
loading bug fixed



Can you reupload the bone tree editor v1.1 because it got removed for violation?