|
|
« Reply #45 on: November 14, 2010, 02:21:20 PM » |
|
Flag3 - shader parameters -0 ??? -1 light/glow -2 cell shade -3 lambert -4 metal -5 reflective -6 environ. -7 phong -8+ ???
yeah vile, I've been unable to recreate any of these successfully, some just looked really buggy, and others didn't work at all? Which values are you changing in hex? because its possible that brawlbox isn't changing all of the right ones.
|
|
|
Logged
|
|
|
|
|
|
|
« Reply #46 on: November 16, 2010, 06:16:40 AM » |
|
I think in flag 3 more as a 'material group' or 'lighting group' than as shader parameters...
Anyway, some objects are able to use more of one type of flag3, and others simply can't. Maybe the flag3 activates some inner type of material in the model, and if it isn't included in the model, it glitches or crashes.
What I'm sure about it, is that changing this changes which lights effect to the model/material.
|
|
|
Logged
|
|
|
|
|
|
|
« Reply #47 on: November 16, 2010, 08:29:10 PM » |
|
I think in flag 3 more as a 'material group' or 'lighting group' than as shader parameters...
Anyway, some objects are able to use more of one type of flag3, and others simply can't. Maybe the flag3 activates some inner type of material in the model, and if it isn't included in the model, it glitches or crashes.
What I'm sure about it, is that changing this changes which lights effect to the model/material.
So then would I be correct in assuming that a value for flag3 determines how fog on stages affects the object, as well as ambient and other lights in the scene data?
|
|
|
Logged
|
|
|
|
|
|
|
« Reply #48 on: November 17, 2010, 09:41:29 AM » |
|
I'm almost sure about the lights, but not 100% sure about the fogs. That 'group' should include fogs group anyway.
|
|
|
Logged
|
|
|
|
|
|
|
« Reply #49 on: November 17, 2010, 07:01:19 PM » |
|
This might just solve a stage lighting problem i'm having Can you go into more detail about flag3? o.O
|
|
|
Logged
|
|
|
|
|
|
|
« Reply #50 on: November 18, 2010, 03:30:00 AM » |
|
Not much to say, if it's some value (for example), the model acts like characters do, for example. And when the value is 3 it acts as a stage element.
It's only an example, don't remember the values right now. Also, some models can't change that value, because they get glitchy.
The flag3 thingy worked, for example, in the ufo in my fourside. It was first acting like characters, and now it's acting like the buildings.
|
|
|
Logged
|
|
|
|
|
|
|
« Reply #51 on: November 18, 2010, 03:00:32 PM » |
|
I will have more time to look into flag3 and materials1 after I finish STDT values on pirates, which I am almost finished
|
|
|
Logged
|
|
|
|
|
|
|
« Reply #52 on: December 09, 2010, 06:34:51 PM » |
|
as a matter of fact, I have my template which could help you guys out alot... give me a moment to finish definitions... and I'll UL it tomorrow after skool (if there is any...) ^if not, it'll just be tomorrow (bout to lose net for the night) also, Materials1 = 'Shaders' Materials2 = 'Materials' Textures1 = 'Textures' Textures2 = 'Pallets' feel free to ask how I figured any of this out EDIT: NVM tomorrow I've just finished the Definitions using a somewhat brute-force method :/ but it works... note: I've only seen types 2 and 4... I'm sure there will be more though... anyways, I'll UL in my next post.
|
|
« Last Edit: December 09, 2010, 06:52:22 PM by Tcll »
|
Logged
|
|
|
|
|
|
|
« Reply #53 on: December 09, 2010, 08:02:10 PM » |
|
KK so here's my template: <?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>
you'll need to use this with HexEdit, found here: (free no trial version) http://www.smashboards.com/showpost.php?p=11656041&postcount=2778now, place the code above into: C:\Documents and Settings\*user*\Application Data\ECSoftware\HexEdit\_mdl0.xml to view the template in HexEdit: after opening 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") (you may need to turn on the 'Navigation' toolbar) anyways... so that's it... if you have any Q's feel free to ask EDIT: just found type3 and type5 for definitions... type3 is confusing (anywhere from len(3) to len(16))
|
|
« Last Edit: December 10, 2010, 12:53:53 PM by Tcll »
|
Logged
|
|
|
|
|
|
|
« Reply #54 on: December 09, 2010, 08:41:15 PM » |
|
hey... I know this is kinda off topic, but it'd be nice to display between eular and quat for the bones when viewing the model just making a suggestion (Blender uses the Quaternion method when animating)
|
|
|
Logged
|
|
|
|
|
|
|
« Reply #55 on: December 10, 2010, 02:49:22 PM » |
|
I'll have time to test out that code as soon as i get my new computer up and running, which might be awhile
|
|
|
Logged
|
|
|
|
|
|
|
« Reply #56 on: December 11, 2010, 11:58:33 AM » |
|
also... 2 things:
1: (suggestion) when viewing a model, can it be rendered while being edited??
I know rendering activates the shaders and what not (making the model look how it would in brawl)
2 I've found 2 more definition types 'type3' (in the midst of figuring out) 'type5' (exactly like type2)
I'll UL that when I figure out type3 note: you may experience errors with few mdl0's when viewing them...
|
|
|
Logged
|
|
|
|
|
|
|
« Reply #57 on: December 11, 2010, 08:53:28 PM » |
|
1. No idea how to do that lol 2. ?? Type three has already been figured out ... Type 0 is 2-sided Type 1 is 1 side Type 2 is the other side Type 3 is no sides (invisible)
|
|
« Last Edit: December 11, 2010, 08:58:39 PM by LordNOaH »
|
Logged
|
|
|
|
|
|
|
« Reply #58 on: December 11, 2010, 09:03:02 PM » |
|
1. No idea how to do that lol 2. ?? Type three has already been figured out ... Type 0 is 2-sided Type 1 is 1 side Type 2 is the other side Type 3 is no sides (invisible) yea... I know... I'm building a template and I need to figure them out... and nobody's helping me D:< btw, there's also types 4 and 5 type3 has a sub-type of (so far) 2 and 3 2 has a length of 12 3 has a length of 18 btw, what do the definitions do (if you know)?? :/ EDIT: found a sub-type of 4 which has a length of 24 and also a sub-type 5 len(30) EDIT2: you know... I'm beginning to think that the sub-types I mention are more of a cound 2*6 = 12 3*6 = 18 ... I noticed they increased by 6 on every count attempt (or whatever the english language calls it)
|
|
« Last Edit: December 11, 2010, 11:34:14 PM by Tcll »
|
Logged
|
|
|
|
|
|
|
« Reply #59 on: December 11, 2010, 11:47:12 PM » |
|
well, I've finished the definitions (so far) here's a template UD: <?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
|
|
|
Logged
|
|
|
|
|
|