using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HaloPlugins.Xbox
{
    public class hlmt : TagDefinition
    {
       public hlmt() : base("hlmt", "object_properties", 252)
       {
           Fields.AddRange(new IMetaNode[] {
           new TagReference("Render_Model", "mode"),
           new TagReference("Collision_Model", "coll"),
           new TagReference("Animation", "jmad"),
           new TagReference("Physics", "phys"),
           new TagReference("Physics_Model", "phmo"),
           new Value("Disappear Distance", typeof(float)),
           new Value("Begin Fade Distance", typeof(float)),
           new Padding(4),
           new Value("Reduce To L1", typeof(float)),
           new Value("Reduce To L2", typeof(float)),
           new Value("Reduce To L3", typeof(float)),
           new Value("Reduce To L4", typeof(float)),
           new Value("Reduce To L5", typeof(float)),
           new Padding(4),
           new HaloPlugins.Enum("Spawn Type", new string[] { "Fade_At_Super_High_Detail_Level", "Fade_At_High_Detail_Level", "Fade_At_Medium_Detail_Level", "Fade_At_Low_Detail_Level", "Fade_At_Super_Low_Detail_Level", "Fade_Never" }, 16),
           new Padding(2),
           new TagBlock("Variants", 56, 64, new IMetaNode[] { 
               new StringId("Name"),
               new Padding(16),
               new TagBlock("Regions", 20, 16, new IMetaNode[] { 
                   new StringId("Name"),
                   new Value("Parent Variant #", typeof(short)),
                   new Padding(2),
                   new TagBlock("Permutation", 32, 32, new IMetaNode[] { 
                       new StringId("Name"),
                       new Flags("Flags", new string[] { "Copy_States_To_All_Permutations" }, 32),
                       new Value("Probability", typeof(float)),
                       new TagBlock("States", 24, 10, new IMetaNode[] { 
                           new StringId("Name"),
                           new Flags("Property Flags", new string[] { "Blurred", "Hella_Blurred", "Shielded" }, 16),
                           new HaloPlugins.Enum("State", new string[] { "Default", "Minor_Damage", "Medium_Damage", "Major_Damage", "Destroyed" }, 16),
                           new TagReference("Looping_Effect", "****"),
                           new StringId("Looping Effect Marker Name"),
                           new Value("Initial Probability", typeof(float)),
                       }),
                       //new Padding(12),
                       new StringId(""),
                       new Value("", typeof(int)),
                       new Value("", typeof(int)), // this is two shorts
                   }),
                   new HaloPlugins.Enum("Sort Order", new string[] { "No_Sorting", "-5_(Closest)", "-4", "-3", "-2", "-1", "0_(Same_As_Model)", "1", "2", "3", "4", "5_(Farthest)" }, 32),
               }),
               new TagBlock("Objects", 16, 16, new IMetaNode[] { 
                   new StringId("Parent Marker"),
                   new StringId("Child Marker"),
                   new TagReference("Child_Object", "obje"),
               }),
               new Padding(8),
               new StringId("Dialogue Sound Effect"),
               new TagReference("Dialogue", "udlg"),
           }),
           new TagBlock("Materials", 20, 32, new IMetaNode[] { 
               new StringId("Material Name"),
               new HaloPlugins.Enum("Material Type", new string[] { "Dirt", "Sand", "Stone", "Snow", "Wood", "Metal_(hollow)", "Metal_(thin)", "Metal_(thick)", "Rubber", "Glass", "Force_Field", "Grunt", "Hunter_Armor", "Hunter_Skin", "Elite", "Jackal", "Jackal_Energy_Shield", "Engineer_Skin", "Engineer_Force_Field", "Flood_Combat_Form", "Flood_Carrier_Form", "Cyborg_Armor", "Cyborg_Energy_Shield", "Human_Armor", "Human_Skin", "Sentinel", "Monitor", "Plastic", "Water", "Leaves", "Elite_Energy_Shield", "Ice", "Hunter_Shield" }, 32),
               new HaloPlugins.Enum("Damage Section", new string[] {  }, 32),
               new StringId("Global Material Name"),
               new Padding(4),
           }),
           new TagBlock("New Damage Info", 248, 1, new IMetaNode[] { 
               new Flags("Flags", new string[] { "Takes_Sheild_Damage_For_Children", "Takes_Body_Damage_For_Children", "Always_Shields_Friendly_Damage", "Passes_Area_Damage_To_Children", "Parent_Never_Takes_Body_Damage_For_Children", "Only_Damaged_By_Explosives", "Parent_Never_Takes_Shield_Damage_For_Children", "Cannot_Die_From_Damage", "Passes_Attached_Damage_To_Riders" }, 32),
               new StringId("Global Indirect Material Name"),
               new Value("Indirect Damage Section", typeof(int)),
               new Padding(4),
               new HaloPlugins.Enum("Collision Damage Reporting Type", new string[] { "Teh_Guardians!!1!!1!", "Falling_Damage", "Generic_Collision_Damage", "Generic_Melee_Edamage", "Generic_Explosion", "Magnum_Pistol", "Plasma_Pistol", "Needler", "Smg", "Plasma_Rifle", "Battle_Rifle", "carbine", "Shotgun", "Sniper_Rifle", "Beam_Rifle", "Rocket_Launcher", "Flak_Cannon", "Brute_shot", "Disintegrator", "Brute_Plasma_Rifle", "Energy_sword", "Frag_Grenade", "Plasma_Grenade", "Flasg_Melee_Damage", "Bomb_Melee_Damage", "Bomb_Explosion_Damage", "Ball_Melee_Damage", "Human_Turret", "Plasma_Turret", "Banshee", "Ghost", "Mongoose", "Scorpion", "Spectre_Driver", "Spectre_Gunner", "Warthog_Driver", "Warthog_Gunner", "Wraith", "Tank", "Sentinel_beam", "Sentinel_Rpg", "Teleporter" }, 16),
               new HaloPlugins.Enum("Response Damage Reporting Type", new string[] { "Teh_Guardians!!1!!1!", "Falling_Damage", "Generic_Collision_Damage", "Generic_Melee_Edamage", "Generic_Explosion", "Magnum_Pistol", "Plasma_Pistol", "Needler", "Smg", "Plasma_Rifle", "Battle_Rifle", "carbine", "Shotgun", "Sniper_Rifle", "Beam_Rifle", "Rocket_Launcher", "Flak_Cannon", "Brute_shot", "Disintegrator", "Brute_Plasma_Rifle", "Energy_sword", "Frag_Grenade", "Plasma_Grenade", "Flasg_Melee_Damage", "Bomb_Melee_Damage", "Bomb_Explosion_Damage", "Ball_Melee_Damage", "Human_Turret", "Plasma_Turret", "Banshee", "Ghost", "Mongoose", "Scorpion", "Spectre_Driver", "Spectre_Gunner", "Warthog_Driver", "Warthog_Gunner", "Wraith", "Tank", "Sentinel_beam", "Sentinel_Rpg", "Teleporter" }, 16),
               new Padding(20),
               new Value("Max Vitality", typeof(float)),
               new Value("Min Stun Damage", typeof(float)),
               new Value("Stun Time", typeof(float)),
               new Value("Recharge Time", typeof(float)),
               new Value("Recharge Fraction", typeof(float)),
               new Padding(64),
               new TagReference("Shield_Damaged_FP_Shader", "effe"),
               new TagReference("Shield_Damaged_Shader", "effe"),
               new Value("Max Shield Vitality", typeof(float)),
               new StringId("Global Sheild Material Name"),
               new Value("Min Stun Damage", typeof(float)),
               new Value("Stun Time", typeof(float)),
               new Value("Shield Recharge Time", typeof(float)),
               new Value("Sheild Damaged Threshold", typeof(float)),
               new TagReference("Sheild_Damaged_Effect", "effe"),
               new TagReference("Sheild_Depleted_Effect", "effe"),
               new TagReference("Sheild_Recharging_Effect", "effe"),
               new TagBlock("Damage Secctions", 56, 16, new IMetaNode[] { 
                   new StringId("Name"),
                   new Flags("Flags", new string[] { "Absorbs_Body_Damage", "Takes_Full_Damage_When_Object_Dies", "Cannot_Die_With_Riders", "Takes_Full_Damage_When_Object_Destroyed", "Restored_On_Ressurection", "unused", "unused", "Headshotable", "Ignores_Sheilds" }, 32),
                   new Value("Vitality Percentage", typeof(float)),
                   new TagBlock("Instant Responses", 80, 16, new IMetaNode[] { 
                       new HaloPlugins.Enum("Response Type", new string[] { "Receives_All_Damage", "Receives_Area_Effect_Damage", "Receives_Local_Damage" }, 16),
                       new HaloPlugins.Enum("Constraint Damage Type", new string[] { "None", "Destroy_One_Of_Group", "Destroy_Entire_Group", "Loosen_One_Of_Group", "Loosen_Entire_Group" }, 16),
                       new Flags("Flags", new string[] { "Kills_Object", "Inhibits_Melee_Attack", "Inhibits_Weapon_Attack", "Inhibits_Walking", "Forces_Drop_Weapon", "Kills_Weapon_Primary_Trigger", "Kills_Weapon_Secondary_Trigger", "Light_Damage_Left_Turn", "Major_Damage_Left_Turn", "Light_Damage_Right_Turn", "Major_Damage_Right_Turn", "Light_Damage_Engine", "Major_Damage_Engine", "Kills_Object_(No_Player_Solo)", "Causes_Detonation", "Destory_All_Group_Constraints", "Kills_Variant_Objects", "Force_Unattached_Effects", "Fires_Under_Threshold", "Triggers_Special_Death", "Only_On_Special_Death", "Only_NOT_on_Special_Death" }, 32),
                       new Value("Damage Threshold", typeof(float)),
                       new TagReference("Transition_Effect", "effe"),
                       new TagReference("Transition_Damage_Effect", "effe"),
                       new StringId("Region"),
                       new HaloPlugins.Enum("New State", new string[] { "Default", "Minor_Damage", "Medium_Damage", "Major_Damage", "Destroyed" }, 16),
                       new Value("Runtime Region Index", typeof(short)),
                       new StringId("Effect Marker Name"),
                       new StringId("Damage Effect Marker Name"),
                       new Value("Response Delay", typeof(float)),
                       new TagReference("Delay_Effect", "effe"),
                       new StringId("Delay Effect Marker Name"),
                       new StringId("Contraint/Group Name"),
                       new StringId("Ejecting Seat Label"),
                       new Value("Skip Fraction", typeof(float)),
                       new StringId("Destroyed Child Object Marker Name"),
                       new Value("Total Damage Threshold", typeof(float)),
                   }),
                   new Padding(20),
                   new Value("Stun Time", typeof(float)),
                   new Value("Recharge Time", typeof(float)),
                   new StringId("Resurrection Restored Region Name"),
                   new Padding(4),
               }),
               new TagBlock("Nodes", 16, 255, new IMetaNode[] { 
                   new Padding(16),
               }),
               new Padding(12),
               new TagBlock("Damage Seats", 20, -1, new IMetaNode[] { 
                   new StringId("Seat Label"),
                   new Value("Direct Damage Scale", typeof(float)),
                   new Value("Damage Transfer Fall-Off Radius", typeof(float)),
                   new Value("Max Transfer Damage Scale", typeof(float)),
                   new Value("Min Transfer Damage Scale", typeof(float)),
               }),
               new TagBlock("Damage Constraints", 20, -1, new IMetaNode[] { 
                   new StringId("Physics Model Constraint Name"),
                   new StringId("Damage Constraint Name"),
                   new StringId("Damage Constaint Goup Name"),
                   new Value("Group Probability Scale", typeof(float)),
                   new Padding(4),
               }),
               new TagReference("Overshield_FP_Shader", "shad"),
               new TagReference("Overshield_Shader", "shad"),
           }),
           new TagBlock("Targets", 28, 32, new IMetaNode[] { 
               new StringId("Marker Name"),
               new Value("Size", typeof(float)),
               new Value("Cone Angle", typeof(float)),
               new Value("Damage Section #", typeof(short)),
               new Value("Variant #", typeof(short)),
               new Value("Targeting Relevance", typeof(float)),
               new Flags("Flags", new string[] { "Locked_By_Human_Tracking", "Locked_By_Plasma_Tracking", "Headshot", "Vulnerable", "Always_Locked_By_Plasma_Tracking" }, 32),
               new Value("Lock-On Distance", typeof(float)),
           }),
           new TagBlock("Model Variations", 16, 16, new IMetaNode[] { 
               new StringId("Type"),
               new Padding(1),
               new Value("Phmo Regions Block Ptr", typeof(byte)),
               new Padding(2),
               new TagBlock("Permutation", 8, 32, new IMetaNode[] { 
                   new StringId("Variation"),
                   new Padding(1),
                   new Value("Phmo Regions->Permutations Block Ptr", typeof(byte)),
                   new Padding(2),
               }),
           }),
           new TagBlock("Nodes", 92, 255, new IMetaNode[] { 
               new StringId("Name"),
               new Value("Parent (Index)", typeof(short)),
               new Value("First Child (Index)", typeof(short)),
               new Value("Next Sibling (Index)", typeof(short)),
               new Padding(2),
               new Value("Y", typeof(float)),
               new Value("X", typeof(float)),
               new Value("Z", typeof(float)),
               new Value("i", typeof(float)),
               new Value("j", typeof(float)),
               new Value("k", typeof(float)),
               new Value("w", typeof(float)),
               new Value("Scale Factor", typeof(float)),
               new Padding(36),
               new Value("Y (Leave Child)", typeof(float)),
               new Value("X (Leave Child)", typeof(float)),
               new Value("Z (Leave Child)", typeof(float)),
           }),
           new Padding(4),
           new TagBlock("Model Object Data", 20, 1, new IMetaNode[] { 
               new HaloPlugins.Enum("Type", new string[] {  }, 32),
               new Value("X", typeof(float)),
               new Value("Y", typeof(float)),
               new Value("Z", typeof(float)),
               new Value("Radius", typeof(float)),
           }),
           new TagReference("Unit_Dialoge", "udlg"),
           new TagReference("Active_Camo_Shader", "shad"),
           new Flags("Flags", new string[] { "Active_Camo_Always_On", "Active_Camo_Always_Merge", "Active_Camo_Never_Merge" }, 32),
           new StringId("Default Dialogue Effect"),
           new Flags("Runtime Flags", new string[] { "Contains_Run-Time_Nodes" }, 32),
           new Padding(72),
           new TagReference("Hologram_Shader", "shad"),
           new StringId("Hologram Control Function"),
           });
       }
    }
}
