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

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

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


FRA_renault_organization = {
	include = generic_heavy_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=0 y=1 }

        relative_position_id = FRA_mio_trait_b1_bis_suspension
		any_parent = { FRA_mio_trait_b1_bis_suspension }
		
		equipment_bonus = {
			maximum_speed = 0.05
			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=-1 y=1 }  
		relative_position_id = generic_mio_trait_wide_tracks
		
		any_parent = { generic_mio_trait_wide_tracks }
		
		
		equipment_bonus = {
			maximum_speed = 0.05
			breakthrough = 0.05
		} 
	}
}

FRA_hotchkiss_organization = {
	include = generic_infantry_tank_organization
	icon = GFX_idea_generic_tank_manufacturer_3
	allowed = {	
		tag = FRA 
		has_dlc = "Arms Against Tyranny"
	}
}

FRA_apx_organization = {
	include = generic_mobile_tank_organization
	icon = GFX_idea_FRA_atelier_puteaux
	
	initial_trait = {
		name = ROM_mio_trait_mobile_tank_destroyers
		
		limit_to_equipment_type = { 
			mio_cat_eq_all_tank_destroyers
		}
		
		equipment_bonus = {
			hard_attack = 0.05
			ap_attack = 0.05
		}
	}

	override_trait = {
		token = generic_mio_enlarged_breech
		limit_to_equipment_type = { 
			mio_cat_eq_all_tank_destroyers
		}
		equipment_bonus = {
			ap_attack = 0.1
		}
		special_trait_background = yes
	}
	
	allowed = {	
		tag = FRA 
		has_dlc = "Arms Against Tyranny"
	}
}

FRA_amx_organization = { # TODO set up correct from focus if needed
	include = generic_tank_organization
	icon = GFX_idea_generic_tank_manufacturer_2
	
	available = {
		FROM = {  has_completed_focus = FRA_army_reform  }
	}
	
	initial_trait = {
		organization_modifier = {
			military_industrial_organization_research_bonus = 0.15
			military_industrial_organization_funds_gain = 0.15
		}
		production_bonus = {
			production_efficiency_cap_factor = 0.05
		}
	}
	
	equipment_type = { armor }
	
	
	allowed = {	
		tag = FRA 
		has_dlc = "Arms Against Tyranny"
	}
}

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

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

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_high_agility_fighter_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_multi_role_aircraft_organization
	icon = GFX_idea_FRA_sncac
	allowed = {	
		tag = FRA 
		has_dlc = "Arms Against Tyranny"
	}
	
	available = {
		FROM = { has_country_flag = FRA_SNCAC_formed }
	}
}

FRA_SNCAN_organization = {
	name = SNCAN
	include = generic_general_aircraft_organization
	icon = GFX_idea_FRA_sncan
	allowed = {	
		tag = FRA 
		has_dlc = "Arms Against Tyranny"
	}
	
	available = {
		FROM = { has_country_flag = FRA_SNCAC_formed }
	}
}

FRA_SNCAO_organization = {
	name = SNCAO
	include = generic_light_aircraft_organization 
	icon = GFX_idea_FRA_sncao
	allowed = {	
		tag = FRA 
		has_dlc = "Arms Against Tyranny"
	}
	
	available = {
		FROM = { has_country_flag = FRA_SNCAC_formed }
	}
}

FRA_SNCASE_organization = {
	name = SNCASE
	include = generic_range_focused_aircraft_organization
	icon = GFX_idea_FRA_sncase
	allowed = {	
		tag = FRA 
		has_dlc = "Arms Against Tyranny"
	}
	
	available = {
		FROM = { has_country_flag = FRA_SNCAC_formed }
	}
}

FRA_SNCASO_organization = {
	name = SNCASO
	include = generic_cas_aircraft_organization
	icon = GFX_idea_FRA_sncaso
	allowed = {	
		tag = FRA 
		has_dlc = "Arms Against Tyranny"
	} 
	
	available = {
		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 
	}
}

FRA_famh_ship_organization = {
	include = generic_refurbishment_repair_organization
	icon = GFX_idea_famh
	name = famh
	allowed = {	
		tag = FRA 
	}
}