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

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

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


FRA_renault_organization = {
	include = generic_infantry_tank_organization
	icon = GFX_idea_renault
	allowed = {	
		OR = {
			tag = FRA 
			AND = {
				tag = ETH 
				has_dlc = "By Blood Alone"
			}
			AND = {
				tag = BRA
				has_dlc = "Trial of Allegiance"
			}
		}
	}

	visible = {
		IF = {
			limit = {
				FROM = { original_tag = ETH }
			}
			FROM = { has_completed_focus = ETH_invite_foreign_industrialists }
		}
	}

	available = {
		# When in a Foreign MIO, countries need to be at peace with original country
		IF = {
			limit = {
				FROM = { NOT = { original_tag = FRA } }
			}
			FROM = { NOT = { has_war_with = FRA } }
		}	

		IF = {
			limit = {
				FROM = { original_tag = ETH }
			}
			custom_trigger_tooltip = {
				tooltip = has_invited_mio_tt
				FROM = {
					has_country_flag = has_invited_FRA_renault_organization_flag
				}
			}
		}
		IF = {
			limit = { FROM = { original_tag = BRA } }
			custom_trigger_tooltip = {
				tooltip = has_invited_mio_tt
				FROM = {
					has_completed_focus = BRA_invite_foreign_companies
					has_country_flag = has_renault_mio_flag
				}
			}
		}
	}

	initial_trait = {
		organization_modifier = {
			military_industrial_organization_research_bonus = 0.05
		}
	}

	add_trait = { 
		token = FRA_mio_trait_automitrailleuses
		name = FRA_mio_trait_automitrailleuses
		icon = GFX_generic_mio_trait_icon_maximum_speed
		special_trait_background = yes
		
		position = { x=6 y=0 }  
		
		limit_to_equipment_type = { medium_tank_chassis }
		
		equipment_bonus = {
			maximum_speed = 0.1
			armor_value = -0.05
		} 

	}
	add_trait = {
		token = FRA_mio_trait_b1_bis_suspension
		name = FRA_mio_trait_b1_bis_suspension
		icon = GFX_generic_mio_trait_icon_breakthrough
		special_trait_background = yes
		
		position = { x=0 y=4 }  
		relative_position_id = generic_mio_trait_heavy_tank_improvements
		
		any_parent = { generic_mio_trait_heavy_tank_improvements }
		
		limit_to_equipment_type = { heavy_tank_chassis }
		
		equipment_bonus = {
			maximum_speed = 0.05
			breakthrough = 0.1 
		} 
	}
}

FRA_hotchkiss_organization = {
	include = generic_mobile_tank_organization
	icon = GFX_idea_generic_tank_manufacturer_3
	allowed = {	
		tag = FRA 
		has_dlc = "Arms Against Tyranny"
	}
	add_trait = { 
		token = FRA_mio_trait_l_35
		name = FRA_mio_trait_l_35
		icon = GFX_generic_mio_department_icon_tank_general_weapons
		any_parent = { generic_mio_enlarged_breech }
		relative_position_id = generic_mio_enlarged_breech
		position = { x=1 y=2 }  
		equipment_bonus = {
			hard_attack = 0.05
			ap_attack = 0.05
		}  
	}

	override_trait = {
		token = generic_mio_gunner_sight_improvements
		position = { x=-1 y=2}
	}
}

FRA_apx_organization = {
	include = generic_medium_tank_organization
	icon = GFX_idea_FRA_atelier_puteaux
	allowed = {	
		tag = FRA 
		has_dlc = "Arms Against Tyranny"
	}
}

FRA_amx_organization = { 
	include = generic_tank_organization
	icon = GFX_idea_generic_tank_manufacturer_2
	allowed = {	
		tag = FRA 
	}
	available = {
		IF = {
			limit = {
				FROM = { original_tag = FRA } 
			}
			FROM = { has_completed_focus = FRA_form_the_state_arsenals }
		}
	}
}

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

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

FRA_fcm_organization = {
	include = generic_escort_ship_organization
	icon = GFX_idea_fcm
	allowed = {	
		tag = FRA 
		has_dlc = "Arms Against Tyranny"
	}
}

FRA_aeb_organization = {
	include = generic_task_force_ship_organization
	icon = GFX_idea_FRA_aeb
	allowed = {	
		tag = FRA 
		has_dlc = "Arms Against Tyranny"
	}
}

FRA_acl_organization = {
	include = generic_battle_line_ship_organization
	icon = GFX_idea_FRA_acl
	allowed = {	
		tag = FRA 
		has_dlc = "Arms Against Tyranny"
	}
}

FRA_acf_organization = {
	include = generic_raider_ship_organization
	icon = GFX_idea_FRA_acf
	allowed = {
		has_dlc = "Arms Against Tyranny"
		OR = {
			tag = FRA
			AND = {
				tag = BRA
				has_dlc = "Trial of Allegiance"
			}
		}
	}
	available = {
		IF = {
			limit = {
				FROM = { NOT = { original_tag = FRA } }
			}
			FROM = { NOT = { has_war_with = FRA } }
		}
		IF = {
			limit = { FROM = { original_tag = BRA } }
			custom_trigger_tooltip = {
				tooltip = has_invited_mio_tt
				FROM = {
					has_completed_focus = BRA_invite_foreign_companies
					has_country_flag = has_acf_mio_flag
				}
			}
		}
	}
}

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

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

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

FRA_morane_saulnier_organization = {
	include = generic_light_aircraft_organization
	icon = GFX_idea_morane_saulnier
	allowed = {	
		tag = FRA 
		has_dlc = "Arms Against Tyranny"
	}
}

FRA_bloch_organization = {
	include = generic_medium_aircraft_organization
	icon = GFX_idea_bloch
	allowed = {	
		OR = {
			tag = FRA 
			AND = {
				tag = ETH 
				has_dlc = "By Blood Alone"
			}
			AND = {
				tag = BRA
				has_dlc = "Trial of Allegiance"
			}
		}
	}

	visible = {
		IF = {
			limit = {
				FROM = { original_tag = ETH }
			}
			FROM = { has_completed_focus = ETH_invite_foreign_industrialists }
		}
	}
	
	available = {
		# When in a Foreign MIO, countries need to be at peace with original country
		IF = {
			limit = {
				FROM = { NOT = { original_tag = FRA } }
			}
			FROM = { NOT = { has_war_with = FRA } }
		}

		IF = {
			limit = {
				FROM = { original_tag = ETH }
			}
			custom_trigger_tooltip = {
				tooltip = has_invited_mio_tt
				FROM = {
					has_country_flag = has_invited_FRA_bloch_organization_flag
				}
			}
		}
		IF = {
			limit = { FROM = { original_tag = BRA } }
			custom_trigger_tooltip = {
				tooltip = has_invited_mio_tt
				FROM = {
					has_completed_focus = BRA_invite_foreign_companies
					has_country_flag = has_bloch_mio_flag
				}
			}
		}
	}
}

FRA_amiot_organization = {
	include = generic_heavy_aircraft_organization
	icon = GFX_idea_amiot
	allowed = {	
		tag = FRA 
		has_dlc = "Arms Against Tyranny"
	}
}

FRA_levasseur_organization = {
	include = generic_naval_aircraft_organization
	icon = GFX_idea_levasseur
	allowed = {	
		tag = FRA 
		has_dlc = "Arms Against Tyranny"
	}
}

FRA_SNCAC_organization = {
	name = SNCAC
	include = generic_general_aircraft_organization
	icon = GFX_idea_FRA_sncac
	allowed = {	
		tag = FRA 
		has_dlc = "Arms Against Tyranny"
	}
	visible = {
		FROM = { has_country_flag = FRA_SNCAC_formed }
	}
}

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

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


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



FRA_panhard_organization = {
	include = generic_armored_car_organization
	icon = GFX_idea_FRA_panhard
	allowed = {	
		tag = FRA 
		has_dlc = "La Resistance"
	}
}

FRA_somua_organization = {
	include = generic_motorized_mechanized_organization
	icon = GFX_idea_somua
	
	allowed = {	
		OR = {
			tag = FRA 
			AND = {
				tag = POL # If Poland sets up a local one
				OR = {
					has_dlc = "Poland: United and Ready"
					has_dlc = "No Step Back"
				}
			}
		}
	}

	visible = {
		IF = { 
			limit = {
				FROM = { tag = POL }
			}
			FROM = {
				has_country_flag = POL_somua_motors
			}
		}
	}

	available = {
		# When in a Foreign MIO, countries need to be at peace with original country
		IF = {
			limit = {
				FROM = { NOT = { original_tag = FRA } }
			}
			FROM = { NOT = { has_war_with = FRA } }
		}
	}
}

FRA_mas_organization = {
	include = generic_infantry_equipment_organization
	icon = GFX_idea_mas
	
	allowed = {	 
		OR = {
			tag = FRA 
			AND = {
				tag = ETH
				has_dlc = "By Blood Alone"
			}
		}
	}
	
	visible = {
		IF = {
			limit = {
				FROM = { original_tag = ETH }
			}
			FROM = { has_completed_focus = ETH_invite_foreign_industrialists }
		}
	}

	available = {
		# When in a Foreign MIO, countries need to be at peace with original country
		IF = {
			limit = {
				FROM = { NOT = { original_tag = FRA } }
			}
			FROM = { NOT = { has_war_with = FRA } }
		}

		IF = {
			limit = {
				FROM = { original_tag = ETH }
			}
			custom_trigger_tooltip = {
				tooltip = has_invited_mio_tt
				FROM = {
					has_country_flag = has_invited_FRA_mas_organization_flag
				}
			}
		}
	}
}

FRA_schneider_organization = {
	include = generic_artillery_organization
	icon = GFX_idea_schneider
	allowed = {	
		tag = FRA 
	}
}