#####################

###  ##  #  # # #  ## 
 #  #  # ## # # # #   
 #  #### # ## ##   #  
 #  #  # #  # # #   # 
 #  #  # #  # # # ## 

 #################### 


ITA_fiat_organization = {
	include = generic_tank_organization
	icon = GFX_idea_fiat
	
	allowed = {	
		OR = {
			tag = ITA 
			AND = {
				tag = GRE 
				has_dlc = "Battle for the Bosporus"
			}
			AND = {
				tag = BUL 
				has_dlc = "Battle for the Bosporus"
			}
			AND = {
				tag = ETH 
				has_dlc = "By Blood Alone"
			}
			AND = {
				tag = BRA
				has_dlc = "Trial of Allegiance"
			}
			tag = VAT
		}
	}

	visible = {
		IF = {
			limit = { FROM = { original_tag = ETH } }
			FROM = { has_country_flag = ETH_ITA_sends_army_designers }
		}
		IF = {
			limit = {
				FROM = {
					original_tag = VAT
				}
			}
			FROM = {
				has_completed_focus = VAT_extension_of_the_powers_of_the_roman_curia
			}
		}
	}
	
	available = {
		# When in a Foreign MIO, countries need to be at peace with original country
		IF = {
			limit = {
				FROM = { NOT = { original_tag = ITA } }
			}
			FROM = { NOT = { has_war_with = ITA } }
		}
		ELSE = { #original_tag = ITA
			FROM = {
				controls_state = 158 #PIEMONT (Torino)
			}
			ITA_is_northern_designer = yes
		}

		IF = {
			limit = { FROM = { original_tag = GRE } }
			FROM = {
				has_completed_focus = GRE_rapprochement_with_the_italians
			}
		}
		IF = {
			limit = { FROM = { original_tag = BUL } }
			custom_trigger_tooltip = {
				tooltip = has_invited_mio_tt
				FROM = {
					has_country_flag = has_invited_fiat_mio_flag
				}
			}
			FROM = {
				OR = {
					is_subject = no
					is_subject_of = ITA
				}
				#is_in_faction_with = ITA
				NOT = { has_completed_focus = BUL_nationalization }
			}
		}
		IF = {
			limit = {
				FROM = {
					original_tag = BRA
				}
			}
			FROM = {
				has_completed_focus = BRA_italian_trucks
			}
		}
		IF = {
			limit = {
				FROM = {
					original_tag = VAT
				}
			}
			FROM = {
				has_completed_focus = VAT_fiat_integration
			}
		}
	}
	
	add_trait = { 
		token = ITA_mio_trait_new_industrialization_program
		name = ITA_new_industrialization_program
		icon = GFX_generic_mio_department_icon_tank_general_production
		special_trait_background = yes

		position = { x=9 y=0 }

		visible = {
			FROM = { original_tag = ITA }
		}
		
		available = {
			FROM = {
				has_completed_focus = ITA_new_industrialization_program
				has_completed_focus = ITA_strengthen_northern_industry
			}
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.1
		}

		production_bonus = {
			production_capacity_factor = 0.1
		}
	}
}


#####################

 ## #  # ### ###   ## 
#   #  #  #  #  # #   
 #  ####  #  ###   #  
  # #  #  #  #      # 
##  #  # ### #    ##  
 
#####################

ITA_crda_organization = {
	include = generic_battle_line_ship_organization
	icon = GFX_idea_crda
	
	allowed = {	
		OR = {
			tag = ITA 
			AND = {
				tag = BUL 
				has_dlc = "Battle for the Bosporus"
			}
			tag = VAT
		}
	}

	visible = {
		IF = {
			limit = {
				FROM = {
					original_tag = VAT
				}
			}
			FROM = {
				has_completed_focus = VAT_extension_of_the_powers_of_the_roman_curia
			}
		}
	}
	
	available = {
		# When in a Foreign MIO, countries need to be at peace with original country
		IF = {
			limit = {
				FROM = { NOT = { original_tag = ITA } }
			}
			FROM = { NOT = { has_war_with = ITA } }
		}
		ELSE = { #original_tag = ITA
			FROM = { controls_state = 736 } #LITORALE (Trieste) 
			ITA_is_northern_designer = yes
		}

		IF = {
			limit = { FROM = { original_tag = BUL } }
			custom_trigger_tooltip = {
				tooltip = has_invited_mio_tt
				FROM = {
					has_country_flag = has_invited_crda_mio_flag
				}
			}
			FROM = {
				OR = {
					is_subject = no
					is_subject_of = ITA
				}
				#is_in_faction_with = ITA
				NOT = { has_completed_focus = BUL_nationalization }
			}
		}
		IF = {
			limit = {
				FROM = {
					original_tag = VAT
				}
			}
			FROM = {
				has_completed_focus = VAT_learn_italian_expirience
			}
		}
	}

	add_trait = { 
		token = ITA_mio_trait_new_industrialization_program
		name = ITA_new_industrialization_program
		icon = GFX_generic_mio_department_icon_ship_capital_ship_production
		special_trait_background = yes

		position = { x=9 y=0 }
		
		available = {
			FROM = {
				has_completed_focus = ITA_new_industrialization_program
				has_completed_focus = ITA_strengthen_northern_industry
			}
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.1
		}

		production_bonus = {
			production_capacity_factor = 0.1
		}
	}
}

ITA_cantiere_oto_organization = {
	include = generic_escort_ship_organization
	icon = GFX_idea_ITA_oto
	
	allowed = {	
		tag = ITA 
	}
	
	available = {
		FROM = {
			controls_state = 158 #PIEDMONT (Genova)
		}
		ITA_is_northern_designer = yes
	}

	add_trait = { 
		token = ITA_mio_trait_new_industrialization_program
		name = ITA_new_industrialization_program
		icon = GFX_generic_mio_department_icon_ship_screen_ship_production
		special_trait_background = yes

		position = { x=9 y=0 }
		
		available = {
			FROM = {
				has_completed_focus = ITA_new_industrialization_program
				has_completed_focus = ITA_strengthen_northern_industry
			}
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.1
		}

		production_bonus = {
			production_capacity_factor = 0.1
		}
	}
}

ITA_navalmeccanica_organization = {
	include = generic_refurbishment_repair_organization
	icon = GFX_idea_ITA_navalmeccanica
	
	allowed = {	
		tag = ITA 
	}
	
	available = {
		FROM = {
			controls_state = 117 # CAMPAGNA (Napoli)	
		}
		ITA_is_southern_designer = yes
	}

	add_trait = { 
		token = ITA_mio_trait_new_industrialization_program
		name = ITA_new_industrialization_program
		icon = GFX_generic_mio_department_icon_ship_screen_ship_production
		special_trait_background = yes

		position = { x=9 y=0 }
		
		available = {
			FROM = {
				has_completed_focus = ITA_new_industrialization_program
				has_completed_focus = ITA_modernize_the_mezzogiorno
			}
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.1
		}

		production_bonus = {
			production_capacity_factor = 0.1
		}
	}
} 

ITA_cantiere_navale_di_ancona_organization = {
	include = generic_raider_ship_organization
	icon = GFX_idea_ITA_cantera_navale_di_ancona
	
	allowed = {	
		tag = ITA 
	}
	
	available = {
		FROM = {
			controls_state = 157 # ABRUZZO (Ancona)		
		}
		ITA_is_southern_designer = yes
	}

	add_trait = { 
		token = ITA_mio_trait_new_industrialization_program
		name = ITA_new_industrialization_program
		icon = GFX_generic_mio_department_icon_ship_general_production
		special_trait_background = yes

		position = { x=9 y=0 }
		
		available = {
			FROM = {
				has_completed_focus = ITA_new_industrialization_program
				has_completed_focus = ITA_modernize_the_mezzogiorno
			}
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.1
		}

		production_bonus = {
			production_capacity_factor = 0.1
		}
	}
}

ITA_cantieri_navali_tosi_organization = {
	include = generic_submarine_organization
	icon = GFX_idea_ITA_cantieri_navali_tosi
	
	allowed = {	
		OR = {
			tag = ITA
			tag = VAT
		}
	}
	
	available = {
		IF = {
			limit = {
				FROM = {
					original_tag = ITA
				}
			}
			AND = {
				FROM = {
					controls_state = 849 # PUGLIA (Taranto)
				}
				ITA_is_southern_designer = yes
			}
		}
		IF = {
			limit = {
				FROM = {
					original_tag = VAT
				}
			}
			FROM = {
				has_completed_focus = VAT_learn_italian_expirience
			}
		}
	}

	visible = {
		IF = {
			limit = {
				FROM = {
					original_tag = VAT
				}
			}
			FROM = {
				has_completed_focus = VAT_extension_of_the_powers_of_the_roman_curia
			}
		}
	}

	add_trait = { 
		token = ITA_mio_trait_new_industrialization_program
		name = ITA_new_industrialization_program
		icon = GFX_generic_mio_department_icon_ship_submarine_production
		special_trait_background = yes

		position = { x=9 y=0 }
		
		available = {
			FROM = {
				has_completed_focus = ITA_new_industrialization_program
				has_completed_focus = ITA_modernize_the_mezzogiorno
			}
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.1
		}

		production_bonus = {
			production_capacity_factor = 0.1
		}
	}
}



###########################

###  #    ##  #  # ###  ## 
#  # #   #  # ## # #   #   
###  #   #### # ## ##   #  
#    #   #  # #  # #     # 
#    ### #  # #  # ### ##  

###########################


ITA_macchi_organization = {
	include = generic_light_aircraft_organization
	icon = GFX_idea_macchi
	
	allowed = {	
		OR = {
			tag = ITA 
			AND = {
				tag = ETH 
				has_dlc = "By Blood Alone"
			}
			tag = VAT
		}
	}
	
	visible = {
		IF = {
			limit = { FROM = { original_tag = ETH } }
			FROM = { has_country_flag = ETH_ITA_sends_air_designers }
		}
		IF = {
			limit = {
				FROM = {
					original_tag = VAT
				}
			}
			FROM = {
				has_completed_focus = VAT_extension_of_the_powers_of_the_roman_curia
			}
		}
	}
	
	available = {
		# When in a Foreign MIO, countries need to be at peace with original country
		IF = {
			limit = {
				FROM = { NOT = { original_tag = ITA } }
			}
			FROM = { NOT = { has_war_with = ITA } }
		}
		ELSE = { #original_tag = ITA
			FROM = {
				controls_state = 159 #LOMBARDIA
			}
			ITA_is_northern_designer = yes
		}
		IF = {
			limit = {
				FROM = {
					original_tag = VAT
				}
			}
			FROM = {
				has_completed_focus = VAT_grants_to_aermacchi
			}
		}
	}

	add_trait = { 
		token = ITA_mio_trait_new_industrialization_program
		name = ITA_new_industrialization_program
		icon = GFX_generic_mio_department_icon_plane_fighter_production
		special_trait_background = yes

		position = { x=9 y=0 }
		
		available = {
			FROM = {
				has_completed_focus = ITA_new_industrialization_program
				has_completed_focus = ITA_strengthen_northern_industry
			}
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.1
		}

		production_bonus = {
			production_capacity_factor = 0.1
		}
	}
}

ITA_savoia_marchetti_organization = {
	include = generic_multi_role_aircraft_organization
	icon = GFX_idea_savoia_marchetti
	
	allowed = {	
		tag = ITA 
	}
	
	available = {
		FROM = {
			controls_state = 159 #LOMBARDIA
		}
		ITA_is_northern_designer = yes
	}

	add_trait = {
		token = ITA_mio_trait_air_race_pedigree
		name = ITA_mio_trait_air_race_pedigree
		icon = GFX_generic_mio_department_icon_plane_medium_engine
		special_trait_background = yes
		
		position = { x=7 y=0 }  
		#relative_position_id = generic_mio_trait_narrow_build
		
		#any_parent = { generic_mio_trait_narrow_build }
		
		limit_to_equipment_type = { mio_cat_eq_all_medium_plane }
		equipment_bonus = {
			maximum_speed = 0.05
			air_range = 0.15
		}
	}

	add_trait = {
		token = ITA_mio_trait_special_aerotorpedoes_unit
		name = ITA_mio_trait_special_aerotorpedoes_unit
		icon = GFX_generic_mio_trait_icon_torpedo_attack
		special_trait_background = yes
		
		position = { x=1 y=0 }  
		relative_position_id = ITA_mio_trait_air_race_pedigree
		
		#any_parent = { generic_mio_trait_narrow_build }
		
		limit_to_equipment_type = { mio_cat_eq_all_medium_plane }
		equipment_bonus = {
			naval_strike_attack = 0.15
		}
	}

	add_trait = {
		token = ITA_mio_trait_remote_operated
		name = ITA_mio_trait_remote_operated
		icon = GFX_generic_mio_trait_icon_build_cost_ic
		special_trait_background = yes
		
		position = { x=3 y=0 }  
		relative_position_id = generic_mio_trait_bomber_specialization
		available = {
			FROM = { has_tech = experimental_rockets }
		}
		
		#any_parent = { generic_mio_trait_narrow_build }
		
		limit_to_equipment_type = { mio_cat_eq_all_small_plane }
		equipment_bonus = {
			reliability = 0.1
		}
		production_bonus = {
			production_cost_factor = -0.1
		}
	}

	add_trait = { 
		token = ITA_mio_trait_new_industrialization_program
		name = ITA_new_industrialization_program
		icon = GFX_generic_mio_department_icon_plane_general_production
		special_trait_background = yes

		position = { x=9 y=0 }
		
		available = {
			FROM = {
				has_completed_focus = ITA_new_industrialization_program
				has_completed_focus = ITA_strengthen_northern_industry
			}
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.1
		}

		production_bonus = {
			production_capacity_factor = 0.1
		}
	}
}

ITA_caproni_organization = {
	include = generic_cas_aircraft_organization
	icon = GFX_idea_caproni
	
	allowed = {	 
		OR = {
			tag = ITA 
			AND = {
				tag = ETH 
				has_dlc = "By Blood Alone"
			}
			tag = VAT
		}
	}

	visible = {
		IF = {
			limit = { FROM = { original_tag = ETH } }
			FROM = { has_country_flag = ETH_ITA_sends_air_designers }
		}
		IF = {
			limit = {
				FROM = {
					original_tag = VAT
				}
			}
			FROM = {
				has_completed_focus = VAT_extension_of_the_powers_of_the_roman_curia
			}
		}
	}
	
	available = {
		# When in a Foreign MIO, countries need to be at peace with original country
		IF = {
			limit = {
				FROM = { NOT = { original_tag = ITA } }
			}
			FROM = { NOT = { has_war_with = ITA } }
		}
		ELSE = { #original_tag = ITA
			FROM = {
				controls_state = 159 #LOMBARDIA
			}
			ITA_is_northern_designer = yes
		}
		IF = {
			limit = {
				FROM = {
					original_tag = VAT
				}
			}
			FROM = {
				has_completed_focus = VAT_grants_to_caproni
			}
		}
	}

	add_trait = { 
		token = ITA_mio_trait_new_industrialization_program
		name = ITA_new_industrialization_program
		icon = GFX_generic_mio_department_icon_plane_cas_production
		special_trait_background = yes

		position = { x=9 y=0 }
		
		available = {
			FROM = {
				has_completed_focus = ITA_new_industrialization_program
				has_completed_focus = ITA_strengthen_northern_industry
			}
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.1
		}

		production_bonus = {
			production_capacity_factor = 0.1
		}
	}
}

ITA_piaggio_organization = {
	include = generic_heavy_aircraft_organization
	icon = GFX_idea_piaggio
	
	allowed = {	 
		tag = ITA 
	}
	
	available = {
		FROM = {
			controls_state = 158 #PIEMONTE
		}
		ITA_is_northern_designer = yes
	}

	add_trait = { 
		token = ITA_mio_trait_new_industrialization_program
		name = ITA_new_industrialization_program
		icon = GFX_generic_mio_department_icon_plane_heavy_production
		special_trait_background = yes

		position = { x=9 y=0 }
		
		available = {
			FROM = {
				has_completed_focus = ITA_new_industrialization_program
				has_completed_focus = ITA_strengthen_northern_industry
			}
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.1
		}

		production_bonus = {
			production_capacity_factor = 0.1
		}
	}
}

ITA_imam_organization = {
	include = generic_medium_aircraft_organization
	icon = GFX_idea_ITA_imam
	
	allowed = {	
		OR = {
			tag = ITA 
			AND = {
				tag = ETH 
				has_dlc = "By Blood Alone"
			}
		}
	}

	visible = {
		IF = {
			limit = { FROM = { original_tag = ETH } }
			FROM = { has_country_flag = ETH_ITA_sends_air_designers }
		}
	}
	
	available = {
		# When in a Foreign MIO, countries need to be at peace with original country
		IF = {
			limit = {
				FROM = { NOT = { original_tag = ITA } }
			}
			FROM = { NOT = { has_war_with = ITA } }
		}
		ELSE = { #original_tag = ITA
			FROM = {
				controls_state = 117 #CAMPANIA (Napoli)
			}
			ITA_is_southern_designer = yes
		}
	}

	add_trait = { 
		token = ITA_mio_trait_new_industrialization_program
		name = ITA_new_industrialization_program
		icon = GFX_generic_mio_department_icon_plane_medium_production
		special_trait_background = yes

		position = { x=9 y=0 }
		
		available = {
			FROM = {
				has_completed_focus = ITA_new_industrialization_program
				has_completed_focus = ITA_modernize_the_mezzogiorno
			}
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.1
		}

		production_bonus = {
			production_capacity_factor = 0.1
		}
	}
}

ITA_crda_cant_organization = {
	include = generic_naval_aircraft_organization
	icon = GFX_idea_ITA_crda_cant
	
	allowed = {	 
		tag = ITA 
	}
	
	available = {
		FROM = {
			controls_state = 736 #LITORALE (Trieste)
		}
		ITA_is_southern_designer = yes
	}

	add_trait = { 
		token = ITA_mio_trait_new_industrialization_program
		name = ITA_new_industrialization_program
		icon = GFX_generic_mio_department_icon_plane_naval_bomber_production
		special_trait_background = yes

		position = { x=9 y=0 }
		
		available = {
			FROM = {
				has_completed_focus = ITA_new_industrialization_program
				has_completed_focus = ITA_strengthen_northern_industry
			}
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.1
		}

		production_bonus = {
			production_capacity_factor = 0.1
		}
	}
}

ITA_fiat_aviazione_organization = {
	include = generic_range_focused_aircraft_organization
	icon = GFX_idea_ITA_fiat_aviazione


	
	allowed = {	 
		OR = {
			tag = ITA
			AND = {
				tag = BRA
				has_dlc = "Trial of Allegiance"
			}
			tag = VAT
		} 
	}
	
	available = {
		IF = {
			limit = {
				FROM = { NOT = { original_tag = ITA } }
			}
			FROM = { NOT = { has_war_with = ITA } }
		}
		ELSE = {
			FROM = {
				controls_state = 158 #PIEDMONT (Torino)
			}
			ITA_is_northern_designer = yes
		}

		IF = {
			limit = { FROM = { original_tag = BRA } }
			FROM = { 
				has_completed_focus = BRA_italian_aircraft
			} 
		}	
		IF = {
			limit = {
				FROM = {
					original_tag = VAT
				}
			}
			FROM = {
				has_completed_focus = VAT_fiat_integration
			}
		}	
	}

	visible = {
		IF = {
			limit = {
				FROM = {
					original_tag = VAT
				}
			}
			FROM = {
				has_completed_focus = VAT_extension_of_the_powers_of_the_roman_curia
			}
		}
	}
	
	initial_trait = {
		equipment_bonus = {
			naval_strike_attack = -0.1
			maximum_speed = 0.1
		}
	}

	override_trait = {
		token = generic_mio_trait_extra_cargo_doors

		position = { x=8 y=0 }
	}

	add_trait = {
		token = ITA_mio_trait_high_altitude_fighter_development
		name = ITA_mio_trait_high_altitude_fighter_development
		icon = GFX_generic_mio_trait_icon_air_agility
		special_trait_background = yes
		
		position = { x=0 y=1 }  
		relative_position_id = generic_mio_trait_low_drag_wings
		
		any_parent = { generic_mio_trait_low_drag_wings }
		
		limit_to_equipment_type = { mio_cat_eq_all_small_plane }
		equipment_bonus = {
			air_agility = 0.05
			air_attack = 0.03
		}
	}

	add_trait = { 
		token = ITA_mio_trait_new_industrialization_program
		name = ITA_new_industrialization_program
		icon = GFX_generic_mio_department_icon_plane_general_production
		special_trait_background = yes

		position = { x=9 y=0 }

		visible = {
			FROM = { original_tag = ITA }
		}
		
		available = {
			FROM = {
				has_completed_focus = ITA_new_industrialization_program
				has_completed_focus = ITA_strengthen_northern_industry
			}
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.1
		}

		production_bonus = {
			production_capacity_factor = 0.1
		}
	}
}



################################### 

#   #  ##  ### ### ###  ### ### #   
## ## #  #  #  #   #  #  #  #   #   
# # # ####  #  ##  ###   #  ##  #   
#   # #  #  #  #   #  #  #  #   #   
#   # #  #  #  ### #  # ### ### ### 


###################################

ITA_beretta_organization = {
	include = generic_infantry_equipment_organization
	icon = GFX_idea_beretta

	allowed = {	 
		OR = {
			tag = ITA 
			AND = {
				tag = ETH
				has_dlc = "By Blood Alone"
			}
			tag = VAT
		}
	}

	visible = {
		IF = {
			limit = { FROM = { original_tag = ETH } }
			FROM = { has_country_flag = ETH_ITA_sends_army_designers }
		}
		IF = {
			limit = {
				FROM = {
					original_tag = VAT
				}
			}
			FROM = {
				has_completed_focus = VAT_extension_of_the_powers_of_the_roman_curia
			}
		}
	}

	available = {
		# When in a Foreign MIO, countries need to be at peace with original country
		IF = {
			limit = {
				FROM = { NOT = { original_tag = ITA } }
			}
			FROM = { NOT = { has_war_with = ITA } }
		}
		ELSE = { #original_tag = ITA
			FROM = {
				controls_state = 159 #LOMBARDIA	
			}
			ITA_is_northern_designer = yes
		}
		IF = {
			limit = {
				FROM = {
					original_tag = VAT
				}
			}
			FROM = {
				has_completed_focus = VAT_integration_of_the_italian_economy
			}
		}
	}

	add_trait = { 
		token = ITA_mio_trait_new_industrialization_program
		name = ITA_new_industrialization_program
		icon = GFX_generic_mio_department_icon_infantry_production
		special_trait_background = yes

		position = { x=9 y=0 }
		
		available = {
			FROM = {
				has_completed_focus = ITA_new_industrialization_program
				has_completed_focus = ITA_strengthen_northern_industry
			}
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.1
		}

		production_bonus = {
			production_capacity_factor = 0.1
		}
	}
}

ITA_lancia_organization = {
	include = generic_motorized_mechanized_organization
	icon = GFX_idea_lancia
	
	allowed = {	 
		OR = {
			tag = ITA 
			AND = {
				tag = BUL 
				has_dlc = "Battle for the Bosporus"
			}
			tag = VAT
		}
	}
	
	available = {
		# When in a Foreign MIO, countries need to be at peace with original country
		IF = {
			limit = {
				FROM = { NOT = { original_tag = ITA } }
			}
			FROM = { NOT = { has_war_with = ITA } }
		}
		ELSE = { #original_tag = ITA
			FROM = { controls_state = 159 } #LOMBARDIA
			ITA_is_northern_designer = yes
		}
		
		IF = {
			limit = { FROM = { original_tag = BUL } }
			custom_trigger_tooltip = {
				tooltip = has_invited_mio_tt
				FROM = {
					has_country_flag = has_invited_lancia_mio_flag
				}
			}
			FROM = {
				OR = {
					is_subject = no
					is_subject_of = ITA
				}
				#is_in_faction_with = ITA
				NOT = { has_completed_focus = BUL_nationalization }
			}
		}
		IF = {
			limit = {
				FROM = {
					original_tag = VAT
				}
			}
			FROM = {
				has_completed_focus = VAT_integration_of_the_italian_economy
			}
		}
	}

	visible = {
		IF = {
			limit = {
				FROM = {
					original_tag = VAT
				}
			}
			FROM = {
				has_completed_focus = VAT_extension_of_the_powers_of_the_roman_curia
			}
		}
	}

	add_trait = { 
		token = ITA_mio_trait_new_industrialization_program
		name = ITA_new_industrialization_program
		icon = GFX_generic_mio_department_icon_motorized_mechanized_production
		special_trait_background = yes

		position = { x=9 y=0 }
		
		available = {
			FROM = {
				has_completed_focus = ITA_new_industrialization_program
				has_completed_focus = ITA_strengthen_northern_industry
			}
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.1
		}

		production_bonus = {
			production_capacity_factor = 0.1
		}
	}
}

ITA_breda_organization = {
	include = generic_artillery_organization
	icon = GFX_idea_breda
	allowed = {	 
		OR = {
			tag = ITA 
			AND = {
				tag = ETH
				has_dlc = "By Blood Alone"
			}
			tag = VAT
		}
	}

	visible = {
		IF = {
			limit = { FROM = { original_tag = ETH } }
			FROM = { has_country_flag = ETH_ITA_sends_army_designers }
		}
		IF = {
			limit = { FROM = { original_tag = VAT } }
			FROM = { has_completed_focus = VAT_extension_of_the_powers_of_the_roman_curia }
		}
	}
	
	available = {
		# When in a Foreign MIO, countries need to be at peace with original country
		IF = {
			limit = {
				FROM = { original_tag = VAT }
			}
			FROM = { has_completed_focus = VAT_investments_in_arms_concerns }
		}
		ELSE = {
			IF = {
				limit = {
					FROM = { NOT = { original_tag = ITA } }
				}
				FROM = { NOT = { has_war_with = ITA } }
			}
			ELSE = { #original_tag = ITA
				FROM = {
					controls_state = 159 #LOMBARDIA
				}
				ITA_is_northern_designer = yes
			}
		}
	}

	add_trait = { 
		token = ITA_mio_trait_new_industrialization_program
		name = ITA_new_industrialization_program
		icon = GFX_generic_mio_department_icon_artillery_production
		special_trait_background = yes

		position = { x=9 y=0 }
		
		available = {
			FROM = {
				has_completed_focus = ITA_new_industrialization_program
				has_completed_focus = ITA_strengthen_northern_industry
			}
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.1
		}

		production_bonus = {
			production_capacity_factor = 0.1
		}
	}
}

ITA_brescia_arsenal_organization = {
	include = generic_support_equipment_organization
	icon = GFX_idea_ITA_brescia_arsenal
	
	allowed = {	 
		OR = {
			tag = ITA
			tag = VAT
		}
	}
	
	available = {
		IF = {
			limit = {
				FROM = {
					original_tag = ITA
				}
			}
			FROM = {
				controls_state = 159 #LOMBARDIA
			}
			ITA_is_northern_designer = yes
		}
		IF = {
			limit = {
				FROM = {
					original_tag = VAT
				}
			}
			FROM = {
				has_completed_focus = VAT_the_bresci_arms_factory
			}
		}
	}

	visible = {
		IF = {
			limit = {
				FROM = {
					original_tag = VAT
				}
			}
			FROM = {
				has_completed_focus = VAT_extension_of_the_powers_of_the_roman_curia
			}
		}
	}

	add_trait = { 
		token = ITA_mio_trait_new_industrialization_program
		name = ITA_new_industrialization_program
		icon = GFX_generic_mio_department_icon_infantry_production
		special_trait_background = yes

		position = { x=9 y=0 }
		
		available = {
			FROM = {
				has_completed_focus = ITA_new_industrialization_program
				has_completed_focus = ITA_strengthen_northern_industry
			}
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.1
		}

		production_bonus = {
			production_capacity_factor = 0.1
		}
	}
}

ITA_officine_meccaniche_organization = {
	include = generic_motorized_mechanized_organization
	icon = GFX_idea_ITA_officine_meccaniche
	
	allowed = {
		original_tag = ITA
		has_dlc = "By Blood Alone"
	}
	
	available = {
		FROM = {
			has_completed_focus = ITA_new_ricostruzione_industriale
		}
	}

	equipment_type = {
		motorized_equipment
		mechanized_equipment
		motorized_rocket_equipment
		train_equipment
	}
	
	research_categories = {
		mio_cat_tech_all_motorized_mechanized
		train_equipment
	}

	initial_trait = {
		organization_modifier = {
			military_industrial_organization_research_bonus = 0.15
		}
	}

	#research_bonus = 0.2 #Intended to be a total of 20% Research for the MIO at start

	override_trait = { #Traits with no limits in the archetype need the limit to exclude the additional equipment in this MIO (train)
		token = generic_mio_trait_medium_machinegun_mounts

		limit_to_equipment_type = {
			motorized_equipment
			mechanized_equipment
			motorized_rocket_equipment
		}
	}

	override_trait = { #Traits with no limits in the archetype need the limit to exclude the additional equipment in this MIO (train)
		token = generic_mio_trait_armored_pulpit_mount

		limit_to_equipment_type = {
			motorized_equipment
			mechanized_equipment
			motorized_rocket_equipment
		}
	}

	add_trait = { 
		token = ITA_mio_trait_new_ricostruzione_iundustriale_motorized
		name = ITA_new_ricostruzione_industriale_motorized
		icon = GFX_generic_mio_department_icon_motorized_production
		special_trait_background = yes

		position = { x=1 y=0 }
		relative_position_id = generic_mio_trait_steel_cargo_bed
		
		available = {
			FROM = {
				has_completed_focus = ITA_new_ricostruzione_industriale
			}
		}

		limit_to_equipment_type = {
			motorized_equipment
			motorized_rocket_equipment
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.05
		}

		production_bonus = {
			production_capacity_factor = 0.1
		}
	}

	add_trait = { 
		token = ITA_mio_trait_new_ricostruzione_iundustriale_mechanized
		name = ITA_new_ricostruzione_industriale_mechanized
		icon = GFX_generic_mio_department_icon_mechanized_production
		special_trait_background = yes

		position = { x=-1 y=0 }
		relative_position_id = generic_mio_trait_open_chassi
		
		available = {
			FROM = {
				has_completed_focus = ITA_new_ricostruzione_industriale
			}
		}

		limit_to_equipment_type = {
			mechanized_equipment
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.05
		}

		production_bonus = {
			production_capacity_factor = 0.1
		}
	}

	add_trait = { 
		token = ITA_mio_trait_new_ricostruzione_iundustriale_train
		name = ITA_new_ricostruzione_industriale_train
		icon = GFX_military_industrial_organization_train
		special_trait_background = yes

		position = { x=9 y=0 }
		
		available = {
			FROM = {
				has_completed_focus = ITA_new_ricostruzione_industriale
			}
		}

		limit_to_equipment_type = {
			train_equipment
		}

		organization_modifier = {
			military_industrial_organization_research_bonus = 0.05
		}

		production_bonus = {
			production_capacity_factor = 0.1
		}
	}
}