# Author(s): TheGeneral
# Aircraft
JAP_mitsubishi_aerospace_aircraft_manufacturer = {
	allowed = { original_tag = JAP }
	icon = GFX_idea_Mitsubishi_aerospace
	name = JAP_mitsubishi_aerospace_aircraft_manufacturer

	equipment_type = {
		mio_cat_eq_only_light_aircraft
		mio_cat_eq_only_medium_aircraft
		mio_cat_eq_only_cv_medium_aircraft
		sam_missile_equipment
	}

	research_categories = {
		CAT_small_plane
		CAT_mr_fighter
		CAT_s_fighter
		CAT_l_fighter
		CAT_sam
		CAT_air_to_air_weapons
	}

	research_bonus = 0.03

	tree_header_text = {
		text = "Wings & Pilot Readiness"
		x = 2
	}

	tree_header_text = {
		text = "Air Defense Shield"
		x = 7
	}

	initial_trait = {
		name = JAP_mitsubishi_aerospace_aircraft_trait

		equipment_bonus = {
			maximum_speed = 0.15
			air_range = 0.10
			reliability = 0.10
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_tx_trainer
		name = JAP_mitsubishi_aerospace_aircraft_trait_tx_trainer
		icon = GFX_generic_mio_trait_icon_light_aircraft_range

		position = { x = 0 y = 0 }

		limit_to_equipment_type = {
			mio_cat_eq_only_light_aircraft
			mio_cat_eq_only_medium_aircraft
			mio_cat_eq_only_cv_medium_aircraft
		}

		equipment_bonus = {
			maximum_speed = 0.05
			air_range = 0.05
			reliability = 0.04
			build_cost_ic = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_advanced_autopilot
		name = JAP_mitsubishi_aerospace_aircraft_trait_advanced_autopilot
		icon = GFX_generic_mio_trait_icon_light_aircraft_agility

		position = { x = 2 y = 0 }
		relative_position_id = JAP_mitsubishi_aerospace_aircraft_trait_tx_trainer

		limit_to_equipment_type = {
			mio_cat_eq_only_light_aircraft
			mio_cat_eq_only_medium_aircraft
			mio_cat_eq_only_cv_medium_aircraft
		}

		equipment_bonus = {
			air_agility = 0.05
			reliability = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_composite_trainer
		name = JAP_mitsubishi_aerospace_aircraft_trait_composite_trainer
		icon = GFX_generic_mio_trait_icon_light_aircraft_weight

		position = { x = 4 y = 0 }
		relative_position_id = JAP_mitsubishi_aerospace_aircraft_trait_tx_trainer

		limit_to_equipment_type = {
			mio_cat_eq_only_light_aircraft
			mio_cat_eq_only_medium_aircraft
			mio_cat_eq_only_cv_medium_aircraft
		}

		equipment_bonus = {
			weight = -0.05
			air_range = 0.06
			build_cost_ic = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_digital_glass
		name = JAP_mitsubishi_aerospace_aircraft_trait_digital_glass
		icon = GFX_generic_mio_trait_icon_light_aircraft_defense

		position = { x = 1 y = 1 }
		relative_position_id = JAP_mitsubishi_aerospace_aircraft_trait_tx_trainer
		all_parents = {
			JAP_mitsubishi_aerospace_aircraft_trait_advanced_autopilot
			JAP_mitsubishi_aerospace_aircraft_trait_tx_trainer
		}

		limit_to_equipment_type = {
			mio_cat_eq_only_light_aircraft
			mio_cat_eq_only_medium_aircraft
			mio_cat_eq_only_cv_medium_aircraft
		}

		equipment_bonus = {
			night_penalty = -0.15
			air_defence = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_training_pylons
		name = JAP_mitsubishi_aerospace_aircraft_trait_training_pylons
		icon = GFX_generic_mio_trait_icon_air_ground_attack

		position = { x = 0 y = 1 }
		relative_position_id = JAP_mitsubishi_aerospace_aircraft_trait_digital_glass
		all_parents = {
			JAP_mitsubishi_aerospace_aircraft_trait_digital_glass
		}

		limit_to_equipment_type = {
			mio_cat_eq_only_light_aircraft
			mio_cat_eq_only_medium_aircraft
			mio_cat_eq_only_cv_medium_aircraft
		}

		equipment_bonus = {
			air_ground_attack = 0.10
			build_cost_ic = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_engine_thrust
		name = JAP_mitsubishi_aerospace_aircraft_trait_engine_thrust
		icon = GFX_generic_mio_trait_icon_light_aircraft

		position = { x = 0 y = 2 }
		relative_position_id = JAP_mitsubishi_aerospace_aircraft_trait_digital_glass
		all_parents = {
			JAP_mitsubishi_aerospace_aircraft_trait_training_pylons
		}

		limit_to_equipment_type = {
			mio_cat_eq_only_light_aircraft
			mio_cat_eq_only_medium_aircraft
			mio_cat_eq_only_cv_medium_aircraft
		}

		equipment_bonus = {
			thrust = 0.10
			fuel_consumption = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_aerodynamic_clean
		name = JAP_mitsubishi_aerospace_aircraft_trait_aerodynamic_clean
		icon = GFX_generic_mio_trait_icon_light_aircraft_range

		position = { x = 3 y = 1 }
		relative_position_id = JAP_mitsubishi_aerospace_aircraft_trait_tx_trainer
		all_parents = {
			JAP_mitsubishi_aerospace_aircraft_trait_advanced_autopilot
			JAP_mitsubishi_aerospace_aircraft_trait_composite_trainer
		}

		limit_to_equipment_type = {
			mio_cat_eq_only_light_aircraft
			mio_cat_eq_only_medium_aircraft
			mio_cat_eq_only_cv_medium_aircraft
		}

		equipment_bonus = {
			maximum_speed = 0.05
			air_range = 0.06
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_lightweight_systems
		name = JAP_mitsubishi_aerospace_aircraft_trait_lightweight_systems
		icon = GFX_generic_mio_trait_icon_reliability

		position = { x = 3 y = 2 }
		relative_position_id = JAP_mitsubishi_aerospace_aircraft_trait_tx_trainer
		all_parents = {
			JAP_mitsubishi_aerospace_aircraft_trait_aerodynamic_clean
		}

		limit_to_equipment_type = {
			mio_cat_eq_only_light_aircraft
			mio_cat_eq_only_medium_aircraft
			mio_cat_eq_only_cv_medium_aircraft
		}

		equipment_bonus = {
			weight = -0.05
			reliability = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_range_profile
		name = JAP_mitsubishi_aerospace_aircraft_trait_range_profile
		icon = GFX_generic_mio_trait_icon_air_range

		position = { x = 3 y = 3 }
		relative_position_id = JAP_mitsubishi_aerospace_aircraft_trait_tx_trainer
		all_parents = {
			JAP_mitsubishi_aerospace_aircraft_trait_lightweight_systems
		}

		limit_to_equipment_type = {
			mio_cat_eq_only_light_aircraft
			mio_cat_eq_only_medium_aircraft
			mio_cat_eq_only_cv_medium_aircraft
		}

		equipment_bonus = {
			air_range = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_stability_autopilot
		name = JAP_mitsubishi_aerospace_aircraft_trait_stability_autopilot
		icon = GFX_generic_mio_trait_icon_air_agility

		position = { x = 2 y = 4 }
		relative_position_id = JAP_mitsubishi_aerospace_aircraft_trait_tx_trainer
		all_parents = {
			JAP_mitsubishi_aerospace_aircraft_trait_range_profile
			JAP_mitsubishi_aerospace_aircraft_trait_engine_thrust
		}

		limit_to_equipment_type = {
			mio_cat_eq_only_light_aircraft
			mio_cat_eq_only_medium_aircraft
			mio_cat_eq_only_cv_medium_aircraft
		}

		equipment_bonus = {
			air_agility = 0.15
			reliability = 0.05
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_high_altitude
		name = JAP_mitsubishi_aerospace_aircraft_trait_high_altitude
		icon = GFX_generic_mio_trait_icon_air_defence

		position = { x = 2 y = 5 }
		relative_position_id = JAP_mitsubishi_aerospace_aircraft_trait_tx_trainer
		all_parents = {
			JAP_mitsubishi_aerospace_aircraft_trait_stability_autopilot
		}

		limit_to_equipment_type = {
			mio_cat_eq_only_light_aircraft
			mio_cat_eq_only_medium_aircraft
			mio_cat_eq_only_cv_medium_aircraft
		}

		equipment_bonus = {
			air_defence = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_export_bureau
		name = JAP_mitsubishi_aerospace_aircraft_trait_export_bureau
		icon = GFX_generic_mio_trait_icon_efficiency_gain

		position = { x = 0 y = 5 }
		relative_position_id = JAP_mitsubishi_aerospace_aircraft_trait_tx_trainer
		all_parents = {
			JAP_mitsubishi_aerospace_aircraft_trait_stability_autopilot
		}

		limit_to_equipment_type = {
			mio_cat_eq_only_light_aircraft
			mio_cat_eq_only_medium_aircraft
			mio_cat_eq_only_cv_medium_aircraft
		}

		production_bonus = {
			production_cost_factor = -0.05
			production_efficiency_gain_factor = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_maintencance_workflow
		name = JAP_mitsubishi_aerospace_aircraft_trait_maintencance_workflow
		icon = GFX_generic_mio_trait_icon_task

		position = { x = 4 y = 5 }
		relative_position_id = JAP_mitsubishi_aerospace_aircraft_trait_tx_trainer
		all_parents = {
			JAP_mitsubishi_aerospace_aircraft_trait_stability_autopilot
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
			military_industrial_organization_funds_gain = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_hud_integration
		name = JAP_mitsubishi_aerospace_aircraft_trait_hud_integration
		icon = GFX_generic_mio_trait_icon_air_attack

		position = { x = 0 y = 6 }
		relative_position_id = JAP_mitsubishi_aerospace_aircraft_trait_tx_trainer
		all_parents = {
			JAP_mitsubishi_aerospace_aircraft_trait_high_altitude
		}

		limit_to_equipment_type = {
			mio_cat_eq_only_light_aircraft
			mio_cat_eq_only_medium_aircraft
			mio_cat_eq_only_cv_medium_aircraft
		}

		equipment_bonus = {
			air_attack = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_noise_suppression
		name = JAP_mitsubishi_aerospace_aircraft_trait_noise_suppression
		icon = GFX_generic_mio_trait_icon_light_aircraft_defense

		position = { x = 2 y = 6 }
		relative_position_id = JAP_mitsubishi_aerospace_aircraft_trait_tx_trainer
		all_parents = {
			JAP_mitsubishi_aerospace_aircraft_trait_high_altitude
		}

		limit_to_equipment_type = {
			mio_cat_eq_only_light_aircraft
			mio_cat_eq_only_medium_aircraft
			mio_cat_eq_only_cv_medium_aircraft
		}

		equipment_bonus = {
			night_penalty = -0.15
			air_defence = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_rapid_panels
		name = JAP_mitsubishi_aerospace_aircraft_trait_rapid_panels
		icon = GFX_generic_mio_trait_icon_build_cost_ic

		position = { x = 4 y = 6 }
		relative_position_id = JAP_mitsubishi_aerospace_aircraft_trait_tx_trainer
		all_parents = {
			JAP_mitsubishi_aerospace_aircraft_trait_high_altitude
		}

		limit_to_equipment_type = {
			mio_cat_eq_only_light_aircraft
			mio_cat_eq_only_medium_aircraft
			mio_cat_eq_only_cv_medium_aircraft
		}

		equipment_bonus = {
			build_cost_ic = -0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_ground_refuel
		name = JAP_mitsubishi_aerospace_aircraft_trait_ground_refuel
		icon = GFX_generic_mio_trait_icon_efficiency_cap

		position = { x = 5 y = 7 }
		relative_position_id = JAP_mitsubishi_aerospace_aircraft_trait_tx_trainer
		all_parents = {
			JAP_mitsubishi_aerospace_aircraft_trait_maintencance_workflow
			JAP_mitsubishi_aerospace_aircraft_trait_rapid_panels
		}

		limit_to_equipment_type = {
			mio_cat_eq_only_light_aircraft
			mio_cat_eq_only_medium_aircraft
			mio_cat_eq_only_cv_medium_aircraft
		}

		production_bonus = {
			production_efficiency_cap_factor = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_patriot_line
		name = JAP_mitsubishi_aerospace_aircraft_trait_patriot_line
		icon = GFX_generic_mio_trait_icon_production_capacity

		position = { x = 6 y = 0 }

		limit_to_equipment_type = {
			sam_missile_equipment
		}

		production_bonus = {
			production_capacity_factor = 0.10
			production_efficiency_cap_factor = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_glide_inteceptor
		name = JAP_mitsubishi_aerospace_aircraft_trait_glide_inteceptor
		icon = GFX_generic_mio_trait_icon_air_attack
		position = { x = 2 y = 0 }
		relative_position_id = JAP_mitsubishi_aerospace_aircraft_trait_patriot_line

		limit_to_equipment_type = {
			sam_missile_equipment
		}

		equipment_bonus = {
			air_attack = 0.05
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_interceptor_datalink
		name = JAP_mitsubishi_aerospace_aircraft_trait_interceptor_datalink
		icon = GFX_generic_mio_trait_icon_naval_strike_targetting

		position = { x = 2 y = 2 }
		relative_position_id = JAP_mitsubishi_aerospace_aircraft_trait_patriot_line
		all_parents = {
			JAP_mitsubishi_aerospace_aircraft_trait_glide_inteceptor
		}

		limit_to_equipment_type = {
			sam_missile_equipment
		}


		equipment_bonus = {
			naval_strike_targetting = 0.10
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_seeker_advancements
		name = JAP_mitsubishi_aerospace_aircraft_trait_seeker_advancements
		icon = GFX_generic_mio_trait_icon_air_attack

		position = { x = 1 y = 1 }
		relative_position_id = JAP_mitsubishi_aerospace_aircraft_trait_patriot_line
		all_parents = {
			JAP_mitsubishi_aerospace_aircraft_trait_glide_inteceptor
			JAP_mitsubishi_aerospace_aircraft_trait_patriot_line
		}

		limit_to_equipment_type = {
			sam_missile_equipment
		}

		equipment_bonus = {
			air_attack = 0.15
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_hardenend_launch
		name = JAP_mitsubishi_aerospace_aircraft_trait_hardenend_launch
		icon = GFX_generic_mio_trait_icon_reliability

		position = { x = 1 y = 3 }
		relative_position_id = JAP_mitsubishi_aerospace_aircraft_trait_patriot_line
		all_parents = {
			JAP_mitsubishi_aerospace_aircraft_trait_seeker_advancements
		}

		limit_to_equipment_type = {
			sam_missile_equipment
		}

		equipment_bonus = {
			reliability = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_missile_upgrade_suite
		name = JAP_mitsubishi_aerospace_aircraft_trait_missile_upgrade_suite
		icon = GFX_generic_mio_trait_icon_air_attack

		position = { x = 0 y = 4 }
		relative_position_id = JAP_mitsubishi_aerospace_aircraft_trait_patriot_line
		all_parents = {
			JAP_mitsubishi_aerospace_aircraft_trait_hardenend_launch
		}

		limit_to_equipment_type = {
			sam_missile_equipment
		}

		equipment_bonus = {
			air_range = 0.05
			air_attack = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_quick_reload
		name = JAP_mitsubishi_aerospace_aircraft_trait_quick_reload
		icon = GFX_generic_mio_trait_icon_task

		position = { x = 0 y = 5 }
		relative_position_id = JAP_mitsubishi_aerospace_aircraft_trait_patriot_line
		all_parents = {
			JAP_mitsubishi_aerospace_aircraft_trait_missile_upgrade_suite
		}

		limit_to_equipment_type = {
			sam_missile_equipment
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}

		production_bonus = {
			production_resource_need_factor = -0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_hypersonic_production_cell
		name = JAP_mitsubishi_aerospace_aircraft_trait_hypersonic_production_cell
		icon = GFX_generic_mio_trait_icon_maximum_speed

		position = { x = 0 y = 2 }
		relative_position_id = JAP_mitsubishi_aerospace_aircraft_trait_patriot_line
		all_parents = {
			JAP_mitsubishi_aerospace_aircraft_trait_glide_inteceptor
		}

		available = {
			JAP = {
				is_special_project_completed = sp:sp_hypersonic_missile
			}
		}

		limit_to_equipment_type = {
			sam_missile_equipment
		}

		equipment_bonus = {
			maximum_speed = 0.10
		}

		production_bonus = {
			production_efficiency_gain_factor = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_hvgp_engineering
		name = JAP_mitsubishi_aerospace_aircraft_trait_hvgp_engineering
		icon = GFX_generic_mio_trait_icon_maximum_speed

		position = { x = 2 y = 4 }
		relative_position_id = JAP_mitsubishi_aerospace_aircraft_trait_patriot_line
		all_parents = {
			JAP_mitsubishi_aerospace_aircraft_trait_hardenend_launch
		}

		limit_to_equipment_type = {
			sam_missile_equipment
		}

		equipment_bonus = {
			maximum_speed = 0.04
			air_range = 0.03
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_airborne_sam_integration
		name = JAP_mitsubishi_aerospace_aircraft_trait_airborne_sam_integration
		icon = GFX_generic_mio_trait_icon_research

		position = { x = 2 y = 5 }
		relative_position_id = JAP_mitsubishi_aerospace_aircraft_trait_patriot_line
		all_parents = {
			JAP_mitsubishi_aerospace_aircraft_trait_hvgp_engineering
		}

		limit_to_equipment_type = {
			sam_missile_equipment
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.04
		}

		on_complete = {
			JAP = {
				add_tech_bonus = {
					name = "Sam Integration Bonus"
					category = CAT_airborne
					uses = 2
					bonus = 0.15
				}
			}
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_aerospace_aircraft_trait_low_missile_husk
		name = JAP_mitsubishi_aerospace_aircraft_trait_low_missile_husk
		icon = GFX_generic_mio_trait_icon_air_agility

		position = { x = 1 y = 6 }
		relative_position_id = JAP_mitsubishi_aerospace_aircraft_trait_patriot_line
		all_parents = {
			JAP_mitsubishi_aerospace_aircraft_trait_airborne_sam_integration
			JAP_mitsubishi_aerospace_aircraft_trait_quick_reload
		}

		limit_to_equipment_type = {
			sam_missile_equipment
		}

		equipment_bonus = {
			air_agility = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
}

JAP_kawasaki_aerospace_company_aircraft_manufacturer = {
	allowed = { original_tag = JAP }
	icon = GFX_idea_kawasaki_aerospace
	name = JAP_kawasaki_aerospace_company_aircraft_manufacturer

	equipment_type = {
		mio_cat_eq_only_large_aircraft
		heavy_tank_chassis
		heavy_tank_amphibious_chassis
	}

	research_categories = {
		CAT_heli
		CAT_h_air
	}

	research_bonus = 0.01

	tree_header_text = {
		text = "Rotary-Wing Aircraft"
		x = 2
	}

	tree_header_text = {
		text = "Heavy Fixed Wing"
		x = 7
	}

	initial_trait = {
		name = JAP_kawasaki_aerospace_aircraft_trait

		equipment_bonus = {
			reliability = 0.15
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.08
		}
	}
	trait = {
		token = JAP_kawasaki_aerospace_trait_series_optimization
		name = JAP_kawasaki_aerospace_trait_series_optimization
		icon = GFX_generic_mio_trait_icon_maximum_speed

		position = { x = 0 y = 0 }

		limit_to_equipment_type = {
			heavy_tank_chassis
			heavy_tank_amphibious_chassis
		}

		equipment_bonus = {
			maximum_speed = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_aerospace_trait_engine_overhaul
		name = JAP_kawasaki_aerospace_trait_engine_overhaul
		icon = GFX_generic_mio_trait_icon_fuel_consumption

		position = { x = 0 y = 1 }
		relative_position_id = JAP_kawasaki_aerospace_trait_series_optimization
		all_parents = {
			JAP_kawasaki_aerospace_trait_series_optimization
		}

		limit_to_equipment_type = {
			heavy_tank_chassis
			heavy_tank_amphibious_chassis
		}

		equipment_bonus = {
			fuel_consumption = -0.05
			max_organisation = 0.05
			build_cost_ic = -0.02
		}

		production_bonus = {
			production_efficiency_gain_factor = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_aerospace_trait_reduced_airframe
		name = JAP_kawasaki_aerospace_trait_reduced_airframe
		icon = GFX_generic_mio_trait_icon_weight

		position = { x = 2 y = 0 }
		relative_position_id = JAP_kawasaki_aerospace_trait_series_optimization

		limit_to_equipment_type = {
			heavy_tank_chassis
			heavy_tank_amphibious_chassis
		}

		equipment_bonus = {
			weight = -0.05
			fuel_consumption = -0.05
		}

		production_bonus = {
			production_resource_need_factor = -0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_aerospace_trait_parts_standardization
		name = JAP_kawasaki_aerospace_trait_parts_standardization
		icon = GFX_generic_mio_trait_icon_efficiency_cap

		position = { x = 1 y = 2 }
		relative_position_id = JAP_kawasaki_aerospace_trait_series_optimization
		all_parents = {
			JAP_kawasaki_aerospace_trait_engine_overhaul
			JAP_kawasaki_aerospace_trait_reduced_airframe
		}

		limit_to_equipment_type = {
			heavy_tank_chassis
			heavy_tank_amphibious_chassis
		}

		equipment_bonus = {
			reliability = 0.10
		}

		production_bonus = {
			production_efficiency_gain_factor = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_aerospace_trait_hot_high
		name = JAP_kawasaki_aerospace_trait_hot_high
		icon = GFX_generic_mio_trait_icon_reliability
		position = { x = 1 y = 3 }
		relative_position_id = JAP_kawasaki_aerospace_trait_series_optimization
		all_parents = {
			JAP_kawasaki_aerospace_trait_parts_standardization
		}

		limit_to_equipment_type = {
			heavy_tank_chassis
			heavy_tank_amphibious_chassis
		}

		equipment_bonus = {
			reliability = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_aerospace_trait_ground_support_training
		name = JAP_kawasaki_aerospace_trait_ground_support_training
		icon = GFX_generic_mio_trait_icon_soft_attack

		position = { x = 3 y = 2 }
		relative_position_id = JAP_kawasaki_aerospace_trait_series_optimization
		all_parents = {
			JAP_kawasaki_aerospace_trait_reduced_airframe
		}

		limit_to_equipment_type = {
			heavy_tank_chassis
			heavy_tank_amphibious_chassis
		}

		equipment_bonus = {
			soft_attack = 0.10
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_aerospace_trait_autopilot
		name = JAP_kawasaki_aerospace_trait_autopilot
		icon = GFX_generic_mio_trait_icon_maximum_speed

		position = { x = 3 y = 3 }
		relative_position_id = JAP_kawasaki_aerospace_trait_series_optimization
		all_parents = {
			JAP_kawasaki_aerospace_trait_ground_support_training
		}

		limit_to_equipment_type = {
			heavy_tank_chassis
			heavy_tank_amphibious_chassis
		}

		equipment_bonus = {
			maximum_speed = 0.10
			max_organisation = 0.05
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_aerospace_trait_rotorblade_dynamics
		name = JAP_kawasaki_aerospace_trait_rotorblade_dynamics
		icon = GFX_generic_mio_trait_icon_armor_value

		position = { x = 4 y = 4 }
		relative_position_id = JAP_kawasaki_aerospace_trait_series_optimization
		all_parents = {
			JAP_kawasaki_aerospace_trait_autopilot
		}

		limit_to_equipment_type = {
			heavy_tank_chassis
			heavy_tank_amphibious_chassis
		}

		equipment_bonus = {
			armor_value = 0.10
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_aerospace_trait_dual_redundant_electronics
		name = JAP_kawasaki_aerospace_trait_dual_redundant_electronics
		icon = GFX_generic_mio_trait_icon_fuel_consumption

		position = { x = 2 y = 4 }
		relative_position_id = JAP_kawasaki_aerospace_trait_series_optimization
		any_parent = {
			JAP_kawasaki_aerospace_trait_autopilot
			JAP_kawasaki_aerospace_trait_hot_high
		}

		limit_to_equipment_type = {
			heavy_tank_chassis
			heavy_tank_amphibious_chassis
		}

		equipment_bonus = {
			reliability = 0.10
			fuel_consumption = -0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_aerospace_trait_rapid_reconfig_loader
		name = JAP_kawasaki_aerospace_trait_rapid_reconfig_loader
		icon = GFX_generic_mio_trait_icon_efficiency_gain

		position = { x = 0 y = 4 }
		relative_position_id = JAP_kawasaki_aerospace_trait_series_optimization
		all_parents = {
			JAP_kawasaki_aerospace_trait_hot_high
		}

		limit_to_equipment_type = {
			heavy_tank_chassis
			heavy_tank_amphibious_chassis
		}

		production_bonus = {
			production_efficiency_gain_factor = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_aerospace_trait_lightweight_line
		name = JAP_kawasaki_aerospace_trait_lightweight_line
		icon = GFX_generic_mio_trait_icon_efficiency_gain

		position = { x = 2 y = 5 }
		relative_position_id = JAP_kawasaki_aerospace_trait_series_optimization
		all_parents = {
			JAP_kawasaki_aerospace_trait_dual_redundant_electronics
		}

		limit_to_equipment_type = {
			heavy_tank_chassis
			heavy_tank_amphibious_chassis
		}

		production_bonus = {
			production_cost_factor = -0.05
			production_resource_penalty_factor = -0.25
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_aerospace_trait_c2_ferry
		name = JAP_kawasaki_aerospace_trait_c2_ferry
		icon = GFX_generic_mio_trait_icon_air_range

		position = { x = 7 y = 0 }

		limit_to_equipment_type = {
			mio_cat_eq_only_large_aircraft
		}

		equipment_bonus = {
			air_range = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_aerospace_trait_composite_fuselage
		name = JAP_kawasaki_aerospace_trait_composite_fuselage
		icon = GFX_generic_mio_trait_icon_weight

		position = { x = -2 y = 1 }
		relative_position_id = JAP_kawasaki_aerospace_trait_c2_ferry
		all_parents = {
			JAP_kawasaki_aerospace_trait_c2_ferry
		}

		limit_to_equipment_type = {
			mio_cat_eq_only_large_aircraft
		}

		equipment_bonus = {
			weight = -0.05
			reliability = 0.03
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_aerospace_trait_high_speed_transport
		name = JAP_kawasaki_aerospace_trait_high_speed_transport
		icon = GFX_generic_mio_trait_icon_maximum_speed

		position = { x = 0 y = 1 }
		relative_position_id = JAP_kawasaki_aerospace_trait_c2_ferry
		all_parents = {
			JAP_kawasaki_aerospace_trait_c2_ferry
		}

		limit_to_equipment_type = {
			mio_cat_eq_only_large_aircraft
		}

		equipment_bonus = {
			maximum_speed = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_aerospace_trait_elint_avionics
		name = JAP_kawasaki_aerospace_trait_elint_avionics
		icon = GFX_generic_mio_trait_icon_air_agility

		position = { x = 2 y = 1 }
		relative_position_id = JAP_kawasaki_aerospace_trait_c2_ferry
		all_parents = {
			JAP_kawasaki_aerospace_trait_c2_ferry
		}

		limit_to_equipment_type = {
			mio_cat_eq_only_large_aircraft
		}

		equipment_bonus = {
			air_agility = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_aerospace_trait_maritime_sensor
		name = JAP_kawasaki_aerospace_trait_maritime_sensor
		icon = GFX_generic_mio_trait_icon_naval_strike_attack

		position = { x = 1 y = 2 }
		relative_position_id = JAP_kawasaki_aerospace_trait_c2_ferry
		all_parents = {
			JAP_kawasaki_aerospace_trait_elint_avionics
			JAP_kawasaki_aerospace_trait_high_speed_transport
		}

		limit_to_equipment_type = {
			mio_cat_eq_only_large_aircraft
		}

		equipment_bonus = {
			naval_strike_attack = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_aerospace_trait_fly_by_light
		name = JAP_kawasaki_aerospace_trait_fly_by_light
		icon = GFX_generic_mio_trait_icon_air_defence

		position = { x = 2 y = 3 }
		relative_position_id = JAP_kawasaki_aerospace_trait_c2_ferry
		all_parents = {
			JAP_kawasaki_aerospace_trait_maritime_sensor
		}

		limit_to_equipment_type = {
			mio_cat_eq_only_large_aircraft
		}

		equipment_bonus = {
			air_defence = 0.10
			armor_value = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_aerospace_trait_transport_export
		name = JAP_kawasaki_aerospace_trait_transport_export
		icon = GFX_generic_mio_trait_icon_funds

		position = { x = -2 y = 2 }
		relative_position_id = JAP_kawasaki_aerospace_trait_c2_ferry
		all_parents = {
			JAP_kawasaki_aerospace_trait_composite_fuselage
		}

		limit_to_equipment_type = {
			mio_cat_eq_only_large_aircraft
		}

		organization_modifier = {
			military_industrial_organization_funds_gain = 0.10
			military_industrial_organization_industrial_manufacturer_assign_cost = -0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_aerospace_trait_maintenance_workflow
		name = JAP_kawasaki_aerospace_trait_maintenance_workflow
		icon = GFX_generic_mio_trait_icon_efficiency_gain

		position = { x = -2 y = 3 }
		relative_position_id = JAP_kawasaki_aerospace_trait_c2_ferry
		all_parents = {
			JAP_kawasaki_aerospace_trait_transport_export
		}

		limit_to_equipment_type = {
			mio_cat_eq_only_large_aircraft
		}

		equipment_bonus = {
			reliability = 0.05
		}

		production_bonus = {
			production_efficiency_gain_factor = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_aerospace_trait_cargo_floor
		name = JAP_kawasaki_aerospace_trait_cargo_floor
		icon = GFX_generic_mio_trait_icon_armor_value

		position = { x = 0 y = 3 }
		relative_position_id = JAP_kawasaki_aerospace_trait_c2_ferry
		all_parents = {
			JAP_kawasaki_aerospace_trait_transport_export
		}

		limit_to_equipment_type = {
			mio_cat_eq_only_large_aircraft
		}

		equipment_bonus = {
			armor_value = 0.10
			build_cost_ic = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_aerospace_trait_night_ops
		name = JAP_kawasaki_aerospace_trait_night_ops
		icon = GFX_generic_mio_trait_icon_night_penalty

		position = { x = -1 y = 4 }
		relative_position_id = JAP_kawasaki_aerospace_trait_c2_ferry
		all_parents = {
			JAP_kawasaki_aerospace_trait_maintenance_workflow
			JAP_kawasaki_aerospace_trait_cargo_floor
		}

		limit_to_equipment_type = {
			mio_cat_eq_only_large_aircraft
		}

		equipment_bonus = {
			night_penalty = -0.15
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_aerospace_trait_long_range_crew
		name = JAP_kawasaki_aerospace_trait_long_range_crew
		icon = GFX_generic_mio_trait_icon_air_range

		position = { x = 1 y = 4 }
		relative_position_id = JAP_kawasaki_aerospace_trait_c2_ferry
		all_parents = {
			JAP_kawasaki_aerospace_trait_fly_by_light
			JAP_kawasaki_aerospace_trait_cargo_floor
		}

		limit_to_equipment_type = {
			mio_cat_eq_only_large_aircraft
		}

		equipment_bonus = {
			air_range = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_aerospace_trait_drone_interface
		name = JAP_kawasaki_aerospace_trait_drone_interface
		icon = GFX_generic_mio_trait_icon_resources

		position = { x = 1 y = 5 }
		relative_position_id = JAP_kawasaki_aerospace_trait_c2_ferry
		all_parents = {
			JAP_kawasaki_aerospace_trait_long_range_crew
		}

		limit_to_equipment_type = {
			mio_cat_eq_only_large_aircraft
		}

		production_bonus = {
			production_resource_need_factor = -0.10
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
}

## Armor
JAP_jsw_tank_manufacturer = {
	allowed = { original_tag = JAP }
	icon = GFX_idea_jsw_company
	name = JAP_jsw_tank_manufacturer

	equipment_type = {
		medium_tank_chassis
		medium_tank_artillery_chassis
	}

	research_categories = {
		CAT_nuclear_reactors
		CAT_mbt
		CAT_sp_arty
		CAT_sp_r_arty
		CAT_naval_cannons
	}

	tree_header_text = {
		text = "MBT Mastery"
		x = 2
	}

	tree_header_text = {
		text = "Self-Propelled Excellence"
		x = 7
	}

	initial_trait = {
		name = JAP_jsw_tank_manufacturer_trait

		equipment_bonus = {
			ap_attack = 0.10
			armor_value = 0.15
			build_cost_ic = 0.05
		}
	}
	trait = {
		token = JAP_jsw_tank_mio_trait_precision_gun
		name = JAP_jsw_tank_mio_trait_precision_gun
		icon = GFX_generic_mio_trait_icon_mbt_ap_attack

		position = { x = 2 y = 0 }

		limit_to_equipment_type = {
			medium_tank_chassis
		}

		equipment_bonus = {
			ap_attack = 0.05
			hard_attack = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jsw_tank_mio_trait_heat_treatment
		name = JAP_jsw_tank_mio_trait_heat_treatment
		icon = GFX_generic_mio_trait_icon_mbt_reliability

		position = { x = -2 y = 1 }
		relative_position_id = JAP_jsw_tank_mio_trait_precision_gun
		all_parents = {
			JAP_jsw_tank_mio_trait_precision_gun
		}

		limit_to_equipment_type = {
			medium_tank_chassis
		}

		equipment_bonus = {
			reliability = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jsw_tank_mio_trait_lightweight_hull
		name = JAP_jsw_tank_mio_trait_lightweight_hull
		icon = GFX_generic_mio_trait_icon_mbt_buildcost

		position = { x = -2 y = 2 }
		relative_position_id = JAP_jsw_tank_mio_trait_precision_gun
		all_parents = {
			JAP_jsw_tank_mio_trait_heat_treatment
		}

		limit_to_equipment_type = {
			medium_tank_chassis
		}

		equipment_bonus = {
			fuel_consumption = -0.10
			build_cost_ic = -0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jsw_tank_mio_trait_advanced_stabilizer
		name = JAP_jsw_tank_mio_trait_advanced_stabilizer
		icon = GFX_generic_mio_trait_icon_mbt_speed

		position = { x = -1 y = 3 }
		relative_position_id = JAP_jsw_tank_mio_trait_precision_gun
		all_parents = {
			JAP_jsw_tank_mio_trait_lightweight_hull
			JAP_jsw_tank_mio_trait_composite_armor_panel
		}

		limit_to_equipment_type = {
			medium_tank_chassis
		}

		equipment_bonus = {
			maximum_speed = 0.10
			breakthrough = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jsw_tank_mio_trait_hydro_suspension
		name = JAP_jsw_tank_mio_trait_hydro_suspension
		icon = GFX_generic_mio_trait_icon_mbt_speed

		position = { x = 0 y = 1 }
		relative_position_id = JAP_jsw_tank_mio_trait_precision_gun
		all_parents = {
			JAP_jsw_tank_mio_trait_precision_gun
		}

		limit_to_equipment_type = {
			medium_tank_chassis
		}

		equipment_bonus = {
			maximum_speed = 0.08
			reliability = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jsw_tank_mio_trait_composite_armor_panel
		name = JAP_jsw_tank_mio_trait_composite_armor_panel
		icon = GFX_generic_mio_trait_icon_mbt_armor

		position = { x = 0 y = 2 }
		relative_position_id = JAP_jsw_tank_mio_trait_precision_gun
		all_parents = {
			JAP_jsw_tank_mio_trait_hydro_suspension
		}

		limit_to_equipment_type = {
			medium_tank_chassis
		}

		equipment_bonus = {
			armor_value = 0.08
			breakthrough = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jsw_tank_mio_trait_autoloader_smoothing
		name = JAP_jsw_tank_mio_trait_autoloader_smoothing
		icon = GFX_generic_mio_trait_icon_mbt_hard_attack

		position = { x = 2 y = 1 }
		relative_position_id = JAP_jsw_tank_mio_trait_precision_gun
		all_parents = {
			JAP_jsw_tank_mio_trait_precision_gun
		}

		limit_to_equipment_type = {
			medium_tank_chassis
		}

		equipment_bonus = {
			hard_attack = 0.06
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jsw_tank_mio_trait_rapid_life_extension
		name = JAP_jsw_tank_mio_trait_rapid_life_extension
		icon = GFX_generic_mio_trait_icon_mbt_reliability

		position = { x = 2 y = 2 }
		relative_position_id = JAP_jsw_tank_mio_trait_precision_gun
		all_parents = {
			JAP_jsw_tank_mio_trait_autoloader_smoothing
		}

		limit_to_equipment_type = {
			medium_tank_chassis
		}

		equipment_bonus = {
			reliability = 0.05
		}

		production_bonus = {
			production_resource_need_factor = -0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jsw_tank_mio_trait_gun_munitions
		name = JAP_jsw_tank_mio_trait_gun_munitions
		icon = GFX_generic_mio_trait_icon_mbt_soft_attack

		position = { x = 1 y = 3 }
		relative_position_id = JAP_jsw_tank_mio_trait_precision_gun
		all_parents = {
			JAP_jsw_tank_mio_trait_rapid_life_extension
			JAP_jsw_tank_mio_trait_composite_armor_panel
		}

		limit_to_equipment_type = {
			medium_tank_chassis
		}

		equipment_bonus = {
			soft_attack = 0.08
			ap_attack = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jsw_tank_mio_trait_integration_support
		name = JAP_jsw_tank_mio_trait_integration_support
		icon = GFX_generic_mio_trait_icon_task

		position = { x = 0 y = 4 }
		relative_position_id = JAP_jsw_tank_mio_trait_precision_gun
		all_parents = {
			JAP_jsw_tank_mio_trait_gun_munitions
			JAP_jsw_tank_mio_trait_advanced_stabilizer
		}

		limit_to_equipment_type = {
			medium_tank_chassis
		}

		available = {
			JAP = { has_tech = command_control_equipment4 }
		}

		equipment_bonus = {
			max_organisation = 0.10
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jsw_tank_mio_trait_howitzer_barrel
		name = JAP_jsw_tank_mio_trait_howitzer_barrel
		icon = GFX_generic_mio_trait_icon_spg_breaktrough

		position = { x = 7 y = 0 }

		limit_to_equipment_type = {
			medium_tank_artillery_chassis
		}

		equipment_bonus = {
			hard_attack = 0.08
			breakthrough = 0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jsw_tank_mio_trait_base_bleed_ammo
		name = JAP_jsw_tank_mio_trait_base_bleed_ammo
		icon = GFX_generic_mio_trait_icon_spg_breaktrough

		position = { x = -1 y = 1 }
		relative_position_id = JAP_jsw_tank_mio_trait_howitzer_barrel
		all_parents = {
			JAP_jsw_tank_mio_trait_howitzer_barrel
		}

		limit_to_equipment_type = {
			medium_tank_artillery_chassis
		}

		equipment_bonus = {
			breakthrough = 0.12
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jsw_tank_mio_trait_multi_baffle
		name = JAP_jsw_tank_mio_trait_multi_baffle
		icon = GFX_generic_mio_trait_icon_spg_soft_attack

		position = { x = 1 y = 1 }
		relative_position_id = JAP_jsw_tank_mio_trait_howitzer_barrel
		all_parents = {
			JAP_jsw_tank_mio_trait_howitzer_barrel
		}

		limit_to_equipment_type = {
			medium_tank_artillery_chassis
		}

		equipment_bonus = {
			soft_attack = 0.08
			reliability = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jsw_tank_mio_trait_wheeled_chassis
		name = JAP_jsw_tank_mio_trait_wheeled_chassis
		icon = GFX_generic_mio_trait_icon_spg_speed

		position = { x = 0 y = 2 }
		relative_position_id = JAP_jsw_tank_mio_trait_howitzer_barrel
		all_parents = {
			JAP_jsw_tank_mio_trait_multi_baffle
			JAP_jsw_tank_mio_trait_base_bleed_ammo
		}

		limit_to_equipment_type = {
			medium_tank_artillery_chassis
		}

		equipment_bonus = {
			fuel_consumption = -0.15
			maximum_speed = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jsw_tank_mio_trait_turret_traverse
		name = JAP_jsw_tank_mio_trait_turret_traverse
		icon = GFX_generic_mio_trait_icon_spg_reliability

		position = { x = 0 y = 3 }
		relative_position_id = JAP_jsw_tank_mio_trait_howitzer_barrel
		all_parents = {
			JAP_jsw_tank_mio_trait_wheeled_chassis
		}

		limit_to_equipment_type = {
			medium_tank_artillery_chassis
		}

		equipment_bonus = {
			reliability = 0.08
			maximum_speed = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jsw_tank_mio_trait_aluminum_allow
		name = JAP_jsw_tank_mio_trait_aluminum_allow
		icon = GFX_generic_mio_trait_icon_spg_armor

		position = { x = -2 y = 3 }
		relative_position_id = JAP_jsw_tank_mio_trait_howitzer_barrel
		all_parents = {
			JAP_jsw_tank_mio_trait_wheeled_chassis
		}

		limit_to_equipment_type = {
			medium_tank_artillery_chassis
		}

		equipment_bonus = {
			armor_value = 0.06
		}

		production_bonus = {
			production_resource_need_factor = -0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jsw_tank_mio_trait_firing_rate_cooling
		name = JAP_jsw_tank_mio_trait_firing_rate_cooling
		icon = GFX_generic_mio_trait_icon_spg_soft_attack

		position = { x = -1 y = 4 }
		relative_position_id = JAP_jsw_tank_mio_trait_howitzer_barrel
		all_parents = {
			JAP_jsw_tank_mio_trait_turret_traverse
		}

		limit_to_equipment_type = {
			medium_tank_artillery_chassis
		}

		equipment_bonus = {
			soft_attack = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jsw_tank_mio_trait_integrated_fire_control
		name = JAP_jsw_tank_mio_trait_integrated_fire_control
		icon = GFX_generic_mio_trait_icon_spg_hard_attack

		position = { x = -1 y = 5 }
		relative_position_id = JAP_jsw_tank_mio_trait_howitzer_barrel
		all_parents = {
			JAP_jsw_tank_mio_trait_firing_rate_cooling
		}

		limit_to_equipment_type = {
			medium_tank_artillery_chassis
		}

		equipment_bonus = {
			hard_attack = 0.08
			reliability = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jsw_tank_mio_trait_rapid_deployment
		name = JAP_jsw_tank_mio_trait_rapid_deployment
		icon = GFX_generic_mio_trait_icon_spg_speed

		position = { x = 1 y = 4 }
		relative_position_id = JAP_jsw_tank_mio_trait_howitzer_barrel
		all_parents = {
			JAP_jsw_tank_mio_trait_turret_traverse
		}

		limit_to_equipment_type = {
			medium_tank_artillery_chassis
		}

		equipment_bonus = {
			maximum_speed = 0.08
			breakthrough = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jsw_tank_mio_trait_artillery_doctrine
		name = JAP_jsw_tank_mio_trait_artillery_doctrine
		icon = GFX_generic_mio_trait_icon_task

		position = { x = 1 y = 5 }
		relative_position_id = JAP_jsw_tank_mio_trait_howitzer_barrel
		all_parents = {
			JAP_jsw_tank_mio_trait_rapid_deployment
		}

		limit_to_equipment_type = {
			medium_tank_artillery_chassis
		}

		equipment_bonus = {
			max_organisation = 0.10
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
}

JAP_mitsubishi_heavy_industries_tank_manufacturer = {
	allowed = { original_tag = JAP }
	icon = GFX_idea_Mitsubishi_Heavy_Industries
	name = JAP_mitsubishi_heavy_industries_tank_manufacturer

	equipment_type = {
		medium_tank_chassis
		medium_tank_destroyer_chassis
		medium_tank_artillery_chassis
		medium_tank_aa_chassis
	}

	research_categories = {
		CAT_tanks
		CAT_armor_engines
		CAT_computer_systems
		CAT_armor_weapons
		CAT_armour
		CAT_sp_arty
		CAT_sp_r_arty
		CAT_sp_aa
	}

	research_bonus = -0.08

	tree_header_text = {
		text = "Battle & Recon Power"
		x = 2
	}

	tree_header_text = {
		text = "Artillery & Anti-Air Systems"
		x = 7
	}

	initial_trait = {
		name = JAP_mitsubishi_heavy_industries_tank_trait

		equipment_bonus = {
			armor_value = 0.15
			reliability = 0.15
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}
	}
	trait = {
		token = JAP_mitsubishi_heavy_industries_tank_mio_trait_agile_turret
		name = JAP_mitsubishi_heavy_industries_tank_mio_trait_agile_turret
		icon = GFX_generic_mio_trait_icon_reliability

		position = { x = 1 y = 0 }

		limit_to_equipment_type = {
			medium_tank_chassis
			medium_tank_destroyer_chassis
		}

		equipment_bonus = {
			maximum_speed = 0.05
			armor_value = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_heavy_industries_tank_mio_trait_modular_armor
		name = JAP_mitsubishi_heavy_industries_tank_mio_trait_modular_armor
		icon = GFX_generic_mio_trait_icon_armor_value

		position = { x = 2 y = 0 }
		relative_position_id = JAP_mitsubishi_heavy_industries_tank_mio_trait_agile_turret

		limit_to_equipment_type = {
			medium_tank_chassis
			medium_tank_destroyer_chassis
		}

		equipment_bonus = {
			armor_value = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_heavy_industries_tank_mio_trait_c4i_integration
		name = JAP_mitsubishi_heavy_industries_tank_mio_trait_c4i_integration
		icon = GFX_generic_mio_trait_icon_max_strength

		position = { x = 1 y = 1 }
		relative_position_id = JAP_mitsubishi_heavy_industries_tank_mio_trait_agile_turret
		all_parents = {
			JAP_mitsubishi_heavy_industries_tank_mio_trait_modular_armor
			JAP_mitsubishi_heavy_industries_tank_mio_trait_agile_turret
		}

		available = {
			JAP = { has_tech = command_control_equipment3 }
		}

		limit_to_equipment_type = {
			medium_tank_chassis
			medium_tank_destroyer_chassis
		}

		equipment_bonus = {
			max_organisation = 0.15
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_heavy_industries_tank_mio_trait_high_mobility_trans
		name = JAP_mitsubishi_heavy_industries_tank_mio_trait_high_mobility_trans
		icon = GFX_generic_mio_trait_icon_maximum_speed

		position = { x = 1 y = 2 }
		relative_position_id = JAP_mitsubishi_heavy_industries_tank_mio_trait_agile_turret
		all_parents = {
			JAP_mitsubishi_heavy_industries_tank_mio_trait_c4i_integration
		}

		limit_to_equipment_type = {
			medium_tank_chassis
			medium_tank_destroyer_chassis
		}

		equipment_bonus = {
			maximum_speed = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_heavy_industries_tank_mio_trait_fire_computer
		name = JAP_mitsubishi_heavy_industries_tank_mio_trait_fire_computer
		icon = GFX_generic_mio_trait_icon_hard_attack

		position = { x = 0 y = 3 }
		relative_position_id = JAP_mitsubishi_heavy_industries_tank_mio_trait_agile_turret
		all_parents = {
			JAP_mitsubishi_heavy_industries_tank_mio_trait_high_mobility_trans
		}

		limit_to_equipment_type = {
			medium_tank_chassis
			medium_tank_destroyer_chassis
		}

		equipment_bonus = {
			hard_attack = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_heavy_industries_tank_mio_trait_chitose_facility
		name = JAP_mitsubishi_heavy_industries_tank_mio_trait_chitose_facility
		icon = GFX_generic_mio_trait_icon_task

		position = { x = 2 y = 3 }
		relative_position_id = JAP_mitsubishi_heavy_industries_tank_mio_trait_agile_turret
		all_parents = {
			JAP_mitsubishi_heavy_industries_tank_mio_trait_high_mobility_trans
		}

		limit_to_equipment_type = {
			medium_tank_chassis
			medium_tank_destroyer_chassis
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}

		on_complete = {
			JAP = {
				random_owned_state = {
					add_building_construction = {
						type = arms_factory
						level = 1
						instant_build = yes
					}
					add_extra_state_shared_building_slots = 1
				}
			}
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					large_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_heavy_industries_tank_mio_trait_refurbishment
		name = JAP_mitsubishi_heavy_industries_tank_mio_trait_refurbishment
		icon = GFX_generic_mio_trait_icon_reliability

		position = { x = 1 y = 4 }
		relative_position_id = JAP_mitsubishi_heavy_industries_tank_mio_trait_agile_turret
		all_parents = {
			JAP_mitsubishi_heavy_industries_tank_mio_trait_high_mobility_trans
		}

		limit_to_equipment_type = {
			medium_tank_chassis
			medium_tank_destroyer_chassis
		}

		equipment_bonus = {
			reliability = 0.05
		}

		production_bonus = {
			production_cost_factor = -0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_heavy_industries_tank_mio_trait_modules_Kit
		name = JAP_mitsubishi_heavy_industries_tank_mio_trait_modules_Kit
		icon = GFX_generic_mio_trait_icon_armor_value

		position = { x = -1 y = 5 }
		relative_position_id = JAP_mitsubishi_heavy_industries_tank_mio_trait_agile_turret
		all_parents = {
			JAP_mitsubishi_heavy_industries_tank_mio_trait_refurbishment
		}

		limit_to_equipment_type = {
			medium_tank_chassis
			medium_tank_destroyer_chassis
		}

		equipment_bonus = {
			armor_value = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_heavy_industries_tank_mio_trait_recon_mast
		name = JAP_mitsubishi_heavy_industries_tank_mio_trait_recon_mast
		icon = GFX_generic_mio_trait_icon_breakthrough

		position = { x = 1 y = 5 }
		relative_position_id = JAP_mitsubishi_heavy_industries_tank_mio_trait_agile_turret
		all_parents = {
			JAP_mitsubishi_heavy_industries_tank_mio_trait_refurbishment
		}

		limit_to_equipment_type = {
			medium_tank_chassis
			medium_tank_destroyer_chassis
		}

		equipment_bonus = {
			breakthrough = 0.15
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_heavy_industries_tank_mio_trait_fuel_engine
		name = JAP_mitsubishi_heavy_industries_tank_mio_trait_fuel_engine
		icon = GFX_generic_mio_trait_icon_fuel_consumption

		position = { x = 3 y = 5 }
		relative_position_id = JAP_mitsubishi_heavy_industries_tank_mio_trait_agile_turret
		all_parents = {
			JAP_mitsubishi_heavy_industries_tank_mio_trait_refurbishment
		}

		limit_to_equipment_type = {
			medium_tank_chassis
			medium_tank_destroyer_chassis
		}

		equipment_bonus = {
			fuel_consumption = -0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_heavy_industries_tank_mio_trait_local_parts
		name = JAP_mitsubishi_heavy_industries_tank_mio_trait_local_parts
		icon = GFX_generic_mio_trait_icon_production_capacity

		position = { x = 1 y = 6 }
		relative_position_id = JAP_mitsubishi_heavy_industries_tank_mio_trait_agile_turret
		all_parents = {
			JAP_mitsubishi_heavy_industries_tank_mio_trait_recon_mast
		}

		limit_to_equipment_type = {
			medium_tank_chassis
			medium_tank_destroyer_chassis
		}

		production_bonus = {
			production_capacity_factor = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_heavy_industries_tank_mio_trait_autoloader
		name = JAP_mitsubishi_heavy_industries_tank_mio_trait_autoloader
		icon = GFX_generic_mio_trait_icon_ap_attack

		position = { x = 0 y = 7 }
		relative_position_id = JAP_mitsubishi_heavy_industries_tank_mio_trait_agile_turret
		all_parents = {
			JAP_mitsubishi_heavy_industries_tank_mio_trait_local_parts
		}

		limit_to_equipment_type = {
			medium_tank_chassis
			medium_tank_destroyer_chassis
		}

		equipment_bonus = {
			ap_attack = 0.05
			hard_attack = 0.10
			soft_attack = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_heavy_industries_tank_mio_trait_rapid_deployment
		name = JAP_mitsubishi_heavy_industries_tank_mio_trait_rapid_deployment
		icon = GFX_generic_mio_trait_icon_maximum_speed

		position = { x = 2 y = 7 }
		relative_position_id = JAP_mitsubishi_heavy_industries_tank_mio_trait_agile_turret
		all_parents = {
			JAP_mitsubishi_heavy_industries_tank_mio_trait_local_parts
		}

		limit_to_equipment_type = {
			medium_tank_chassis
			medium_tank_destroyer_chassis
		}

		equipment_bonus = {
			breakthrough = 0.05
			maximum_speed = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_heavy_industries_tank_mio_trait_fire_control
		name = JAP_mitsubishi_heavy_industries_tank_mio_trait_fire_control
		icon = GFX_generic_mio_trait_icon_anti_air_attack

		position = { x = 7 y = 0 }

		limit_to_equipment_type = {
			medium_tank_aa_chassis
		}

		equipment_bonus = {
			hard_attack = 0.10
			anti_air_attack = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_heavy_industries_tank_mio_trait_shoot_scoot
		name = JAP_mitsubishi_heavy_industries_tank_mio_trait_shoot_scoot
		icon = GFX_generic_mio_trait_icon_maximum_speed

		position = { x = -2 y = 1 }
		relative_position_id = JAP_mitsubishi_heavy_industries_tank_mio_trait_fire_control
		all_parents = {
			JAP_mitsubishi_heavy_industries_tank_mio_trait_fire_control
		}

		limit_to_equipment_type = {
			medium_tank_artillery_chassis
			medium_tank_aa_chassis
		}

		equipment_bonus = {
			maximum_speed = 0.08
			breakthrough = 0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_heavy_industries_tank_mio_trait_aluminium_chassis
		name = JAP_mitsubishi_heavy_industries_tank_mio_trait_aluminium_chassis
		icon = GFX_generic_mio_trait_icon_weight

		position = { x = 0 y = 1 }
		relative_position_id = JAP_mitsubishi_heavy_industries_tank_mio_trait_fire_control
		all_parents = {
			JAP_mitsubishi_heavy_industries_tank_mio_trait_fire_control
		}

		available = {
			JAP = {
				has_resources_in_country = {
					resource = aluminium
					amount > 0
				}
			}
		}

		limit_to_equipment_type = {
			medium_tank_artillery_chassis
			medium_tank_aa_chassis
		}

		equipment_bonus = {
			weight = -0.10
		}

		production_bonus = {
			production_resource_need_factor = -0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_heavy_industries_tank_mio_trait_production_line
		name = JAP_mitsubishi_heavy_industries_tank_mio_trait_production_line
		icon = GFX_generic_mio_trait_icon_efficiency_cap

		position = { x = 2 y = 1 }
		relative_position_id = JAP_mitsubishi_heavy_industries_tank_mio_trait_fire_control
		all_parents = {
			JAP_mitsubishi_heavy_industries_tank_mio_trait_fire_control
		}

		limit_to_equipment_type = {
			medium_tank_artillery_chassis
		}

		production_bonus = {
			production_efficiency_cap_factor = 0.15
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_heavy_industries_tank_mio_trait_training_sim
		name = JAP_mitsubishi_heavy_industries_tank_mio_trait_training_sim
		icon = GFX_generic_mio_trait_icon_max_strength

		position = { x = 2 y = 2 }
		relative_position_id = JAP_mitsubishi_heavy_industries_tank_mio_trait_fire_control
		all_parents = {
			JAP_mitsubishi_heavy_industries_tank_mio_trait_production_line
		}

		limit_to_equipment_type = {
			medium_tank_artillery_chassis
			medium_tank_aa_chassis
		}

		equipment_bonus = {
			max_organisation = 0.10
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_heavy_industries_tank_mio_trait_integrated
		name = JAP_mitsubishi_heavy_industries_tank_mio_trait_integrated
		icon = GFX_generic_mio_trait_icon_hard_attack

		position = { x = 2 y = 3 }
		relative_position_id = JAP_mitsubishi_heavy_industries_tank_mio_trait_fire_control
		all_parents = {
			JAP_mitsubishi_heavy_industries_tank_mio_trait_training_sim
		}

		limit_to_equipment_type = {
			medium_tank_artillery_chassis
			medium_tank_aa_chassis
		}

		equipment_bonus = {
			soft_attack = 0.05
			hard_attack = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_heavy_industries_tank_mio_trait_quick_reload
		name = JAP_mitsubishi_heavy_industries_tank_mio_trait_quick_reload
		icon = GFX_generic_mio_trait_icon_breakthrough

		position = { x = 1 y = 2 }
		relative_position_id = JAP_mitsubishi_heavy_industries_tank_mio_trait_fire_control
		all_parents = {
			JAP_mitsubishi_heavy_industries_tank_mio_trait_aluminium_chassis
		}

		limit_to_equipment_type = {
			medium_tank_artillery_chassis
			medium_tank_aa_chassis
		}

		equipment_bonus = {
			breakthrough = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_heavy_industries_tank_mio_trait_radar_integration
		name = JAP_mitsubishi_heavy_industries_tank_mio_trait_radar_integration
		icon = GFX_generic_mio_trait_icon_anti_air_attack

		position = { x = -1 y = 2 }
		relative_position_id = JAP_mitsubishi_heavy_industries_tank_mio_trait_fire_control
		all_parents = {
			JAP_mitsubishi_heavy_industries_tank_mio_trait_aluminium_chassis
		}

		limit_to_equipment_type = {
			medium_tank_aa_chassis
		}

		equipment_bonus = {
			anti_air_attack = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_heavy_industries_tank_mio_trait_ammo_feed
		name = JAP_mitsubishi_heavy_industries_tank_mio_trait_ammo_feed
		icon = GFX_generic_mio_trait_icon_reliability

		position = { x = -1 y = 3 }
		relative_position_id = JAP_mitsubishi_heavy_industries_tank_mio_trait_fire_control
		all_parents = {
			JAP_mitsubishi_heavy_industries_tank_mio_trait_radar_integration
		}

		limit_to_equipment_type = {
			medium_tank_aa_chassis
		}

		equipment_bonus = {
			reliability = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_heavy_industries_tank_mio_trait_airfire_trianing
		name = JAP_mitsubishi_heavy_industries_tank_mio_trait_airfire_trianing
		icon = GFX_generic_mio_trait_icon_research

		position = { x = 1 y = 3 }
		relative_position_id = JAP_mitsubishi_heavy_industries_tank_mio_trait_fire_control
		all_parents = {
			JAP_mitsubishi_heavy_industries_tank_mio_trait_radar_integration
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_heavy_industries_tank_mio_trait_barrel_workshop
		name = JAP_mitsubishi_heavy_industries_tank_mio_trait_barrel_workshop
		icon = GFX_generic_mio_trait_icon_conversion_speed

		position = { x = -2 y = 2 }
		relative_position_id = JAP_mitsubishi_heavy_industries_tank_mio_trait_fire_control
		all_parents = {
			JAP_mitsubishi_heavy_industries_tank_mio_trait_shoot_scoot
		}

		limit_to_equipment_type = {
			medium_tank_artillery_chassis
			medium_tank_aa_chassis
		}

		production_bonus = {
			production_cost_factor = -0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_heavy_industries_tank_mio_trait_locator_radar
		name = JAP_mitsubishi_heavy_industries_tank_mio_trait_locator_radar
		icon = GFX_generic_mio_trait_icon_breakthrough

		position = { x = -2 y = 3 }
		relative_position_id = JAP_mitsubishi_heavy_industries_tank_mio_trait_fire_control
		all_parents = {
			JAP_mitsubishi_heavy_industries_tank_mio_trait_barrel_workshop
		}

		limit_to_equipment_type = {
			medium_tank_artillery_chassis
		}

		equipment_bonus = {
			breakthrough = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_heavy_industries_tank_mio_trait_autonomy_kit
		name = JAP_mitsubishi_heavy_industries_tank_mio_trait_autonomy_kit
		icon = GFX_generic_mio_trait_icon_soft_attack

		position = { x = -2 y = 4 }
		relative_position_id = JAP_mitsubishi_heavy_industries_tank_mio_trait_fire_control
		all_parents = {
			JAP_mitsubishi_heavy_industries_tank_mio_trait_locator_radar
		}

		limit_to_equipment_type = {
			medium_tank_artillery_chassis
		}

		equipment_bonus = {
			soft_attack = 0.10
			fuel_consumption = -0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
}

JAP_komatsu_tank_manufacturer = {
	allowed = { original_tag = JAP }
	icon = GFX_idea_Komatsu
	name = JAP_komatsu_tank_manufacturer

	equipment_type = {
		medium_tank_amphibious_chassis
		medium_tank_flame_chassis
		medium_tank_destroyer_chassis
		util_vehicle_equipment
	}

	research_categories = {
		CAT_afv
		CAT_excavation_tech
	}

	tree_header_text = {
		text = "Light Vehicle Systems"
		x = 2
	}

	tree_header_text = {
		text = "Heavy Vehicle Systems"
		x = 7
	}

	initial_trait = {
		name = JAP_komatsu_tank_trait

		equipment_bonus = {
			maximum_speed = 0.15
			defense = 0.05
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.02
		}
	}
	trait = {
		token = JAP_komatsu_tank_mio_trait_speed_tuning
		name = JAP_komatsu_tank_mio_trait_speed_tuning
		icon = GFX_generic_mio_trait_icon_maximum_speed

		position = { x = 1 y = 0 }
		mutually_exclusive = {
			JAP_komatsu_tank_mio_trait_light_armor_upgrade
		}

		limit_to_equipment_type = {
			medium_tank_destroyer_chassis
			util_vehicle_equipment
		}

		equipment_bonus = {
			maximum_speed = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_komatsu_tank_mio_trait_light_armor_upgrade
		name = JAP_komatsu_tank_mio_trait_light_armor_upgrade
		icon = GFX_generic_mio_trait_icon_armor_value

		position = { x = 2 y = 0 }
		relative_position_id = JAP_komatsu_tank_mio_trait_speed_tuning
		mutually_exclusive = {
			JAP_komatsu_tank_mio_trait_speed_tuning
		}

		limit_to_equipment_type = {
			medium_tank_destroyer_chassis
			util_vehicle_equipment
		}

		equipment_bonus = {
			armor_value = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_komatsu_tank_mio_trait_range_extension
		name = JAP_komatsu_tank_mio_trait_range_extension
		icon = GFX_generic_mio_trait_icon_max_strength

		position = { x = 1 y = 1 }
		relative_position_id = JAP_komatsu_tank_mio_trait_speed_tuning
		any_parent = {
			JAP_komatsu_tank_mio_trait_light_armor_upgrade
			JAP_komatsu_tank_mio_trait_speed_tuning
		}

		limit_to_equipment_type = {
			medium_tank_destroyer_chassis
			util_vehicle_equipment
		}

		equipment_bonus = {
			max_organisation = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_komatsu_tank_mio_trait_recon_mast
		name = JAP_komatsu_tank_mio_trait_recon_mast
		icon = GFX_generic_mio_trait_icon_breakthrough

		position = { x = 1 y = 2 }
		relative_position_id = JAP_komatsu_tank_mio_trait_speed_tuning
		all_parents = {
			JAP_komatsu_tank_mio_trait_range_extension
		}

		limit_to_equipment_type = {
			medium_tank_destroyer_chassis
			util_vehicle_equipment
		}

		equipment_bonus = {
			breakthrough = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_komatsu_tank_mio_trait_lightweight_chassis
		name = JAP_komatsu_tank_mio_trait_lightweight_chassis
		icon = GFX_generic_mio_trait_icon_production_capacity

		position = { x = 0 y = 3 }
		relative_position_id = JAP_komatsu_tank_mio_trait_speed_tuning
		all_parents = {
			JAP_komatsu_tank_mio_trait_recon_mast
		}

		limit_to_equipment_type = {
			medium_tank_destroyer_chassis
			util_vehicle_equipment
		}

		production_bonus = {
			production_cost_factor = -0.05
			production_capacity_factor = 0.05
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_komatsu_tank_mio_trait_advanced_gun_mount
		name = JAP_komatsu_tank_mio_trait_advanced_gun_mount
		icon = GFX_generic_mio_trait_icon_hard_attack

		position = { x = 0 y = 4 }
		relative_position_id = JAP_komatsu_tank_mio_trait_speed_tuning
		all_parents = {
			JAP_komatsu_tank_mio_trait_lightweight_chassis
		}

		limit_to_equipment_type = {
			medium_tank_destroyer_chassis
			util_vehicle_equipment
		}

		equipment_bonus = {
			hard_attack = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_komatsu_tank_mio_trait_recon_module
		name = JAP_komatsu_tank_mio_trait_recon_module
		icon = GFX_generic_mio_trait_icon_defense

		position = { x = 2 y = 3 }
		relative_position_id = JAP_komatsu_tank_mio_trait_speed_tuning
		all_parents = {
			JAP_komatsu_tank_mio_trait_recon_mast
		}

		limit_to_equipment_type = {
			util_vehicle_equipment
		}

		equipment_bonus = {
			defense = 0.10
			breakthrough = 0.05
		}
		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_komatsu_tank_mio_trait_rapid_demount
		name = JAP_komatsu_tank_mio_trait_rapid_demount
		icon = GFX_generic_mio_trait_icon_maximum_speed

		position = { x = 4 y = 4 }
		relative_position_id = JAP_komatsu_tank_mio_trait_speed_tuning
		all_parents = {
			JAP_komatsu_tank_mio_trait_crew_comfort
		}

		limit_to_equipment_type = {
			medium_tank_destroyer_chassis
			util_vehicle_equipment
		}

		equipment_bonus = {
			maximum_speed = 0.05
			build_cost_ic = -0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_komatsu_tank_mio_trait_suspension_overhaul
		name = JAP_komatsu_tank_mio_trait_suspension_overhaul
		icon = GFX_generic_mio_trait_icon_efficiency_cap

		position = { x = 2 y = 4 }
		relative_position_id = JAP_komatsu_tank_mio_trait_speed_tuning
		all_parents = {
			JAP_komatsu_tank_mio_trait_recon_module
		}

		limit_to_equipment_type = {
			medium_tank_destroyer_chassis
			util_vehicle_equipment
		}

		equipment_bonus = {
			reliability = 0.05
		}

		production_bonus = {
			production_efficiency_cap_factor = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_komatsu_tank_mio_trait_crew_comfort
		name = JAP_komatsu_tank_mio_trait_crew_comfort
		icon = GFX_generic_mio_trait_icon_reliability

		position = { x = 4 y = 3 }
		relative_position_id = JAP_komatsu_tank_mio_trait_speed_tuning
		all_parents = {
			JAP_komatsu_tank_mio_trait_recon_mast
		}

		limit_to_equipment_type = {
			medium_tank_destroyer_chassis
			util_vehicle_equipment
		}

		equipment_bonus = {
			reliability = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_komatsu_tank_mio_trait_engine_boost
		name = JAP_komatsu_tank_mio_trait_engine_boost
		icon = GFX_generic_mio_trait_icon_maximum_speed

		position = { x = 8 y = 0 }

		limit_to_equipment_type = {
			medium_tank_amphibious_chassis
			medium_tank_flame_chassis
		}

		equipment_bonus = {
			maximum_speed = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_komatsu_tank_mio_trait_loadout_expansion
		name = JAP_komatsu_tank_mio_trait_loadout_expansion
		icon = GFX_generic_mio_trait_icon_armor_value

		position = { x = 0 y = 1 }
		relative_position_id = JAP_komatsu_tank_mio_trait_engine_boost
		all_parents = {
			JAP_komatsu_tank_mio_trait_engine_boost
		}

		limit_to_equipment_type = {
			medium_tank_amphibious_chassis
			medium_tank_flame_chassis
		}

		equipment_bonus = {
			armor_value = 0.12
			build_cost_ic = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_komatsu_tank_mio_trait_ramp_auto_loader
		name = JAP_komatsu_tank_mio_trait_ramp_auto_loader
		icon = GFX_generic_mio_trait_icon_efficiency_gain

		position = { x = -2 y = 0 }
		relative_position_id = JAP_komatsu_tank_mio_trait_engine_boost

		limit_to_equipment_type = {
			medium_tank_amphibious_chassis
			medium_tank_flame_chassis
		}

		production_bonus = {
			production_efficiency_gain_factor = 0.12
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_komatsu_tank_mio_trait_autocannon_stabilizer
		name = JAP_komatsu_tank_mio_trait_autocannon_stabilizer
		icon = GFX_generic_mio_trait_icon_ap_attack

		position = { x = -2 y = 1 }
		relative_position_id = JAP_komatsu_tank_mio_trait_engine_boost
		all_parents = {
			JAP_komatsu_tank_mio_trait_ramp_auto_loader
		}

		limit_to_equipment_type = {
			medium_tank_amphibious_chassis
			medium_tank_flame_chassis
		}

		equipment_bonus = {
			ap_attack = 0.12
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_komatsu_tank_mio_trait_night_ops
		name = JAP_komatsu_tank_mio_trait_night_ops
		icon = GFX_generic_mio_trait_icon_breakthrough

		position = { x = -2 y = 2 }
		relative_position_id = JAP_komatsu_tank_mio_trait_engine_boost
		all_parents = {
			JAP_komatsu_tank_mio_trait_ramp_auto_loader
		}

		limit_to_equipment_type = {
			medium_tank_amphibious_chassis
			medium_tank_flame_chassis
		}

		equipment_bonus = {
			breakthrough = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_komatsu_tank_mio_trait_modular_armor_plate
		name = JAP_komatsu_tank_mio_trait_modular_armor_plate
		icon = GFX_generic_mio_trait_icon_resources

		position = { x = -1 y = 3 }
		relative_position_id = JAP_komatsu_tank_mio_trait_engine_boost
		all_parents = {
			JAP_komatsu_tank_mio_trait_night_ops
			JAP_komatsu_tank_mio_trait_loadout_expansion
		}

		limit_to_equipment_type = {
			medium_tank_amphibious_chassis
			medium_tank_flame_chassis
		}

		equipment_bonus = {
			armor_value = 0.03
		}

		production_bonus = {
			production_efficiency_gain_factor = 0.05
			production_resource_need_factor = -0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_komatsu_tank_mio_trait_powertrain_factory
		name = JAP_komatsu_tank_mio_trait_powertrain_factory
		icon = GFX_generic_mio_trait_icon_efficiency_cap

		position = { x = -1 y = 4 }
		relative_position_id = JAP_komatsu_tank_mio_trait_engine_boost
		all_parents = {
			JAP_komatsu_tank_mio_trait_modular_armor_plate
		}

		limit_to_equipment_type = {
			medium_tank_amphibious_chassis
			medium_tank_flame_chassis
		}

		production_bonus = {
			production_efficiency_cap_factor = 0.10
			production_capacity_factor = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_komatsu_tank_mio_trait_transport_crew
		name = JAP_komatsu_tank_mio_trait_transport_crew
		icon = GFX_generic_mio_trait_icon_reliability

		position = { x = -2 y = 5 }
		relative_position_id = JAP_komatsu_tank_mio_trait_engine_boost
		all_parents = {
			JAP_komatsu_tank_mio_trait_powertrain_factory
		}

		limit_to_equipment_type = {
			medium_tank_amphibious_chassis
			medium_tank_flame_chassis
		}

		equipment_bonus = {
			reliability = 0.07
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_komatsu_tank_mio_trait_persistence_kit
		name = JAP_komatsu_tank_mio_trait_persistence_kit
		icon = GFX_generic_mio_trait_icon_armor_value

		position = { x = -2 y = 7 }
		relative_position_id = JAP_komatsu_tank_mio_trait_engine_boost
		all_parents = {
			JAP_komatsu_tank_mio_trait_transport_crew
		}

		limit_to_equipment_type = {
			medium_tank_amphibious_chassis
			medium_tank_flame_chassis
		}

		equipment_bonus = {
			armor_value = 0.18
			build_cost_ic = 0.03
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_komatsu_tank_mio_trait_targeting_optics
		name = JAP_komatsu_tank_mio_trait_targeting_optics
		icon = GFX_generic_mio_trait_icon_soft_attack

		position = { x = 0 y = 5 }
		relative_position_id = JAP_komatsu_tank_mio_trait_engine_boost
		all_parents = {
			JAP_komatsu_tank_mio_trait_powertrain_factory
		}

		limit_to_equipment_type = {
			medium_tank_amphibious_chassis
			medium_tank_flame_chassis
		}

		equipment_bonus = {
			hard_attack = 0.06
			soft_attack = 0.06
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_komatsu_tank_mio_trait_high_mobility
		name = JAP_komatsu_tank_mio_trait_high_mobility
		icon = GFX_generic_mio_trait_icon_maximum_speed

		position = { x = 0 y = 7 }
		relative_position_id = JAP_komatsu_tank_mio_trait_engine_boost
		all_parents = {
			JAP_komatsu_tank_mio_trait_targeting_optics
		}

		limit_to_equipment_type = {
			medium_tank_amphibious_chassis
			medium_tank_flame_chassis
		}

		equipment_bonus = {
			maximum_speed = 0.07
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_komatsu_tank_mio_trait_rapid_deployment
		name = JAP_komatsu_tank_mio_trait_rapid_deployment
		icon = GFX_generic_mio_trait_icon_task

		position = { x = -1 y = 6 }
		relative_position_id = JAP_komatsu_tank_mio_trait_engine_boost
		all_parents = {
			JAP_komatsu_tank_mio_trait_powertrain_factory
		}

		limit_to_equipment_type = {
			medium_tank_amphibious_chassis
			medium_tank_flame_chassis
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
			military_industrial_organization_research_bonus = 0.04
			military_industrial_organization_industrial_manufacturer_assign_cost = -0.15
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
}

JAP_subaru_tank_manufacturer = {
	allowed = { original_tag = JAP }
	icon = GFX_idea_fuji_company
	name = JAP_subaru_tank_manufacturer

	equipment_type = {
		heavy_tank_amphibious_chassis
	}

	research_categories = {
		CAT_trans_heli
		CAT_air_engine
		CAT_armor_engines
	}

	tree_header_text = {
		text = "Light Utility Performance"
		x = 2
	}

	tree_header_text = {
		text = "Systems Resilence"
		x = 8
	}

	initial_trait = {
		name = JAP_subaru_tank_manufacturer_trait

		equipment_bonus = {
			maximum_speed = 0.10
			breakthrough = 0.10
		}

		production_bonus = {
			production_efficiency_gain_factor = 0.10
		}
	}
	trait = {
		token = JAP_subaru_tank_mio_trait_turbine_optimized
		name = JAP_subaru_tank_mio_trait_turbine_optimized
		icon = GFX_generic_mio_trait_icon_maximum_speed

		position = { x = 2 y = 0 }

		equipment_bonus = {
			maximum_speed = 0.12
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_subaru_tank_mio_trait_four_blade_composite
		name = JAP_subaru_tank_mio_trait_four_blade_composite
		icon = GFX_generic_mio_trait_icon_max_strength

		position = { x = -2 y = 1 }
		relative_position_id = JAP_subaru_tank_mio_trait_turbine_optimized
		all_parents = {
			JAP_subaru_tank_mio_trait_turbine_optimized
		}

		equipment_bonus = {
			weight = -0.05
			max_organisation = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_subaru_tank_mio_trait_quick_swap
		name = JAP_subaru_tank_mio_trait_quick_swap
		icon = GFX_generic_mio_trait_icon_soft_attack

		position = { x = -2 y = 2 }
		relative_position_id = JAP_subaru_tank_mio_trait_turbine_optimized
		all_parents = {
			JAP_subaru_tank_mio_trait_four_blade_composite
		}

		equipment_bonus = {
			soft_attack = 0.08
			hard_attack = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_subaru_tank_mio_trait_glass_cockpit
		name = JAP_subaru_tank_mio_trait_glass_cockpit
		icon = GFX_generic_mio_trait_icon_defense

		position = { x = 0 y = 1 }
		relative_position_id = JAP_subaru_tank_mio_trait_turbine_optimized
		all_parents = {
			JAP_subaru_tank_mio_trait_turbine_optimized
		}

		equipment_bonus = {
			breakthrough = 0.08
			defense = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_subaru_tank_mio_trait_fenestron_tail
		name = JAP_subaru_tank_mio_trait_fenestron_tail
		icon = GFX_generic_mio_trait_icon_maximum_speed

		position = { x = 0 y = 2 }
		relative_position_id = JAP_subaru_tank_mio_trait_turbine_optimized
		all_parents = {
			JAP_subaru_tank_mio_trait_glass_cockpit
		}

		equipment_bonus = {
			maximum_speed = 0.10
			breakthrough = 0.03
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_subaru_tank_mio_trait_hot_high_mission
		name = JAP_subaru_tank_mio_trait_hot_high_mission
		icon = GFX_generic_mio_trait_icon_reliability

		position = { x = 2 y = 1 }
		relative_position_id = JAP_subaru_tank_mio_trait_turbine_optimized
		all_parents = {
			JAP_subaru_tank_mio_trait_turbine_optimized
		}

		equipment_bonus = {
			reliability = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_subaru_tank_mio_trait_composite_fuselage
		name = JAP_subaru_tank_mio_trait_composite_fuselage
		icon = GFX_generic_mio_trait_icon_efficiency_gain

		position = { x = 2 y = 2 }
		relative_position_id = JAP_subaru_tank_mio_trait_turbine_optimized
		all_parents = {
			JAP_subaru_tank_mio_trait_hot_high_mission
		}

		production_bonus = {
			production_efficiency_gain_factor = 0.12
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_subaru_tank_mio_trait_scheduled_maintenance
		name = JAP_subaru_tank_mio_trait_scheduled_maintenance
		icon = GFX_generic_mio_trait_icon_task

		position = { x = 0 y = 3 }
		relative_position_id = JAP_subaru_tank_mio_trait_turbine_optimized
		all_parents = {
			JAP_subaru_tank_mio_trait_composite_fuselage
			JAP_subaru_tank_mio_trait_fenestron_tail
			JAP_subaru_tank_mio_trait_quick_swap
		}

		production_bonus = {
			production_conversion_speed_factor = 0.15
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
			military_industrial_organization_research_bonus = 0.03
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_subaru_tank_mio_trait_bell_huey
		name = JAP_subaru_tank_mio_trait_bell_huey
		icon = GFX_generic_mio_trait_icon_reliability

		position = { x = 9 y = 0 }

		equipment_bonus = {
			reliability = 0.07
			armor_value = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_subaru_tank_mio_trait_endurance_training
		name = JAP_subaru_tank_mio_trait_endurance_training
		icon = GFX_generic_mio_trait_icon_maximum_speed

		position = { x = 0 y = 1 }
		relative_position_id = JAP_subaru_tank_mio_trait_bell_huey
		all_parents = {
			JAP_subaru_tank_mio_trait_bell_huey
		}

		equipment_bonus = {
			maximum_speed = 0.05
			reliability = 0.08
			fuel_consumption = 0.06
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_subaru_tank_mio_trait_redundant_power
		name = JAP_subaru_tank_mio_trait_redundant_power
		icon = GFX_generic_mio_trait_icon_defense

		position = { x = -2 y = 0 }
		relative_position_id = JAP_subaru_tank_mio_trait_bell_huey

		equipment_bonus = {
			reliability = 0.04
			defense = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_subaru_tank_mio_trait_precision_blade
		name = JAP_subaru_tank_mio_trait_precision_blade
		icon = GFX_generic_mio_trait_icon_production_capacity

		position = { x = -2 y = 1 }
		relative_position_id = JAP_subaru_tank_mio_trait_bell_huey
		all_parents = {
			JAP_subaru_tank_mio_trait_redundant_power
		}

		equipment_bonus = {
			reliability = 0.04
		}

		production_bonus = {
			production_capacity_factor = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_subaru_tank_mio_trait_wingbox_coaching
		name = JAP_subaru_tank_mio_trait_wingbox_coaching
		icon = GFX_generic_mio_trait_icon_research

		position = { x = 0 y = 2 }
		relative_position_id = JAP_subaru_tank_mio_trait_bell_huey
		all_parents = {
			JAP_subaru_tank_mio_trait_endurance_training
			JAP_subaru_tank_mio_trait_precision_blade
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_subaru_tank_mio_trait_all_weather
		name = JAP_subaru_tank_mio_trait_all_weather
		icon = GFX_generic_mio_trait_icon_breakthrough

		position = { x = 0 y = 3 }
		relative_position_id = JAP_subaru_tank_mio_trait_bell_huey
		all_parents = {
			JAP_subaru_tank_mio_trait_wingbox_coaching
		}

		equipment_bonus = {
			breakthrough = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_subaru_tank_mio_trait_emergency
		name = JAP_subaru_tank_mio_trait_emergency
		icon = GFX_generic_mio_trait_icon_task

		position = { x = -2 y = 3 }
		relative_position_id = JAP_subaru_tank_mio_trait_bell_huey
		all_parents = {
			JAP_subaru_tank_mio_trait_wingbox_coaching
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_subaru_tank_mio_trait_training_overlay
		name = JAP_subaru_tank_mio_trait_training_overlay
		icon = GFX_generic_mio_trait_icon_design

		position = { x = -4 y = 3 }
		relative_position_id = JAP_subaru_tank_mio_trait_bell_huey
		all_parents = {
			JAP_subaru_tank_mio_trait_wingbox_coaching
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.03
			military_industrial_organization_design_team_assign_cost = -0.25
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
}

## Material
JAP_howa_machinery_materiel_manufacturer = {
	allowed = { original_tag = JAP }
	icon = GFX_idea_Howa
	name = JAP_howa_machinery_materiel_manufacturer

	equipment_type = {
		Inf_equipment
	}

	research_categories = {
		CAT_inf_wep
		CAT_support_weapons
	}

	tree_header_text = {
		text = "Service Rifle Evolution"
		x = 3
	}

	tree_header_text = {
		text = "Support Weapons & Accessories"
		x = 8
	}

	initial_trait = {
		name = JAP_howa_machinery_materiel_manufacturer_trait

		equipment_bonus = {
			soft_attack = 0.10
			reliability = 0.05
		}

		production_bonus = {
			production_efficiency_cap_factor = 0.15
		}
	}
	trait = {
		token = JAP_howa_material_mio_trait_accuracy_linage
		name = JAP_howa_material_mio_trait_accuracy_linage
		icon = GFX_generic_mio_trait_icon_soft_attack

		position = { x = 3 y = 0 }

		equipment_bonus = {
			soft_attack = 0.12
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_howa_material_mio_trait_stamped_receiver
		name = JAP_howa_material_mio_trait_stamped_receiver
		icon = GFX_generic_mio_trait_icon_resources

		position = { x = -3 y = 1 }
		relative_position_id = JAP_howa_material_mio_trait_accuracy_linage
		all_parents = {
			JAP_howa_material_mio_trait_accuracy_linage
		}
		mutually_exclusive = {
			JAP_howa_material_mio_trait_gas_piston
		}

		production_bonus = {
			production_resource_need_factor = -0.10
			production_cost_factor = -0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_howa_material_mio_trait_gas_piston
		name = JAP_howa_material_mio_trait_gas_piston
		icon = GFX_generic_mio_trait_icon_reliability

		position = { x = -1 y = 1 }
		relative_position_id = JAP_howa_material_mio_trait_accuracy_linage
		all_parents = {
			JAP_howa_material_mio_trait_accuracy_linage
		}
		mutually_exclusive = {
			JAP_howa_material_mio_trait_stamped_receiver
		}

		equipment_bonus = {
			reliability = 0.15
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_howa_material_mio_trait_folding_stock
		name = JAP_howa_material_mio_trait_folding_stock
		icon = GFX_generic_mio_trait_icon_build_cost_ic

		position = { x = 1 y = 1 }
		relative_position_id = JAP_howa_material_mio_trait_accuracy_linage
		all_parents = {
			JAP_howa_material_mio_trait_accuracy_linage
		}
		mutually_exclusive = {
			JAP_howa_material_mio_trait_simplified_parts
		}

		equipment_bonus = {
			build_cost_ic = -0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_howa_material_mio_trait_simplified_parts
		name = JAP_howa_material_mio_trait_simplified_parts
		icon = GFX_generic_mio_trait_icon_efficiency_cap

		position = { x = 3 y = 1 }
		relative_position_id = JAP_howa_material_mio_trait_accuracy_linage
		all_parents = {
			JAP_howa_material_mio_trait_accuracy_linage
		}
		mutually_exclusive = {
			JAP_howa_material_mio_trait_folding_stock
		}

		production_bonus = {
			production_efficiency_cap_factor = 0.15
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_howa_material_mio_trait_clean_trigger
		name = JAP_howa_material_mio_trait_clean_trigger
		icon = GFX_generic_mio_trait_icon_soft_attack

		position = { x = 0 y = 2 }
		relative_position_id = JAP_howa_material_mio_trait_accuracy_linage
		all_parents = {
			JAP_howa_material_mio_trait_accuracy_linage
		}

		equipment_bonus = {
			soft_attack = 0.8
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_howa_material_mio_trait_rifle_grenade
		name = JAP_howa_material_mio_trait_rifle_grenade
		icon = GFX_generic_mio_trait_icon_hard_attack

		position = { x = 0 y = 3 }
		relative_position_id = JAP_howa_material_mio_trait_accuracy_linage
		all_parents = {
			JAP_howa_material_mio_trait_clean_trigger
		}

		equipment_bonus = {
			hard_attack = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_howa_material_mio_trait_digital_rail
		name = JAP_howa_material_mio_trait_digital_rail
		icon = GFX_generic_mio_trait_icon_defense

		position = { x = -2 y = 2 }
		relative_position_id = JAP_howa_material_mio_trait_accuracy_linage
		any_parent = {
			JAP_howa_material_mio_trait_stamped_receiver
			JAP_howa_material_mio_trait_gas_piston
		}

		equipment_bonus = {
			defense = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_howa_material_mio_trait_lightweight_polymer
		name = JAP_howa_material_mio_trait_lightweight_polymer
		icon = GFX_generic_mio_trait_icon_efficiency_gain

		position = { x = -2 y = 3 }
		relative_position_id = JAP_howa_material_mio_trait_accuracy_linage
		all_parents = {
			JAP_howa_material_mio_trait_digital_rail
		}

		production_bonus = {
			production_efficiency_gain_factor = 0.03
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_howa_material_mio_trait_ambidextrous
		name = JAP_howa_material_mio_trait_ambidextrous
		icon = GFX_generic_mio_trait_icon_task

		position = { x = 2 y = 2 }
		relative_position_id = JAP_howa_material_mio_trait_accuracy_linage
		any_parent = {
			JAP_howa_material_mio_trait_folding_stock
			JAP_howa_material_mio_trait_simplified_parts
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_howa_material_mio_trait_bipod
		name = JAP_howa_material_mio_trait_bipod
		icon = GFX_generic_mio_trait_icon_breakthrough

		position = { x = 2 y = 3 }
		relative_position_id = JAP_howa_material_mio_trait_accuracy_linage
		all_parents = {
			JAP_howa_material_mio_trait_ambidextrous
		}

		equipment_bonus = {
			breakthrough = 0.8
		}

		production_bonus = {
			production_capacity_factor = 0.03
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_howa_material_mio_trait_retail_caliber
		name = JAP_howa_material_mio_trait_retail_caliber
		icon = GFX_generic_mio_trait_icon_ap_attack

		position = { x = -1 y = 4 }
		relative_position_id = JAP_howa_material_mio_trait_accuracy_linage
		all_parents = {
			JAP_howa_material_mio_trait_lightweight_polymer
			JAP_howa_material_mio_trait_rifle_grenade
		}

		equipment_bonus = {
			ap_attack = 0.06
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_howa_material_mio_trait_magazine_latch
		name = JAP_howa_material_mio_trait_magazine_latch
		icon = GFX_generic_mio_trait_icon_reliability

		position = { x = 1 y = 4 }
		relative_position_id = JAP_howa_material_mio_trait_accuracy_linage
		all_parents = {
			JAP_howa_material_mio_trait_bipod
			JAP_howa_material_mio_trait_rifle_grenade
		}

		equipment_bonus = {
			reliability = 0.05
		}

		production_bonus = {
			production_resource_need_factor = -0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_howa_material_mio_trait_agl_feed
		name = JAP_howa_material_mio_trait_agl_feed
		icon = GFX_generic_mio_trait_icon_hard_attack

		position = { x = 8 y = 0 }

		equipment_bonus = {
			hard_attack = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_howa_material_mio_trait_tripod
		name = JAP_howa_material_mio_trait_tripod
		icon = GFX_generic_mio_trait_icon_build_cost_ic

		position = { x = 0 y = 1 }
		relative_position_id = JAP_howa_material_mio_trait_agl_feed
		all_parents = {
			JAP_howa_material_mio_trait_agl_feed
		}

		equipment_bonus = {
			build_cost_ic = -0.05
			maximum_speed = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_howa_material_mio_trait_belt_feed
		name = JAP_howa_material_mio_trait_belt_feed
		icon = GFX_generic_mio_trait_icon_reliability

		position = { x = -1 y = 2 }
		relative_position_id = JAP_howa_material_mio_trait_agl_feed
		all_parents = {
			JAP_howa_material_mio_trait_tripod
		}

		equipment_bonus = {
			reliability = 0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_howa_material_mio_trait_heavy_fire_workshop
		name = JAP_howa_material_mio_trait_heavy_fire_workshop
		icon = GFX_generic_mio_trait_icon_design

		position = { x = 1 y = 2 }
		relative_position_id = JAP_howa_material_mio_trait_agl_feed
		all_parents = {
			JAP_howa_material_mio_trait_tripod
		}

		organization_modifier = {
			military_industrial_organization_design_team_assign_cost = -0.25
			military_industrial_organization_industrial_manufacturer_assign_cost = -0.25
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_howa_material_mio_trait_recoilless
		name = JAP_howa_material_mio_trait_recoilless
		icon = GFX_generic_mio_trait_icon_ap_attack

		position = { x = 1 y = 3 }
		relative_position_id = JAP_howa_material_mio_trait_agl_feed
		all_parents = {
			JAP_howa_material_mio_trait_heavy_fire_workshop
		}

		equipment_bonus = {
			ap_attack = 0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_howa_material_mio_trait_bolt_action
		name = JAP_howa_material_mio_trait_bolt_action
		icon = GFX_generic_mio_trait_icon_build_cost_ic

		position = { x = 1 y = 4 }
		relative_position_id = JAP_howa_material_mio_trait_agl_feed
		all_parents = {
			JAP_howa_material_mio_trait_recoilless
		}

		equipment_bonus = {
			build_cost_ic = -0.04
			soft_attack = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_howa_material_mio_trait_carbine_trails
		name = JAP_howa_material_mio_trait_carbine_trails
		icon = GFX_generic_mio_trait_icon_task

		position = { x = -0 y = 5 }
		relative_position_id = JAP_howa_material_mio_trait_agl_feed
		all_parents = {
			JAP_howa_material_mio_trait_recoilless
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_howa_material_mio_trait_parts_quality
		name = JAP_howa_material_mio_trait_parts_quality
		icon = GFX_generic_mio_trait_icon_reliability

		position = { x = -1 y = 3 }
		relative_position_id = JAP_howa_material_mio_trait_agl_feed
		all_parents = {
			JAP_howa_material_mio_trait_belt_feed
		}

		equipment_bonus = {
			reliability = 0.03
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.03
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_howa_material_mio_trait_bolt_group
		name = JAP_howa_material_mio_trait_bolt_group
		icon = GFX_generic_mio_trait_icon_conversion_speed

		position = { x = -2 y = 4 }
		relative_position_id = JAP_howa_material_mio_trait_agl_feed
		all_parents = {
			JAP_howa_material_mio_trait_parts_quality
		}

		production_bonus = {
			production_conversion_speed_factor = 0.25
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_howa_material_mio_trait_magazine_winder
		name = JAP_howa_material_mio_trait_magazine_winder
		icon = GFX_generic_mio_trait_icon_production_capacity

		position = { x = -1 y = 5 }
		relative_position_id = JAP_howa_material_mio_trait_agl_feed
		all_parents = {
			JAP_howa_material_mio_trait_parts_quality
		}

		production_bonus = {
			production_capacity_factor = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
}
JAP_nec_materiel_manufacturer = {
	allowed = { original_tag = JAP }
	icon = GFX_idea_nec_company
	name = JAP_nec_materiel_manufacturer

	equipment_type = {
		cnc_equipment
	}

	research_categories = {
		CAT_cnc
		CAT_naval_electronics
	}

	tree_header_text = {
		text = "Light Wings"
		x = 2
	}

	tree_header_text = {
		text = "Air Defense Shield"
		x = 7
	}

	initial_trait = {
		name = JAP_nec_materiel_manufacturer_trait

		equipment_bonus = {
			max_organisation = 0.25
		}

		production_bonus = {
			production_efficiency_cap_factor = -0.10
		}
	}
	trait = {
		token = JAP_nec_materiel_mio_trait_broadband_radio
		name = JAP_nec_materiel_mio_trait_broadband_radio
		icon = GFX_generic_mio_trait_icon_max_strength

		position = { x = 0 y = 0 }

		equipment_bonus = {
			max_organisation = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_nec_materiel_mio_trait_emergency_recovery
		name = JAP_nec_materiel_mio_trait_emergency_recovery
		icon = GFX_generic_mio_trait_icon_max_strength

		position = { x = 0 y = 1 }
		relative_position_id = JAP_nec_materiel_mio_trait_broadband_radio
		all_parents = {
			JAP_nec_materiel_mio_trait_broadband_radio
		}

		equipment_bonus = {
			max_organisation = 0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_nec_materiel_mio_trait_secure_receiver
		name = JAP_nec_materiel_mio_trait_secure_receiver
		icon = GFX_generic_mio_trait_icon_reliability

		position = { x = 2 y = 0 }
		relative_position_id = JAP_nec_materiel_mio_trait_broadband_radio

		equipment_bonus = {
			reliability = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_nec_materiel_mio_trait_simulation_lab
		name = JAP_nec_materiel_mio_trait_simulation_lab
		icon = GFX_generic_mio_trait_icon_reliability

		position = { x = 2 y = 2 }
		relative_position_id = JAP_nec_materiel_mio_trait_broadband_radio
		all_parents = {
			JAP_nec_materiel_mio_trait_secure_receiver
		}
		any_parent = {
			JAP_nec_materiel_mio_trait_emergency_recovery
			JAP_nec_materiel_mio_trait_operator_training_center
		}

		equipment_bonus = {
			reliability = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_nec_materiel_mio_trait_radio_ui
		name = JAP_nec_materiel_mio_trait_radio_ui
		icon = GFX_generic_mio_trait_icon_build_cost_ic

		position = { x = 1 y = 3 }
		relative_position_id = JAP_nec_materiel_mio_trait_broadband_radio
		all_parents = {
			JAP_nec_materiel_mio_trait_simulation_lab
		}

		equipment_bonus = {
			build_cost_ic = -0.03
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_nec_materiel_mio_trait_data_link
		name = JAP_nec_materiel_mio_trait_data_link
		icon = GFX_generic_mio_trait_icon_max_strength

		position = { x = 3 y = 3 }
		relative_position_id = JAP_nec_materiel_mio_trait_broadband_radio
		all_parents = {
			JAP_nec_materiel_mio_trait_simulation_lab
		}

		equipment_bonus = {
			max_organisation = 0.03
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_nec_materiel_mio_trait_burst_data
		name = JAP_nec_materiel_mio_trait_burst_data
		icon = GFX_generic_mio_trait_icon_maximum_speed

		position = { x = 2 y = 4 }
		relative_position_id = JAP_nec_materiel_mio_trait_broadband_radio
		all_parents = {
			JAP_nec_materiel_mio_trait_data_link
			JAP_nec_materiel_mio_trait_radio_ui
		}

		equipment_bonus = {
			maximum_speed = 0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_nec_materiel_mio_trait_multi_band
		name = JAP_nec_materiel_mio_trait_multi_band
		icon = GFX_generic_mio_trait_icon_max_strength

		position = { x = 4 y = 0 }
		relative_position_id = JAP_nec_materiel_mio_trait_broadband_radio

		equipment_bonus = {
			maximum_speed = 0.03
			max_organisation = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_nec_materiel_mio_trait_operator_training_center
		name = JAP_nec_materiel_mio_trait_operator_training_center
		icon = GFX_generic_mio_trait_icon_task

		position = { x = 4 y = 1 }
		relative_position_id = JAP_nec_materiel_mio_trait_broadband_radio
		all_parents = {
			JAP_nec_materiel_mio_trait_multi_band
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
			military_industrial_organization_design_team_assign_cost = -0.15
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_nec_materiel_mio_trait_falcon_net
		name = JAP_nec_materiel_mio_trait_falcon_net
		icon = GFX_generic_mio_trait_icon_reliability

		position = { x = 4 y = 4 }
		relative_position_id = JAP_nec_materiel_mio_trait_broadband_radio
		all_parents = {
			JAP_nec_materiel_mio_trait_operator_training_center
		}

		equipment_bonus = {
			reliability = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_nec_materiel_mio_trait_space_tracking
		name = JAP_nec_materiel_mio_trait_space_tracking
		icon = GFX_generic_mio_trait_icon_build_cost_ic

		position = { x = 6 y = 0 }
		relative_position_id = JAP_nec_materiel_mio_trait_broadband_radio

		equipment_bonus = {
			build_cost_ic = -0.05
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.03
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_nec_materiel_mio_trait_redundant_data
		name = JAP_nec_materiel_mio_trait_redundant_data
		icon = GFX_generic_mio_trait_icon_task

		position = { x = 6 y = 2 }
		relative_position_id = JAP_nec_materiel_mio_trait_broadband_radio
		all_parents = {
			JAP_nec_materiel_mio_trait_space_tracking
		}
		any_parent = {
			JAP_nec_materiel_mio_trait_operator_training_center
			JAP_nec_materiel_mio_trait_cyber_resillient
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
			military_industrial_organization_industrial_manufacturer_assign_cost = -0.15
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_nec_materiel_mio_trait_modem_cost
		name = JAP_nec_materiel_mio_trait_modem_cost
		icon = GFX_generic_mio_trait_icon_resources

		position = { x = 5 y = 3 }
		relative_position_id = JAP_nec_materiel_mio_trait_broadband_radio
		all_parents = {
			JAP_nec_materiel_mio_trait_redundant_data
		}

		production_bonus = {
			production_resource_need_factor = -0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_nec_materiel_mio_trait_command_node
		name = JAP_nec_materiel_mio_trait_command_node
		icon = GFX_generic_mio_trait_icon_efficiency_cap

		position = { x = 6 y = 4 }
		relative_position_id = JAP_nec_materiel_mio_trait_broadband_radio
		all_parents = {
			JAP_nec_materiel_mio_trait_modem_cost
			JAP_nec_materiel_mio_trait_control_station
		}

		equipment_bonus = {
			build_cost_ic = -0.05
		}

		production_bonus = {
			production_efficiency_cap_factor = 0.15
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_nec_materiel_mio_trait_control_station
		name = JAP_nec_materiel_mio_trait_control_station
		icon = GFX_generic_mio_trait_icon_efficiency_gain

		position = { x = 7 y = 3 }
		relative_position_id = JAP_nec_materiel_mio_trait_broadband_radio
		all_parents = {
			JAP_nec_materiel_mio_trait_redundant_data
		}

		production_bonus = {
			production_efficiency_gain_factor = 0.05
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_nec_materiel_mio_trait_ground_space
		name = JAP_nec_materiel_mio_trait_ground_space
		icon = GFX_generic_mio_trait_icon_efficiency_cap

		position = { x = 8 y = 0 }
		relative_position_id = JAP_nec_materiel_mio_trait_broadband_radio

		equipment_bonus = {
			reliability = 0.03
		}

		production_bonus = {
			production_efficiency_cap_factor = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_nec_materiel_mio_trait_cyber_resillient
		name = JAP_nec_materiel_mio_trait_cyber_resillient
		icon = GFX_generic_mio_trait_icon_max_strength

		position = { x = 8 y = 1 }
		relative_position_id = JAP_nec_materiel_mio_trait_broadband_radio
		all_parents = {
			JAP_nec_materiel_mio_trait_ground_space
		}

		equipment_bonus = {
			reliability = 0.04
			max_organisation = 0.05
		}

		production_bonus = {
			production_efficiency_cap_factor = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
}

JAP_toshiba_materiel_manufacturer = {
	allowed = { original_tag = JAP }
	icon = GFX_idea_toshiba_company
	name = JAP_toshiba_materiel_manufacturer

	equipment_type = {
		train_equipment
		medium_tank_aa_chassis
		AA_Equipment
	}

	research_categories = {
		CAT_nuclear_reactors
		CAT_computing_tech
		CAT_internet_tech
		CAT_infrastructure
		CAT_aa
	}

	tree_header_text = {
		text = "Rail Systems"
		x = 1
	}

	tree_header_text = {
		text = "Air Defense Systems"
		x = 7
	}

	on_tech_research_completed = {
		if = {
			limit = {
				JAP = {
					mio:JAP_toshiba_materiel_manufacturer = {
						is_mio_trait_completed = JAP_toshiba_materiel_mio_trait_reactor_development
					}
				}
			}
			JAP = {
				random_owned_state = {
					random_list = {
						30 = {
							add_building_construction = {
								type = nuclear_reactor
								level = 1
								instant_build = yes
							}
						}
						70 = {
							add_building_construction = {
								type = internet_station
								level = 1
								instant_build = yes
							}
						}
					}
				}
			}
		}
	}

	initial_trait = {
		name = JAP_toshiba_materiel_manufacturer_trait

		equipment_bonus = {
			reliability = 0.10
		}

		production_bonus = {
			production_efficiency_cap_factor = 0.10
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.15
			military_industrial_organization_size_up_requirement = 0.30
			military_industrial_organization_industrial_manufacturer_assign_cost = 0.10
		}
	}
	trait = {
		token = JAP_toshiba_materiel_mio_trait_reactor_development
		name = JAP_toshiba_materiel_mio_trait_reactor_development
		icon = GFX_generic_mio_trait_icon_unique
		special_trait_background = yes

		position = { x = 0 y = 1 }

		available = {
			JAP = {
				mio:JAP_toshiba_materiel_manufacturer = {
					has_mio_size > 5
				}
			}
		}

		on_complete = {
			custom_effect_tooltip = JAP_toshiba_materiel_mio_trait_reactor_development_tt
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					large_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_toshiba_materiel_mio_trait_emergency_battery
		name = JAP_toshiba_materiel_mio_trait_emergency_battery
		icon = GFX_generic_mio_trait_icon_build_cost_ic

		position = { x = 0 y = 0 }

		limit_to_equipment_type = {
			train_equipment
		}

		equipment_bonus = {
			build_cost_ic = -0.02
		}

		production_bonus = {
			production_cost_factor = -0.03
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_toshiba_materiel_mio_trait_high_speed_inverter
		name = JAP_toshiba_materiel_mio_trait_high_speed_inverter
		icon = GFX_generic_mio_trait_icon_efficiency_gain

		position = { x = 2 y = 0 }
		relative_position_id = JAP_toshiba_materiel_mio_trait_emergency_battery

		limit_to_equipment_type = {
			train_equipment
		}

		production_bonus = {
			production_efficiency_gain_factor = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_toshiba_materiel_mio_trait_global_export
		name = JAP_toshiba_materiel_mio_trait_global_export
		icon = GFX_generic_mio_trait_icon_funds

		position = { x = 1 y = 1 }
		relative_position_id = JAP_toshiba_materiel_mio_trait_emergency_battery
		all_parents = {
			JAP_toshiba_materiel_mio_trait_high_speed_inverter
			JAP_toshiba_materiel_mio_trait_emergency_battery
		}

		limit_to_equipment_type = {
			train_equipment
		}

		organization_modifier = {
			military_industrial_organization_funds_gain = 0.05
			military_industrial_organization_industrial_manufacturer_assign_cost = -0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_toshiba_materiel_mio_trait_disaster_recovery
		name = JAP_toshiba_materiel_mio_trait_disaster_recovery
		icon = GFX_generic_mio_trait_icon_task

		position = { x = 1 y = 2 }
		relative_position_id = JAP_toshiba_materiel_mio_trait_emergency_battery
		all_parents = {
			JAP_toshiba_materiel_mio_trait_global_export
		}

		limit_to_equipment_type = {
			train_equipment
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_toshiba_materiel_mio_trait_rail_component
		name = JAP_toshiba_materiel_mio_trait_rail_component
		icon = GFX_generic_mio_trait_icon_research

		position = { x = 0 y = 3 }
		relative_position_id = JAP_toshiba_materiel_mio_trait_emergency_battery
		all_parents = {
			JAP_toshiba_materiel_mio_trait_disaster_recovery
		}

		limit_to_equipment_type = {
			train_equipment
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.03
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_toshiba_materiel_mio_trait_railway_integration
		name = JAP_toshiba_materiel_mio_trait_railway_integration
		icon = GFX_generic_mio_trait_icon_research

		position = { x = 0 y = 4 }
		relative_position_id = JAP_toshiba_materiel_mio_trait_emergency_battery
		all_parents = {
			JAP_toshiba_materiel_mio_trait_rail_component
		}

		limit_to_equipment_type = {
			train_equipment
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.06
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_toshiba_materiel_mio_trait_rail_line_automation
		name = JAP_toshiba_materiel_mio_trait_rail_line_automation
		icon = GFX_generic_mio_trait_icon_efficiency_gain

		position = { x = 2 y = 3 }
		relative_position_id = JAP_toshiba_materiel_mio_trait_emergency_battery
		all_parents = {
			JAP_toshiba_materiel_mio_trait_disaster_recovery
		}

		limit_to_equipment_type = {
			train_equipment
		}

		production_bonus = {
			production_efficiency_gain_factor = 0.15
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_toshiba_materiel_mio_trait_component_standardization
		name = JAP_toshiba_materiel_mio_trait_component_standardization
		icon = GFX_generic_mio_trait_icon_efficiency_cap

		position = { x = 2 y = 4 }
		relative_position_id = JAP_toshiba_materiel_mio_trait_emergency_battery
		all_parents = {
			JAP_toshiba_materiel_mio_trait_rail_line_automation
		}

		limit_to_equipment_type = {
			train_equipment
		}

		production_bonus = {
			production_efficiency_cap_factor = 0.15
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_toshiba_materiel_mio_trait_miniaturized_energy
		name = JAP_toshiba_materiel_mio_trait_miniaturized_energy
		icon = GFX_generic_mio_trait_icon_resources

		position = { x = 4 y = 3 }
		relative_position_id = JAP_toshiba_materiel_mio_trait_emergency_battery
		all_parents = {
			JAP_toshiba_materiel_mio_trait_disaster_recovery
		}

		limit_to_equipment_type = {
			train_equipment
		}

		production_bonus = {
			production_resource_need_factor = -0.15
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_toshiba_materiel_mio_trait_propulsion_system
		name = JAP_toshiba_materiel_mio_trait_propulsion_system
		icon = GFX_generic_mio_trait_icon_build_cost_ic

		position = { x = 4 y = 4 }
		relative_position_id = JAP_toshiba_materiel_mio_trait_emergency_battery
		all_parents = {
			JAP_toshiba_materiel_mio_trait_miniaturized_energy
		}

		limit_to_equipment_type = {
			train_equipment
		}

		equipment_bonus = {
			build_cost_ic = -0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_toshiba_materiel_mio_trait_kin_sam_vehicle
		name = JAP_toshiba_materiel_mio_trait_kin_sam_vehicle
		icon = GFX_generic_mio_trait_icon_anti_air_attack

		position = { x = 4 y = 0 }

		limit_to_equipment_type = {
			medium_tank_aa_chassis
		}

		equipment_bonus = {
			soft_attack = 0.04
			anti_air_attack = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_toshiba_materiel_mio_trait_reinforced_launcher
		name = JAP_toshiba_materiel_mio_trait_reinforced_launcher
		icon = GFX_generic_mio_trait_icon_armor_value

		position = { x = -1 y = 1 }
		relative_position_id = JAP_toshiba_materiel_mio_trait_kin_sam_vehicle
		all_parents = {
			JAP_toshiba_materiel_mio_trait_kin_sam_vehicle
		}

		limit_to_equipment_type = {
			medium_tank_aa_chassis
		}

		equipment_bonus = {
			armor_value = 0.08
			reliability = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_toshiba_materiel_mio_trait_reload_drilling
		name = JAP_toshiba_materiel_mio_trait_reload_drilling
		icon = GFX_generic_mio_trait_icon_reliability

		position = { x = 1 y = 1 }
		relative_position_id = JAP_toshiba_materiel_mio_trait_kin_sam_vehicle
		all_parents = {
			JAP_toshiba_materiel_mio_trait_kin_sam_vehicle
		}

		limit_to_equipment_type = {
			medium_tank_aa_chassis
		}

		equipment_bonus = {
			reliability = 0.05
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_toshiba_materiel_mio_trait_dual_barrel
		name = JAP_toshiba_materiel_mio_trait_dual_barrel
		icon = GFX_generic_mio_trait_icon_hard_attack

		position = { x = 2 y = 2 }
		relative_position_id = JAP_toshiba_materiel_mio_trait_kin_sam_vehicle
		all_parents = {
			JAP_toshiba_materiel_mio_trait_reload_drilling
		}

		limit_to_equipment_type = {
			medium_tank_aa_chassis
		}

		equipment_bonus = {
			hard_attack = 0.07
			reliability = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_toshiba_materiel_mio_trait_launcher_mobility
		name = JAP_toshiba_materiel_mio_trait_launcher_mobility
		icon = GFX_generic_mio_trait_icon_breakthrough

		position = { x = 0 y = 1 }
		relative_position_id = JAP_toshiba_materiel_mio_trait_kin_sam_vehicle
		all_parents = {
			JAP_toshiba_materiel_mio_trait_kin_sam_vehicle
		}

		limit_to_equipment_type = {
			medium_tank_aa_chassis
		}

		equipment_bonus = {
			maximum_speed = 0.04
			breakthrough = 0.04
			fuel_consumption = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_toshiba_materiel_mio_trait_mobile_fire
		name = JAP_toshiba_materiel_mio_trait_mobile_fire
		icon = GFX_generic_mio_trait_icon_efficiency_cap

		position = { x = 0 y = 2 }
		relative_position_id = JAP_toshiba_materiel_mio_trait_kin_sam_vehicle
		all_parents = {
			JAP_toshiba_materiel_mio_trait_launcher_mobility
		}

		limit_to_equipment_type = {
			medium_tank_aa_chassis
		}

		production_bonus = {
			production_efficiency_cap_factor = 0.10
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_toshiba_materiel_mio_trait_rapid_targt
		name = JAP_toshiba_materiel_mio_trait_rapid_targt
		icon = GFX_generic_mio_trait_icon_maximum_speed

		position = { x = -2 y = 2 }
		relative_position_id = JAP_toshiba_materiel_mio_trait_kin_sam_vehicle
		all_parents = {
			JAP_toshiba_materiel_mio_trait_reinforced_launcher
		}

		limit_to_equipment_type = {
			medium_tank_aa_chassis
		}

		equipment_bonus = {
			maximum_speed = 0.08
			anti_air_attack = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_toshiba_materiel_mio_trait_imaging_seeker
		name = JAP_toshiba_materiel_mio_trait_imaging_seeker
		icon = GFX_generic_mio_trait_icon_aa_anti_air_attack

		position = { x = 8 y = 0 }

		limit_to_equipment_type = {
			AA_Equipment
		}

		equipment_bonus = {
			anti_air_attack = 0.08
			reliability = 0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_toshiba_materiel_mio_trait_night_acquisition
		name = JAP_toshiba_materiel_mio_trait_night_acquisition
		icon = GFX_generic_mio_trait_icon_aa_anti_air_attack

		position = { x = -1 y = 1 }
		relative_position_id = JAP_toshiba_materiel_mio_trait_imaging_seeker
		all_parents = {
			JAP_toshiba_materiel_mio_trait_imaging_seeker
		}

		limit_to_equipment_type = {
			AA_Equipment
		}

		equipment_bonus = {
			air_attack = 0.05
			reliability = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_toshiba_materiel_mio_trait_production_streamline
		name = JAP_toshiba_materiel_mio_trait_production_streamline
		icon = GFX_generic_mio_trait_icon_aa_efficiency_cap

		position = { x = 1 y = 1 }
		relative_position_id = JAP_toshiba_materiel_mio_trait_imaging_seeker
		all_parents = {
			JAP_toshiba_materiel_mio_trait_imaging_seeker
		}

		limit_to_equipment_type = {
			AA_Equipment
		}

		production_bonus = {
			production_efficiency_cap_factor = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_toshiba_materiel_mio_trait_thermal_dampening
		name = JAP_toshiba_materiel_mio_trait_thermal_dampening
		icon = GFX_generic_mio_trait_icon_aa_reliability

		position = { x = 0 y = 2 }
		relative_position_id = JAP_toshiba_materiel_mio_trait_imaging_seeker
		all_parents = {
			JAP_toshiba_materiel_mio_trait_production_streamline
			JAP_toshiba_materiel_mio_trait_night_acquisition
		}

		limit_to_equipment_type = {
			AA_Equipment
		}

		equipment_bonus = {
			reliability = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_toshiba_materiel_mio_trait_supply_office
		name = JAP_toshiba_materiel_mio_trait_supply_office
		icon = GFX_generic_mio_trait_icon_aa_resource

		position = { x = 1 y = 3 }
		relative_position_id = JAP_toshiba_materiel_mio_trait_imaging_seeker
		all_parents = {
			JAP_toshiba_materiel_mio_trait_thermal_dampening
		}

		limit_to_equipment_type = {
			AA_Equipment
		}

		production_bonus = {
			production_resource_penalty_factor = -0.25
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_toshiba_materiel_mio_trait_resource_efficient
		name = JAP_toshiba_materiel_mio_trait_resource_efficient
		icon = GFX_generic_mio_trait_icon_aa_resource

		position = { x = -1 y = 3 }
		relative_position_id = JAP_toshiba_materiel_mio_trait_imaging_seeker
		all_parents = {
			JAP_toshiba_materiel_mio_trait_thermal_dampening
		}

		limit_to_equipment_type = {
			AA_Equipment
		}

		production_bonus = {
			production_resource_need_factor = -0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
}


## Naval

JAP_mitsubishi_shipbuilding_naval_manufacturer = {
	allowed = { original_tag = JAP }
	icon = GFX_idea_Mitsubishi_Heavy_Industries
	name = JAP_mitsubishi_shipbuilding_naval_manufacturer

	equipment_type = {
		mio_cat_only_small_ships
		submarine
		mio_cat_destroyers
		convoy
		mio_cat_frigates
	}

	research_categories = {
		CAT_sub
		CAT_destroyer
		CAT_frigate
		CAT_torpedoes
		CAT_vls_systems
		CAT_landing_craft
	}

	tree_header_text = {
		text = "Patrol & Convoy Vessels"
		x = 1
	}

	tree_header_text = {
		text = "Frigates & Destroyers"
		x = 5
	}

	tree_header_text = {
		text = "Submarines"
		x = 8
	}

	initial_trait = {
		name = JAP_mitsubishi_shipbuilding_naval_manufacturer_trait

		equipment_bonus = {
			hg_armor_piercing = 0.10
			lg_armor_piercing = 0.10
			lg_attack = 0.10
			hg_attack = 0.10
			surface_detection = 0.05
		}
	}
	trait = {
		token = JAP_mitsubishi_ship_mio_trait_rapid_coastal
		name = JAP_mitsubishi_ship_mio_trait_rapid_coastal
		icon = GFX_generic_mio_trait_icon_naval_speed

		position = { x = 0 y = 0 }

		limit_to_equipment_type = {
			mio_cat_only_small_ships
		}

		equipment_bonus = {
			maximum_speed = 0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_ship_mio_trait_hull_stabilization
		name = JAP_mitsubishi_ship_mio_trait_hull_stabilization
		icon = GFX_generic_mio_trait_icon_reliability

		position = { x = 2 y = 0 }
		relative_position_id = JAP_mitsubishi_ship_mio_trait_rapid_coastal

		limit_to_equipment_type = {
			mio_cat_only_small_ships
			convoy
		}

		equipment_bonus = {
			reliability = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_ship_mio_trait_low_surface
		name = JAP_mitsubishi_ship_mio_trait_low_surface
		icon = GFX_generic_mio_trait_icon_surface_visibility

		position = { x = 2 y = 1 }
		relative_position_id = JAP_mitsubishi_ship_mio_trait_rapid_coastal
		any_parent = {
			JAP_mitsubishi_ship_mio_trait_hull_stabilization
			JAP_mitsubishi_ship_mio_trait_rapid_coastal
		}

		limit_to_equipment_type = {
			mio_cat_only_small_ships
			convoy
		}

		equipment_bonus = {
			surface_visibility = -0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_ship_mio_trait_hull_welding
		name = JAP_mitsubishi_ship_mio_trait_hull_welding
		icon = GFX_generic_mio_trait_icon_build_cost_ic

		position = { x = 0 y = 1 }
		relative_position_id = JAP_mitsubishi_ship_mio_trait_rapid_coastal
		any_parent = {
			JAP_mitsubishi_ship_mio_trait_hull_stabilization
			JAP_mitsubishi_ship_mio_trait_rapid_coastal
		}

		limit_to_equipment_type = {
			mio_cat_only_small_ships
			convoy
		}

		equipment_bonus = {
			build_cost_ic = -0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_ship_mio_trait_coating_durability
		name = JAP_mitsubishi_ship_mio_trait_coating_durability
		icon = GFX_generic_mio_trait_icon_reliability

		position = { x = 1 y = 2 }
		relative_position_id = JAP_mitsubishi_ship_mio_trait_rapid_coastal
		all_parents = {
			JAP_mitsubishi_ship_mio_trait_hull_welding
			JAP_mitsubishi_ship_mio_trait_low_surface
		}

		limit_to_equipment_type = {
			convoy
		}

		equipment_bonus = {
			naval_range = 0.04
			reliability = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_ship_mio_trait_remote_weapon
		name = JAP_mitsubishi_ship_mio_trait_remote_weapon
		icon = GFX_generic_mio_trait_icon_lg_attack

		position = { x = 0 y = 3 }
		relative_position_id = JAP_mitsubishi_ship_mio_trait_rapid_coastal
		all_parents = {
			JAP_mitsubishi_ship_mio_trait_coating_durability
		}

		limit_to_equipment_type = {
			mio_cat_only_small_ships
		}

		equipment_bonus = {
			lg_attack = 0.07
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_ship_mio_trait_rapid_load
		name = JAP_mitsubishi_ship_mio_trait_rapid_load
		icon = GFX_generic_mio_trait_icon_task

		position = { x = 0 y = 5 }
		relative_position_id = JAP_mitsubishi_ship_mio_trait_rapid_coastal
		all_parents = {
			JAP_mitsubishi_ship_mio_trait_remote_weapon
		}

		limit_to_equipment_type = {
			mio_cat_only_small_ships
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_ship_mio_trait_export_liaison
		name = JAP_mitsubishi_ship_mio_trait_export_liaison
		icon = GFX_generic_mio_trait_icon_conversion_speed

		position = { x = 2 y = 3 }
		relative_position_id = JAP_mitsubishi_ship_mio_trait_rapid_coastal
		all_parents = {
			JAP_mitsubishi_ship_mio_trait_coating_durability
		}

		limit_to_equipment_type = {
			mio_cat_only_small_ships
		}

		organization_modifier = {
			military_industrial_organization_size_up_requirement = -0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_ship_mio_trait_battery_efficient
		name = JAP_mitsubishi_ship_mio_trait_battery_efficient
		icon = GFX_generic_mio_trait_icon_fuel_consumption

		position = { x = 2 y = 5 }
		relative_position_id = JAP_mitsubishi_ship_mio_trait_rapid_coastal
		all_parents = {
			JAP_mitsubishi_ship_mio_trait_export_liaison
		}

		limit_to_equipment_type = {
			mio_cat_only_small_ships
			convoy
		}

		equipment_bonus = {
			fuel_consumption = -0.10
			sub_visibility = -0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_ship_mio_trait_maritime_supply
		name = JAP_mitsubishi_ship_mio_trait_maritime_supply
		icon = GFX_generic_mio_trait_icon_unique

		position = { x = 1 y = 4 }
		relative_position_id = JAP_mitsubishi_ship_mio_trait_rapid_coastal
		all_parents = {
			JAP_mitsubishi_ship_mio_trait_coating_durability
		}

		limit_to_equipment_type = {
			mio_cat_only_small_ships
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_ship_mio_trait_stealth_hull
		name = JAP_mitsubishi_ship_mio_trait_stealth_hull
		icon = GFX_generic_mio_trait_icon_surface_visibility
		special_trait_background = yes

		position = { x = -1 y = 0 }
		relative_position_id = JAP_mitsubishi_ship_mio_trait_automated_combat

		available = {
			JAP = {
				OR = {
					is_special_project_completed = sp:sp_stealth_corvette
					is_special_project_completed = sp:sp_stealth_destroyer
					is_special_project_completed = sp:sp_stealth_frigate
				}
			}
		}

		limit_to_equipment_type = {
			mio_cat_destroyers
			mio_cat_frigates
		}

		equipment_bonus = {
			surface_visibility = -0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_ship_mio_trait_automated_combat
		name = JAP_mitsubishi_ship_mio_trait_automated_combat
		icon = GFX_generic_mio_trait_icon_reliability

		position = { x = 4 y = 0 }

		limit_to_equipment_type = {
			mio_cat_destroyers
			mio_cat_frigates
		}

		equipment_bonus = {
			reliability = 0.10
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_ship_mio_trait_codag
		name = JAP_mitsubishi_ship_mio_trait_codag
		icon = GFX_generic_mio_trait_icon_naval_speed

		position = { x = 2 y = 0 }
		relative_position_id = JAP_mitsubishi_ship_mio_trait_automated_combat

		limit_to_equipment_type = {
			mio_cat_destroyers
			mio_cat_frigates
		}

		equipment_bonus = {
			naval_speed = 0.08
			fuel_consumption = -0.03
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_ship_mio_trait_launch_automation
		name = JAP_mitsubishi_ship_mio_trait_launch_automation
		icon = GFX_generic_mio_trait_icon_hg_attack

		position = { x = 0 y = 1 }
		relative_position_id = JAP_mitsubishi_ship_mio_trait_automated_combat
		all_parents = {
			JAP_mitsubishi_ship_mio_trait_codag
			JAP_mitsubishi_ship_mio_trait_automated_combat
		}

		limit_to_equipment_type = {
			mio_cat_destroyers
			mio_cat_frigates
		}

		equipment_bonus = {
			hg_attack = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_ship_mio_trait_swordfish_antiradar
		name = JAP_mitsubishi_ship_mio_trait_swordfish_antiradar
		icon = GFX_generic_mio_trait_icon_naval_torpedo_damage_reduction_factor

		position = { x = 1 y = 2 }
		relative_position_id = JAP_mitsubishi_ship_mio_trait_automated_combat
		all_parents = {
			JAP_mitsubishi_ship_mio_trait_launch_automation
		}

		limit_to_equipment_type = {
			mio_cat_destroyers
			mio_cat_frigates
		}

		equipment_bonus = {
			surface_visibility = -0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_ship_mio_trait_automated_shot
		name = JAP_mitsubishi_ship_mio_trait_automated_shot
		icon = GFX_generic_mio_trait_icon_naval_strike_attack

		position = { x = -1 y = 2 }
		relative_position_id = JAP_mitsubishi_ship_mio_trait_automated_combat
		all_parents = {
			JAP_mitsubishi_ship_mio_trait_launch_automation
		}

		limit_to_equipment_type = {
			mio_cat_destroyers
			mio_cat_frigates
		}

		equipment_bonus = {
			hg_armor_piercing = 0.04
			lg_armor_piercing = 0.04
			reliability = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_ship_mio_trait_crew_reduction
		name = JAP_mitsubishi_ship_mio_trait_crew_reduction
		icon = GFX_generic_mio_trait_icon_max_strength

		position = { x = 2 y = 1 }
		relative_position_id = JAP_mitsubishi_ship_mio_trait_automated_combat
		all_parents = {
			JAP_mitsubishi_ship_mio_trait_codag
			JAP_mitsubishi_ship_mio_trait_automated_combat
		}

		limit_to_equipment_type = {
			mio_cat_destroyers
			mio_cat_frigates
		}

		equipment_bonus = {
			max_strength = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_ship_mio_trait_inmanned_systems
		name = JAP_mitsubishi_ship_mio_trait_inmanned_systems
		icon = GFX_generic_mio_trait_icon_sub_detection

		position = { x = 2 y = 2 }
		relative_position_id = JAP_mitsubishi_ship_mio_trait_automated_combat
		all_parents = {
			JAP_mitsubishi_ship_mio_trait_crew_reduction
		}

		limit_to_equipment_type = {
			mio_cat_destroyers
			mio_cat_frigates
		}

		equipment_bonus = {
			sub_detection = 0.08
			surface_detection = 0.08
			naval_range = 0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_ship_mio_trait_lithium_integration
		name = JAP_mitsubishi_ship_mio_trait_lithium_integration
		icon = GFX_generic_mio_trait_icon_naval_range

		position = { x = 8 y = 0 }

		limit_to_equipment_type = {
			submarine
		}

		equipment_bonus = {
			naval_range = 0.10
			sub_detection = -0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_ship_mio_trait_silent_drive
		name = JAP_mitsubishi_ship_mio_trait_silent_drive
		icon = GFX_generic_mio_trait_icon_sub_detection

		position = { x = -1 y = 1 }
		relative_position_id = JAP_mitsubishi_ship_mio_trait_lithium_integration
		all_parents = {
			JAP_mitsubishi_ship_mio_trait_lithium_integration
		}

		limit_to_equipment_type = {
			submarine
		}

		equipment_bonus = {
			sub_detection = -0.10
			reliability = 0.04
			build_cost_ic = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_ship_mio_trait_advanced_sonar
		name = JAP_mitsubishi_ship_mio_trait_advanced_sonar
		icon = GFX_generic_mio_trait_icon_surface_detection

		position = { x = -1 y = 2 }
		relative_position_id = JAP_mitsubishi_ship_mio_trait_lithium_integration
		all_parents = {
			JAP_mitsubishi_ship_mio_trait_silent_drive
		}

		limit_to_equipment_type = {
			submarine
		}

		equipment_bonus = {
			surface_detection = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_ship_mio_trait_snorkel_fuel
		name = JAP_mitsubishi_ship_mio_trait_snorkel_fuel
		icon = GFX_generic_mio_trait_icon_fuel_consumption

		position = { x = 1 y = 1 }
		relative_position_id = JAP_mitsubishi_ship_mio_trait_lithium_integration
		all_parents = {
			JAP_mitsubishi_ship_mio_trait_lithium_integration
		}

		limit_to_equipment_type = {
			submarine
		}

		equipment_bonus = {
			fuel_consumption = -0.06
			naval_speed = 0.02
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_ship_mio_trait_hull_shock
		name = JAP_mitsubishi_ship_mio_trait_hull_shock
		icon = GFX_generic_mio_trait_icon_armor_value

		position = { x = 1 y = 2 }
		relative_position_id = JAP_mitsubishi_ship_mio_trait_lithium_integration
		all_parents = {
			JAP_mitsubishi_ship_mio_trait_snorkel_fuel
		}

		limit_to_equipment_type = {
			submarine
		}

		equipment_bonus = {
			armor_value = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_ship_mio_trait_xconfig_rudder
		name = JAP_mitsubishi_ship_mio_trait_xconfig_rudder
		icon = GFX_generic_mio_trait_icon_naval_speed

		position = { x = 1 y = 3 }
		relative_position_id = JAP_mitsubishi_ship_mio_trait_lithium_integration
		all_parents = {
			JAP_mitsubishi_ship_mio_trait_hull_shock
		}

		limit_to_equipment_type = {
			submarine
		}

		equipment_bonus = {
			naval_speed = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_ship_mio_trait_next_gen_torpedo
		name = JAP_mitsubishi_ship_mio_trait_next_gen_torpedo
		icon = GFX_generic_mio_trait_icon_torpedo_attack

		position = { x = 0 y = 4 }
		relative_position_id = JAP_mitsubishi_ship_mio_trait_lithium_integration
		all_parents = {
			JAP_mitsubishi_ship_mio_trait_xconfig_rudder
			JAP_mitsubishi_ship_mio_trait_advanced_sonar
		}

		limit_to_equipment_type = {
			submarine
		}

		equipment_bonus = {
			torpedo_attack = 0.12
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_mitsubishi_ship_mio_trait_submarine_research
		name = JAP_mitsubishi_ship_mio_trait_submarine_research
		icon = GFX_generic_mio_trait_icon_research

		position = { x = 0 y = 5 }
		relative_position_id = JAP_mitsubishi_ship_mio_trait_lithium_integration
		all_parents = {
			JAP_mitsubishi_ship_mio_trait_next_gen_torpedo
		}

		limit_to_equipment_type = {
			submarine
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.08
			military_industrial_organization_funds_gain = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
}

JAP_kawasaki_shipbuilding_naval_manufacturer = {
	allowed = { original_tag = JAP }
	icon = GFX_idea_Kawasaki_Shipbuilding
	name = JAP_kawasaki_shipbuilding_naval_manufacturer

	equipment_type = {
		submarine
		convoy
	}

	research_categories = {
		CAT_sub
		CAT_naval_engine
		CAT_landing_craft
	}

	tree_header_text = {
		text = "Submarine Excellence"
		x = 2
	}

	tree_header_text = {
		text = "Container Vessel Efficiency"
		x = 7
	}

	initial_trait = {
		name = JAP_kawasaki_shipbuilding_naval_manufacturer_trait

		equipment_bonus = {
			fuel_consumption = -0.15
			sub_detection = -0.10
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.05
		}
	}
	trait = {
		token = JAP_kawasaki_ship_mio_trait_stirling_aip
		name = JAP_kawasaki_ship_mio_trait_stirling_aip
		icon = GFX_generic_mio_trait_icon_reliability

		position = { x = 1 y = 0 }

		limit_to_equipment_type = {
			submarine
		}

		equipment_bonus = {
			reliability = 0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_ship_mio_trait_high_density_battery
		name = JAP_kawasaki_ship_mio_trait_high_density_battery
		icon = GFX_generic_mio_trait_icon_naval_range

		position = { x = 0 y = 1 }
		relative_position_id = JAP_kawasaki_ship_mio_trait_stirling_aip
		all_parents = {
			JAP_kawasaki_ship_mio_trait_stirling_aip
		}

		limit_to_equipment_type = {
			submarine
		}

		equipment_bonus = {
			naval_range = 0.09
			reliability = 0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_ship_mio_trait_x_rudder
		name = JAP_kawasaki_ship_mio_trait_x_rudder
		icon = GFX_generic_mio_trait_icon_naval_speed

		position = { x = 2 y = 0 }
		relative_position_id = JAP_kawasaki_ship_mio_trait_stirling_aip

		limit_to_equipment_type = {
			submarine
		}

		equipment_bonus = {
			naval_speed = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_ship_mio_trait_hull_steel
		name = JAP_kawasaki_ship_mio_trait_hull_steel
		icon = GFX_generic_mio_trait_icon_armor_value

		position = { x = 2 y = 1 }
		relative_position_id = JAP_kawasaki_ship_mio_trait_stirling_aip
		all_parents = {
			JAP_kawasaki_ship_mio_trait_x_rudder
		}

		limit_to_equipment_type = {
			submarine
		}

		equipment_bonus = {
			armor_value = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_ship_mio_trait_absorbation_coating
		name = JAP_kawasaki_ship_mio_trait_absorbation_coating
		icon = GFX_generic_mio_trait_icon_sub_visibility

		position = { x = 1 y = 2 }
		relative_position_id = JAP_kawasaki_ship_mio_trait_stirling_aip
		all_parents = {
			JAP_kawasaki_ship_mio_trait_hull_steel
			JAP_kawasaki_ship_mio_trait_high_density_battery
		}

		limit_to_equipment_type = {
			submarine
		}

		equipment_bonus = {
			sub_visibility = -0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_ship_mio_trait_advanced_sonar
		name = JAP_kawasaki_ship_mio_trait_advanced_sonar
		icon = GFX_generic_mio_trait_icon_sub_detection

		position = { x = 1 y = 3 }
		relative_position_id = JAP_kawasaki_ship_mio_trait_stirling_aip
		all_parents = {
			JAP_kawasaki_ship_mio_trait_absorbation_coating
		}

		limit_to_equipment_type = {
			submarine
		}

		equipment_bonus = {
			sub_detection = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_ship_mio_trait_automated_launch
		name = JAP_kawasaki_ship_mio_trait_automated_launch
		icon = GFX_generic_mio_trait_icon_hg_attack

		position = { x = 0 y = 4 }
		relative_position_id = JAP_kawasaki_ship_mio_trait_stirling_aip
		all_parents = {
			JAP_kawasaki_ship_mio_trait_advanced_sonar
		}

		limit_to_equipment_type = {
			submarine
		}

		equipment_bonus = {
			hg_attack = 0.12
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_ship_mio_trait_battery_compartment
		name = JAP_kawasaki_ship_mio_trait_battery_compartment
		icon = GFX_generic_mio_trait_icon_reliability

		position = { x = 1 y = 5 }
		relative_position_id = JAP_kawasaki_ship_mio_trait_stirling_aip
		all_parents = {
			JAP_kawasaki_ship_mio_trait_advanced_sonar
		}

		limit_to_equipment_type = {
			submarine
		}

		equipment_bonus = {
			reliability = 0.07
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_ship_mio_trait_next_gen_ss
		name = JAP_kawasaki_ship_mio_trait_next_gen_ss
		icon = GFX_generic_mio_trait_icon_research

		position = { x = 2 y = 4 }
		relative_position_id = JAP_kawasaki_ship_mio_trait_stirling_aip
		all_parents = {
			JAP_kawasaki_ship_mio_trait_advanced_sonar
		}

		limit_to_equipment_type = {
			submarine
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.07
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_ship_mio_trait_high_troughput
		name = JAP_kawasaki_ship_mio_trait_high_troughput
		icon = GFX_generic_mio_trait_icon_build_cost_ic

		position = { x = 7 y = 0 }

		limit_to_equipment_type = {
			convoy
		}

		equipment_bonus = {
			build_cost_ic = -0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_ship_mio_trait_low_friction
		name = JAP_kawasaki_ship_mio_trait_low_friction
		icon = GFX_generic_mio_trait_icon_fuel_consumption

		position = { x = -1 y = 1 }
		relative_position_id = JAP_kawasaki_ship_mio_trait_high_troughput
		all_parents = {
			JAP_kawasaki_ship_mio_trait_high_troughput
		}

		limit_to_equipment_type = {
			convoy
		}

		equipment_bonus = {
			naval_speed = 0.04
			fuel_consumption = -0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_ship_mio_trait_hull_repair
		name = JAP_kawasaki_ship_mio_trait_hull_repair
		icon = GFX_generic_mio_trait_icon_task

		position = { x = -1 y = 2 }
		relative_position_id = JAP_kawasaki_ship_mio_trait_high_troughput
		all_parents = {
			JAP_kawasaki_ship_mio_trait_low_friction
		}

		limit_to_equipment_type = {
			convoy
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_ship_mio_trait_high_capacity_diesel
		name = JAP_kawasaki_ship_mio_trait_high_capacity_diesel
		icon = GFX_generic_mio_trait_icon_naval_speed

		position = { x = -1 y = 3 }
		relative_position_id = JAP_kawasaki_ship_mio_trait_high_troughput
		all_parents = {
			JAP_kawasaki_ship_mio_trait_hull_repair
		}

		limit_to_equipment_type = {
			convoy
		}

		equipment_bonus = {
			naval_speed = 0.08
			fuel_consumption = -0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_ship_mio_trait_cargo_module
		name = JAP_kawasaki_ship_mio_trait_cargo_module
		icon = GFX_generic_mio_trait_icon_build_cost_ic

		position = { x = 1 y = 1 }
		relative_position_id = JAP_kawasaki_ship_mio_trait_high_troughput
		all_parents = {
			JAP_kawasaki_ship_mio_trait_high_troughput
		}

		limit_to_equipment_type = {
			convoy
		}

		equipment_bonus = {
			build_cost_ic = -0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_ship_mio_trait_emergency_redunt
		name = JAP_kawasaki_ship_mio_trait_emergency_redunt
		icon = GFX_generic_mio_trait_icon_reliability

		position = { x = 1 y = 2 }
		relative_position_id = JAP_kawasaki_ship_mio_trait_high_troughput
		all_parents = {
			JAP_kawasaki_ship_mio_trait_cargo_module
		}

		limit_to_equipment_type = {
			convoy
		}

		equipment_bonus = {
			reliability = 0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_ship_mio_trait_automated_container
		name = JAP_kawasaki_ship_mio_trait_automated_container
		icon = GFX_generic_mio_trait_icon_build_cost_ic

		position = { x = 1 y = 3 }
		relative_position_id = JAP_kawasaki_ship_mio_trait_high_troughput
		all_parents = {
			JAP_kawasaki_ship_mio_trait_emergency_redunt
		}

		limit_to_equipment_type = {
			convoy
		}

		equipment_bonus = {
			build_cost_ic = -0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_ship_mio_trait_export_design
		name = JAP_kawasaki_ship_mio_trait_export_design
		icon = GFX_generic_mio_trait_icon_design

		position = { x = 0 y = 4 }
		relative_position_id = JAP_kawasaki_ship_mio_trait_high_troughput
		all_parents = {
			JAP_kawasaki_ship_mio_trait_high_capacity_diesel
			JAP_kawasaki_ship_mio_trait_automated_container
		}

		limit_to_equipment_type = {
			convoy
		}

		organization_modifier = {
			military_industrial_organization_design_team_assign_cost = -0.25
			military_industrial_organization_design_team_change_cost = -0.25
			military_industrial_organization_industrial_manufacturer_assign_cost = -0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_kawasaki_ship_mio_trait_logistics
		name = JAP_kawasaki_ship_mio_trait_logistics
		icon = GFX_generic_mio_trait_icon_task

		position = { x = 0 y = 5 }
		relative_position_id = JAP_kawasaki_ship_mio_trait_high_troughput
		all_parents = {
			JAP_kawasaki_ship_mio_trait_export_design
		}

		limit_to_equipment_type = {
			convoy
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
}

JAP_ihi_corporation_naval_manufacturer = {
	allowed = { original_tag = JAP }
	icon = GFX_idea_IHI
	name = JAP_ihi_corporation_naval_manufacturer

	equipment_type = {
		mio_cat_destroyers
		helicopter_operator
		convoy
	}

	research_categories = {
		CAT_lha
		CAT_lpd
		CAT_destroyer
		CAT_landing_craft
	}

	tree_header_text = {
		text = "Flagship Core Systems"
		x = 1
	}

	tree_header_text = {
		text = "Projecting Presence"
		x = 8
	}

	initial_trait = {
		name = JAP_ihi_shipbuilding_naval_manufacturer_trait

		equipment_bonus = {
			naval_speed = 0.15
			naval_range = 0.05
		}
	}
	trait = {
		token = JAP_ihi_naval_mio_trait_reinforced_flightdeck
		name = JAP_ihi_naval_mio_trait_reinforced_flightdeck
		icon = GFX_generic_mio_trait_icon_heli_operator_armor

		position = { x = 0 y = 0 }

		limit_to_equipment_type = {
			helicopter_operator
		}

		equipment_bonus = {
			armor_value = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_ihi_naval_mio_trait_enhanced_vtol
		name = JAP_ihi_naval_mio_trait_enhanced_vtol
		icon = GFX_generic_mio_trait_icon_heli_operator_reliability

		position = { x = 2 y = 0 }
		relative_position_id = JAP_ihi_naval_mio_trait_reinforced_flightdeck

		limit_to_equipment_type = {
			helicopter_operator
		}

		equipment_bonus = {
			reliability = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_ihi_naval_mio_trait_auto_hoist
		name = JAP_ihi_naval_mio_trait_auto_hoist
		icon = GFX_generic_mio_trait_icon_heli_operator_speed

		position = { x = 2 y = 1 }
		relative_position_id = JAP_ihi_naval_mio_trait_reinforced_flightdeck
		all_parents = {
			JAP_ihi_naval_mio_trait_enhanced_vtol
		}

		limit_to_equipment_type = {
			helicopter_operator
		}

		equipment_bonus = {
			naval_speed = 0.08
			naval_range = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_ihi_naval_mio_trait_dual_searam
		name = JAP_ihi_naval_mio_trait_dual_searam
		icon = GFX_generic_mio_trait_icon_hg_attack

		position = { x = 0 y = 1 }
		relative_position_id = JAP_ihi_naval_mio_trait_reinforced_flightdeck
		all_parents = {
			JAP_ihi_naval_mio_trait_reinforced_flightdeck
		}

		limit_to_equipment_type = {
			helicopter_operator
			mio_cat_destroyers
		}

		equipment_bonus = {
			hg_attack = 0.04
			anti_air_attack = 0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_ihi_naval_mio_trait_advanced_asw
		name = JAP_ihi_naval_mio_trait_advanced_asw
		icon = GFX_generic_mio_trait_icon_sub_detection

		position = { x = 0 y = 2 }
		relative_position_id = JAP_ihi_naval_mio_trait_reinforced_flightdeck
		all_parents = {
			JAP_ihi_naval_mio_trait_dual_searam
			JAP_ihi_naval_mio_trait_auto_hoist
		}

		limit_to_equipment_type = {
			helicopter_operator
			mio_cat_destroyers
		}

		equipment_bonus = {
			sub_detection = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_ihi_naval_mio_trait_stealth_radar
		name = JAP_ihi_naval_mio_trait_stealth_radar
		icon = GFX_generic_mio_trait_icon_surface_detection

		position = { x = 2 y = 2 }
		relative_position_id = JAP_ihi_naval_mio_trait_reinforced_flightdeck
		all_parents = {
			JAP_ihi_naval_mio_trait_dual_searam
			JAP_ihi_naval_mio_trait_auto_hoist
		}

		limit_to_equipment_type = {
			helicopter_operator
			mio_cat_destroyers
		}

		equipment_bonus = {
			surface_detection = 0.08
			surface_visibility = -0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_ihi_naval_mio_trait_codag_propulsion
		name = JAP_ihi_naval_mio_trait_codag_propulsion
		icon = GFX_generic_mio_trait_icon_naval_speed

		position = { x = 1 y = 2 }
		relative_position_id = JAP_ihi_naval_mio_trait_reinforced_flightdeck
		all_parents = {
			JAP_ihi_naval_mio_trait_dual_searam
			JAP_ihi_naval_mio_trait_auto_hoist
		}

		limit_to_equipment_type = {
			helicopter_operator
			mio_cat_destroyers
		}

		equipment_bonus = {
			naval_speed = 0.08
			fuel_consumption = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_ihi_naval_mio_trait_hangar_deck
		name = JAP_ihi_naval_mio_trait_hangar_deck
		icon = GFX_generic_mio_trait_icon_heli_operator_sub_detection

		position = { x = 0 y = 3 }
		relative_position_id = JAP_ihi_naval_mio_trait_reinforced_flightdeck
		any_parent = {
			JAP_ihi_naval_mio_trait_advanced_asw
			JAP_ihi_naval_mio_trait_stealth_radar
		}
		all_parents = {
			JAP_ihi_naval_mio_trait_codag_propulsion
		}

		limit_to_equipment_type = {
			helicopter_operator
		}

		equipment_bonus = {
			sub_detection = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_ihi_naval_mio_trait_reinforced_command_bridge
		name = JAP_ihi_naval_mio_trait_reinforced_command_bridge
		icon = GFX_generic_mio_trait_icon_armor_value

		position = { x = 0 y = 4 }
		relative_position_id = JAP_ihi_naval_mio_trait_reinforced_flightdeck
		all_parents = {
			JAP_ihi_naval_mio_trait_hangar_deck
		}

		limit_to_equipment_type = {
			helicopter_operator
			mio_cat_destroyers
		}

		equipment_bonus = {
			armor_value = 0.075
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_ihi_naval_mio_trait_reinforced_high_radar
		name = JAP_ihi_naval_mio_trait_reinforced_high_radar
		icon = GFX_generic_mio_trait_icon_surface_detection

		position = { x = 1 y = 4 }
		relative_position_id = JAP_ihi_naval_mio_trait_reinforced_flightdeck
		all_parents = {
			JAP_ihi_naval_mio_trait_hangar_deck
		}

		limit_to_equipment_type = {
			helicopter_operator
			mio_cat_destroyers
		}

		equipment_bonus = {
			surface_detection = 0.08
			lg_attack = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_ihi_naval_mio_trait_long_range
		name = JAP_ihi_naval_mio_trait_long_range
		icon = GFX_generic_mio_trait_icon_heli_operator_lg_attack

		position = { x = 2 y = 3 }
		relative_position_id = JAP_ihi_naval_mio_trait_reinforced_flightdeck
		any_parent = {
			JAP_ihi_naval_mio_trait_advanced_asw
			JAP_ihi_naval_mio_trait_stealth_radar
		}
		all_parents = {
			JAP_ihi_naval_mio_trait_codag_propulsion
		}

		limit_to_equipment_type = {
			mio_cat_destroyers
		}

		equipment_bonus = {
			naval_range = 0.04
			lg_armor_piercing = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_ihi_naval_mio_trait_automated_damage
		name = JAP_ihi_naval_mio_trait_automated_damage
		icon = GFX_generic_mio_trait_icon_reliability

		position = { x = 2 y = 4 }
		relative_position_id = JAP_ihi_naval_mio_trait_reinforced_flightdeck
		all_parents = {
			JAP_ihi_naval_mio_trait_long_range
		}

		limit_to_equipment_type = {
			helicopter_operator
			mio_cat_destroyers
		}

		equipment_bonus = {
			max_strength = 0.05
			reliability = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_ihi_naval_mio_trait_crew_efficiency
		name = JAP_ihi_naval_mio_trait_crew_efficiency
		icon = GFX_generic_mio_trait_icon_task

		position = { x = 3 y = 4 }
		relative_position_id = JAP_ihi_naval_mio_trait_reinforced_flightdeck
		all_parents = {
			JAP_ihi_naval_mio_trait_long_range
		}

		limit_to_equipment_type = {
			helicopter_operator
			mio_cat_destroyers
		}

		equipment_bonus = {
			fuel_consumption = -0.05
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_ihi_naval_mio_trait_commercial_hull
		name = JAP_ihi_naval_mio_trait_commercial_hull
		icon = GFX_generic_mio_trait_icon_convoy_armor

		position = { x = 5 y = 0 }
		relative_position_id = JAP_ihi_naval_mio_trait_reinforced_flightdeck

		limit_to_equipment_type = {
			convoy
		}

		equipment_bonus = {
			armor_value = 0.04
			reliability = 0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_ihi_naval_mio_trait_fuel_efficient_convoy
		name = JAP_ihi_naval_mio_trait_fuel_efficient_convoy
		icon = GFX_generic_mio_trait_icon_convoy_buildcost

		position = { x = 0 y = 1 }
		relative_position_id = JAP_ihi_naval_mio_trait_commercial_hull

		all_parents = {
			JAP_ihi_naval_mio_trait_commercial_hull
		}

		limit_to_equipment_type = {
			convoy
		}

		equipment_bonus = {
			build_cost_ic = -0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_ihi_naval_mio_trait_radar_early
		name = JAP_ihi_naval_mio_trait_radar_early
		icon = GFX_generic_mio_trait_icon_convoy_surface_detection

		position = { x = 0 y = 2 }
		relative_position_id = JAP_ihi_naval_mio_trait_commercial_hull

		all_parents = {
			JAP_ihi_naval_mio_trait_fuel_efficient_convoy
		}

		limit_to_equipment_type = {
			convoy
		}

		equipment_bonus = {
			surface_detection = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_ihi_naval_mio_trait_automated_cargo
		name = JAP_ihi_naval_mio_trait_automated_cargo
		icon = GFX_generic_mio_trait_icon_convoy_speed

		position = { x = 0 y = 3 }
		relative_position_id = JAP_ihi_naval_mio_trait_commercial_hull

		all_parents = {
			JAP_ihi_naval_mio_trait_radar_early
		}

		limit_to_equipment_type = {
			convoy
		}

		equipment_bonus = {
			max_organisation = 0.15
			naval_speed = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_ihi_naval_mio_trait_convoy_operations
		name = JAP_ihi_naval_mio_trait_convoy_operations
		icon = GFX_generic_mio_trait_icon_convoy_reliability

		position = { x = -1 y = 3 }
		relative_position_id = JAP_ihi_naval_mio_trait_commercial_hull

		all_parents = {
			JAP_ihi_naval_mio_trait_radar_early
		}

		limit_to_equipment_type = {
			convoy
		}

		equipment_bonus = {
			reliability = 0.02
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
			military_industrial_organization_industrial_manufacturer_assign_cost = -0.25
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_ihi_naval_mio_trait_extended_supply
		name = JAP_ihi_naval_mio_trait_extended_supply
		icon = GFX_generic_mio_trait_icon_naval_range
		position = { x = 9 y = 0 }
		relative_position_id = JAP_ihi_naval_mio_trait_reinforced_flightdeck

		limit_to_equipment_type = {
			helicopter_operator
			mio_cat_destroyers
		}

		equipment_bonus = {
			naval_range = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_ihi_naval_mio_trait_stealth_hull
		name = JAP_ihi_naval_mio_trait_stealth_hull
		icon = GFX_generic_mio_trait_icon_surface_detection
		position = { x = -2 y = 0 }
		relative_position_id = JAP_ihi_naval_mio_trait_extended_supply

		available = {
			JAP = {
				OR = {
					is_special_project_completed = sp:sp_stealth_corvette
					is_special_project_completed = sp:sp_stealth_destroyer
					is_special_project_completed = sp:sp_stealth_frigate
				}
			}
		}

		limit_to_equipment_type = {
			helicopter_operator
			mio_cat_destroyers
		}

		equipment_bonus = {
			surface_detection = -0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_ihi_naval_mio_trait_reinforced_superstructure
		name = JAP_ihi_naval_mio_trait_reinforced_superstructure
		icon = GFX_generic_mio_trait_icon_armor_value
		position = { x = -1 y = 1 }
		relative_position_id = JAP_ihi_naval_mio_trait_extended_supply

		any_parent = {
			JAP_ihi_naval_mio_trait_stealth_hull
		}

		all_parents = {
			JAP_ihi_naval_mio_trait_extended_supply
		}

		limit_to_equipment_type = {
			helicopter_operator
			mio_cat_destroyers
		}

		equipment_bonus = {
			armor_value = 0.20
			build_cost_ic = 0.075
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_ihi_naval_mio_trait_transport_overlay
		name = JAP_ihi_naval_mio_trait_transport_overlay
		icon = GFX_generic_mio_trait_icon_heli_operator_reliability

		position = { x = -2 y = 2 }
		relative_position_id = JAP_ihi_naval_mio_trait_extended_supply

		all_parents = {
			JAP_ihi_naval_mio_trait_reinforced_superstructure
		}

		limit_to_equipment_type = {
			helicopter_operator
		}

		equipment_bonus = {
			max_strength = 0.05
			reliability = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_ihi_naval_mio_trait_large_fuel
		name = JAP_ihi_naval_mio_trait_large_fuel
		icon = GFX_generic_mio_trait_icon_naval_range
		position = { x = 0 y = 2 }
		relative_position_id = JAP_ihi_naval_mio_trait_extended_supply

		all_parents = {
			JAP_ihi_naval_mio_trait_reinforced_superstructure
		}

		limit_to_equipment_type = {
			helicopter_operator
			mio_cat_destroyers
		}

		equipment_bonus = {
			naval_range = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_ihi_naval_mio_trait_robust_bulkhead
		name = JAP_ihi_naval_mio_trait_robust_bulkhead
		icon = GFX_generic_mio_trait_icon_armor_value
		position = { x = 0 y = 3 }
		relative_position_id = JAP_ihi_naval_mio_trait_extended_supply

		all_parents = {
			JAP_ihi_naval_mio_trait_large_fuel
		}

		limit_to_equipment_type = {
			helicopter_operator
			mio_cat_destroyers
		}

		equipment_bonus = {
			armor_value = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_ihi_naval_mio_trait_dry_dock
		name = JAP_ihi_naval_mio_trait_dry_dock
		icon = GFX_generic_mio_trait_icon_build_cost_ic
		position = { x = -2 y = 3 }
		relative_position_id = JAP_ihi_naval_mio_trait_extended_supply

		all_parents = {
			JAP_ihi_naval_mio_trait_large_fuel
		}

		limit_to_equipment_type = {
			helicopter_operator
			mio_cat_destroyers
		}

		equipment_bonus = {
			build_cost_ic = -0.05
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
}

JAP_jmu_corporation_naval_manufacturer = {
	allowed = { original_tag = JAP }
	icon = GFX_idea_jmu_company
	name = JAP_jmu_corporation_naval_manufacturer

	equipment_type = {
		mio_cat_destroyers
		helicopter_operator
		carrier
	}

	research_categories = {
		CAT_carrier
		CAT_destroyer
	}

	tree_header_text = {
		text = "Escort Combatants"
		x = 1
	}

	tree_header_text = {
		text = "Flight Ops & Sea Control"
		x = 5
	}

	tree_header_text = {
		text = "Carrier Aviation"
		x = 8
	}

	initial_trait = {
		name = JAP_jmu_shipbuilding_naval_manufacturer_trait

		equipment_bonus = {
			reliability = 0.10
			armor_value = 0.15
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_sensor_fusion
		name = JAP_jmu_naval_mio_trait_sensor_fusion
		icon = GFX_generic_mio_trait_icon_destroyer_detection

		position = { x = 0 y = 0 }

		limit_to_equipment_type = {
			mio_cat_destroyers
		}

		equipment_bonus = {
			surface_detection = 0.08
			naval_light_gun_hit_chance_factor = 0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_wave_piercing_bow
		name = JAP_jmu_naval_mio_trait_wave_piercing_bow
		icon = GFX_generic_mio_trait_icon_destroyer_engine

		position = { x = 1 y = 0 }
		relative_position_id = JAP_jmu_naval_mio_trait_sensor_fusion

		limit_to_equipment_type = {
			mio_cat_destroyers
		}

		equipment_bonus = {
			naval_speed = 0.08
			fuel_consumption = -0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_dual_band_surveillance
		name = JAP_jmu_naval_mio_trait_dual_band_surveillance
		icon = GFX_generic_mio_trait_icon_destroyer_detection

		position = { x = 2 y = 0 }
		relative_position_id = JAP_jmu_naval_mio_trait_sensor_fusion

		limit_to_equipment_type = {
			mio_cat_destroyers
		}

		equipment_bonus = {
			surface_detection = 0.08
			anti_air_attack = 0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_wave_quiet_shaft
		name = JAP_jmu_naval_mio_trait_wave_quiet_shaft
		icon = GFX_generic_mio_trait_icon_destroyer_reliability

		position = { x = 1 y = 1 }
		relative_position_id = JAP_jmu_naval_mio_trait_sensor_fusion
		all_parents = {
			JAP_jmu_naval_mio_trait_sensor_fusion
			JAP_jmu_naval_mio_trait_wave_piercing_bow
			JAP_jmu_naval_mio_trait_dual_band_surveillance
		}

		limit_to_equipment_type = {
			mio_cat_destroyers
		}

		equipment_bonus = {
			sub_detection = -0.05
			reliability = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_long_range_torpedo
		name = JAP_jmu_naval_mio_trait_long_range_torpedo
		icon = GFX_generic_mio_trait_icon_destroyer_torpedo

		position = { x = 1 y = 2 }
		relative_position_id = JAP_jmu_naval_mio_trait_sensor_fusion
		all_parents = {
			JAP_jmu_naval_mio_trait_wave_quiet_shaft
		}

		limit_to_equipment_type = {
			mio_cat_destroyers
		}

		equipment_bonus = {
			torpedo_attack = 0.10
			naval_torpedo_hit_chance_factor = 0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_helideck_ops
		name = JAP_jmu_naval_mio_trait_helideck_ops
		icon = GFX_generic_mio_trait_icon_destroyer_sub_detection

		position = { x = 0 y = 3 }
		relative_position_id = JAP_jmu_naval_mio_trait_sensor_fusion
		all_parents = {
			JAP_jmu_naval_mio_trait_long_range_torpedo
		}

		limit_to_equipment_type = {
			mio_cat_destroyers
		}

		equipment_bonus = {
			sub_detection = 0.08
			hg_attack = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_heavy_weather
		name = JAP_jmu_naval_mio_trait_heavy_weather
		icon = GFX_generic_mio_trait_icon_destroyer_hg_attack

		position = { x = 2 y = 3 }
		relative_position_id = JAP_jmu_naval_mio_trait_sensor_fusion
		all_parents = {
			JAP_jmu_naval_mio_trait_long_range_torpedo
		}

		limit_to_equipment_type = {
			mio_cat_destroyers
		}

		equipment_bonus = {
			naval_weather_penalty_factor = -0.10
			naval_heavy_gun_hit_chance_factor = 0.05
			naval_light_gun_hit_chance_factor = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_lightweight_topside
		name = JAP_jmu_naval_mio_trait_lightweight_topside
		icon = GFX_generic_mio_trait_icon_destroyer_engine

		position = { x = 1 y = 4 }
		relative_position_id = JAP_jmu_naval_mio_trait_sensor_fusion
		all_parents = {
			JAP_jmu_naval_mio_trait_long_range_torpedo
		}

		limit_to_equipment_type = {
			mio_cat_destroyers
		}

		equipment_bonus = {
			build_cost_ic = -0.08
			armor_value = -0.2
			naval_speed = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_thermal_management
		name = JAP_jmu_naval_mio_trait_thermal_management
		icon = GFX_generic_mio_trait_icon_destroyer_hg_attack

		position = { x = 0 y = 5 }
		relative_position_id = JAP_jmu_naval_mio_trait_sensor_fusion
		all_parents = {
			JAP_jmu_naval_mio_trait_lightweight_topside
		}

		limit_to_equipment_type = {
			mio_cat_destroyers
		}

		equipment_bonus = {
			hg_armor_piercing = 0.08
			reliability = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_air_defense_fire
		name = JAP_jmu_naval_mio_trait_air_defense_fire
		icon = GFX_generic_mio_trait_icon_destroyer_anti_air

		position = { x = 0 y = 6 }
		relative_position_id = JAP_jmu_naval_mio_trait_sensor_fusion
		all_parents = {
			JAP_jmu_naval_mio_trait_thermal_management
		}

		limit_to_equipment_type = {
			mio_cat_destroyers
		}

		equipment_bonus = {
			anti_air_attack = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_digital_damage_control
		name = JAP_jmu_naval_mio_trait_digital_damage_control
		icon = GFX_generic_mio_trait_icon_destroyer

		position = { x = 2 y = 5 }
		relative_position_id = JAP_jmu_naval_mio_trait_sensor_fusion
		all_parents = {
			JAP_jmu_naval_mio_trait_lightweight_topside
		}

		limit_to_equipment_type = {
			mio_cat_destroyers
		}

		equipment_bonus = {
			max_organisation = 0.15
			naval_torpedo_damage_reduction_factor = 0.15
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_replenishment_discipline
		name = JAP_jmu_naval_mio_trait_replenishment_discipline
		icon = GFX_generic_mio_trait_icon_destroyer_range

		position = { x = 2 y = 6 }
		relative_position_id = JAP_jmu_naval_mio_trait_sensor_fusion
		all_parents = {
			JAP_jmu_naval_mio_trait_digital_damage_control
		}

		limit_to_equipment_type = {
			mio_cat_destroyers
		}

		equipment_bonus = {
			naval_range = 0.10
			fuel_consumption = -0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_reinforced_flight
		name = JAP_jmu_naval_mio_trait_reinforced_flight
		icon = GFX_generic_mio_trait_icon_heli_operator_armor

		position = { x = 5 y = 0 }
		relative_position_id = JAP_jmu_naval_mio_trait_sensor_fusion

		limit_to_equipment_type = {
			helicopter_operator
		}

		equipment_bonus = {
			armor_value = 0.06
			reliability = 0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_deck_heat_coating
		name = JAP_jmu_naval_mio_trait_deck_heat_coating
		icon = GFX_generic_mio_trait_icon_heli_operator_reliability

		position = { x = -1 y = 1 }
		relative_position_id = JAP_jmu_naval_mio_trait_reinforced_flight
		all_parents = {
			JAP_jmu_naval_mio_trait_reinforced_flight
		}

		limit_to_equipment_type = {
			helicopter_operator
		}

		equipment_bonus = {
			reliability = 0.06
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_rcs_island
		name = JAP_jmu_naval_mio_trait_rcs_island
		icon = GFX_generic_mio_trait_icon_heli_operator_surface_detection

		position = { x = -1 y = 2 }
		relative_position_id = JAP_jmu_naval_mio_trait_reinforced_flight
		all_parents = {
			JAP_jmu_naval_mio_trait_deck_heat_coating
		}

		limit_to_equipment_type = {
			helicopter_operator
		}

		equipment_bonus = {
			surface_visibility = -0.08
			surface_detection = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_twin_elevator
		name = JAP_jmu_naval_mio_trait_twin_elevator
		icon = GFX_generic_mio_trait_icon_heli_operator_hg_attack

		position = { x = 1 y = 1 }
		relative_position_id = JAP_jmu_naval_mio_trait_reinforced_flight
		all_parents = {
			JAP_jmu_naval_mio_trait_reinforced_flight
		}

		limit_to_equipment_type = {
			helicopter_operator
		}

		equipment_bonus = {
			hg_attack = 0.08
			naval_speed = 0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_air_wing_coordination
		name = JAP_jmu_naval_mio_trait_air_wing_coordination
		icon = GFX_generic_mio_trait_icon_heli_operator_sub_detection

		position = { x = 1 y = 2 }
		relative_position_id = JAP_jmu_naval_mio_trait_reinforced_flight
		all_parents = {
			JAP_jmu_naval_mio_trait_twin_elevator
		}

		limit_to_equipment_type = {
			helicopter_operator
		}

		equipment_bonus = {
			sub_detection = 0.10
			sub_attack = 0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_ciws_searam
		name = JAP_jmu_naval_mio_trait_ciws_searam
		icon = GFX_generic_mio_trait_icon_heli_operator_anti_air_attack

		position = { x = 0 y = 3 }
		relative_position_id = JAP_jmu_naval_mio_trait_reinforced_flight
		all_parents = {
			JAP_jmu_naval_mio_trait_air_wing_coordination
			JAP_jmu_naval_mio_trait_rcs_island
		}

		limit_to_equipment_type = {
			helicopter_operator
		}

		equipment_bonus = {
			anti_air_attack = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_uav_bay
		name = JAP_jmu_naval_mio_trait_uav_bay
		icon = GFX_generic_mio_trait_icon_heli_operator_surface_detection

		position = { x = 0 y = 4 }
		relative_position_id = JAP_jmu_naval_mio_trait_reinforced_flight
		all_parents = {
			JAP_jmu_naval_mio_trait_ciws_searam
		}

		limit_to_equipment_type = {
			helicopter_operator
		}

		equipment_bonus = {
			mines_sweeping = 0.10
			surface_detection = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_shock_hardened_hangar
		name = JAP_jmu_naval_mio_trait_shock_hardened_hangar
		icon = GFX_generic_mio_trait_icon_heli_operator_reliability

		position = { x = -1 y = 5 }
		relative_position_id = JAP_jmu_naval_mio_trait_reinforced_flight
		all_parents = {
			JAP_jmu_naval_mio_trait_uav_bay
		}

		limit_to_equipment_type = {
			helicopter_operator
		}

		equipment_bonus = {
			max_strength = 0.06
			reliability = 0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_shock_long_legs_bunker
		name = JAP_jmu_naval_mio_trait_shock_long_legs_bunker
		icon = GFX_generic_mio_trait_icon_heli_operator_range

		position = { x = 0 y = 5 }
		relative_position_id = JAP_jmu_naval_mio_trait_reinforced_flight
		all_parents = {
			JAP_jmu_naval_mio_trait_uav_bay
		}

		limit_to_equipment_type = {
			helicopter_operator
		}

		equipment_bonus = {
			naval_range = 0.10
			fuel_consumption = -0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_ops_night_patterns
		name = JAP_jmu_naval_mio_trait_ops_night_patterns
		icon = GFX_generic_mio_trait_icon_heli_operator_surface_detection

		position = { x = 1 y = 5 }
		relative_position_id = JAP_jmu_naval_mio_trait_reinforced_flight
		all_parents = {
			JAP_jmu_naval_mio_trait_uav_bay
		}

		limit_to_equipment_type = {
			helicopter_operator
		}

		equipment_bonus = {
			surface_detection = 0.04
			anti_air_attack = 0.02
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_integrated_asuw
		name = JAP_jmu_naval_mio_trait_integrated_asuw
		icon = GFX_generic_mio_trait_icon_heli_operator_lg_attack

		position = { x = -1 y = 6 }
		relative_position_id = JAP_jmu_naval_mio_trait_reinforced_flight
		all_parents = {
			JAP_jmu_naval_mio_trait_shock_hardened_hangar
			JAP_jmu_naval_mio_trait_shock_long_legs_bunker
		}

		limit_to_equipment_type = {
			helicopter_operator
		}

		equipment_bonus = {
			lg_attack = 0.04
			lg_armor_piercing = 0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_conversion_drills
		name = JAP_jmu_naval_mio_trait_conversion_drills
		icon = GFX_generic_mio_trait_icon_heli_operator_reliability

		position = { x = 1 y = 6 }
		relative_position_id = JAP_jmu_naval_mio_trait_reinforced_flight
		all_parents = {
			JAP_jmu_naval_mio_trait_ops_night_patterns
			JAP_jmu_naval_mio_trait_shock_long_legs_bunker
		}

		limit_to_equipment_type = {
			helicopter_operator
		}

		equipment_bonus = {
			naval_range = 0.04
			reliability = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_stovl_approach
		name = JAP_jmu_naval_mio_trait_stovl_approach
		icon = GFX_generic_mio_trait_icon_carrier_upgrade

		position = { x = 7 y = 0 }
		relative_position_id = JAP_jmu_naval_mio_trait_sensor_fusion

		limit_to_equipment_type = {
			carrier
		}

		equipment_bonus = {
			carrier_size = 2
			surface_detection = 0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_bow_stern_jet
		name = JAP_jmu_naval_mio_trait_bow_stern_jet
		icon = GFX_generic_mio_trait_icon_carrier_reliablity

		position = { x = 2 y = 0 }
		relative_position_id = JAP_jmu_naval_mio_trait_stovl_approach

		limit_to_equipment_type = {
			carrier
		}

		equipment_bonus = {
			reliability = 0.06
			max_strength = 0.04
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_deck_marking
		name = JAP_jmu_naval_mio_trait_deck_marking
		icon = GFX_generic_mio_trait_icon_carrier_engine

		position = { x = 1 y = 1 }
		relative_position_id = JAP_jmu_naval_mio_trait_stovl_approach
		all_parents = {
			JAP_jmu_naval_mio_trait_bow_stern_jet
			JAP_jmu_naval_mio_trait_stovl_approach
		}

		limit_to_equipment_type = {
			carrier
		}

		equipment_bonus = {
			carrier_size = 2
			naval_speed = 0.08
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_aviation_fuel
		name = JAP_jmu_naval_mio_trait_aviation_fuel
		icon = GFX_generic_mio_trait_icon_carrier_reliablity

		position = { x = 1 y = 2 }
		relative_position_id = JAP_jmu_naval_mio_trait_stovl_approach
		all_parents = {
			JAP_jmu_naval_mio_trait_deck_marking
		}

		limit_to_equipment_type = {
			carrier
		}

		equipment_bonus = {
			reliability = 0.10
			fuel_consumption = -0.10
			build_cost_ic = 0.03
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_integrated_air_wing
		name = JAP_jmu_naval_mio_trait_integrated_air_wing
		icon = GFX_generic_mio_trait_icon_carrier_detection

		position = { x = 0 y = 3 }
		relative_position_id = JAP_jmu_naval_mio_trait_stovl_approach
		all_parents = {
			JAP_jmu_naval_mio_trait_aviation_fuel
		}

		limit_to_equipment_type = {
			carrier
		}

		equipment_bonus = {
			anti_air_attack = 0.08
			surface_detection = 0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_recovery_assist
		name = JAP_jmu_naval_mio_trait_recovery_assist
		icon = GFX_generic_mio_trait_icon_carrier_upgrade

		position = { x = 0 y = 4 }
		relative_position_id = JAP_jmu_naval_mio_trait_stovl_approach
		all_parents = {
			JAP_jmu_naval_mio_trait_integrated_air_wing
		}

		limit_to_equipment_type = {
			carrier
		}

		equipment_bonus = {
			carrier_size = 1
			reliability = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_magazine_fire
		name = JAP_jmu_naval_mio_trait_magazine_fire
		icon = GFX_generic_mio_trait_icon_carrier_reliablity

		position = { x = 2 y = 3 }
		relative_position_id = JAP_jmu_naval_mio_trait_stovl_approach
		all_parents = {
			JAP_jmu_naval_mio_trait_aviation_fuel
		}

		limit_to_equipment_type = {
			carrier
		}

		equipment_bonus = {
			surface_visibility = -0.05
			reliability = 0.05
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_low_observable
		name = JAP_jmu_naval_mio_trait_low_observable
		icon = GFX_generic_mio_trait_icon_carrier_reliablity

		position = { x = 2 y = 4 }
		relative_position_id = JAP_jmu_naval_mio_trait_stovl_approach
		all_parents = {
			JAP_jmu_naval_mio_trait_magazine_fire
		}

		limit_to_equipment_type = {
			carrier
		}

		equipment_bonus = {
			reliability = 0.10
			sub_visibility = -0.10
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_aviation_spares
		name = JAP_jmu_naval_mio_trait_aviation_spares
		icon = GFX_generic_mio_trait_icon_carrier_buildcost

		position = { x = 1 y = 5 }
		relative_position_id = JAP_jmu_naval_mio_trait_stovl_approach
		all_parents = {
			JAP_jmu_naval_mio_trait_low_observable
			JAP_jmu_naval_mio_trait_recovery_assist
		}

		limit_to_equipment_type = {
			carrier
		}

		equipment_bonus = {
			build_cost_ic = -0.05
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
	trait = {
		token = JAP_jmu_naval_mio_trait_sortie_surge
		name = JAP_jmu_naval_mio_trait_sortie_surge
		icon = GFX_generic_mio_trait_icon_carrier_upgrade

		position = { x = 1 y = 6 }
		relative_position_id = JAP_jmu_naval_mio_trait_stovl_approach
		all_parents = {
			JAP_jmu_naval_mio_trait_aviation_spares
		}

		limit_to_equipment_type = {
			carrier
		}

		equipment_bonus = {
			carrier_size = 2
			naval_range = 0.05
		}

		organization_modifier = {
			military_industrial_organization_task_capacity = 1
		}

		on_complete = {
			if = {
				limit = {
					check_variable = { free_trait_picks > 0 }
				}
				add_to_variable = { free_trait_picks = -1 }
			}
			else = {
				FROM = {
					small_expenditure = yes
				}
			}
		}

		ai_will_do = {
			base = 10
			modifier = {
				factor = 0
				check_variable = { FROM.interest_rate > 8 }
			}
		}
	}
}