--mounting 3d model paths and texture paths 












mount_vfs_model_path	(current_mod_path.."/Shapes")
mount_vfs_liveries_path (current_mod_path.."/Liveries")
mount_vfs_texture_path  (current_mod_path.."/Textures/AH-1G")
ApacheA =  {
        
	Name 				=   'AH-1G',
	DisplayName			= _('AH-1G'),
	
	HumanCockpit 		= false,
	--HumanCockpitPath    = current_mod_path..'/Cockpit/',
	
	Picture 			= "AH-1W.png",
	Rate 				= 40, -- RewardPoint in Multiplayer
	Shape 				= "AH-1G",
	
	shape_table_data 	= 
	{
		{
			file  	 = 'AH-1G';
			life  	 = 18; -- lifebar
			vis   	 = 3; -- visibility gain.
			desrt    = 'ah-64-oblomok'; -- Name of destroyed object file name
			fire  	 = { 300, 2}; -- Fire on the ground after destoyed: 300sec 2m
			username = 'AH-1G';
			index    =  WSTYPE_PLACEHOLDER;
                        classname 	= "lLandPlane";
			positioning = "BYNORMAL";
			drawonmap 	= true;
		},
		{
			name  = "ah-64-oblomok";
			file  = "ah-64-oblomok";
			fire  = { 240, 2};
		},

	},
	
	
	mapclasskey 		= "P0091000021",
	attribute  			= {wsType_Air, wsType_Helicopter, wsType_Battleplane, WSTYPE_PLACEHOLDER ,"Attack helicopters",},
	Categories 			= {"{828CEADE-3F1D-40aa-93CE-8CDB73FE2710}", "Helicopter",},	
	-------------------------
	--  HelicopterConst.lua  157
		length	=	17.87,
		height	=	4.15,
		rotor_height	=	1.6,
		rotor_diameter	=	14.63,
		blades_number	=	4,
		blade_area	=	3.39,
		rotor_RPM	=	289,
		engines_count	=	2,
		blade_chord	=	0.53,
		rotor_MOI	=	5800,
		rotor_pos = 	{0.123,	1.47,	0},
		thrust_correction	=	0.75,
		fuselage_Cxa0	=	0.5,
		fuselage_Cxa90	=	5.9,
		fuselage_area	=	4,
		centering	=	-0.22,
		tail_pos = 	{-9,	1.401,	0},
		tail_fin_area	=	1.45,
		tail_stab_area	=	2.94,
		M_empty	=	5345,
		M_nominal	=	6552,
		M_max	=	9225,
		MOI = 	{6170,	28982,	33441},
		M_fuel_max	=	1157,
		V_max	=	365,
		V_max_cruise	=	296,
		Vy_max	=	12.7,
		H_stat_max_L	=	4570,
		H_stat_max	=	3505,
		H_din_two_eng	=	6400,
		H_din_one_eng	=	3290,
		range	=	480,
		flight_time_typical	=	110,
		flight_time_maximum	=	189,
		main_gear_pos = 	{1.062,	-2.209,	1.017},
		nose_gear_pos = 	{-9.522,	-1.952,	0},
		
		H_max = 3050, -- vu dans dbmods.lua
		lead_stock_main	=	0.37,
		lead_stock_support	=	0.147,
		stores_number	=	4,
		scheme	=	0,
		fire_rate	=	625,
		crew_size	=	2,
		crew_members = 
		{
			[1] =
			{
				ejection_seat_name	=	10,
				pilot_name			= 	11,
				drop_canopy_name	=	0,
				pos = 	{3,0.7,0},
				ejection_added_speed = {5.0 ,30.0, 0},
				drop_parachute_name	 = "pilot_su27_parachute",
			}
		},

		RCS	=	5,
		detection_range_max	=	0,
		IR_emission_coeff	=	0.2,
		Vy_land_max	=	12.8,
		Ny_max	=	3.5,
		radar_can_see_ground	=	false,
		sound_name	= "Aircrafts/Engines/RotorAH64",
		engine_data = 
		{
			power_take_off	=	1044,
			power_max	=	1044,
			power_WEP	=	1044,
			power_TH_k = 
			{
				[1] = 	{-1.8859,	17.806,	1030},
				[2] = 	{-2.2584,	20.573,	1030},
				[3] = 	{-0.9078,	-3.1185,	1051.6},
				[4] = 	{-0.2853,	-0.614,	786.19},
			}, -- end of power_TH_k
			SFC_k = 	{0,	-0.000312128,	0.63},
			power_RPM_k = 	{-0.0778,	0.2506,	0.8099},
			power_RPM_min	=	9.1384,
			sound_name	=	"Aircrafts/Engines/EngineGE",
		}, -- end of engine_data
		cannon_sight_type	=	2,
		--net_animation = { 208, 43, 209, 44--[[spotlight]]},
		fires_pos = 
		{
			[1] = 	{0,	0.7,	0},
			[2] = 	{-0.6,	1.1,	0},
			[3] = 	{0,	0,	0},
			[4] = 	{0,	0,	0},
			[5] = 	{-6.8,	0.8,	0},
			[6] = 	{-0.623,	-0.746,	0},			
			[7] = 	{0,	0,	0},
			[8] = 	{0,	0,	0},
			[9] = 	{0,	0,	0},
			[10] = 	{0,	0,	0},
			[11] = 	{0,	0,	0},
		}, -- end of fires_pos
        effects_presets = {
            {effect = "APU_STARTUP_BLAST", preset = "ka50", ttl = 3.0},
	        },
		cargo_radius_in_menu = 2000, -- radius, when cargo displays in menu
		helicopter_hook_pos={0.0,-0.5,0.0},
		h_max_gear_hook= 3.3,
		net_animation = { 208, 43, 209, 44--[[spotlight]]},
	
		LandRWCategories = 
        {
            [1] = 
            {
                Name = "AircraftCarrier",
            }, -- end of [1]
            [2] = 
            {
                Name = "HelicopterCarrier",
            }, -- end of [2]
        }, -- end of LandRWCategories
        MaxFuelWeight = "1157",
        MaxHeight = "6400",
        MaxSpeed = "300",
        MaxTakeOffWeight = "9225",
        Picture = "AH-64.png",
        Rate = "50",
        Shape = "AH-1G",
        TakeOffRWCategories = 
        {
            [1] = 
            {
                Name = "AircraftCarrier",
            }, -- end of [1]
            [2] = 
            {
                Name = "HelicopterCarrier",
            }, -- end of [2]
        }, -- end of TakeOffRWCategories
		
		
	
 

        Navpoint_Panel = true,
		Fixpoint_Panel = true,
-- Countermeasures
				passivCounterm = {
		CMDS_Edit = true,
		SingleChargeTotal = 60,
		chaff = {default = 30, increment = 3, chargeSz = 1},
		flare = {default = 30,  increment = 3, chargeSz = 1},
	},

	chaff_flare_dispenser 	= {
			
			
		{ dir =  {0, 1, 0}, pos =   {-3.027,  0.35, -0.53}, }, -- Chaff L
		{ dir =  {0, 1, 0}, pos =   {-3.727,  0.35, 0.53}, },  -- Chaff R
	    { dir =  {0, 1,  0}, pos =  {-3.032,  0.35, -0.532}, }, -- Flares L	
		{ dir =  {0, 1,  0}, pos =  {-3.732,  0.35,  0.532}, }, -- Flares R
	},


        --Crew = 2,
        CanopyGeometry = {
            azimuth = {-165.0, 165.0},
            elevation = {-80.0, 90.0}
        },
        Sensors = {
            OPTIC = {"TADS DTV", "TADS DVO", "TADS FLIR"},
            RWR = "Abstract RWR"
        },
        Countermeasures = {         
        },
		
		HumanRadio = {
			frequency = 124.0,
			editable = true,
			minFrequency = 100,
			maxFrequency = 400,
			modulation = MODULATION_AM
		},

		Failures = {
            { id = 'hydro_main',  label = _('HYDRO MAIN'), 		enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
            { id = 'hydro_common',  label = _('HYDRO COMMON'), 	enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
            { id = 'l_engine',  label = _('L-ENGINE'), 		enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
            { id = 'r_engine',  label = _('R-ENGINE'), 		enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
            { id = 'asc_p',  	label = _('ASC PITCH'), 	enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
            { id = 'asc_r',  	label = _('ASC ROLL'), 		enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
            { id = 'asc_y',  	label = _('ASC YAW'), 		enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
            { id = 'asc_a',  	label = _('ASC ALT'), 		enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
			{ id = 'abris_software',  	label = _('ABRIS SOFTWARE'),	enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
 			{ id = 'abris_hardware',  	label = _('ABRIS HARDWARE'),	enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
			{ id = 'laser_failure' ,  	label = _('LASER FAILURE'),		enable = false, hh = 0, mm = 0, mmint = 1, prob = 100 },
       },
	   
			Guns = {
			 gun_mount("2A42", { count1 = 240, count2 = 220 },{muzzle_pos= {4.301, -1.471,  0.17}}),
			
			 gun_mount("2A42", { count1 = 240, count2 = 220 },{muzzle_pos= {1.85, -0.86,  1.0}}),	 
			
			gun_mount("2A42", { count1 = 240, count2 = 220 },{muzzle_pos= {1.85, -0.87,  -0.98}}),
			},

				
	Pylons =     {
                pylon(1, 0, 0.288000, -0.976000, -2.425000, 
            {
                FiZ = 0,--arg = 308,
				
            },
            {
                
			    { CLSID = "{FD90A1DC-9147-49FA-BF56-CB83EF0BD32B}" ,  attach_point_position = { 0.02,  -0.05, 0.85}},            --LAU-61 - 19 2.75' rockets MK151 HE
               
            { CLSID = "M260_HYDRA"    ,  attach_point_position = { 0.02,  0.20 , 0.85}},                   --LAU-131 - 7 2.75' rockets M151 (HE)

{ CLSID = "XM158_MK1"    ,  attach_point_position = { 0.02,  0.15 , 0.87}},                   --XM158- 7 2.75' rockets M151 


{ CLSID = "XM158_MK5"    ,  attach_point_position = { 0.02,  0.15 , 0.87}},                   --XM158- 7 2.75' rockets M151 


{ CLSID = "XM158_M151"    ,  attach_point_position = { 0.02,  0.15 , 0.87}},                   --XM158- 7 2.75' rockets M151 


{ CLSID = "XM158_M156"    ,  attach_point_position = { 0.02,  0.15 , 0.87}},                   --XM158- 7 2.75' rockets M151 


{ CLSID = "XM158_M274"    ,  attach_point_position = { 0.02,  0.15 , 0.87}},                   --XM158- 7 2.75' rockets M151 


{ CLSID = "XM158_M257"    ,  attach_point_position = { 0.02,  0.15 , 0.87}},                   --XM158- 7 2.75' rockets M151 


{ CLSID = "M261_MK151"    ,  attach_point_position = { 0.02,  0.15 , 0.87}},                   --XM158- 7 2.75' rockets M151 


{ CLSID = "M261_MK156"    ,  attach_point_position = { 0.02,  0.15 , 0.87}},                   --XM158- 7 2.75' rockets M151 

 }
        ),
        pylon(2, 0, 0.288000, -0.976000, -1.685000,
            {
                FiZ = 0,
				--arg = 309,
				 use_full_connector_position=true, connector = "Dummy_Objat_L", arg = 3 , arg_value = -0.20,
            },
            {
                ----
                
				}
        ),
        pylon(3, 0, 0.288000, -0.976000, 1.685000,
            {
                FiZ = 0,
				arg = 310,
            },
            {
                ---
                
				}
        ),
        pylon(4, 0, 0.288000, -0.976000, 2.425000,
            {
                FiZ = 0,--arg = 311,
				use_full_connector_position=true, connector = "Dummy_Objat_R", arg = 5 , arg_value = -0.20,
            },
            {
            	

			    { CLSID = "{FD90A1DC-9147-49FA-BF56-CB83EF0BD32B}" , attach_point_position = { 0.02,  -0.05, -0.85}},                  --LAU-61 - 19 2.75' rockets MK151 HE

{ CLSID = "M260_HYDRA"   , attach_point_position =  { 0.02,  0.20 , -0.85}},                  --LAU-131*3 - 7 2.75' rockets M151 (HE)


{ CLSID = "XM158_MK1"    ,  attach_point_position = { 0.02,  0.15 , -0.87}},                   --XM158- 7 2.75' rockets M151 


{ CLSID = "XM158_MK5"    ,  attach_point_position = { 0.02,  0.15 , -0.87}},                   --XM158- 7 2.75' rockets M151 


{ CLSID = "XM158_M151"    ,  attach_point_position = { 0.02,  0.15 , -0.87}},                   --XM158- 7 2.75' rockets M151 


{ CLSID = "XM158_M156"    ,  attach_point_position = { 0.02,  0.15 , -0.87}},                   --XM158- 7 2.75' rockets M151 


{ CLSID = "XM158_M274"    ,  attach_point_position = { 0.02,  0.15 , -0.87}},                   --XM158- 7 2.75' rockets M151 


{ CLSID = "XM158_M257"    ,  attach_point_position = { 0.02,  0.15 , -0.87}},                   --XM158- 7 2.75' rockets M151 


{ CLSID = "M261_MK151"    ,  attach_point_position = { 0.02,  0.15 , -0.87}},                   --XM158- 7 2.75' rockets M151 


{ CLSID = "M261_MK156"    ,  attach_point_position = { 0.02,  0.15 , -0.87}},                   --XM158- 7 2.75' rockets M151
            }
        ),
    },
	
	Tasks = {
        aircraft_task(CAS),
        aircraft_task(GroundAttack),
		aircraft_task(Escort),
        aircraft_task(AFAC),
        aircraft_task(AntishipStrike)
    },	
	DefaultTask = aircraft_task(CAS),

	--damage , index meaning see in  Scripts\Aircrafts\_Common\Damage.lua
Damage = {
	[0]  = {critical_damage = 2, args = {146}},
	[1]  = {critical_damage = 1, args = {296}},
	[2]  = {critical_damage = 1, args = {297}},
	[3]  = {critical_damage = 12, args = {65}},
	[4]  = {critical_damage = 12, args = {150}},
	[5]  = {critical_damage = 12, args = {149}},
	[7]  = {critical_damage = 4, args = {249}},
	[9]  = {critical_damage = 13, args = {154, 299}},
	[10] = {critical_damage = 13, args = {153, 303}},
	[11] = {critical_damage = 2, args = {167}},
	[12] = {critical_damage = 2, args = {161}},
	[29] = {critical_damage = 8, args = {224}},
	[30] = {critical_damage = 8, args = {214}},
	[35] = {critical_damage = 8, args = {224}},
	[36] = {critical_damage = 8, args = {214}},
	[45] = {critical_damage = 4, args = {235}},
	[46] = {critical_damage = 4, args = {233}},
	[63] = {critical_damage = 10, args = {53}},
	[55] = {critical_damage = 3, args = {159}},
	[56] = {critical_damage = 13, args = {81, 158}, deps_cells = {55}},
	[57] = {critical_damage = 13, args = {81, 157}, deps_cells = {55}},
	[59] = {critical_damage = 4, args = {148}},
	[61] = {critical_damage = 8, args = {147}},
	[62] = {critical_damage = 8, args = {250}},
	[82] = {critical_damage = 14, args = {152}},
	},
	
	DamageParts = 
	{  
		    [1] = "AH-64A-WING-R",
			[2] = "AH-64A-WING-L",
			[4] = "AH-64A-TAIL",
	},
	
	lights_data = {
		typename = "collection",
		lights = {
		
		   [1] = { typename = "collection", -- form lights aft
				lights = {
					
					
					{typename = "argnatostrobelight",connector = "RED_BEACON R",argument = 193,period = 2.0,color = {1.0, 0.0, 0.0},phase_shift = 0.0},
                     {typename = "argnatostrobelight",connector = "RED_BEACON L",argument = 194,period = 2.0,color = {1.0, 0.0, 0.0},phase_shift = 0.0},						
					
					
					
			},
			},
		
		
		
			[2] = { typename = "collection", -- form lights aft
				lights = {
					
					
					{typename = "spotlight", connector = "MAIN_SPOT_PTR",argument = 209, connector = "MAIN_SPOT_PTR"},
					 
				},
			},
			[3] = { typename = "collection", -- left nav light
				lights = {
					{typename = "omnilight",argument = 190}, 
					{typename = "omnilight",argument = 191}, 
					{typename = "omnilight",argument = 192}, 
					
				},
			},
			[4] = { typename = "collection", -- tail nav light
				lights = {
				 {typename = "argnatostrobelight",connector = "RED_BEACON",argument = 195,period = 2.0,color = {1.0, 0.0, 0.0},phase_shift = 0.0},	
				 {typename = "argnatostrobelight",connector = "RED_BEACON",argument = 196,period = 2.0,color = {1.0, 0.0, 0.0},phase_shift = 0.0},	
				
					
					
					
						},
			},
			[5] = { typename = "collection", -- tail nav light
				lights = {
					--{typename = "spotlight",argument = 0}, -- FORMATION LIGHTS   
					--{typename = "spotlight",connector = "MAIN_SPOT_PTL",argument_1 = 208,period = 2.0,color = {1.0, 0.0, 0.0},phase_shift = 0.0},
						
					
					
					
					
				},
			},
		}
	}, -- end lights_data
					

			  
			
}	

add_aircraft(ApacheA)
