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

namespace HaloPlugins.Xbox
{
    public class Char : TagDefinition
    {
       public Char() : base("char", "character", 236)
       {
           Fields.AddRange(new IMetaNode[] {
           new Flags("Character Flags", new string[] { "Flag1" }, 32),
           new TagReference("Parent_Character", "char"),
           new TagReference("Unit", "unit"),
           new TagReference("Creature", "crea"),
           new TagReference("Style", "styl"),
           new TagReference("Major_Character", "char"),
           new TagBlock("Variants", 12, 64, new IMetaNode[] { 
               new StringId("Name"),
               new Value("Variant Index", typeof(int)),
               new StringId("Variant Designator"),
           }),
           new TagBlock("General Properties", 12, 1, new IMetaNode[] { 
               new Flags("General Flags", new string[] { "Swarm", "Flying", "Dual_Wields", "Uses_Gravemind" }, 32),
               new HaloPlugins.Enum("Type", new string[] { "Elite", "Jackal", "Grunt", "Hunter", "Engineer", "Assassin", "Player", "Marien", "Crew", "Combat_Form", "Infection_Form", "Carrier_Form", "Monitor", "Sentinal", "None", "Mounted_Weapon", "Brute", "Prophet", "Bugger", "Juggernaunt" }, 32),
               new Value("Scariness", typeof(float)),
           }),
           new TagBlock("Vitality Properties", 112, 1, new IMetaNode[] { 
               new Flags("Vitality Flags", new string[] { "Unused" }, 32),
               new Value("Health on easy", typeof(float)),
               new Value("Shields on easy", typeof(float)),
               new Value("Health on legendary", typeof(float)),
               new Value("Shields on legendary", typeof(float)),
               new Value("Health Recharge Fraction", typeof(float)),
               new Value("Soft Ping Threshold With Shields", typeof(float)),
               new Value("Soft Ping Threshold No Shields", typeof(float)),
               new Value("Soft Ping Min Interupt Time", typeof(float)),
               new Value("Hard Ping Threshold With Shields", typeof(float)),
               new Value("Hard Ping Threshold No Shields", typeof(float)),
               new Value("Hard Ping Min Interupt Time", typeof(float)),
               new Value("Current Damage Decay Delay", typeof(float)),
               new Value("Current Damage Decay Time", typeof(float)),
               new Value("Recent Damage Decay Delay", typeof(float)),
               new Value("Recent Damage Decay Time", typeof(float)),
               new Value("Health Recharge Delay Time", typeof(float)),
               new Value("Health Recharge Time", typeof(float)),
               new Value("Shield Recharge Delay Time", typeof(float)),
               new Value("Shield Recharge Time", typeof(float)),
               new Value("Stun Threshold", typeof(float)),
               new RealBounds("Stun Time"),
               new Value("Extended Shield Damage Threshold %", typeof(float)),
               new Value("Extended Health Damage Threshold %", typeof(float)),
               new Padding(8),
               new Value("Suicide Radius", typeof(float)),
           }),
           new TagBlock("Placement Properties", 52, 1, new IMetaNode[] { 
               new Value("Few Upgrade Chance (Easy)", typeof(float)),
               new Value("Few Upgrade Chance (Normal)", typeof(float)),
               new Value("Few Upgrade Chance (Heroic)", typeof(float)),
               new Value("Few Upgrade Chance (Legendary)", typeof(float)),
               new Value("Normal Upgrade Chance (Easy)", typeof(float)),
               new Value("Normal Upgrade Chance (Normal)", typeof(float)),
               new Value("Normal Upgrade Chance (Heroic)", typeof(float)),
               new Value("Normal Upgrade Chance (Legendary)", typeof(float)),
               new Value("Many Upgrade Chance (Easy)", typeof(float)),
               new Value("Many Upgrade Chance (Normal)", typeof(float)),
               new Value("Many Upgrade Chance (Heroic)", typeof(float)),
               new Value("Many Upgrade Chance (Legendary)", typeof(float)),
               new Padding(4),
           }),
           new TagBlock("Perception Properties", 52, 4, new IMetaNode[] { 
               new Flags("Perception FLags", new string[] { "Flag1" }, 32),
               new Value("Max Vision Distance (World Units)", typeof(float)),
               new Value("Central Vision Angle (Degrees)", typeof(float)),
               new Value("Max Vision Angle (Degrees)", typeof(float)),
               new Value("Peripheral Vision Angle (Degrees)", typeof(float)),
               new Value("Peripheral Distance (World Units)", typeof(float)),
               new Value("Hearing Distance (World Units)", typeof(float)),
               new Value("Notice Project Chance", typeof(float)),
               new Value("Notice Vehicle Chance", typeof(float)),
               new Value("Combat Perception Time", typeof(float)),
               new Value("Guard Perception Time", typeof(float)),
               new Value("Non-Combat Perception Time", typeof(float)),
               new Value("First Ack. Surprise Distance (World Units)", typeof(float)),
           }),
           new TagBlock("Look Properties", 80, 1, new IMetaNode[] { 
               new Value("Maximum Aiming Deviation Y", typeof(float)),
               new Value("Maximum Aiming Deviation P", typeof(float)),
               new Value("Maximum Looking Deviation Y", typeof(float)),
               new Value("Maximum Looking Deviation P", typeof(float)),
               new Value("Non-Combat Look Delta L", typeof(float)),
               new Value("Non-Combat Look Delta R", typeof(float)),
               new Value("Combat Look Delta L", typeof(float)),
               new Value("Combat Look Delta R", typeof(float)),
               new Value("Non-Combat Idle Looking (Seconds)", typeof(float)),
               new Value("To (Seconds)", typeof(float)),
               new Value("Non-Combat Idle Aiming (Seconds)", typeof(float)),
               new Value("To (Seconds)", typeof(float)),
               new Value("Combat Idle Looking (Seconds)", typeof(float)),
               new Value("To (Seconds)", typeof(float)),
               new Value("Combat Idle Aiming (Seconds)", typeof(float)),
               new Value("To (Seconds)", typeof(float)),
               new Value("Unknown", typeof(float)),
               new Value("Unknown", typeof(float)),
               new Value("Unknown", typeof(float)),
               new Value("Unknown", typeof(float)),
           }),
           new TagBlock("Movement Properties", 36, 1, new IMetaNode[] { 
               new Flags("Flags", new string[] { "Danger_Crouch_Allow_Movement", "No_Side_Step", "Prefer_To_Combat_Near_Friends", "Hop_(To_Cover_Path_Segment)", "Perch", "Has_Flying_Mode", "Disallow_Crouch" }, 32),
               new Value("Pathfinding Radius", typeof(float)),
               new Value("Destination Radius", typeof(float)),
               new Value("Dive Grenade Chance", typeof(float)),
               new HaloPlugins.Enum("Obstacle Leap Min Size", new string[] { "None", "Tiny", "Small", "Medium", "Large", "Huge", "Immobile" }, 16),
               new HaloPlugins.Enum("Obstacle Leap Max Size", new string[] { "None", "Tiny", "Small", "Medium", "Large", "Huge", "Immobile" }, 16),
               new HaloPlugins.Enum("Obstacle Ignore Size", new string[] { "None", "Tiny", "Small", "Medium", "Large", "Huge", "Immobile" }, 16),
               new HaloPlugins.Enum("Obstacle Smashable Size", new string[] { "None", "Tiny", "Small", "Medium", "Large", "Huge", "Immobile" }, 16),
               new HaloPlugins.Enum("Jump Height", new string[] { "NONE", "Down", "Step", "Crouch", "Stand", "Storey", "Tower", "Infinte" }, 32),
               new Flags("Movement Hints", new string[] { "Vault_Step", "Vault_Crouch", "", "", "", "Mount_Step", "Mount_Crouch", "Mount_Stand", "", "", "", "Hoist_Crouch", "Hoist_Stand", "", "", "" }, 32),
               new Value("Throttle Scale", typeof(float)),
           }),
           new TagBlock("Swarm Properties", 40, 3, new IMetaNode[] { 
               new Value("Scatter Killed Count", typeof(int)),
               new Value("Scatter Radius", typeof(float)),
               new Value("Scatter Time", typeof(float)),
               new Value("Hound Min Distance", typeof(float)),
               new Value("Hound Max Distance", typeof(float)),
               new Value("Perlin Offset Scale", typeof(float)),
               new Value("Offset Period", typeof(float)),
               new Value("To", typeof(float)),
               new Value("Perlin Idle Movement Threshold", typeof(float)),
               new Value("Perlin Combat Movement Threshold", typeof(float)),
           }),
           new TagBlock("Ready Properties", 8, 3, new IMetaNode[] { 
               new Value("Ready Time Bounds", typeof(float)),
               new Value("To", typeof(float)),
           }),
           new TagBlock("Engage Properties", 16, 3, new IMetaNode[] { 
               new Flags("Flags", new string[] { "Engage_Perch", "Fight_Constant_Movement", "Flight_Fight_Constant_Movement" }, 32),
               new Value("Crouch Danger Threshold", typeof(float)),
               new Value("Stand Danger Threshold", typeof(float)),
               new Value("Fight Danger Move Threshold", typeof(float)),
           }),
           new TagBlock("Charge Properties", 64, 3, new IMetaNode[] { 
               new Flags("Charge Flags", new string[] { "Offhand_Melee_Allowed", "Berserk_Whenever_Charged" }, 32),
               new Value("Melee Consider Range", typeof(float)),
               new Value("Melee Chance", typeof(float)),
               new Value("Melee Atack Range", typeof(float)),
               new Value("Melee Abort Range", typeof(float)),
               new Value("Melee Attack Timeout", typeof(float)),
               new Value("Melee Attack Delay Timer", typeof(float)),
               new Value("Melee Leap Range", typeof(float)),
               new Value("To", typeof(float)),
               new Value("Melee Leap Chance", typeof(float)),
               new Value("Ideal Leap Velocity", typeof(float)),
               new Value("Max Leap Velocity", typeof(float)),
               new Value("Melee Leap Ballistic", typeof(float)),
               new Value("Melee Delay Timer", typeof(float)),
               new TagReference("Berserk_Weapon", "weap"),
           }),
           new TagBlock("Evasion Properties", 20, 3, new IMetaNode[] { 
               new Value("Evasion Danger Threshold", typeof(float)),
               new Value("Evasion Delay Timer", typeof(float)),
               new Value("Evasion Chance", typeof(float)),
               new Value("Evasion Proximity Threshold", typeof(float)),
               new Value("Dive Retreat Chance", typeof(float)),
           }),
           new TagBlock("Cover Properties", 64, 3, new IMetaNode[] { 
               new Flags("Flags", new string[] { "Flag1" }, 32),
               new Value("Hide Behind Cover Time", typeof(float)),
               new Value("To", typeof(float)),
               new Value("Cover Vitality Threshold", typeof(float)),
               new Value("Cover Shield Fraction", typeof(float)),
               new Value("Cover Check Delay", typeof(float)),
               new Value("Emerge From Cover When Shielded", typeof(float)),
               new Value("Cover Danger Threshold", typeof(float)),
               new Value("Danger Upper Threshold", typeof(float)),
               new Value("Cover Chance", typeof(float)),
               new Value("To", typeof(float)),
               new Value("Proximity Self Preserve", typeof(float)),
               new Value("Disallow Cover Distance", typeof(float)),
               new Value("Proximity Melee Distance", typeof(float)),
               new Value("Unreachable Enemy Danger Threshold", typeof(float)),
               new Value("Scary Target Threshold", typeof(float)),
           }),
           new TagBlock("Retreat Properties", 76, 3, new IMetaNode[] { 
               new Flags("Retreat Flags", new string[] { "Zig-Zag_when_Fleeing", "Unused1" }, 32),
               new Value("Shield Threshold", typeof(float)),
               new Value("Scary Target Threshold", typeof(float)),
               new Value("Danger Threshold", typeof(float)),
               new Value("Proximity Threshold", typeof(float)),
               new Value("Min/Max Forced Cower Time Bounds", typeof(float)),
               new Value("To", typeof(float)),
               new Value("Min/Max Cower Time Bounds", typeof(float)),
               new Value("To", typeof(float)),
               new Value("Proximity ambush Threshold", typeof(float)),
               new Value("Awareness Ambush Threshold", typeof(float)),
               new Value("Leader Dead Retreat Chance", typeof(float)),
               new Value("Peer Dead Retreat Chance", typeof(float)),
               new Value("Second Peer Dead Retreat Chance", typeof(float)),
               new Value("ZigZag Angle", typeof(float)),
               new Value("ZigZag Period", typeof(float)),
               new Value("Retreat Grenade Chance", typeof(float)),
               new TagReference("Backup_Weapon", "weap"),
           }),
           new TagBlock("Search Properties", 20, 3, new IMetaNode[] { 
               new Flags("Search Flags", new string[] { "Crouch_on_Investigation", "Walk_on_Pursuit" }, 32),
               new Value("Search Time", typeof(float)),
               new Value("To", typeof(float)),
               new Value("Uncover Distance Bounds", typeof(float)),
               new Value("To", typeof(float)),
           }),
           new TagBlock("Pre-Search Properties", 36, 3, new IMetaNode[] { 
               new Flags("Flags", new string[] { "Flag1" }, 32),
               new Value("Min Presearch Time", typeof(float)),
               new Value("To", typeof(float)),
               new Value("Max Presearch Time", typeof(float)),
               new Value("To", typeof(float)),
               new Value("Min Certainty Radius", typeof(float)),
               new Value("DEPRECATED", typeof(float)),
               new Value("Min Suppressing Time", typeof(float)),
               new Value("To", typeof(float)),
           }),
           new TagBlock("Idle Properties", 12, 3, new IMetaNode[] { 
               new Padding(4),
               new Value("Idle Pose Delay Time", typeof(float)),
               new Value("To", typeof(float)),
           }),
           new TagBlock("Vocalization Properties", 8, 1, new IMetaNode[] { 
               new Value("Look Comment Time", typeof(float)),
               new Value("Look Long Comment Time", typeof(float)),
           }),
           new TagBlock("Boarding Properties", 16, 1, new IMetaNode[] { 
               new Flags("Flags", new string[] { "Airborne_Boarding" }, 32),
               new Value("Max Distance", typeof(float)),
               new Value("Abort Distance", typeof(float)),
               new Value("Max Speed", typeof(float)),
           }),
           new TagBlock("Boss Properties", 12, 1, new IMetaNode[] { 
               new Padding(4),
               new Value("Flurry Damage Threshold", typeof(float)),
               new Value("Flurry Time", typeof(float)),
           }),
           new TagBlock("Weapons Properties", 204, 100, new IMetaNode[] { 
               new Flags("Flags", new string[] { "Bursting_Inhibits_Movement", "Must_Crouch_To_Shoot", "Use_Extended_Safe_to_Save_Range" }, 32),
               new TagReference("Weapon", "weap"),
               new Value("Maximum Firing Range", typeof(float)),
               new Value("Minimum Firing Range", typeof(float)),
               new Value("Normal Combat Range", typeof(float)),
               new Value("To", typeof(float)),
               new Value("Bombardment Range", typeof(float)),
               new Value("Max Special Target Distance", typeof(float)),
               new Value("Timid Combat Range", typeof(float)),
               new Value("To", typeof(float)),
               new Value("Aggressive Combat Range", typeof(float)),
               new Value("To", typeof(float)),
               new Value("Super Ballistic Range", typeof(float)),
               new Value("Ballistic Firing Bounds", typeof(float)),
               new Value("To", typeof(float)),
               new Value("Ballistic Fraction Bounds", typeof(float)),
               new Value("To", typeof(float)),
               new Value("First Burst Delay Time", typeof(float)),
               new Value("To", typeof(float)),
               new Value("Surprise Delay Time", typeof(float)),
               new Value("Surprise Fire-Wildly Time", typeof(float)),
               new Value("Death Fire-Wildly Chance", typeof(float)),
               new Value("Death Fire-Wildly Time", typeof(float)),
               new Value("Custom Stand Gun Offset i", typeof(float)),
               new Value("Custom Stand Gun Offset j", typeof(float)),
               new Value("Custom Stand Gun Offset k", typeof(float)),
               new Value("Custom Crouch Gun Offset i", typeof(float)),
               new Value("Custom Crouch Gun Offset j", typeof(float)),
               new Value("Custom Crouch Gun Offset k", typeof(float)),
               new HaloPlugins.Enum("Special Fire Mode", new string[] { "None", "Overcharge", "Secondary_Trigger" }, 32),
               new HaloPlugins.Enum("Special Fire Situation", new string[] { "Never", "Enemy_Visible", "Enemy_out_of_Sight", "Strafing" }, 32),
               new Value("Special Fire Chance", typeof(float)),
               new Value("Special Fire Delay", typeof(float)),
               new Value("Special Damage Modifier", typeof(float)),
               new Value("Special Projectile error", typeof(float)),
               new Value("Drop Weapon Loaded", typeof(float)),
               new Value("To", typeof(float)),
               new Value("Drop Weapon Ammo", typeof(short)),
               new Value("To", typeof(short)),
               new Value("Normal Accuracy Bounds", typeof(float)),
               new Value("To", typeof(float)),
               new Value("Normal Accuracy TIme", typeof(float)),
               new Value("Heroic Accuracy Bounds", typeof(float)),
               new Value("To", typeof(float)),
               new Value("Heroic Accuracy Time", typeof(float)),
               new Value("Legendary Accuracy Bounds", typeof(float)),
               new Value("To", typeof(float)),
               new Value("Legendary Accuracy Time", typeof(float)),
               new Padding(4),
               new TagReference("Weapon_Melee_Damage", "weap"),
           }),
           new TagBlock("Firing Pattern Properties", 16, 100, new IMetaNode[] { 
               new TagReference("Weapon", "weap"),
               new TagBlock("Firing Patterns", 64, 2, new IMetaNode[] { 
                   new Value("Rate of Fire", typeof(float)),
                   new Value("Target Tracking", typeof(float)),
                   new Value("Target Leading", typeof(float)),
                   new Value("Burst Origin Radius", typeof(float)),
                   new Value("Burst Origin Angle", typeof(float)),
                   new Value("Burst Return Length", typeof(float)),
                   new Value("To", typeof(float)),
                   new Value("Burst Return Angle", typeof(float)),
                   new Value("Burst Duration", typeof(float)),
                   new Value("To", typeof(float)),
                   new Value("Burst Separation", typeof(float)),
                   new Value("To", typeof(float)),
                   new Value("Weapon Damage Modifier", typeof(float)),
                   new Value("Projectile Error", typeof(float)),
                   new Value("Burst Angular Velocity", typeof(float)),
                   new Value("Maximum Error Angle", typeof(float)),
               }),
           }),
           new TagBlock("Grenade Properties", 60, 10, new IMetaNode[] { 
               new Flags("Flags", new string[] { "Flag1" }, 32),
               new HaloPlugins.Enum("Grenade Type", new string[] { "Human_Fragmentation", "Covenant_Plasma" }, 32),
               new HaloPlugins.Enum("Trajectory Type", new string[] { "Toss", "Lob", "Bounce" }, 16),
               new Value("Minimum Enemy Count", typeof(short)),
               new Value("Enemy Radius", typeof(float)),
               new Value("Grenade Ideal Velocity", typeof(float)),
               new Value("Grenade Velocity", typeof(float)),
               new Value("Grenade Ranges", typeof(float)),
               new Value("To", typeof(float)),
               new Value("Collateral Damage Radius", typeof(float)),
               new Value("Grenade Chance", typeof(float)),
               new Value("Grenade Throw Delay", typeof(float)),
               new Value("Grenade Uncover Chance", typeof(float)),
               new Value("Anti-Vehicle Grenade Chance", typeof(float)),
               new Value("Grenade Count", typeof(short)),
               new Value("To", typeof(short)),
               new Value("Don't Drop Grenades Chance", typeof(float)),
           }),
           new TagBlock("Vehicle Properties", 180, 100, new IMetaNode[] { 
               new TagReference("Vehicle", "vehi"),
               new TagReference("Style", "styl"),
               new Flags("Flags", new string[] { "Passengers_Adopt_Original_Squad" }, 32),
               new Value("AI Pathfinding Radius", typeof(float)),
               new Value("AI Destination Radius", typeof(float)),
               new Value("AI Deceleration Distance", typeof(float)),
               new Value("AI Turning Radius", typeof(float)),
               new Value("AI Inner Turning Radius", typeof(float)),
               new Value("AI Ideal Turning Radius", typeof(float)),
               new Value("AI Banshee Steering Maximum", typeof(float)),
               new Value("AI Max Steering Angle", typeof(float)),
               new Value("AI Max Steering Delta", typeof(float)),
               new Value("AI Oversteering Scale", typeof(float)),
               new Value("AI Oversteering Bounds", typeof(float)),
               new Value("To", typeof(float)),
               new Value("AI Side Slip Distance", typeof(float)),
               new Value("AI Avoidance Distance", typeof(float)),
               new Value("AI Min Urgency", typeof(float)),
               new Value("AI Throttle Maximum", typeof(float)),
               new Value("AI Goal Min Throttle Scale", typeof(float)),
               new Value("AI Turn Min Throttle Scale", typeof(float)),
               new Value("AI Direction Min Throttle Scale", typeof(float)),
               new Value("AI Acceleration Scale", typeof(float)),
               new Value("AI Throttle Blend", typeof(float)),
               new Value("Theoretical Max Speed", typeof(float)),
               new Value("Error Scale", typeof(float)),
               new Value("AI Allowable Aim Deviation Angle", typeof(float)),
               new Value("AI Charge Tight Angle Distance", typeof(float)),
               new Value("AI Charge Tight Angle", typeof(float)),
               new Value("AI Charge Repeat Timeout", typeof(float)),
               new Value("AI Charge Look-Ahead Time", typeof(float)),
               new Value("AI Consider Distance", typeof(float)),
               new Value("AI Charge Abort Distance", typeof(float)),
               new Value("Vehicle Ram Timeout", typeof(float)),
               new Value("Ram Paralysis Time", typeof(float)),
               new Value("AI Cover Damage Threshold", typeof(float)),
               new Value("AI Cover Min Distance", typeof(float)),
               new Value("AI Cover Time", typeof(float)),
               new Value("AI Cover Min Boost Distance", typeof(float)),
               new Value("Turtling Recent Damage Threshold", typeof(float)),
               new Value("Turtling Min Time", typeof(float)),
               new Value("Turtling Timeout", typeof(float)),
               new HaloPlugins.Enum("Obstacle Ignore Size", new string[] { "None", "Tiny", "Small", "Medium", "Large", "Huge", "Inmobile" }, 32),
           }),
           });
       }
    }
}
