### search_filters = {FOCUS_FILTER_POLITICAL}
### search_filters = {FOCUS_FILTER_RESEARCH}
### search_filters = {FOCUS_FILTER_INDUSTRY}
### search_filters = {FOCUS_FILTER_STABILITY}
### search_filters = {FOCUS_FILTER_WAR_SUPPORT}
### search_filters = {FOCUS_FILTER_MANPOWER}
### search_filters = {FOCUS_FILTER_ANNEXATION}
### search_filters = {FOCUS_FILTER_POLITICAL_CHARACTER}
### search_filters = {FOCUS_FILTER_MILITARY_CHARACTER}
### search_filters = {FOCUS_FILTER_ANNEXATION}

focus_tree = {
	id = chilean_focus_tree
	
	country = {
		factor = 0
		modifier = {
			add = 10
			tag = CHL
			has_dlc = "Trial of Allegiance"
		}
	}
	

	default = no


	shared_focus = SMB_army
	shared_focus = SMB_air_force
	shared_focus = SMB_navy

	continuous_focus_position = { x = 50 y = 2500 }

	initial_show_position = {
		x = 35
		y = 0
	}


	### LOOK TO TRADITION
	focus = {
		id = CHL_look_to_tradition

		icon = GFX_focus_CHL_look_to_tradition

		#relative_position_id = 	
		x = 10
		y = 0
		cost = 5

		offset = {
			x = -5
			y = 0
			trigger = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
				has_completed_focus = CHL_address_the_mapuche_conflict
			}
		}

		allow_branch = {
			IF = {
				limit = {
					has_game_rule = {
						rule = obsolete_focus_branches_visibility
						option = HIDE
					}
				}
				NOT = { has_completed_focus = CHL_endorse_the_constitution }
				NOT = { has_completed_focus = CHL_denounce_the_anarchy }
			}
		}

		mutually_exclusive = {
			focus = CHL_endorse_the_constitution
			focus = CHL_denounce_the_anarchy
		} 
		
		ai_will_do = {
			base = 0.5
		}

		available = {
		}

		search_filters = { FOCUS_FILTER_POLITICAL }
		
		completion_reward = {

			add_popularity = {
				ideology = neutrality
				popularity = 0.05
			}	

			add_political_power = 35

			hidden_effect = {
				IF = {
					limit = {
						has_game_rule = {
							rule = obsolete_focus_branches_visibility
							option = HIDE
						}
					}
					mark_focus_tree_layout_dirty = yes
				}
			}

		}
	} 

	### ENDORSE THE CONSTITUTION OF 1925
	focus = {
		id = CHL_endorse_the_constitution

		icon = GFX_focus_CHL_endorse_the_constitution

		relative_position_id = CHL_look_to_tradition
		x = 25
		y = 0
		cost = 5

		allow_branch = {
			IF = {
				limit = {
					has_game_rule = {
						rule = obsolete_focus_branches_visibility
						option = HIDE
					}
				}
				NOT = { has_completed_focus = CHL_look_to_tradition }
				NOT = { has_completed_focus = CHL_denounce_the_anarchy }
			}
		}

		offset = {
			x = -26
			y = 0
			trigger = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
				has_completed_focus = CHL_endorse_the_constitution
			}
		}

		mutually_exclusive = {
			focus = CHL_look_to_tradition
			focus = CHL_denounce_the_anarchy
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY FOCUS_FILTER_POLITICAL_CHARACTER FOCUS_FILTER_HISTORICAL }
		
		completion_reward = {

			add_stability = 0.05

			add_political_power = 35

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = CHL_ulk

			hidden_effect = {
				IF = {
					limit = {
						has_game_rule = {
							rule = obsolete_focus_branches_visibility
							option = HIDE
						}
					}
					mark_focus_tree_layout_dirty = yes
				}
			}

		}
	} 

	### DENOUNCE THE STATE OF NEAR ANARCHY
	focus = {
		id = CHL_denounce_the_anarchy

		icon = GFX_focus_CHL_denounce_the_anarchy

		relative_position_id = CHL_look_to_tradition
		x = 38
		y = 0
		cost = 5

		mutually_exclusive = {
			focus = CHL_look_to_tradition
			focus = CHL_endorse_the_constitution
		} 

		allow_branch = {
			IF = {
				limit = {
					has_game_rule = {
						rule = obsolete_focus_branches_visibility
						option = HIDE
					}
				}
				NOT = { has_completed_focus = CHL_look_to_tradition }
				NOT = { has_completed_focus = CHL_endorse_the_constitution }
			}
		}

		offset = {
			x = -40
			y = 0
			trigger = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
				has_completed_focus = CHL_denounce_the_anarchy
			}
		}
		
		ai_will_do = {
			base = 1
		}

		available = {
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_POLITICAL_CHARACTER }
		
		completion_reward = {

			add_popularity = {
				ideology = fascism
				popularity = 0.05
			}	

			add_political_power = 50

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = CHL_carlos_keller_reuff
			show_ideas_tooltip = CHL_jorge_gonzález_von_marées

			hidden_effect = {
				IF = {
					limit = {
						has_game_rule = {
							rule = obsolete_focus_branches_visibility
							option = HIDE
						}
					}
					mark_focus_tree_layout_dirty = yes
				}
			}

		}
	} 

	### COOPERATION WITH THE FALANGE
	focus = {
		id = CHL_cooperation_with_the_falange

		icon = GFX_focus_CHL_cooperation_with_the_falange

		relative_position_id = CHL_endorse_the_constitution
		x = 2
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_endorse_the_constitution  
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_POLITICAL_CHARACTER FOCUS_FILTER_HISTORICAL }
		
		completion_reward = {

			add_popularity = {
				ideology = democratic
				popularity = 0.05
			}	

			custom_effect_tooltip = CHL_skip_one_line_tt
 
			add_ideas = CHL_national_falange

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = CHL_bernardo_leighton
			show_ideas_tooltip = CHL_radomiro_romero

		}
	} 

	### THE POLICIES OF ARTURO ALESSANDRI
	focus = {
		id = CHL_policies_of_arturo_alessandri

		icon = GFX_focus_CHL_policies_of_arturo_alessandri

		relative_position_id = CHL_endorse_the_constitution
		x = 0
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_endorse_the_constitution  
		}

		bypass = {
			AND = {
				NOT = {
					has_country_leader = {
						character = CHL_arturo_alessandri
						ruling_only = yes
					} 
				}
				has_government = democratic
			}
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2.5
			modifier = {
				factor = 0
				date > 1938.8.2
			}
		}

		available = {
			has_country_leader = { 
			    character = CHL_arturo_alessandri
			    ruling_only = yes
			}
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_HISTORICAL }
		
		completion_reward = {

			add_political_power = 50

			CHL_anarchic_society_level_down = yes

		}
	}

	### INFLATION CONTROL BY THE BANCO CENTRAL DE CHILE
	focus = {   
		id = CHL_inflation_control_by_the_central_bank 

		icon = GFX_focus_hol_abandon_the_gold_standard

		relative_position_id = CHL_policies_of_arturo_alessandri
		x = 0
		y = 2
		cost = 10

		prerequisite = {
			focus = CHL_policies_of_arturo_alessandri  
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
			modifier = {
				factor = 0
				date > 1938.8.2
			}
		}

		available = {
			has_country_leader = { 
			    character = CHL_arturo_alessandri
			    ruling_only = yes
			}
		}

		bypass = {
			NOT = {
				has_country_leader = { 
				    character = CHL_arturo_alessandri
				    ruling_only = yes
				}
			}
		}

		search_filters = { FOCUS_FILTER_INDUSTRY FOCUS_FILTER_HISTORICAL }
		
		completion_reward = {

			custom_effect_tooltip = CHL_upgrade_central_bank_tt
			hidden_effect = {
				IF = {
					limit = {
						has_idea =  CHL_banco_central_de_chile
					}
					swap_ideas = {
						remove_idea = CHL_banco_central_de_chile 
						add_idea = CHL_banco_central_de_chile_better
					}
				}
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_modify_chilean_economy_ns_intro
			add_to_variable = { CHL_economy_production_speed_buildings_factor = 0.05 tooltip = production_speed_buildings_factor_tt }

			custom_effect_tooltip = CHL_skip_one_line_tt
			custom_effect_tooltip = available_industrial_concern
			show_ideas_tooltip = CHL_banco_central_de_chile

		}
	}


	### ELECCION PRESIDENCIAL DE CHILE DE 1938
	focus = {
		id = CHL_1938_chilean_presidential_election

		icon = GFX_focus_CHL_1938_chilean_presidential_election

		relative_position_id = CHL_inflation_control_by_the_central_bank
		x = 0
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_inflation_control_by_the_central_bank 
		} 

		mutually_exclusive = {
		} 
		
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_POLITICAL_CHARACTER FOCUS_FILTER_HISTORICAL FOCUS_FILTER_COMPLETED_BY_EVENT }

		available = {

			custom_trigger_tooltip = {
				tooltip = CHL_1938_chilean_presidential_election_tt
				always = no
			}
			
		}
		
		completion_reward = {
			
			CHL_anarchic_society_level_down = yes

		}
	} 

	### EMPOWER THE PREPARATION DEPARTMENT
	focus = {
		id = CHL_empower_the_preparation_department

		icon = GFX_focus_generic_fascist_troops

		relative_position_id = CHL_denounce_the_anarchy
		x = 0
		y = 1
		cost = 10

		ai_will_do = {
			base = 2
		}

		prerequisite = {
			focus = CHL_denounce_the_anarchy 
		}

		mutually_exclusive = {
		} 
		
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_MANPOWER }

		available = {

			NOT = {
				has_completed_focus = CHL_commence_the_counter_revolution
			}

		}

		bypass = {
			has_government = fascism
		}
		
		completion_reward = { 

			add_timed_idea = {
				idea = CHL_empowered_preparations_department
				days = 365
			}	 

			custom_effect_tooltip = CHL_skip_one_line_tt

			activate_mission = CHL_anti_fascist_coalition_forming

		}
	} 

	### SWAY ARIOSTO HERRERA
	focus = {
		id = CHL_sway_ariosto_hererra

		icon = GFX_focus_CHL_sway_ariosto_hererra

		relative_position_id = CHL_empower_the_preparation_department
		x = -2
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_empower_the_preparation_department 
		} 

		mutually_exclusive = {
		} 
		
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_MANPOWER FOCUS_FILTER_MILITARY_CHARACTER }

		available = {

			NOT = {
				has_completed_focus = CHL_commence_the_counter_revolution
			}

		}

		ai_will_do = {
			base = 1
		}
		
		completion_reward = {

			custom_effect_tooltip = CHL_sway_ariosto_hererra_tt

			custom_effect_tooltip = CHL_skip_one_line_tt

			add_popularity = {
				ideology = communism 
				popularity = -0.05
			}	

			CHL_one_more_fascist_focus_done = yes

		}
	} 

	### INFILTRATE THE CARABINIEROS
	focus = {
		id = CHL_inflitrate_the_carabinieros

		icon = GFX_focus_generic_infiltration

		relative_position_id = CHL_empower_the_preparation_department
		x = 2
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_empower_the_preparation_department 
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
		}

		available = {

			NOT = {
				OR = {
					has_country_flag = CHL_carabineros_secured_by_opposition
					has_completed_focus = CHL_commence_the_counter_revolution
				}
			}

		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_MANPOWER }
		
		completion_reward = {

			add_ideas = CHL_carabineros_de_chile_fascist

			custom_effect_tooltip = CHL_skip_one_line_tt

			CHL_one_more_fascist_focus_done = yes

		}
	} 

	### UNIFY THE FASCIST MOVEMENTS
	focus = {
		id = CHL_unify_the_fascist_movements

		icon = GFX_focus_CHL_unify_the_fascist_movements

		relative_position_id = CHL_empower_the_preparation_department
		x = 0
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_empower_the_preparation_department 
		}

		mutually_exclusive = {
		} 

		ai_will_do = {
			base = 2.5
		}

		available = {

			NOT = {
				has_completed_focus = CHL_commence_the_counter_revolution
			}

		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_WAR_SUPPORT }

		bypass = {
			has_government = fascism
		}
		
		completion_reward = {

			add_popularity = {
				ideology = fascism
				popularity = 0.08
			}	

			add_stability = -0.05
			add_war_support = 0.05

			custom_effect_tooltip = CHL_skip_one_line_tt

			CHL_one_more_fascist_focus_done = yes

		}
	} 

	### PROLIFERATE NATIONAL POPULISM
	focus = {
		id = CHL_proliferate_national_populism

		icon = GFX_goal_generic_propaganda

		relative_position_id = CHL_unify_the_fascist_movements
		x = -1
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_unify_the_fascist_movements 
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available = {

			NOT = {
				has_completed_focus = CHL_commence_the_counter_revolution
			}

		}

		search_filters = { FOCUS_FILTER_POLITICAL }
		
		completion_reward = {

			custom_effect_tooltip = CHL_proliferate_national_populism_tt

			custom_effect_tooltip = CHL_skip_one_line_tt

			CHL_one_more_fascist_focus_done = yes

		}
	} 

	### MORE FUNDS FOR THE PROPAGANDA DEPARTMENT
	focus = {
		id = CHL_more_funds_or_the_propaganda_department

		icon = GFX_focus_generic_fascist_propaganda

		relative_position_id = CHL_unify_the_fascist_movements
		x = 1
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_unify_the_fascist_movements 
		}

		mutually_exclusive = {
		} 

		ai_will_do = {
			base = 1.5
		}

		available = {

			NOT = {
				has_completed_focus = CHL_commence_the_counter_revolution
			}

		}

		bypass = {
			has_government = fascism
		}
		
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_MANPOWER FOCUS_FILTER_INDUSTRY }

		completion_reward = {
 
			add_timed_idea = {
				idea = CHL_siphoning_funds
				days = 365
			}	

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_more_funds_or_the_propaganda_department_tt

			custom_effect_tooltip = CHL_skip_one_line_tt

			CHL_one_more_fascist_focus_done = yes

		}
	} 

	### REQUEST FOREIGN SUPPORT
	focus = {
		id = CHL_request_foreign_support

		icon = GFX_focus_ger_reichskommisariats

		relative_position_id = CHL_proliferate_national_populism
		x = 0
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_proliferate_national_populism 
			focus = CHL_more_funds_or_the_propaganda_department 
		}

		mutually_exclusive = {
		} 

		available = {

			NOT = {
				has_completed_focus = CHL_commence_the_counter_revolution
			}

		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_MANPOWER }

		ai_will_do = {
			base = 1.5
		}
		
		completion_reward = {

			every_country = {
				limit = {
					has_government = fascism
					NOT = {
						OR = {
							tag = ROOT
							has_war_with = ROOT
						}
					}
					has_war = no
					is_subject = no
				}
				country_event = {
					id = CHL_political_events.29
					days = 1
				}
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			CHL_one_more_fascist_focus_done = yes

		}
	} 

	### THE POPULAR FREEDOM ALLIANCE
	focus = {
		id = CHL_the_popular_freedom_alliance

		icon = GFX_focus_CHL_the_popular_freedom_alliance

		relative_position_id = CHL_proliferate_national_populism
		x = 2
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_proliferate_national_populism 
			focus = CHL_more_funds_or_the_propaganda_department 
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available = {

			NOT = {
				has_completed_focus = CHL_commence_the_counter_revolution
			}

		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_WAR_SUPPORT }

		bypass = {
			has_government = fascism
		}
		
		completion_reward = {

			add_ideas = CHL_popular_freedom_alliance_in_power

			custom_effect_tooltip = CHL_skip_one_line_tt

			CHL_one_more_fascist_focus_done = yes

		}
	} 

	### RALLY THE PEOPLE
	focus = {
		id = CHL_rally_the_people

		icon = GFX_focus_generic_support_the_left_right

		relative_position_id = CHL_the_popular_freedom_alliance
		x = -1
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_the_popular_freedom_alliance 
			focus = CHL_request_foreign_support 
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 3
		}

		search_filters = { FOCUS_FILTER_POLITICAL }

		available = {

			NOT = {
				has_completed_focus = CHL_commence_the_counter_revolution
			}

		}

		bypass = {
			has_government = fascism
		}
		
		completion_reward = {

			add_stability = -0.05

			add_political_power = 75

			add_popularity = {
				ideology = fascism
				popularity = 0.1
			}	

			custom_effect_tooltip = CHL_skip_one_line_tt

			CHL_one_more_fascist_focus_done = yes

		}
	} 

	### COMMENCE THE COUNTER REVOLUTION
	focus = {
		id = CHL_commence_the_counter_revolution

		icon = GFX_focus_mex_restore_the_army_of_christ
 
		relative_position_id = CHL_rally_the_people
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_rally_the_people 
		}

		mutually_exclusive = {
		} 
		
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_MANPOWER FOCUS_FILTER_MILITARY_CHARACTER FOCUS_FILTER_POLITICAL_CHARACTER FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_STABILITY }

		available = {
			fascism > 0.39
			is_subject = no
		}

		ai_will_do = {
			base = 2.5
		}

		cancel_if_invalid = no
		
		completion_reward = {

			country_event = {
				id = CHL_political_events.96 
				hours = 0
			}

			event_option_tooltip = CHL_political_events.96.a

			hidden_effect = {
				news_event = { 
					id = CHL_news_events.1 
					days = 2
					random_days = 5
				}
			}
 			
 			custom_effect_tooltip = available_political_advisor
 			show_ideas_tooltip = CHL_juan_gomez_millas

		}
	} 

	### IBANEZS COUP
	focus = {
		id = CHL_ibanezs_coup

		icon = GFX_focus_CHL_ibanezs_coup

		relative_position_id = CHL_look_to_tradition
		x = 0
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_look_to_tradition 
		}

		mutually_exclusive = {
		} 
		
		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_POLITICAL_CHARACTER }

		available = {
		}

		ai_will_do = {
			base = 2.5
		}
		
		completion_reward = {

			add_stability = -0.1

			country_event = {
				id = CHL_political_events.71 
				hours = 0
			}
			event_option_tooltip = CHL_political_events.71.a

		}
	}

	### ADDRESS THE MAPUCHE CONFLICT
	focus = {
		id = CHL_address_the_mapuche_conflict

		icon = GFX_focus_CHL_address_the_mapuche_conflict

		relative_position_id = CHL_ibanezs_coup
		x = 9
		y = 1
		cost = 5

		offset = {
			x = -9
			y = 0
			trigger = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
				has_completed_focus = CHL_address_the_mapuche_conflict
			}
		}

		prerequisite = {
			focus = CHL_ibanezs_coup 
		}

		mutually_exclusive = {
			focus = CHL_rule_by_decree 
		} 
		
		ai_will_do = {
			base = 1.5
		}

		allow_branch = {
			IF = {
				limit = {
					has_game_rule = {
						rule = obsolete_focus_branches_visibility
						option = HIDE
					}
				}
				NOT = { has_completed_focus = CHL_rule_by_decree }
				NOT = { has_completed_focus = CHL_endorse_the_constitution }
				NOT = { has_completed_focus = CHL_denounce_the_anarchy }
			}
		}

		available = {
			#has_stability < 0.15 
			has_government = neutrality
		}

		search_filters = { FOCUS_FILTER_POLITICAL }
		
		completion_reward = {

			add_dynamic_modifier = { 
				modifier = CHL_mapuche_nationalism_dynamic_modifier
			}
			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = CHL_manuel_panguilef

			custom_effect_tooltip = CHL_skip_one_line_tt

			IF = {
				limit = {
					has_mapuche_conflict = yes
				}
				CHL_mapuche_conflict_level_up = yes
			}
			custom_effect_tooltip = CHL_no_more_advisors_tt
						
			remove_mission = CHL_nacista_coup_attempt
			activate_mission = CHL_ibanez_ruling_by_decree_mission

			hidden_effect = {
				IF = {
					limit = {
						has_game_rule = {
							rule = obsolete_focus_branches_visibility
							option = HIDE
						}
					}
					mark_focus_tree_layout_dirty = yes
				}
			}
		}
	}

	### RULE BY DECREE
	focus = {
		id = CHL_rule_by_decree

		icon = GFX_focus_generic_military_dictatorship

		relative_position_id = CHL_ibanezs_coup
		x = -5
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_ibanezs_coup 
		}

		mutually_exclusive = {
			focus = CHL_address_the_mapuche_conflict 
		} 
		
		ai_will_do = {
			base = 1
		}

		offset = {
			x = 5
			y = 0
			trigger = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
				has_completed_focus = CHL_rule_by_decree
			}
		}

		allow_branch = {
			IF = {
				limit = {
					has_game_rule = {
						rule = obsolete_focus_branches_visibility
						option = HIDE
					}
				}
				NOT = { has_completed_focus = CHL_address_the_mapuche_conflict }
				NOT = { has_completed_focus = CHL_endorse_the_constitution }
				NOT = { has_completed_focus = CHL_denounce_the_anarchy }
			}
		}

		available = {
			has_country_leader = {
				ruling_only = yes
				character = CHL_carlos_ibanez
			}
			NOT = {
				OR = {
					has_completed_focus = CHL_crown_antoine_as_sovereign_king
					has_country_flag = CHL_fascist_and_communist_joint_civil_war_started
				}
			}
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_POLITICAL_CHARACTER }
		
		completion_reward = {

			add_country_leader_trait = dictator

			add_stability = -0.15

			### Removing the now irrelevant Near Anarchic Society
			IF = {
				limit = {
					has_idea = idea_CHL_near_anarchic_society
				}
				remove_ideas = idea_CHL_near_anarchic_society
			}
			ELSE_IF = {
				limit = {
					has_idea = idea_CHL_near_anarchic_society_2
				}
				remove_ideas = idea_CHL_near_anarchic_society_2
			}
			ELSE_IF = {
				limit = {
					has_idea = idea_CHL_near_anarchic_society_3
				}
				remove_ideas = idea_CHL_near_anarchic_society_3
			}
			ELSE_IF = {
				limit = {
					has_idea = idea_CHL_near_anarchic_society_4
				}
				remove_ideas = idea_CHL_near_anarchic_society_4
			}

			set_country_flag = CHL_no_more_anarchy_flag

			hidden_effect = {
				IF = {
					limit = {
						has_game_rule = {
							rule = obsolete_focus_branches_visibility
							option = HIDE
						}
					}
					mark_focus_tree_layout_dirty = yes
				}
			}

		}
	}

	### STRENGTHEN THE CARABINIEROS
	focus = {
		id = CHL_strengthen_the_carabinieros

		icon = GFX_focus_CHL_strengthen_the_carabinieros

		relative_position_id = CHL_rule_by_decree
		x = 4
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_rule_by_decree 
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
		}

		available = {
			has_government = neutrality
			NOT = {
				OR = {
					has_completed_focus = CHL_crown_antoine_as_sovereign_king
					has_country_flag = CHL_fascist_and_communist_joint_civil_war_started
				}
			}
		}

		search_filters = { FOCUS_FILTER_MANPOWER }
		
		completion_reward = {
			add_ideas = CHL_carabineros_de_chile_neutrality
		}
	}

	### SEEK FOREIGN INVESTMENTS
	focus = {
		id = CHL_seek_foreign_investments

		icon = GFX_goal_generic_forceful_treaty

		relative_position_id = CHL_rule_by_decree
		x = 2
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_rule_by_decree 
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		search_filters = { FOCUS_FILTER_INDUSTRY }

		available = {
			has_government = neutrality
			NOT = {
				OR = {
					has_completed_focus = CHL_crown_antoine_as_sovereign_king
					has_country_flag = CHL_fascist_and_communist_joint_civil_war_started
				}
			}
		}
		
		completion_reward = {

			random_owned_controlled_state = {
				limit = {
					is_core_of = ROOT
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}	
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			add_timed_idea = {
				idea = CHL_ibanez_foriegn_support
				days = 365
			}	

		}
	}

	### INCREASE SPENDING ON PUBLIC WORKS
	focus = {
		id = CHL_increase_spending_on_public_works

		icon = GFX_goal_generic_construct_infrastructure

		relative_position_id = CHL_rule_by_decree
		x = -2
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_rule_by_decree 
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		search_filters = { FOCUS_FILTER_INDUSTRY }

		available = {
			has_government = neutrality
			NOT = {
				OR = {
					has_completed_focus = CHL_crown_antoine_as_sovereign_king
					has_country_flag = CHL_fascist_and_communist_joint_civil_war_started
				}
			}
		}
		
		completion_reward = {
			custom_effect_tooltip = CHL_modify_chilean_economy_ns_intro
			add_to_variable = { CHL_economy_production_speed_buildings_factor = 0.05 tooltip = production_speed_buildings_factor_tt }
			add_to_variable = { CHL_economy_industrial_capacity_factory = 0.05 tooltip = industrial_capacity_factory_tt }

			custom_effect_tooltip = CHL_skip_one_line_tt

			random_state = {
				limit = {
					is_owned_and_controlled_by = ROOT
				}
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}	
			}

			add_war_support = -0.05

			custom_effect_tooltip = CHL_skip_one_line_tt



		}
	}

	### THE ALIANZA POPULAR LIBERTADORA AS A VANGUARD
	focus = {
		id = CHL_alianza_popular_libertadora_as_a_vanguard

		icon = GFX_focus_CHL_the_popular_freedom_alliance

		relative_position_id = CHL_rule_by_decree
		x = -4
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_rule_by_decree 
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 0.5
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_WAR_SUPPORT }

		available = {
			has_government = neutrality
			NOT = {
				OR = {
					has_completed_focus = CHL_crown_antoine_as_sovereign_king
					has_country_flag = CHL_fascist_and_communist_joint_civil_war_started
				}
			}
		}
		
		completion_reward = {
			add_ideas = CHL_popular_freedom_alliance_in_power
		}
	}

	### UTILIZE NATIONAL POPULISM
	focus = {
		id = CHL_utilize_national_populism

		icon = GFX_focus_ITA_generic_fascist_workers

		relative_position_id = CHL_increase_spending_on_public_works
		x = 0
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_increase_spending_on_public_works 
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 0.5
		}

		available = {
			has_government = neutrality
			NOT = {
				OR = {
					has_completed_focus = CHL_crown_antoine_as_sovereign_king
					has_country_flag = CHL_fascist_and_communist_joint_civil_war_started
				}
			}
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_WAR_SUPPORT }
		
		completion_reward = {
			add_war_support = 0.05

			add_popularity = {
				ideology = neutrality
				popularity = 0.1
			}	

			add_popularity = {
				ideology = fascism
				popularity = 0.05
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = CHL_francisco_encina
			show_ideas_tooltip = CHL_tancredo_pinochet
			show_ideas_tooltip = CHL_guillermo_araya
			
			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_sell_arica_to_peru_civil_war_tt_2	

		}
	}

	### OUTLAW SOCIALISM
	focus = {
		id = CHL_outlaw_socialism

		icon = GFX_goal_anti_comintern_pact

		relative_position_id = CHL_seek_foreign_investments
		x = 0
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_seek_foreign_investments 
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
		}

		available = {
			has_government = neutrality
			NOT = {
				OR = {
					has_completed_focus = CHL_crown_antoine_as_sovereign_king
					has_country_flag = CHL_fascist_and_communist_joint_civil_war_started
				}
			}
		}

		search_filters = { FOCUS_FILTER_POLITICAL }
		
		completion_reward = {
			add_political_power = 50

			set_temp_variable = {
				var = ban_ideology_var
				value = party_popularity@communism
			}
			multiply_temp_variable = {
				var = ban_ideology_var
				value = -1
			}
			add_popularity = {
				ideology = communism
				popularity = ban_ideology_var
			}
			multiply_temp_variable = {
				var = ban_ideology_var
				value = 0.66
			}
			set_country_flag = banned_communism_flag
			custom_effect_tooltip = CHL_sell_arica_to_peru_civil_war_tt_2

		}
	}

	### SELL ARICA TO PERU
	focus = {
		id = CHL_sell_arica_to_peru

		icon = GFX_focus_CHL_sell_arica_to_peru

		relative_position_id = CHL_seek_foreign_investments
		x = -2
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_rule_by_decree
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available = {
			has_government = neutrality
			951 = {
				is_owned_and_controlled_by = ROOT
			}
			PRU = {
				exists = yes
				NOT = {
					has_war_with = ROOT
				}
				owns_state = 947
			}
			NOT = {
				OR = {
					has_completed_focus = CHL_crown_antoine_as_sovereign_king
					has_country_flag = CHL_fascist_and_communist_joint_civil_war_started
				}
			}
		}

		bypass = {
			OR = {
				951 = {
					NOT = {
						is_owned_and_controlled_by = ROOT
					}
				}
				PRU = {
					OR = {
						exists = no
						has_war_with = ROOT
						NOT = {
							owns_state = 947
						}
					}
				}
			}
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_INDUSTRY }
		
		completion_reward = {
			PRU = {
				country_event = {
					id = CHL_political_events.75
					days = 1
				}	
			}

			custom_effect_tooltip = if_they_accept_tt
			event_option_tooltip =  CHL_political_events.76.a
			custom_effect_tooltip = CHL_sell_arica_to_peru_civil_war_tt
		}
	}

	### CROWN ANTOINE AS SOVEREIGN KING
	focus = {
		id = CHL_crown_antoine_as_sovereign_king

		icon = GFX_focus_CHL_crown_antoine_as_sovereign_king

		relative_position_id = CHL_sell_arica_to_peru
		x = 0
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_sell_arica_to_peru 
		}

		prerequisite = {
			focus = CHL_utilize_national_populism
			focus = CHL_outlaw_socialism
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 5
		}

		search_filters = { FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_POLITICAL_CHARACTER }

		available = {
			has_government = neutrality
			has_country_flag = CHL_approached_by_mysterious_frenchman
		}
		
		completion_reward = {

			add_war_support = 0.05

			country_event = {
				id = CHL_political_events.74
				hours = 0
			}	

			event_option_tooltip = CHL_political_events.74.a
			hidden_effect = {
				IF = {
					limit = {
						has_idea = idea_CHL_repubican_guard
					}
					remove_ideas = idea_CHL_repubican_guard
				}

				country_event = {
					id = CHL_political_events.97
					days = 3
					random_days = 30
				}
				
				news_event = { 
					id = CHL_news_events.5 
					days = 2
					random_days = 5
				}
				
			}
			
		}
	}

	

	### UNDERMINE THE CARABINEROS DE CHILE
	focus = {
		id = CHL_undermine_the_carabineros_de_chile

		icon = GFX_goal_generic_political_pressure

		relative_position_id = CHL_address_the_mapuche_conflict
		x = -4
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_address_the_mapuche_conflict 
		}

		mutually_exclusive = {
		} 
		 
		ai_will_do = {
			base = 1.5
		}

		available = {
			NOT = {
				has_completed_focus = CHL_avenge_the_pacification_of_araucania
			}
		}

		search_filters = { FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_ARMY_XP }
		
		completion_reward = {

			custom_effect_tooltip = CHL_undermine_the_carabineros_de_chile_bonuses_tt

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_undermine_the_carabineros_de_chile_tt
		}
	}

	### STRIKE A DEAL WITH THE MAPUCHE
	focus = {
		id = CHL_strike_a_deal_with_the_mapuche

		icon = GFX_focus_generic_befriend_mapuche

		relative_position_id = CHL_crown_antoine_as_sovereign_king
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_crown_antoine_as_sovereign_king 
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
			has_government = neutrality
		}

		search_filters = { FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_STABILITY FOCUS_FILTER_POLITICAL_CHARACTER FOCUS_FILTER_MILITARY_CHARACTER FOCUS_FILTER_MANPOWER}
		
		completion_reward = {

			IF = {
				limit = {
					has_idea = CHL_the_mapuche_conflict_rebellion
				}
				remove_ideas = CHL_the_mapuche_conflict_rebellion
			}
			ELSE_IF = {
				limit = {
					has_idea = CHL_the_mapuche_conflict_much_worse
				}
				remove_ideas = CHL_the_mapuche_conflict_much_worse
			}
			ELSE_IF = {
				limit = {
					has_idea = CHL_the_mapuche_conflict_worse
				}
				remove_ideas = CHL_the_mapuche_conflict_worse
			}
			ELSE_IF = {
				limit = {
					has_idea = CHL_the_mapuche_conflict
				}
				remove_ideas = CHL_the_mapuche_conflict
			}
			ELSE_IF = {
				limit = {
					has_idea = CHL_the_mapuche_conflict_calmed
				}
				remove_ideas = CHL_the_mapuche_conflict_calmed
			}
			ELSE_IF = {
				limit = {
					has_idea = CHL_the_mapuche_conflict_near_gone
				}
				remove_ideas = CHL_the_mapuche_conflict_near_gone
			}
			ELSE_IF = {
				limit = {
					has_idea = CHL_mapuche_conflict_done
				}
				remove_ideas = CHL_mapuche_conflict_done
			}

			hidden_effect = {
				set_country_flag = CHL_no_more_mapuche_conflict
			}

			hidden_effect = {
				delete_unit_template_and_units = { 
					division_template = "Guerreros Mapuche"
					disband = yes #if yes, will refund equipment/manpower. 
				}

				delete_unit_template_and_units = { 
					division_template = "Guerreros Abajinos"
					disband = yes #if yes, will refund equipment/manpower. 
				}
			}
			
			division_template = {
			    name = "Guerreros Mapuche"
			    is_locked = no
			    division_names_group = SPR_INF_01
			    override_model = CHL_infantry_alt_0_entity
			    template_counter = 83
			    priority = 1
			    regiments = {
			        infantry = { x = 0 y = 0 } 
			        infantry = { x = 0 y = 1 } 
			        infantry = { x = 0 y = 2 }
			        infantry = { x = 1 y = 0 }  
			        infantry = { x = 1 y = 1 } 
			        infantry = { x = 1 y = 2 } 
			    }
			} 
			random_state = {
				limit = {
					OR = {
						state = 279
						state = 950
					}
					is_controlled_by = ROOT
				}
				create_unit = {
				    division = "name = \"Guerreros Mapuche\" division_template = \"Guerreros Mapuche\" start_experience_factor = 0.5 start_equipment_factor = 0.8"
				    owner = ROOT 
				}
			}

			division_template = {
			    name = "Guerreros Abajinos"
			    is_locked = no
			    division_names_group = SPR_INF_01
			    override_model = CHL_infantry_alt_1_entity
			    template_counter = 85
			    priority = 1
			    regiments = {
			        infantry = { x = 0 y = 0 } 
			        infantry = { x = 0 y = 1 } 
			        infantry = { x = 1 y = 0 }  
			        infantry = { x = 1 y = 1 } 
			    }
			} 
			random_state = {
				limit = {
					OR = {
						state = 279
						state = 950
					}
					is_controlled_by = ROOT
				}
				create_unit = {
				    division = "name = \"Guerreros Abajinos\" division_template = \"Guerreros Abajinos\" start_experience_factor = 0.5 start_equipment_factor = 1"
				    owner = ROOT 
				}
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = CHL_rayen_quitral
			show_ideas_tooltip = CHL_manuel_manquilef
			show_ideas_tooltip = CHL_venancio_huenchual
			show_ideas_tooltip = CHL_esteban_romero_sandoval
			show_ideas_tooltip = CHL_manuel_neculman
			show_ideas_tooltip = CHL_carlos_huayquinir
			show_ideas_tooltip = CHL_manuel_panguilef
		}
	}

	### REQUEST ASSISTANCE IN THE WAR
	focus = {
		id = CHL_request_assistance_in_the_war

		icon = GFX_focus_generic_monarchy_2

		relative_position_id = CHL_crown_antoine_as_sovereign_king
		x = -2
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_crown_antoine_as_sovereign_king 
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2.5
		}

		available = {	
			has_government = neutrality
			has_civil_war = yes
		}

		search_filters = { FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_MANPOWER }
		
		completion_reward = {
			custom_effect_tooltip = CHL_request_assistance_in_the_war_tt
			every_country = {
				limit = {
					NOT = {
						OR = {
							has_government = communism
							has_government = democratic
						}
					}
					NOT = {
						OR = {
							tag = ROOT
							has_war_with = ROOT
							is_subject_of = ROOT
							is_in_faction_with = ROOT
							tag = SPC
						}
					}
					OR = {
						original_tag = GER
						original_tag = FRA
						original_tag = ITA
						original_tag = SPR
						original_tag = POR
						original_tag = ENG
						original_tag = HOL
						original_tag = YUG
						original_tag = JAP
					}
				}
				country_event = {
					id = CHL_political_events.78
					days = 1
				}
			}
		}
	}

	### MOBILIZE THE VETERAN LEGIONARIES
	focus = {
		id = CHL_mobilize_the_veteran_legionaries

		icon = GFX_focus_CHL_mobilize_the_veteran_legionaries

		relative_position_id = CHL_crown_antoine_as_sovereign_king
		x = -4
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_crown_antoine_as_sovereign_king 
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available = {
			has_government = neutrality
			has_War = yes
		}

		search_filters = { FOCUS_FILTER_MANPOWER }
		
		completion_reward = {
			hidden_effect = {
				delete_unit_template_and_units = { 
					division_template = "Légion Étrangère"
					disband = yes #if yes, will refund equipment/manpower. 
				}
			}
			
			division_template = {
			    name = "Légion Étrangère" 
			    is_locked = no
			    division_names_group = FRA_INF_01
			    template_counter = 88
			    priority = 1
			    regiments = {
			        infantry = { x = 0 y = 0 } 
			        infantry = { x = 0 y = 1 } 
			        infantry = { x = 0 y = 2 }
			        infantry = { x = 0 y = 3 }
			        infantry = { x = 1 y = 0 }  
			        infantry = { x = 1 y = 1 } 
			        infantry = { x = 1 y = 2 } 
			        infantry = { x = 1 y = 3 } 
			        artillery_brigade = { x = 2 y = 0 } 
			    }
		    	support = {
		           	recon = { x = 0 y = 0 }
		           	engineer = { x = 0 y = 1 }
		           	artillery = { x = 0 y = 2 }
		    	}
			} 
			random_state = {
				limit = {
					is_controlled_by = ROOT
					is_core_of = ROOT
				}
				create_unit = {
				    division = "name = \"Première Légion Étrangère\" division_template = \"Légion Étrangère\" start_experience_factor = 0.8 start_equipment_factor = 1"
				    owner = ROOT 
				}
				create_unit = {
				    division = "name = \"Deuxième Légion Étrangère\" division_template = \"Légion Étrangère\" start_experience_factor = 0.8 start_equipment_factor = 1"
				    owner = ROOT 
				}
			}
		}
	}

	### ESTABLISH A ROYAL GUARD
	focus = {
		id = CHL_establish_a_royal_guard

		icon = GFX_focus_rom_royal_dictatorship

		relative_position_id = CHL_crown_antoine_as_sovereign_king
		x = 2
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_crown_antoine_as_sovereign_king 
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
		}

		available = {
			has_government = neutrality
		}

		search_filters = { FOCUS_FILTER_MANPOWER FOCUS_FILTER_ARMY_XP }
		
		completion_reward = {

			army_experience = 30

			add_manpower = 15000

			add_equipment_to_stockpile = { 
				type = infantry_equipment
				amount = 500
				producer = ROOT
			}

			add_equipment_to_stockpile = { 
				type = artillery_equipment
				amount = 80
				producer = ROOT
			}

			add_equipment_to_stockpile = { 
				type = support_equipment
				amount = 150
				producer = ROOT
			}	
		}
	}

	### ATTRACT ADDITIONAL FRENCH INVESTMENTS
	focus = {
		id = CHL_attract_additional_french_investments

		icon = GFX_focus_chi_reach_out_to_france

		relative_position_id = CHL_crown_antoine_as_sovereign_king
		x = 5
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_crown_antoine_as_sovereign_king 
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available = {
			has_government = neutrality

			NOT = {
				has_war_with = FRA
			}
		}

		bypass = {
			has_war_with = FRA
		}

		search_filters = { FOCUS_FILTER_INDUSTRY }
		
		completion_reward = {
			random_core_state = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}	
				prioritize = {
					279
				}
			}

			random_core_state = {
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}	
				prioritize = {
					279
				}
			}
		}
	}

	### INVITE FRENCH ARISTOCRACY
	focus = {
		id = CHL_invite_french_aristocracy

		icon = GFX_focus_CHL_invite_french_aristocracy

		relative_position_id = CHL_attract_additional_french_investments
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_attract_additional_french_investments 
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available = {
			has_government = neutrality
			has_civil_war = no
		}

		search_filters = { FOCUS_FILTER_INDUSTRY FOCUS_FILTER_STABILITY FOCUS_FILTER_MANPOWER }
		
		completion_reward = {
			swap_ideas = {
				remove_idea = idea_CHL_the_Hacienda_inquilinaje_system
				add_idea = CHL_french_aristocracy
			}	
		}
	}

	### IBANEZ AS PRIME MINISTER
	focus = {
		id = CHL_ibanez_as_prime_minister

		icon = GFX_focus_rom_handle_king 

		relative_position_id = CHL_strike_a_deal_with_the_mapuche
		x = -3
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_strike_a_deal_with_the_mapuche 
		}

		mutually_exclusive = {
			focus = CHL_an_absolute_monarchy
		} 
		
		ai_will_do = {
			base = 0.5
		}

		available = {
			has_government = neutrality
		}

		search_filters = { FOCUS_FILTER_POLITICAL_CHARACTER FOCUS_FILTER_POLITICAL }
		
		completion_reward = {

			hidden_effect = {
				remove_trait = {
				    character = CHL_carlos_ibanez
				    slot = political_advisor
				    trait = JUNO_ibanismo
				}
			}

			add_trait = {
			    character = CHL_carlos_ibanez
			    slot = political_advisor
			    trait = JUNO_ibanist_prime_minister
			}

			hidden_effect = {

				IF = {
					limit = {
						NOT = {
							has_idea = CHL_carlos_ibanez
							
						}

						amount_taken_ideas = {
						    amount < 3
						    slots = {
						        political_advisor
						    }
						}
					}
					add_ideas = CHL_carlos_ibanez
				}
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_ibanez_as_prime_minister_tt

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_no_deluges_tt
		}
	}

	### AN ABSOLUTE MONARCHY
	focus = {
		id = CHL_an_absolute_monarchy

		icon = GFX_focus_generic_monarchy_1

		relative_position_id = CHL_strike_a_deal_with_the_mapuche
		x = 3
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_strike_a_deal_with_the_mapuche 
		}

		mutually_exclusive = {
			focus = CHL_ibanez_as_prime_minister
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available = {
			has_government = neutrality
		}

		search_filters = { FOCUS_FILTER_POLITICAL_CHARACTER FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY FOCUS_FILTER_WAR_SUPPORT }
		
		completion_reward = {
			add_political_power = 50

			IF = {
				limit = {
					has_country_leader = {
						ruling_only = yes
						character = CHL_antoine_iii
					}
				}

				CHL_antoine_iii = {
					swap_country_leader_traits = {
					    remove = JUNO_sovereign_of_patagonia_1
					    add = JUNO_sovereign_of_patagonia_2
					    ideology = despotism
					}
				}
			}
			ELSE = {
				effect_tooltip = { #Only for tooltipping
					CHL_antoine_iii = {
						add_trait = {
						 	trait = JUNO_sovereign_of_patagonia_2
						 	ideology = despotism
						} 
					}
				}
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_an_absolute_monarchy_tt

			
		}
	}

	### APPROACH THE MODERATES
	focus = {
		id = CHL_approach_the_moderates

		icon = GFX_goal_generic_neutrality_focus

		relative_position_id = CHL_ibanez_as_prime_minister
		x = -2
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_ibanez_as_prime_minister 
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2.5
		}

		available = {
			has_government = neutrality
		}

		search_filters = { FOCUS_FILTER_POLITICAL_CHARACTER FOCUS_FILTER_POLITICAL }
		
		completion_reward = {

			add_political_power = 50

			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = CHL_juan_rosetti
			show_ideas_tooltip = CHL_emilio_codesido
			show_ideas_tooltip = CHL_radomiro_romero
			show_ideas_tooltip = CHL_bernardo_leighton
		}
	}

	### INTRODUCE THE FRANC
	focus = {
		id = CHL_introduce_the_franc

		icon = GFX_focus_fra_devalue_the_franc

		relative_position_id = CHL_ibanez_as_prime_minister
		x = 2
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_ibanez_as_prime_minister 
			focus = CHL_an_absolute_monarchy
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
		}

		available = {
			has_government = neutrality
		}

		search_filters = { FOCUS_FILTER_INDUSTRY }
		
		completion_reward = {
			add_stability = -0.1

			add_ideas = CHL_introduced_the_franc_idea
		}
	}

	### STRENGTHEN CONTROL
	focus = {
		id = CHL_strengthen_control

		icon = GFX_goal_generic_demand_territory

		relative_position_id = CHL_ibanez_as_prime_minister
		x = 0
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_ibanez_as_prime_minister 
			focus = CHL_an_absolute_monarchy
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available = {
			has_government = neutrality
			has_idea = CHL_popular_resistance
			has_civil_war = no
		}

		bypass = {
			NOT = {
				has_idea = CHL_popular_resistance
			}
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY }
		
		completion_reward = {

			add_political_power = 75

			IF = {
				limit = {
					has_idea = CHL_popular_resistance
				}
				remove_ideas = CHL_popular_resistance
			}
			else = {
				effect_tooltip = {
					remove_ideas = CHL_popular_resistance
				}
			}
		}
	}

	### INVITE CARLIST REFUGEES
	focus = {
		id = CHL_invite_carlist_refugees

		icon = GFX_focus_spa_no_compromise_on_carlist_ideals

		relative_position_id = CHL_invite_french_aristocracy
		x = -2
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_ibanez_as_prime_minister 
			focus = CHL_an_absolute_monarchy
		}

		prerequisite = {
			focus = CHL_invite_french_aristocracy 
		}

		mutually_exclusive = {
		} 
		
		allow_branch = {
			has_dlc = "La Resistance"
			IF = {
				limit = {
					has_game_rule = {
						rule = obsolete_focus_branches_visibility
						option = HIDE
					}
				}
				NOT = { has_completed_focus = CHL_endorse_the_constitution }
				NOT = { has_completed_focus = CHL_denounce_the_anarchy }
				NOT = { has_completed_focus = CHL_address_the_mapuche_conflict }
			}
		}

		available = {
			has_government = neutrality
			SPB = {
				exists = no
			}
		}
		
		ai_will_do = {
			base = 0.5
		}

		search_filters = { FOCUS_FILTER_POLITICAL_CHARACTER FOCUS_FILTER_MILITARY_CHARACTER FOCUS_FILTER_MANPOWER FOCUS_FILTER_ARMY_XP }

		completion_reward = {

			army_experience = 30

			add_manpower = 5000

			SPR = {
				SPA_tomas_dominguez_arevalo = { set_nationality = ROOT }
				show_ideas_tooltip = SPA_tomas_dominguez_arevalo
				SPA_martin_de_riquer = { set_nationality = ROOT }
				show_ideas_tooltip = SPA_martin_de_riquer
				SPA_rafael_garcia_valino = { set_nationality = ROOT }
				show_ideas_tooltip = SPA_rafael_garcia_valino
				SPA_heli_rolando_de_tella = { set_nationality = ROOT }
				show_ideas_tooltip = SPA_heli_rolando_de_tella
				SPA_jose_enrique_varela = { set_nationality = ROOT }
				show_ideas_tooltip = SPA_jose_enrique_varela
			}

		}
	}

	### EXPAND THE OFFICER CORPS
	focus = {
		id = CHL_expand_the_officer_corps

		icon = GFX_focus_generic_military_academy

		relative_position_id = CHL_ibanez_as_prime_minister
		x = 3
		y = 2
		cost = 5

		prerequisite = {
			focus = CHL_ibanez_as_prime_minister 
			focus = CHL_an_absolute_monarchy
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
		}

		available = {
			has_government = neutrality
		}

		search_filters = { FOCUS_FILTER_MILITARY_CHARACTER FOCUS_FILTER_ARMY_XP }
		
		completion_reward = {
			add_command_power = 30

			army_experience = 25

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_recruit_young_officers_tt
		}
	}

	### THE SCOUTS
	focus = {
		id = CHL_the_scouts_monarchist_youth_organization

		icon = GFX_focus_CHL_the_scouts_monarchist_youth_organization

		relative_position_id = CHL_strengthen_control
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_strengthen_control 
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available = {
			has_government = neutrality
		}

		search_filters = { FOCUS_FILTER_MANPOWER }
		
		completion_reward = {
			add_ideas = CHL_the_kings_scouts
		}
	}

	### STATE CATHOLICISM
	focus = {
		id = CHL_state_catholicism

		icon = GFX_focus_por_concordat

		relative_position_id = CHL_strengthen_control
		x = 1
		y = 2
		cost = 10

		prerequisite = {
			focus = CHL_strengthen_control 
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available = {
			has_government = neutrality
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_POLITICAL_CHARACTER }
		
		completion_reward = {

			add_ideas = CHL_state_catholicism_idea

			custom_effect_tooltip = CHL_skip_one_line_tt

			IF = {
				limit = {
					AND = {
						has_dlc = "By Blood Alone"
						ITA = {
							exists = yes 
							has_completed_focus = ITA_seek_papal_support
						}
					}
				}
				ITA = {
					add_opinion_modifier = {
						target = ROOT
						modifier = embraced_catholicism
					}
				}
			}

			IF = {
				limit = {
					AND = {
						has_dlc = "La Resistance"
						POR = {
							has_completed_focus = POR_concordat_with_the_holy_see
						}
					}
				}
				POR = {
					add_opinion_modifier = {
						target = ROOT
						modifier = embraced_catholicism
					}
				}
			}

			IF = {
				limit = {
					AND = {
						has_dlc = "La Resistance"
						SPR = {
							has_completed_focus = SPA_defenders_of_catholicism
						}
					}
				}
				SPR = {
					add_opinion_modifier = {
						target = ROOT
						modifier = embraced_catholicism
					}
				} 
			}

			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = CHL_guido_beck
			show_ideas_tooltip = CHL_osvaldo_lira_perez
		}
	}

	### INVITE FRENCH ACADEMIA
	focus = {
		id = CHL_invite_french_academia

		icon = GFX_focus_research 

		relative_position_id = CHL_ibanez_as_prime_minister
		x = 4
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_ibanez_as_prime_minister 
			focus = CHL_an_absolute_monarchy
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available = {
			has_government = neutrality
			NOT = {
				has_war_with = FRA
			}
			has_civil_war = no
		}

		search_filters = { FOCUS_FILTER_RESEARCH }
		
		completion_reward = {

			add_ideas = CHL_invited_french_academia

			add_research_slot = 1
		}
	}

	### A NEW ARAUCANIAN NOBLE CLASS
	focus = {
		id = CHL_a_new_araucanian_noble_class

		icon = GFX_focus_CHL_a_new_araucanian_noble_class

		relative_position_id = CHL_invite_french_aristocracy
		x = 0
		y = 3
		cost = 10

		prerequisite = {
			focus = CHL_invite_french_aristocracy 
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
			has_government = neutrality
			has_idea = CHL_french_aristocracy
		}

		search_filters = { FOCUS_FILTER_STABILITY FOCUS_FILTER_INDUSTRY FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_MANPOWER }
		
		completion_reward = {
			swap_ideas = {
				remove_idea = CHL_french_aristocracy
				add_idea = CHL_araucanian_aristocracy
			}	
		}
	}

	### ESTABLISH THE ROYAL MOUNTAINEERS
	focus = {
		id = CHL_establish_the_royal_mountaineers

		icon = GFX_focus_ITA_bersaglieri

		relative_position_id = CHL_expand_the_officer_corps
		x = 0
		y = 3
		cost = 10

		prerequisite = {
			focus = CHL_expand_the_officer_corps
		}

		prerequisite = {
			#focus = CHL_invite_french_academia
			focus = CHL_a_new_araucanian_noble_class
			focus = CHL_state_catholicism
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available = {
			has_government = neutrality
		}

		search_filters = { FOCUS_FILTER_ARMY_XP FOCUS_FILTER_WAR_SUPPORT }
		
		completion_reward = {

			add_war_support = 0.05
			army_experience = 25

			custom_effect_tooltip = CHL_skip_one_line_tt

			add_ideas = CHL_royal_mountaineers

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_union_of_american_indigenous_peoples_tt
		}
	}

	### AN IMPERIAL CAPITAL
	focus = {
		id = CHL_an_imperial_capital

		icon = GFX_focus_CHL_an_imperial_capital

		relative_position_id = CHL_establish_the_royal_mountaineers
		x = 0
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_establish_the_royal_mountaineers
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available = {
			has_government = neutrality
		}

		search_filters = { FOCUS_FILTER_POLITICAL }
		
		completion_reward = {
			country_event = {
				id = CHL_political_events.82
				hours = 0
			}	
			custom_effect_tooltip = CHL_an_imperial_capital_tt

			IF = {
				limit = {
					has_completed_focus = CHL_an_absolute_monarchy
				}
				CHL_antoine_iii = {
					swap_country_leader_traits = {
					    remove = JUNO_sovereign_of_patagonia_2
					    add = JUNO_sovereign_of_patagonia_3
					    ideology = despotism
					}
				}
			}
		}
	}

	### LA CORPORACION ARAUCANIA
	focus = {
		id = CHL_la_corporacion_araucania

		icon = GFX_focus_CHL_la_corporacion_araucania

		relative_position_id = CHL_address_the_mapuche_conflict
		x = -2
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_address_the_mapuche_conflict
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
		}

		available = {
			NOT = {
				has_completed_focus = CHL_avenge_the_pacification_of_araucania
			}
		}

		search_filters = { FOCUS_FILTER_INDUSTRY }
		
		completion_reward = {


			custom_effect_tooltip = CHL_modify_mapuche_nationalism_ns_intro
			add_to_variable = { CHL_mapuche_nationalism_industrial_capacity_factory = 0.05 tooltip = industrial_capacity_factory_tt }
			add_to_variable = { CHL_mapuche_nationalism_industrial_capacity_dockyard = 0.05 tooltip = industrial_capacity_dockyard_tt }
			add_to_variable = { CHL_mapuche_nationalism_consumer_goods_factor = -0.05 tooltip = consumer_goods_factor_tt }
			custom_effect_tooltip = CHL_skip_one_line_tt

			add_popularity = {
				ideology = neutrality
				popularity = -0.05
			}
			add_stability = -0.02



		}
	}

	### LA FEDERACION ARAUCANIA
	focus = {
		id = CHL_la_federacion_araucania

		icon = GFX_focus_CHL_la_federacion_araucania 

		relative_position_id = CHL_address_the_mapuche_conflict
		x = 2
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_address_the_mapuche_conflict
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
		}

		available = {
			NOT = {
				has_completed_focus = CHL_avenge_the_pacification_of_araucania
			}
		}

		search_filters = { FOCUS_FILTER_POLITICAL }
		
		completion_reward = {
			custom_effect_tooltip = CHL_modify_mapuche_nationalism_ns_intro
			add_to_variable = { CHL_mapuche_nationalism_resistance_target_on_our_occupied_states = 0.1 tooltip = resistance_target_on_our_occupied_states_tt }
			add_to_variable = { CHL_mapuche_nationalism_army_org_factor = 0.05 tooltip = army_org_factor_tt }add_to_variable = { CHL_mapuche_nationalism_army_morale_factor = 0.05 tooltip = army_morale_factor_tt }
			custom_effect_tooltip = CHL_skip_one_line_tt
			
			add_popularity = {
				ideology = neutrality
				popularity = -0.05
			}
			add_stability = -0.02


		}
	}

	### SOCIEDAD CAUPOLICAN DEFENSORA DE LA ARAUCANIA 
	focus = {
		id = CHL_sociedad_caupolican_defensora_de_la_araucania

		icon = GFX_focus_CHL_sociedad_caupolican_defensora_de_la_araucania
 
		relative_position_id = CHL_address_the_mapuche_conflict 
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_address_the_mapuche_conflict
		}  

		mutually_exclusive = {
		} 
		 
		ai_will_do = {
			base = 1.5
		}

		available = { 
			NOT = {
				has_completed_focus = CHL_avenge_the_pacification_of_araucania
			}
		}

		search_filters = { FOCUS_FILTER_STABILITY FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_MANPOWER }
		 
		completion_reward = {
			custom_effect_tooltip = CHL_modify_mapuche_nationalism_ns_intro
			add_to_variable = { CHL_mapuche_nationalism_stability_factor = 0.05 tooltip = stability_factor_tt }
			add_to_variable = { CHL_mapuche_nationalism_war_support_factor = 0.05 tooltip = war_support_factor_tt }
			add_to_variable = { CHL_mapuche_nationalism_recruitable_population_factor = 0.1 tooltip = conscription_factor_tt }
			custom_effect_tooltip = CHL_skip_one_line_tt
			add_popularity = {
				ideology = neutrality
				popularity = -0.05
			}
			add_stability = -0.02
		}
	}

	### UNION ARAUCANA
	focus = {
		id = CHL_union_araucana

		icon = GFX_focus_CHL_union_araucana

		relative_position_id = CHL_sociedad_caupolican_defensora_de_la_araucania
		x = -1
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_sociedad_caupolican_defensora_de_la_araucania
			focus = CHL_la_corporacion_araucania
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
		}

		available = {
			NOT = {
				has_completed_focus = CHL_avenge_the_pacification_of_araucania
			}
		} 

		search_filters = { FOCUS_FILTER_POLITICAL }
		
		completion_reward = {
			custom_effect_tooltip = CHL_modify_mapuche_nationalism_ns_intro
			add_to_variable = { CHL_mapuche_nationalism_army_core_defence_factor = 0.1 tooltip = army_core_defence_factor_tt }
			add_to_variable = { CHL_mapuche_nationalism_modifier_compliance_gain = 0.05 tooltip = modifier_compliance_gain_tt }
			custom_effect_tooltip = CHL_skip_one_line_tt

			add_popularity = {
				ideology = neutrality
				popularity = -0.05
			}
			add_war_support = -0.02

		}
	}

	### LA MODERNA ARAUCANIA
	focus = {
		id = CHL_la_moderna_araucania

		icon = GFX_focus_CHL_la_moderna_araucania_fin

		relative_position_id = CHL_sociedad_caupolican_defensora_de_la_araucania
		x = 1
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_sociedad_caupolican_defensora_de_la_araucania
			focus = CHL_la_federacion_araucania
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
		}

		available = {
			NOT = {
				has_completed_focus = CHL_avenge_the_pacification_of_araucania
			}
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_RESEARCH }
		
		completion_reward = {
			custom_effect_tooltip = CHL_modify_mapuche_nationalism_ns_intro
			add_to_variable = { CHL_mapuche_nationalism_political_power_factor = 0.1 tooltip = political_power_factor_tt }
			add_to_variable = { CHL_mapuche_nationalism_research_speed_factor = 0.1 tooltip = research_speed_factor_tt }
			custom_effect_tooltip = CHL_skip_one_line_tt
			
			add_popularity = {
				ideology = neutrality
				popularity = -0.05
			}
			add_war_support = -0.02
		}
	}

	### ELECTING A TOQUI
	focus = {
		id = CHL_electing_a_toqui

		icon = GFX_focus_CHL_electing_a_toqui

		relative_position_id = CHL_union_araucana
		x = 0
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_la_moderna_araucania
			focus = CHL_union_araucana
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
			NOT = {
				has_completed_focus = CHL_avenge_the_pacification_of_araucania
			}
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_POLITICAL_CHARACTER FOCUS_FILTER_MILITARY_CHARACTER }
		
		completion_reward = {
			country_event = {
				id = CHL_political_events.73
				hours = 0
			}
			custom_effect_tooltip = CHL_electing_a_toqui_tt
			custom_effect_tooltip = CHL_skip_one_line_tt
			IF = {
				limit = {
					has_mapuche_conflict = yes
				}
				CHL_mapuche_conflict_level_up = yes
			}
		}
	}

	### CONVENE THE ARAUCANIAN CONGRESS
	focus = {
		id = CHL_convene_the_araucanian_congress

		icon = GFX_focus_ETH_re-convene_the_parliament

		relative_position_id = CHL_la_moderna_araucania
		x = 0
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_la_moderna_araucania
			focus = CHL_union_araucana
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
			NOT = {
				has_completed_focus = CHL_avenge_the_pacification_of_araucania
			}
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_POLITICAL_CHARACTER FOCUS_FILTER_MILITARY_CHARACTER }
		
		completion_reward = {
			country_event = {
				id = CHL_political_events.72
				hours = 0
			}
			custom_effect_tooltip = one_of_the_options_tt
			custom_effect_tooltip = CHL_unlocks_various_communist_advisors
			custom_effect_tooltip = CHL_skip_one_line_tt
			IF = {
				limit = {
					has_mapuche_conflict = yes
				}
				CHL_mapuche_conflict_level_up = yes
			}



		}
	}

	### AVENGE THE PACIFICATION OF ARAUCANIA
	focus = {
		id = CHL_avenge_the_pacification_of_araucania

		icon = GFX_focus_CHL_avenge_the_pacification_of_araucania

		relative_position_id = CHL_electing_a_toqui
		x = 1
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_electing_a_toqui
		}

		prerequisite = {
			focus = CHL_convene_the_araucanian_congress
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
			is_subject = no
			has_civil_war = no
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_POLITICAL_CHARACTER FOCUS_FILTER_MILITARY_CHARACTER FOCUS_FILTER_MANPOWER }
		
		completion_reward = {

			custom_effect_tooltip = CHL_avenge_the_pacification_tt
			hidden_effect = {
				start_civil_war = {
				    ideology = democratic
				    size = 0.5
				    army_ratio = 0.5
				    navy_ratio = 0.3
				    air_ratio = 0.7
				    keep_all_characters = yes
				    states = all
				    states_filter = {
				        OR = {
				        	state = 951
				        	state = 506
				        	state = 952
				        	state = 279
				        }
				        is_controlled_by = ROOT
				    }
			    
			    	PREV = {  # Original country
			            CHL_jorge_gonzález_von_marées = { # Character
			                set_nationality = PREV.PREV
			                # Transfers to breakaway
			            }
			            CHL_carlos_keller_reuff = { # Character
			                set_nationality = PREV.PREV
			                # Transfers to breakaway
			            }
			            CHL_francisco_valderrama = { # Character
			                set_nationality = PREV.PREV
			                # Transfers to breakaway
			            }
			            CHL_carlos_ibanez = { # Character
			                set_nationality = PREV.PREV
			                # Transfers to breakaway
			            }
			            CHL_ariosto_herrera = { # Character
			                set_nationality = PREV.PREV
			                # Transfers to breakaway
			            }
			            CHL_bartolome_blanche = { # Character
			                set_nationality = PREV.PREV
			                # Transfers to breakaway
			            }
			            CHL_escudero_oscar_otárola = { # Character
			                set_nationality = PREV.PREV
			                # Transfers to breakaway 
			            }
			            CHL_guillermo_barrios_tirado = { # Character
			                set_nationality = PREV.PREV
			                # Transfers to breakaway
			            }
			            CHL_e_novoa_fuentes = { # Character
			                set_nationality = PREV.PREV
			                # Transfers to breakaway
			            }
		        	}
		        	IF = {
		        		limit = {
		        			PREV.PREV = {
		        				NOT = {
		        					has_country_leader = {
		        						ruling_only = yes
		        						character = CHL_carlos_ibanez
		        					}
		        				}
		        				has_civil_war = yes
		        			}
		        		}
		        		PREV.PREV = {
		        			promote_character = {
		        				character = CHL_carlos_ibanez 
		        				ideology = conservatism 
		        			}
		        		}
		        	}

			        IF = {
			        	limit = {
			        		NOT = {
			        			ROOT = {
			        				has_completed_focus = CHL_undermine_the_carabineros_de_chile
			        			}
			        		}
			        	}
			        	PREV.PREV = {
			        		division_template = {
			        		    name = "Carabineros Patrios de Chile"
			        		    is_locked = yes
			        		    division_names_group = SPR_INF_01
			        		    override_model = CHL_militia_entity
			        		    template_counter = 81
			        		    priority = 0
			        		    regiments = {
			        		        militia = { x = 0 y = 0 } 
			        		        militia = { x = 0 y = 1 } 
			        		        militia = { x = 0 y = 2 }
			        		        militia = { x = 0 y = 3 }
			        		        militia = { x = 1 y = 0 }  
			        		        militia = { x = 1 y = 1 } 
			        		        militia = { x = 1 y = 2 } 
			        		        militia = { x = 1 y = 3 } 
			        		    }
			        		} 
			        		random_state = {
			        			limit = {
			        				OR = {
			        					state = 951
			        					state = 506
			        					state = 952
			        					state = 279
			        				}
			        			}
			        			create_unit = {
			        			    division = "name = \"Primeros Carabineros Patrios de Chile\" division_template = \"Carabineros Patrios de Chile\" start_experience_factor = 0.5 start_equipment_factor = 0.7"
			        			    owner = PREV 
			        			}
			        			create_unit = {
			        			    division = "name = \"Segundo Carabineros Patrios de Chile\" division_template = \"Carabineros Patrios de Chile\" start_experience_factor = 0.5 start_equipment_factor = 0.7"
			        			    owner = PREV 
			        			}
			        			create_unit = {
			        			    division = "name = \"Tercer Carabineros Patrios de Chile\" division_template = \"Carabineros Patrios de Chile\" start_experience_factor = 0.5 start_equipment_factor = 0.7"
			        			    owner = PREV 
			        			}
			        		}
			        	}
			        }
			        ELSE_IF = {
			        	limit = {
			        		ROOT = {
			        			has_completed_focus = CHL_undermine_the_carabineros_de_chile
			        		}
			        	}
			        	PREV.PREV = {
			        		division_template = {
			        		    name = "Carabineros Patrios de Chile"
			        		    is_locked = yes
			        		    division_names_group = SPR_INF_01
			        		    override_model = CHL_militia_entity
			        		    template_counter = 81
			        		    priority = 0
			        		    regiments = {
			        		        militia = { x = 0 y = 0 } 
			        		        militia = { x = 0 y = 1 } 
			        		        militia = { x = 0 y = 2 }
			        		        militia = { x = 0 y = 3 }
			        		        militia = { x = 1 y = 0 }  
			        		        militia = { x = 1 y = 1 } 
			        		        militia = { x = 1 y = 2 } 
			        		        militia = { x = 1 y = 3 } 
			        		    }
			        		} 
			        		random_state = {
			        			limit = {
			        				OR = {
			        					state = 951
			        					state = 506
			        					state = 952
			        					state = 279
			        				}
			        			}
			        			create_unit = {
			        			    division = "name = \"Primeros Carabineros Patrios de Chile\" division_template = \"Carabineros Patrios de Chile\" start_experience_factor = 0.5 start_equipment_factor = 0.7"
			        			    owner = PREV 
			        			}
			        		}
			        	}
			        }

			        IF = {
			        	limit = {
			        		ROOT = {
			        			has_country_flag = CHL_ibanez_secured_foreign_support_flag
			        		}
			        	}
			        	PREV.PREV = {
			        		add_ideas = CHL_ibanez_foriegn_support
			        	}
			        }
			        IF = {
			        	limit = {
			        		ROOT = {
			        			has_country_flag = CHL_ibanez_secured_more_weapons_flag
			        		}
			        	}
			        	PREV.PREV = {
			        		random_state = {
			        			limit = {
			        				is_capital = yes
			        				is_controlled_by = PREV
			        			}
			        			add_extra_state_shared_building_slots = 2
			        			add_building_construction = {
			        				type = arms_factory
			        				level = 2
			        				instant_build = yes
			        			}	
			        		}
			        		add_equipment_to_stockpile = { 
			        			type = infantry_equipment
			        			amount = 2000 
			        			producer = CHL
			        		}	
			        	}
			        }
			        IF = {
			        	limit = {
			        		ROOT = {
			        			has_country_flag = CHL_ibanez_secured_more_carabineros_flag
			        		}
			        	}
			        	PREV.PREV = {
			        		random_state = {
			        			limit = {
			        				OR = {
			        					state = 951
			        					state = 506
			        					state = 952
			        					state = 279
			        				}
			        			}
			        			create_unit = {
			        			    division = "name = \"Primeros Carabineros Patrios de Chile\" division_template = \"Carabineros Patrios de Chile\" start_experience_factor = 0.5 start_equipment_factor = 0.4"
			        			    owner = PREV 
			        			}
			        			create_unit = {
			        			    division = "name = \"Primeros Carabineros Patrios de Chile\" division_template = \"Carabineros Patrios de Chile\" start_experience_factor = 0.5 start_equipment_factor = 0.5"
			        			    owner = PREV 
			        			}
			        		}
			        	}
			        }
			        IF = {
			        	limit = {
			        		ROOT = {
			        			has_country_flag = CHL_ibanez_secured_argentinian_aid_flag
			        		}
			        	}
			        	PREV.PREV = {
			        		division_template = {
			        		    name = "Voluntarios Argentinos"
			        		    is_locked = yes
			        		    division_names_group = SPR_INF_01
			        		    priority = 0
			        		    template_counter = 82
			        		    regiments = {
			        		        militia = { x = 0 y = 0 } 
			        		        militia = { x = 0 y = 1 } 
			        		        militia = { x = 0 y = 2 }
			        		        militia = { x = 0 y = 3 }
			        		        militia = { x = 1 y = 0 }  
			        		        militia = { x = 1 y = 1 } 
			        		        militia = { x = 1 y = 2 } 
			        		        militia = { x = 1 y = 3 } 
			        		    }
			        		} 
			        		random_state = {
			        			limit = {
			        				OR = {
			        					state = 951
			        					state = 506
			        					state = 952
			        					state = 279
			        				}
			        			}
			        			create_unit = {
			        			    division = "name = \"Primeros Voluntarios Argentinos\" division_template = \"Voluntarios Argentinos\" start_experience_factor = 0.5 start_equipment_factor = 0.8"
			        			    owner = PREV 
			        			}
			        			create_unit = {
			        			    division = "name = \"Primeros Voluntarios Argentinos\" division_template = \"Voluntarios Argentinos\" start_experience_factor = 0.5 start_equipment_factor = 0.9"
			        			    owner = PREV 
			        			}
			        			create_unit = {
			        			    division = "name = \"Tercer Voluntarios Argentinos\" division_template = \"Voluntarios Argentinos\" start_experience_factor = 0.5 start_equipment_factor = 0.7"
			        			    owner = PREV 
			        			}
			        		}
			        	}
			        }
				}
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			set_cosmetic_tag = CHL_mapuche_state	

			IF = {
				limit = {
					has_country_flag = CHL_manuel_manquilef_will_lead_the_mapuche
				}
				promote_character = {
					character = CHL_manuel_manquilef 
					ideology = despotism 
				}
			}
			ELSE_IF = {
				limit = {
					has_country_flag = CHL_esteban_romero_sandoval_will_lead_the_mapuche
				}
				promote_character = {
					character = CHL_esteban_romero_sandoval 
					ideology = despotism 
				}
			}
			ELSE_IF = {
				limit = {
					has_country_flag = CHL_venancio_conuepan_huenchual_will_lead_the_mapuche
				}
				promote_character = {
					character = CHL_venancio_huenchual 
					ideology = despotism 
				}
			}

			hidden_effect = {

				IF = {
					limit = {
						has_idea = idea_CHL_repubican_guard
					}
					remove_ideas = idea_CHL_repubican_guard
				}

				### Removing the now irrelevant Near Anarchic Society
				IF = {
					limit = {
						has_idea = idea_CHL_near_anarchic_society
					}
					remove_ideas = idea_CHL_near_anarchic_society
				}
				ELSE_IF = {
					limit = {
						has_idea = idea_CHL_near_anarchic_society_2
					}
					remove_ideas = idea_CHL_near_anarchic_society_2
				}
				ELSE_IF = {
					limit = {
						has_idea = idea_CHL_near_anarchic_society_3
					}
					remove_ideas = idea_CHL_near_anarchic_society_3
				}
				ELSE_IF = {
					limit = {
						has_idea = idea_CHL_near_anarchic_society_4
					}
					remove_ideas = idea_CHL_near_anarchic_society_4
				}

				set_country_flag = CHL_no_more_anarchy_flag

				### Removing the now irrelevant Mapuche Conflict
				IF = {
					limit = {
						has_idea = CHL_the_mapuche_conflict_rebellion
					}
					remove_ideas = CHL_the_mapuche_conflict_rebellion
				}
				ELSE_IF = {
					limit = {
						has_idea = CHL_the_mapuche_conflict_much_worse
					}
					remove_ideas = CHL_the_mapuche_conflict_much_worse
				}
				ELSE_IF = {
					limit = {
						has_idea = CHL_the_mapuche_conflict_worse
					}
					remove_ideas = CHL_the_mapuche_conflict_worse
				}
				ELSE_IF = {
					limit = {
						has_idea = CHL_the_mapuche_conflict
					}
					remove_ideas = CHL_the_mapuche_conflict
				}
				ELSE_IF = {
					limit = {
						has_idea = CHL_the_mapuche_conflict_calmed
					}
					remove_ideas = CHL_the_mapuche_conflict_calmed
				}
				ELSE_IF = {
					limit = {
						has_idea = CHL_the_mapuche_conflict_near_gone
					}
					remove_ideas = CHL_the_mapuche_conflict_near_gone
				}
				ELSE_IF = {
					limit = {
						has_idea = CHL_mapuche_conflict_done
					}
					remove_ideas = CHL_mapuche_conflict_done
				}

				set_country_flag = CHL_no_more_mapuche_conflict


				set_capital = {
					state = 950
					remember_old_capital = no
				}

				add_victory_points = {
					province = 5121
					value = 8
				}

				950 = {
					add_extra_state_shared_building_slots = 4
					add_building_construction = {
						type = arms_factory
						level = 2
						instant_build = yes
					}	
				}

				add_manpower = 20000

				add_command_power = 50

				IF = {
					limit = {
						has_completed_focus = CHL_undermine_the_carabineros_de_chile
					}
					army_experience = 25
					add_war_support = 0.05
				}

				set_party_name = {
				    ideology = neutrality
				    long_name = CHL_mapuche_party_long
				    name = CHL_mapuche_party
				}

				division_template = {
				    name = "Los Insurgentes Mapuche de Esteban Romero Sandoval"
				    is_locked = no
				    division_names_group = SPR_INF_01
				    override_model = CHL_infantry_alt_0_entity
				    priority = 1
				    template_counter = 83
				    regiments = {
				        infantry = { x = 0 y = 0 } 
				        infantry = { x = 0 y = 1 } 
				        infantry = { x = 0 y = 2 }
				        infantry = { x = 1 y = 0 }  
				        infantry = { x = 1 y = 1 } 
				        infantry = { x = 1 y = 2 } 
				    }
				} 
				random_state = {
					limit = {
						OR = {
							state = 950
							state = 949
							state = 507
							state = 953
							state = 954
							state = 955
							state = 512
						}
						is_controlled_by = ROOT
					}
					create_unit = {
					    division = "name = \"Los Insurgentes Primeros de Mapuche de Esteban Romero Sandoval\" division_template = \"Los Insurgentes Mapuche de Esteban Romero Sandoval\" start_experience_factor = 0.5 start_equipment_factor = 0.8"
					    owner = ROOT 
					}
					create_unit = {
					    division = "name = \"Los Insurgentes Segundo de Mapuche de Esteban Romero Sandoval\" division_template = \"Los Insurgentes Mapuche de Esteban Romero Sandoval\" start_experience_factor = 0.5 start_equipment_factor = 0.8"
					    owner = ROOT 
					}
				}

				division_template = {
				    name = "Guerreros Abajinos"
				    is_locked = no
				    division_names_group = SPR_INF_01
				    override_model = CHL_infantry_alt_1_entity
				    priority = 1
				    template_counter = 85
				    regiments = {
				        infantry = { x = 0 y = 0 } 
				        infantry = { x = 0 y = 1 } 
				        infantry = { x = 1 y = 0 }  
				        infantry = { x = 1 y = 1 } 
				    }
				} 
				random_state = {
					limit = {
						OR = {
							state = 950
							state = 949
							state = 507
							state = 953
							state = 954
							state = 955
							state = 512
						}
						is_controlled_by = ROOT
					}
					create_unit = {
					    division = "name = \"Guerreros Abajinos\" division_template = \"Guerreros Abajinos\" start_experience_factor = 0.5 start_equipment_factor = 1"
					    owner = ROOT 
					}
				}

				division_template = {
				    name = "Guerreros de Rapa Nui de Valentino Riroroko Tuki"
				    is_locked = no
				    division_names_group = SPR_INF_01
				    override_model = CHL_infantry_alt_0_entity
				    priority = 1
				    template_counter = 87
				    regiments = {
				        infantry = { x = 0 y = 0 } 
				        infantry = { x = 0 y = 1 } 
				        infantry = { x = 1 y = 0 }  
				        infantry = { x = 1 y = 1 } 
				    }
			    	support = {
			           	recon = { x = 0 y = 0 }
			    	}
				} 
				random_state = {
					limit = {
						state = 948
						is_controlled_by = ROOT
					}
					create_unit = {
					    division = "name = \"Guerreros de Rapa Nui de Valentino Riroroko Tuki\" division_template = \"Guerreros de Rapa Nui de Valentino Riroroko Tuki\" start_experience_factor = 0.5 start_equipment_factor = 1"
					    owner = ROOT 
					}
				}

				IF = {
					limit = {
						has_country_flag = CHL_formed_local_defense_groups_flag
					}
					add_timed_idea = {
						idea = CHL_local_mapuche_defense_groups
						days = 360
					}	
				}

			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = CHL_guido_beck
			show_ideas_tooltip = CHL_rayen_quitral
			show_ideas_tooltip = CHL_gabriela_mistral
			show_ideas_tooltip = CHL_manuel_manquilef
			show_ideas_tooltip = CHL_venancio_huenchual
			show_ideas_tooltip = CHL_esteban_romero_sandoval
			show_ideas_tooltip = CHL_manuel_neculman
			show_ideas_tooltip = CHL_carlos_huayquinir
		}
	}

	### REVISE THE SOCIAL CLASSES
	focus = {
		id = CHL_revise_the_social_classes

		icon = GFX_focus_CHL_revise_the_social_classes

		relative_position_id = CHL_avenge_the_pacification_of_araucania
		x = -2
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_avenge_the_pacification_of_araucania
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available = {
			has_government = neutrality
		}

		search_filters = { FOCUS_FILTER_MANPOWER FOCUS_FILTER_STABILITY FOCUS_FILTER_INDUSTRY }
		
		completion_reward = {
			add_ideas = CHL_mapuche_social_classes
			custom_effect_tooltip = CHL_skip_one_line_tt
			remove_ideas = idea_CHL_the_Hacienda_inquilinaje_system
		}
	}

	### ADOPT MAPUNDUNGUN
	focus = {
		id = CHL_adopt_mapundungun

		icon = GFX_focus_generic_treaty

		relative_position_id = CHL_avenge_the_pacification_of_araucania
		x = 2
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_avenge_the_pacification_of_araucania
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
		}

		available = {
			has_government = neutrality
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY }
		
		completion_reward = {

			add_political_power = 75

			add_stability = 0.05

		}
	}

	### EMBRACE INDIGENOUS CORPORATISM
	focus = {
		id = CHL_embrace_indigenous_corporatism

		icon = GFX_focus_generic_industry_3

		relative_position_id = CHL_revise_the_social_classes
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_revise_the_social_classes
		}

		prerequisite = {
			focus = CHL_adopt_mapundungun
		}

		mutually_exclusive = {
			focus = CHL_expand_the_agricultural_field
		} 
		
		ai_will_do = {
			base = 1
		}

		available = {
			has_government = neutrality
		}

		search_filters = { FOCUS_FILTER_INDUSTRY }
		
		completion_reward = {

			every_core_state = {   
				limit = {
					is_owned_and_controlled_by = ROOT 
				}
				random_select_amount = 3
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}	
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_modify_mapuche_nationalism_ns_intro
			add_to_variable = { CHL_mapuche_nationalism_industrial_capacity_factory = 0.05 tooltip = industrial_capacity_factory_tt }
			add_to_variable = { CHL_mapuche_nationalism_industrial_capacity_dockyard = 0.05 tooltip = industrial_capacity_dockyard_tt }

		}
	}

	### EXPAND THE AGRICULTURAL FIELD
	focus = {
		id = CHL_expand_the_agricultural_field

		icon = GFX_focus_SOV_breadbasket_of_the_union

		relative_position_id = CHL_adopt_mapundungun
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_revise_the_social_classes
		}

		prerequisite = {
			focus = CHL_adopt_mapundungun
		}

		mutually_exclusive = {
			focus = CHL_embrace_indigenous_corporatism
		} 
		
		ai_will_do = {
			base = 1
		}

		available = {
			has_government = neutrality
			950 = {
				is_owned_and_controlled_by = ROOT
			}
		}

		search_filters = { FOCUS_FILTER_INDUSTRY }
		
		completion_reward = {

			950 = {
				add_extra_state_shared_building_slots = 4
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_modify_mapuche_nationalism_ns_intro
			add_to_variable = { CHL_mapuche_nationalism_consumer_goods_factor = -0.1 tooltip = consumer_goods_factor_tt }

		}
	}

	### FOCUS ON CATTLE AND WOOL
	focus = {
		id = CHL_focus_on_cattle_and_wool

		icon = GFX_focus_CHL_focus_on_cattle_and_wool

		relative_position_id = CHL_expand_the_agricultural_field
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_expand_the_agricultural_field
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available = {
			has_government = neutrality
			has_civil_war = no
		}
		
		completion_reward = {

			add_ideas = CHL_cattle_and_wool

		}
	}

	### ENLARGE THE TEXTILE INDUSTRIES
	focus = {
		id = CHL_enlarge_the_textile_industries

		icon = GFX_focus_CHL_enlarge_the_textile_industries

		relative_position_id = CHL_invite_french_aristocracy
		x = 3
		y = 2
		cost = 10

		offset = {
			x = -7
			y = 0
			trigger = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
				has_completed_focus = CHL_address_the_mapuche_conflict
			}
		}

		offset = {
			x = -1
			y = 0
			trigger = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
				has_completed_focus = CHL_rule_by_decree
			}
		}

		prerequisite = {
			focus = CHL_embrace_indigenous_corporatism
			focus = CHL_invite_french_aristocracy
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available = {
			has_government = neutrality
			has_civil_war = no
		}

		search_filters = { FOCUS_FILTER_INDUSTRY }
		
		completion_reward = {

			every_core_state = {   
				limit = {
					is_owned_and_controlled_by = ROOT 
				}
				random_select_amount = 2
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}	
			}

		}
	}

	### SILVERWORKING
	focus = {
		id = CHL_silverworking

		icon = GFX_focus_CHL_silverworking

		relative_position_id = CHL_embrace_indigenous_corporatism
		x = 2
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_embrace_indigenous_corporatism
			focus = CHL_expand_the_agricultural_field
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available = {
			has_government = neutrality
			has_civil_war = no
		}

		search_filters = { FOCUS_FILTER_INDUSTRY }
		
		completion_reward = {

			custom_effect_tooltip = CHL_modify_mapuche_nationalism_ns_intro
			add_to_variable = { CHL_mapuche_nationalism_consumer_goods_factor = -0.15 tooltip = consumer_goods_factor_tt }

		}
	}

	### INCORPORATE MACHI INTO THE ARMY
	focus = {
		id = CHL_incorporate_machi_into_the_army

		icon = GFX_focus_CHL_incorporate_machi_into_the_army

		relative_position_id = CHL_silverworking
		x = -2
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_silverworking
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
		}

		available = {
			has_government = neutrality
		}

		search_filters = { FOCUS_FILTER_MANPOWER }
		
		completion_reward = {

			add_ideas = CHL_machi_in_the_army

		}
	}

	### THE PATAGONIAN GIANTS
	focus = {
		id = CHL_the_patagonian_giants

		icon = GFX_focus_CHL_the_patagonian_giants

		relative_position_id = CHL_incorporate_machi_into_the_army
		x = -5
		y = 1
		cost = 10

		offset = {
			x = 5
			y = 0
			trigger = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
				has_completed_focus = CHL_address_the_mapuche_conflict
			}
		}

		offset = {
			x = 3
			y = 0
			trigger = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
				has_completed_focus = CHL_rule_by_decree
			}
		}

		prerequisite = {
			focus = CHL_incorporate_machi_into_the_army
			focus = CHL_a_new_araucanian_noble_class
			#focus = CHL_invite_french_academia
			#focus = CHL_state_catholicism
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available = {
			has_government = neutrality
			has_civil_war = no
		}

		search_filters = { FOCUS_FILTER_MANPOWER FOCUS_FILTER_POLITICAL }
		
		completion_reward = {

			add_manpower = 30000

			ARG = {
				add_opinion_modifier = {
					target = ROOT
					modifier = CHL_claims_patagonia
				}	
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			add_ideas = CHL_patagonian_giants

		}
	}

	### TAKING BACK PATAGONIA
	focus = {
		id = CHL_taking_back_patagonia

		dynamic = yes

		icon = {
			trigger = {
				NOT = {
					has_completed_focus = CHL_address_the_mapuche_conflict
				}
			}
			value = GFX_focus_CHL_taking_back_patagonia_monarchist
		}
		icon = {
			trigger = {
				has_completed_focus = CHL_address_the_mapuche_conflict
			}
			value = GFX_focus_CHL_taking_back_patagonia_mapuche
		} 

		relative_position_id = CHL_the_patagonian_giants
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_the_patagonian_giants
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available = {
			is_subject = no
			has_government = neutrality
		}

		will_lead_to_war_with = ARG

		search_filters = { FOCUS_FILTER_ANNEXATION }
		
		completion_reward = {

			every_state = {
				limit = {
					NOT = {
						is_core_of = ROOT
					}
					OR = {	
						state = 953
						state = 507
						state = 949
						state = 954
						state = 955
						state = 512
						state = 950
					}
				}
				add_core_of = ROOT
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			IF = {
				limit = {
					ARG = {
						exists = yes
						has_civil_war = yes 
						NOT = {
							is_in_faction_with = ROOT
						}
					}
					any_country = {
						original_tag = ARG
						OR = {
							owns_state = 512
							owns_state = 955
							owns_state = 954
							owns_state = 953
						}
					}
				}
				every_country = {
					limit = {
						original_tag = ARG
					}
					ROOT = {
						declare_war_on = {
							target = PREV
							type = take_core_state
						}	
					}
				}
				ELSE = {
					every_country = {
						limit = {
							NOT = {
								OR = {
									original_tag = CHL
									is_in_faction_with = CHL
									is_subject_of = CHL
								}
							}
							OR = {
								owns_state = 512
								owns_state = 955
								owns_state = 954
								owns_state = 953
							}
						}
						ROOT = {
							declare_war_on = {
								target = PREV
								type = take_core_state
							}	
						}
					}
				}
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			IF = {
				limit = {
					has_completed_focus = CHL_address_the_mapuche_conflict
				}
				add_timed_idea = {
					idea = CHL_mapuche_ancestral_resistance_good
					days = 1095
				}
			}

		}
	}

	### SATELLITE KINGDOMS
	focus = {
		id = CHL_satellite_kingdoms

		icon = GFX_goal_tfv_strengthen_commonwealth_ties

		relative_position_id = CHL_an_imperial_capital
		x = -1
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_an_imperial_capital
		}

		prerequisite = {
			focus = CHL_taking_back_patagonia
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
		}

		available = {
			has_government = neutrality
			is_subject = no
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_MANPOWER }
		
		completion_reward = { 

			add_political_power = 50

			custom_effect_tooltip = CHL_satellite_kingdoms_tt

			custom_effect_tooltip = CHL_skip_one_line_tt

			add_ideas = CHL_puppeteering_idea

		}
	}

	### SECURE THE BRAZILIAN BORDER
	focus = {
		id = CHL_secure_the_brazilian_border

		icon = GFX_goal_generic_territory_or_war

		relative_position_id = CHL_an_imperial_capital
		x = 1
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_an_imperial_capital
		}

		prerequisite = {
			focus = CHL_taking_back_patagonia
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
		}

		available = {
			has_government = neutrality
			is_subject = no
			OR = {
				PAR = {
					exists = yes
				}
				BOL = {
					exists = yes
				}
				URG = {
					exists = yes
				}
			}
		}

		bypass = {
			AND = {
				PAR = {
					exists = no
				}
				BOL = {
					exists = no
				}
				URG = {
					exists = no
				}
			}
		}

		search_filters = { FOCUS_FILTER_ANNEXATION }

		will_lead_to_war_with = PAR
		will_lead_to_war_with = BOL
		will_lead_to_war_with = URG
		
		completion_reward = {

			IF = {
				limit = {
					PAR = {
						exists = yes
					}
				}
				create_wargoal = {
					type = puppet_wargoal_focus
					target = PAR
				}	
			}

			IF = {
				limit = {
					BOL = {
						exists = yes
					}
				}
				create_wargoal = {
					type = puppet_wargoal_focus
					target = BOL
				}	
			}

			IF = {
				limit = {
					URG = {
						exists = yes
					}
				}
				create_wargoal = {
					type = puppet_wargoal_focus
					target = URG
				}	
			}
			

		}
	}

	### A NEW EMPIRE OF BRAZIL
	focus = {
		id = CHL_a_new_empire_of_brazil

		icon = GFX_focus_CHL_a_new_empire_of_brazil

		relative_position_id = CHL_satellite_kingdoms
		x = -1
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_satellite_kingdoms
		}

		prerequisite = {
			focus = CHL_secure_the_brazilian_border
		}

		mutually_exclusive = {
		} 
		
		will_lead_to_war_with = BRA
		will_lead_to_war_with = POR

		ai_will_do = {
			base = 2
		}

		available = {
			has_government = neutrality
			is_subject = no
			OR = {
				BRA = {
					exists = yes
					OR = {
						AND = {
							is_subject_of = ROOT
							is_in_faction_with = ROOT
						}
						NOT = {
							is_in_faction_with = ROOT
						}
					}
				}
				AND = {
					POR = {
						exists = yes
						owns_state = 500
						NOT = {
							is_in_faction_with = ROOT
						}
					}
				}
			}
			
		}

		bypass = {
			BRA = {
				is_in_faction_with = ROOT
				NOT = {
					is_subject_of = ROOT
				}
			}
		}

		search_filters = { FOCUS_FILTER_ANNEXATION }
		
		completion_reward = {

			every_state = {
				limit = {
					NOT = {
						OR = {
							is_claimed_by = ROOT
							is_core_of = ROOT
						}
					}
					OR = {
						is_core_of = BRA
						AND = {
							is_on_continent = south_america
							is_core_of = POR
						}
					}
				}
				add_claim_by = ROOT
			}

			IF = {
				limit = {
					BRA = {
						exists = yes
					}
				}
				create_wargoal = {
					type = take_claimed_state
					target = BRA
				}	
			}
			ELSE_IF = {
				limit = {
					BRA = {
						exists = no
					}
					POR = {
						exists = yes
						owns_state = 500
					}
				}
				create_wargoal = {
					type = take_claimed_state
					target = POR
				}
			}
			unlock_decision_tooltip = {
				decision = CHL_integrate_rio_grande_do_sul
				show_effect_tooltip = yes # default is no
				show_modifiers = no # default is no
			}
			#custom_effect_tooltip = CHL_skip_one_line_tt

			#custom_effect_tooltip = CHL_a_new_empire_of_brazil_tt

		}
	}

	### RULER OF THE INCA
	focus = {
		id = CHL_ruler_of_the_inca

		icon = GFX_focus_CHL_ruler_of_the_inca

		relative_position_id = CHL_a_new_empire_of_brazil
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_a_new_empire_of_brazil
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
			has_government = neutrality
			is_subject = no
			OR = {
				PRU = {
					exists = yes
				}
				ECU = {
					exists = yes
				}
			}
		}

		search_filters = { FOCUS_FILTER_ANNEXATION }
		
		will_lead_to_war_with = PRU
		will_lead_to_war_with = ECU

		completion_reward = {
			IF = {
				limit = {
					PRU = {
						exists = yes
					}
				}
				create_wargoal = {
					type = annex_everything
					target = PRU
				}	
			}

			IF = {
				limit = {
					ECU = {
						exists = yes
					}
				}
				create_wargoal = {
					type = annex_everything
					target = ECU
				}	
			}
		}
	}

	### A FRENCH ALLIANCE
	focus = {
		id = CHL_a_french_alliance

		icon = GFX_focus_CHL_a_french_alliance

		relative_position_id = CHL_secure_the_brazilian_border
		x = -1
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_secure_the_brazilian_border
		}

		mutually_exclusive = {
			focus = CHL_return_to_the_continent
		} 
		
		ai_will_do = {
			base = 5
		}

		available = {
			has_government = neutrality
			FRA = {
				exists = yes
				has_government = neutrality
				is_subject = no
				NOT = {
					has_war_with = ROOT
				}
				OR = {
					is_in_faction = no
					is_faction_leader = yes
				}
			}
			is_in_faction = no
			is_subject = no
		}

		search_filters = { FOCUS_FILTER_POLITICAL }
		
		completion_reward = {

			FRA = {
				country_event = {
					id = CHL_political_events.86
					days = 2
				}	
			}
		}
	}

	### RETURN TO THE CONTINENT
	focus = {
		id = CHL_return_to_the_continent

		icon = GFX_focus_attack_france

		relative_position_id = CHL_secure_the_brazilian_border
		x = 1
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_secure_the_brazilian_border
		}

		mutually_exclusive = {
			focus = CHL_a_french_alliance
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available = {
			has_government = neutrality
			
			any_state = {
				is_core_of = FRA
				is_on_continent = europe
				NOT = {
					is_owned_by = ROOT
				}
			}

			is_subject = no
			
		}

		bypass = {
			any_owned_state = {
				is_core_of = FRA
				is_on_continent = europe
			}
		}

		search_filters = { FOCUS_FILTER_ANNEXATION }

		will_lead_to_war_with = FRA
		
		completion_reward = {

			create_wargoal = {
				type = annex_everything
				target = FRA
			}	

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_return_to_the_continent_tt

		}
	}

	### A JOINT INVASION OF MEXICO
	focus = {
		id = CHL_joint_invasion_of_mexico

		icon = GFX_focus_attack_mexico

		relative_position_id = CHL_a_french_alliance
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_a_french_alliance
		}

		mutually_exclusive = {
		} 

		ai_will_do = {
			base = 2.5
		}
		
		will_lead_to_war_with = MEX

		search_filters = { FOCUS_FILTER_ANNEXATION }

		available = {
			has_government = neutrality
			is_subject = no
			MEX = {
				exists = yes
				NOT = {
					OR = {
						is_subject_of = ROOT
						is_subject_of = FRA
					}
				}
			}
		}

		bypass = {
			MEX = {
				exists = no
				all_core_state = {
					is_controlled_by = ROOT
				}
			}
		}
		
		completion_reward = {

			every_state = {
				limit = {
					NOT = {
						OR = {
							state = 474
							state = 475
							state = 476
							state = 477
						}
					}
					is_core_of = MEX
				}
				add_claim_by = ROOT
			}

			every_state = {
				limit = {
					OR = {
						state = 474
						state = 475
						state = 476
						state = 477
					}
				}
				add_claim_by = FRA
			}

			ROOT = {
				declare_war_on = {
					target = MEX
					type = puppet_wargoal_focus
				}	
			}

		}

	}

	### CLAIM THE MEXICAN THRONE
	focus = {
		id = CHL_claim_the_mexican_throne

		icon = GFX_focus_CHL_claim_the_mexican_throne

		relative_position_id = CHL_return_to_the_continent
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_return_to_the_continent
		}

		mutually_exclusive = {
		} 
		
		will_lead_to_war_with = MEX

		search_filters = { FOCUS_FILTER_ANNEXATION }

		available = {
			has_government = neutrality
			is_subject = no
			MEX = {
				exists = yes
				NOT = {
					is_subject_of = ROOT
				}
			}
		}

		bypass = {
			MEX = {
				exists = no
				all_core_state = {
					is_controlled_by = ROOT
				}
			}
		}

		ai_will_do = {
			base = 0.5
		}
		
		completion_reward = {

			create_wargoal = {
				type = annex_everything
				target = MEX
			}	

			custom_effect_tooltip = CHL_skip_one_line_tt
			unlock_decision_tooltip = {
				decision = CHL_integrate_the_kingdom_of_mexico
				show_effect_tooltip = yes # default is no
				show_modifiers = no # default is no
			}

		}
	}

	### THE STRAIGHT LINE
	focus = {
		id = CHL_the_straight_line

		icon = GFX_focus_CHL_the_straight_line 

		relative_position_id = CHL_joint_invasion_of_mexico
		x = -1
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_joint_invasion_of_mexico
			focus = CHL_claim_the_mexican_throne
		}

		mutually_exclusive = {
			focus = CHL_je_suis_le_deluge
		} 
		
		ai_will_do = {
			base = 2.5
		}

		available = {
			has_government = neutrality
			has_completed_focus = CHL_ibanez_as_prime_minister
			has_country_leader = {
				ruling_only = yes
				character = CHL_antoine_iii
			}	
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_POLITICAL_CHARACTER }
		
		completion_reward = {

			custom_effect_tooltip = CHL_the_straight_line_tt

			custom_effect_tooltip = CHL_skip_one_line_tt

			set_cosmetic_tag = CHL_new_fatherland

			hidden_effect = {
				retire_country_leader = yes

				add_country_leader_role  = {
					character = CHL_carlos_ibanez
				    promote_leader = yes
				    country_leader = {
				        ideology = despotism
				        expire = "1965.1.1.1"
				        traits = { JUNO_king_of_chile }
				    }
				}

				CHL_carlos_ibanez = {
					set_portraits = {
						civilian = {
							large = GFX_portrait_CHL_carlos_ibanez_king
							small = GFX_portrait_CHL_carlos_ibanez_king_small
						}
					}
				}
			}

			hidden_effect = {
				set_party_name = {
				    ideology = neutrality
				    name = CHL_straight_line_party
				    long_name = CHL_straight_line_party_long
				}
			}

		}
	}

	### JE SUIS LE DELUGE
	focus = {
		id = CHL_je_suis_le_deluge

		icon = GFX_focus_fra_le_deluge

		relative_position_id = CHL_joint_invasion_of_mexico
		x = 1
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_joint_invasion_of_mexico
			focus = CHL_claim_the_mexican_throne
		}

		mutually_exclusive = {
			focus = CHL_the_straight_line
		} 
		
		ai_will_do = {
			base = 2.5
		}

		available = {
			has_government = neutrality
			is_subject = no
			has_completed_focus = CHL_an_absolute_monarchy
			has_country_leader = {
				ruling_only = yes
				character = CHL_antoine_iii
			}	
		}

		search_filters = { FOCUS_FILTER_STABILITY FOCUS_FILTER_WAR_SUPPORT }
		
		completion_reward = {

			IF = {
				limit = {
					NOT = {
						has_country_leader = {
							ruling_only = yes
							character = CHL_antoine_iii
						}	
					}
				}
				custom_effect_tooltip = CHL_je_suis_le_deluge_tt
			}
			
			CHL_antoine_iii = {
				add_country_leader_trait = {
				    ideology = despotism
				    trait = emperor_of_france_and_the_americas
				}
			}
		}
	}

	### A GRAND ARMADA
	focus = {
		id = CHL_a_grand_armada

		icon = GFX_focus_generic_navy_battleship2

		relative_position_id = CHL_the_straight_line
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_the_straight_line
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2.5
		}

		available = {	
			any_owned_state = {
				is_controlled_by = ROOT
				is_coastal = yes
			}
		}

		search_filters = { FOCUS_FILTER_INDUSTRY FOCUS_FILTER_NAVY_XP }
		
		completion_reward = {

			navy_experience = 50

			add_ideas = CHL_the_grand_chilean_armada

		}
	}

	### RECLAIMING QUEBEC
	focus = {
		id = CHL_reclaiming_quebec

		icon = GFX_goal_generic_major_war

		relative_position_id = CHL_je_suis_le_deluge
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_je_suis_le_deluge
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2.5
		}

		available = {	
			is_subject = no
			NOT = {
				OR = {
					QUE = {
						exists = yes
					}
					AND = {
						controls_state = 466
						controls_state = 861
						controls_state = 860
						controls_state = 863
						controls_state = 862
						controls_state = 468
					}
				}
			}
		}

		search_filters = { FOCUS_FILTER_ANNEXATION FOCUS_FILTER_MANPOWER }
		
		completion_reward = {

			every_state = {
				limit = {
					OR = {
						state = 466
						state = 861
						state = 860
						state = 863
						state = 862
						state = 468
					}
					NOT = {
						is_owned_by = ROOT
					}
				}
				add_claim_by = ROOT
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			every_country = {
				limit = {
					OR = {
						controls_state = 466
						controls_state = 861
						controls_state = 860
						controls_state = 863
						controls_state = 862
						controls_state = 468
					}
					NOT = {
						OR = {
							original_tag = CHL
							is_subject_of = ROOT
							has_war_with = ROOT
							is_in_faction_with = ROOT
						}
					}
				}
				ROOT = {
					create_wargoal = {
						type = take_claimed_state
						target = PREV
					}
				}
			}

			#custom_effect_tooltip = CHL_skip_one_line_tt

			unlock_decision_tooltip = {
				decision = CHL_integrate_quebec
				show_effect_tooltip = yes # default is no
				show_modifiers = yes # default is no
			}

		}
	}
 
	### HONOR THE LEGACY OF CAUPOLICAN 
	focus = { 
		id = CHL_honor_the_legacy_of_caupolican

		icon = GFX_focus_CHL_honor_the_legacy_of_caupolican

		relative_position_id = CHL_silverworking
		x = 0
		y = 2
		cost = 10

		prerequisite = {
			focus = CHL_silverworking
		}

		mutually_exclusive = {
		}   
		
		ai_will_do = {
			base = 2
		}

		available = {
			has_government = neutrality
		} 

		search_filters = { FOCUS_FILTER_WAR_SUPPORT }
		
		completion_reward = {

			add_ideas = CHL_legacy_of_caupolican

		}
	}

	### THE UNION OF AMERICAN INDIGENOUS PEOPLES
	focus = {
		id = CHL_union_of_american_indigenous_peoples

		icon = GFX_focus_spr_torchbearers_of_tomorrow

		relative_position_id = CHL_honor_the_legacy_of_caupolican
		x = 0
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_honor_the_legacy_of_caupolican
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
		}
		available_if_capitulated = no
		available = {
			has_government = neutrality
			is_subject = no
		}

		search_filters = { FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_POLITICAL }
		
		completion_reward = {

			IF = {
				limit = {
					is_in_faction = yes
				}
				leave_faction = yes 
			}

			add_political_power = 50
			add_war_support = 0.05

			IF = {
				limit = {
					has_dlc = "No Compromise, No Surrender"
				}
				set_rule = { can_create_factions = yes }
				create_faction_from_template = faction_template_CHL_indigenous_union
				add_faction_initiative = 1
			}
			ELSE = {
				set_rule = { can_create_factions = yes }
				create_faction = CHL_indigenous_union
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_union_of_american_indigenous_peoples_tt

			hidden_effect = {
				set_rule = { can_send_volunteers = yes }
				set_rule = { can_create_factions = yes }
				set_rule = { can_join_factions = no }
			}

		}
	}

	### CRUSADE AGAINST IMPERIALSIM
	focus = {
		id = CHL_crusade_against_imperialism

		icon = GFX_goal_tfv_saf_anti_colonialist_crusade

		relative_position_id = CHL_union_of_american_indigenous_peoples
		x = 0
		y = 2
		cost = 10

		prerequisite = {
			focus = CHL_union_of_american_indigenous_peoples
		}

		prerequisite = {
			focus = CHL_taking_back_patagonia
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available = {
			all_owned_state = {
				is_controlled_by = ROOT
			}  
			is_subject = no
		}

		search_filters = { FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_POLITICAL FOCUS_FILTER_ANNEXATION }
		
		completion_reward = {

			add_ideas = CHL_crusade_against_imperialism_idea

			custom_effect_tooltip = CHL_skip_one_line_tt

			every_country = {
				limit = {
					OR = {
						AND = {
							NOT = {
								has_government = communism
							}
							OR = {
								original_tag = FRA
								original_tag = ENG
								original_tag = HOL
							}
						}
						capital_scope = {
							is_on_continent = south_america
						}
						capital_scope = {
							is_on_continent = north_america
						}
					}
					NOT = {
						OR = {
							tag = ROOT
							is_subject_of = ROOT
							is_in_faction_with = ROOT
						}
					}
				}
				add_opinion_modifier = {
					target = ROOT
					modifier = CHL_crusading_against_imperialism
				}	
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_crusade_against_imperialism_tt

			hidden_effect = {
				news_event = { 
					id = CHL_news_events.4 
					days = 2
					random_days = 5
				}
			}
		}
	}

	### UNIFIED BY WILL
	focus = {
		id = CHL_unified_by_will

		icon = GFX_goal_generic_improve_relations

		relative_position_id = CHL_crusade_against_imperialism
		x = -2
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_crusade_against_imperialism
		}

		mutually_exclusive = {
			focus = CHL_unified_in_spirit
		} 
		
		ai_will_do = {
			base = 1
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_ANNEXATION }

		available = {
			any_country = {
				is_subject_of = ROOT
				OR = {
					tag = GAR
					tag = INC
					tag = MIS
					tag = MAY
					tag = INU
					tag = CHR
					tag = ITZ
					tag = NAH
					tag = IAS
					tag = HAW
					tag = TAH
					tag = SAM
					tag = RAP
					original_tag = BOL
					original_tag = SUR
					original_tag = BRA
					original_tag = MEX
					original_tag = USA
					original_tag = CAN
				}
			}
		}
		
		completion_reward = {

			add_political_power = 100

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_annex_and_core_all_american_subjects
			every_country = {
				limit = {
					is_subject_of = ROOT
					OR = {
						tag = GAR
						tag = INC
						tag = MIS
						tag = MAY
						tag = INU
						tag = CHR
						tag = ITZ
						tag = NAH
						tag = IAS
						tag = HAW
						tag = TAH
						tag = RAP
						tag = SAM
						tag = RAP
						original_tag = BOL
						original_tag = SUR
						original_tag = BRA
						original_tag = MEX
						original_tag = USA
						original_tag = CAN
					}
				}
				ROOT = {
					annex_country = {
						target = PREV
						transfer_troops = yes
					}	
				}
				every_state = {
					limit = {
						is_core_of = PREV
					}
					add_core_of = ROOT
				}
			}

			hidden_effect = {
				set_cosmetic_tag = CHL_amerindian_federation
			}

		}
	}

	### UNIFIED IN SPIRIT
	focus = {
		id = CHL_unified_in_spirit

		icon = GFX_goal_generic_military_sphere

		relative_position_id = CHL_crusade_against_imperialism
		x = 2
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_crusade_against_imperialism
		}

		mutually_exclusive = {
			focus = CHL_unified_by_will
		} 
		
		ai_will_do = {
			base = 1.5
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY FOCUS_FILTER_WAR_SUPPORT }

		available = {
			any_country = {
				is_subject_of = ROOT
				OR = {
					tag = GAR
					tag = INC
					tag = MIS
					tag = MAY
					tag = INU
					tag = CHR
					tag = ITZ
					tag = NAH
					tag = IAS
					tag = HAW
					tag = TAH
					tag = SAM
					tag = RAP
					original_tag = BOL
					original_tag = SUR
					original_tag = BRA
					original_tag = MEX
					original_tag = USA
					original_tag = CAN
				}
			}
		}
		
		completion_reward = {

			add_ideas = CHL_unified_in_spirit_idea

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_unified_in_spirit_tt
			every_country = { 
				limit = {
					is_subject_of = ROOT
					OR = {
						tag = GAR
						tag = INC
						tag = MIS 
						tag = MAY
						tag = INU
						tag = CHR
						tag = ITZ
						tag = NAH
						tag = IAS
						tag = HAW
						tag = TAH
						tag = RAP
						tag = SAM
						original_tag = BOL
						original_tag = SUR
						original_tag = BRA
						original_tag = MEX
						original_tag = USA
						original_tag = CAN
					}
				}
				add_ideas = CHL_unified_in_spirit_idea
			}

		}
	}

	### SUPPRESS THE NACISTAS
	focus = {
		id = CHL_suppress_the_nacistas

		icon = GFX_focus_CHL_suppress_the_nacistas

		relative_position_id = CHL_endorse_the_constitution
		x = -2
		y = 1
		cost = 5

		#offset = {
		#	x = -7
		#	y = 0
		#	trigger = {
		#		has_game_rule = {
		#			rule = obsolete_focus_branches_visibility
		#			option = HIDE
		#		}
		#		has_completed_focus = CHL_look_to_tradition
		#	}
		#}

		prerequisite = {
			focus = CHL_endorse_the_constitution  
			#focus = CHL_look_to_tradition 
		}

		mutually_exclusive = {
			#focus = CHL_use_the_fascist_movement
		} 
		
		ai_will_do = {
			base = 1
			modifier = {
				factor = 2
				has_completed_focus = CHL_endorse_the_constitution
			}
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY FOCUS_FILTER_HISTORICAL }

		available = {
			NOT = {
				OR = {
					has_global_flag = nacista_coup_attempt_happened
					has_government = fascism
				}
			}	
		}
		
		completion_reward = {

			add_popularity = {
				ideology = fascism
				popularity = -0.05
			}	

			add_stability = 0.05

			custom_effect_tooltip = CHL_suppress_the_nacistas_tt

			custom_effect_tooltip = CHL_skip_one_line_tt

			unlock_decision_tooltip = { decision = CHL_expand_the_carabineros show_effect_tooltip = yes }

		}
	}

	### USE THE FASCIST MOVEMENT
	#focus = {
	#	id = CHL_use_the_fascist_movement
	#	icon = GFX_focus_ITA_generic_fascist_workers
	#	relative_position_id = CHL_look_to_tradition
	#	x = 2
	#	y = 1
	#	cost = 5
	#	#offset = {
	#	#	x = -7
	#	#	y = 0
	#	#	trigger = {
	#	#		has_game_rule = {
	#	#			rule = obsolete_focus_branches_visibility
	#	#			option = HIDE
	#	#		}
	#	#		has_completed_focus = CHL_look_to_tradition
	#	#	}
	#	#}
	#	prerequisite = { 
	#		focus = CHL_look_to_tradition  
	#		#focus = CHL_look_to_tradition 
	#	}
	#	mutually_exclusive = {
	#		#focus = CHL_suppress_the_nacistas 
	#	} 
	#	
	#	ai_will_do = {
	#		base = 1
	#		modifier = {
	#			factor = 1.5
	#			has_completed_focus = CHL_look_to_tradition
	#		}
	#		modifier = {
	#			factor = 0.5
	#			has_completed_focus = CHL_endorse_the_constitution
	#		}
	#	}
	#	search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_MILITARY_CHARACTER FOCUS_FILTER_POLITICAL_CHARACTER }
	#	available = {
	#		NOT = {
	#			OR = {
	#				has_global_flag = nacista_coup_attempt_happened
	#				has_government = fascism
	#				has_completed_focus = CHL_denounce_the_anarchy
	#				has_completed_focus = CHL_avenge_the_pacification_of_araucania
	#				has_completed_focus = CHL_crown_antoine_as_sovereign_king
	#			}
	#		}
	#	}
	#	
	#	completion_reward = {
	#		add_political_power = 75
	#		add_war_support = 0.05
	#		custom_effect_tooltip = CHL_use_the_fascist_movement_tt
	#		custom_effect_tooltip = CHL_skip_one_line_tt
	#	}
	#}

	### REESTABLISH THE REPUBLICAN GUARD
	focus = {
		id = CHL_reestablish_the_republican_guard

		icon = GFX_focus_SWE_varnplikt

		relative_position_id = CHL_policies_of_arturo_alessandri
		x = 3
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_policies_of_arturo_alessandri
		}
		prerequisite = {
			#focus = CHL_suppress_the_nacistas  
			#focus = CHL_use_the_fascist_movement 
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
			modifier = {
				factor = 5
				has_war = yes
			}
		}

		available = {
			has_country_leader = { 
			    character = CHL_arturo_alessandri
			    ruling_only = yes
			}
			NOT = {
				has_idea = idea_CHL_repubican_guard
			}
			has_war = yes
		}

		search_filters = { FOCUS_FILTER_MANPOWER }
		
		completion_reward = {

			add_ideas = idea_CHL_repubican_guard

			custom_effect_tooltip = CHL_skip_one_line_tt

			hidden_effect = {
				division_template = {
				    name = "Republican Guard"
				    is_locked = yes
				    force_allow_recruiting = yes
				    division_names_group = SPR_INF_01
				    priority = 0
				    regiments = {
				        militia = { x = 0 y = 0 } 
				        militia = { x = 0 y = 1 }
				        militia = { x = 0 y = 2 } 
				        militia = { x = 1 y = 0 } 
				        militia = { x = 1 y = 1 }
				    }
				} 
			}

			random_owned_controlled_state = {
				limit = {
					is_core_of = ROOT
					NOT = {
						state = 948
					}
				}
				create_unit = {
				    division = "name = \"Alessandri's First Republican Guard\" division_template = \"Republican Guard\" start_experience_factor = 0.5 start_equipment_factor = 0.8"
				    owner = ROOT 
				}
			}
			random_owned_controlled_state = {
				limit = {
					is_core_of = ROOT
					NOT = {
						state = 948
					}
				}
				create_unit = {
				    division = "name = \"Alessandri's Second Republican Guard\" division_template = \"Republican Guard\" start_experience_factor = 0.5 start_equipment_factor = 0.8"
				    owner = ROOT 
				}
			}
			random_owned_controlled_state = {
				limit = {
					is_core_of = ROOT
					NOT = {
						state = 948
					}
				}
				create_unit = {
				    division = "name = \"Alessandri's Third Republican Guard\" division_template = \"Republican Guard\" start_experience_factor = 0.5 start_equipment_factor = 0.8"
				    owner = ROOT 
				}
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			add_manpower = 6000
			

		}
	}

	### VOLUNTEERS TO THE REPUBLICANS
	focus = {
		id = CHL_volunteers_to_the_republicans

		icon = GFX_focus_intervention_spain_republic

		relative_position_id = CHL_policies_of_arturo_alessandri
		x = 1
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_policies_of_arturo_alessandri  
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

		available = {
			has_country_leader = { 
			    character = CHL_arturo_alessandri
			    ruling_only = yes
			}

			custom_trigger_tooltip = { #Need custom tt for non spawned civil war participant 
				tooltip = CHL_volunteers_to_the_republicans_tt
				country_exists = SPD
			}

			custom_trigger_tooltip = {
				tooltip = CHL_volunteers_to_the_republicans_tt_2
				any_country_with_original_tag = {
					original_tag_to_check = SPR # Add other triggers as needed
					NOT = {
						has_completed_focus = SPA_a_great_spain
						has_completed_focus = SPR_regional_defense_council_of_aragon
					}
				}
			}
			
			has_war = no
			SPR_scw_in_progress = yes
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_ARMY_XP FOCUS_FILTER_AIR_XP }
		
		completion_reward = {

			add_political_power = 100

			add_stability = -0.05

			custom_effect_tooltip = CHL_skip_one_line_tt

			add_relation_modifier = {
				target = SPD
				modifier = ETH_support_spain_static_modifier #this does not show up in the ui, is that intended or should there be an idea instead?
			}
			add_relation_rule_override = {
				target = SPD
				can_send_volunteers = yes
			}

			hidden_effect = {
				ROOT = {
					set_rule = { can_send_volunteers = yes }
					add_timed_idea = {
						idea = CHL_aid_SPR
						days = 730
					}
					add_ai_strategy = {
						type = send_volunteers_desire
						id = SPD
						value = 200
					}
				}
			}

		}
	}

	### PROP UP GUSTAVO ROSS
	focus = {
		id = CHL_prop_up_gustavo_ross

		icon = GFX_goal_generic_propaganda

		relative_position_id = CHL_policies_of_arturo_alessandri
		x = -1
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_policies_of_arturo_alessandri  
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
		}

		available = {
			has_country_leader = { 
			    character = CHL_arturo_alessandri
			    ruling_only = yes
			}
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY FOCUS_FILTER_POLITICAL_CHARACTER }
		
		completion_reward = {
			custom_effect_tooltip = propping_up_gustavo_ross_tt
		}
	}

	### CONSTRUCT THE ESTADIO NACIONAL
	focus = {
		id = CHL_construct_the_estadio_nacional

		icon = GFX_goal_generic_construct_civilian

		relative_position_id = CHL_policies_of_arturo_alessandri
		x = -3
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_policies_of_arturo_alessandri  
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2.5
			modifier = {
				factor = 0
				date > 1938.8.2
			}
		}

		available = {
			has_country_leader = { 
			    character = CHL_arturo_alessandri
			    ruling_only = yes
			}
			279 = {
				is_owned_and_controlled_by = ROOT
			}
		}

		search_filters = { FOCUS_FILTER_INDUSTRY FOCUS_FILTER_STABILITY FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_HISTORICAL }
		
		completion_reward = {

			279 = {
				add_extra_state_shared_building_slots = 3
			}

			CHL_anarchic_society_level_down = yes

		}
	}

	### ESTABLISH CORFO
	focus = {
		id = CHL_establish_corfo

		icon = GFX_focus_spa_the_spanish_miracle

		relative_position_id = CHL_1938_chilean_presidential_election
		x = -2
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_1938_chilean_presidential_election  
		}

		mutually_exclusive = {
			focus = CHL_work_towards_laissex_faire
		} 
		
		ai_will_do = {
			base = 2
			modifier = {
				factor = 0
				has_country_leader = { 
				    character = CHL_gustavo_ross_santa_maria
				    ruling_only = yes
				}	
			}
			modifier = {
				factor = 2
				has_country_leader = { 
				    character =  CHL_pedro_aguirre_cerda
				    ruling_only = yes
				}	
			}
			modifier = {
				factor = 1.5
				has_country_leader = { 
				    character = CHL_elias_lafertte_gavino
				    ruling_only = yes
				}	
			}
		}

		search_filters = { FOCUS_FILTER_INDUSTRY FOCUS_FILTER_HISTORICAL }

		available = {
		}
		
		completion_reward = {

			custom_effect_tooltip = CHL_modify_chilean_economy_ns_intro
			add_to_variable = { CHL_economy_local_resources_factor = 0.1 tooltip = local_resources_factor_tt }
			add_to_variable = { CHL_economy_production_speed_buildings_factor = 0.05 tooltip = production_speed_buildings_factor_tt }

			custom_effect_tooltip = CHL_skip_one_line_tt

			random_state = {
				limit = {
					is_capital = yes 
					is_owned_and_controlled_by = ROOT
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}	
			}

			custom_effect_tooltip = CHL_skip_one_line_tt
			custom_effect_tooltip = available_industrial_concern
			show_ideas_tooltip = CHL_corporacion_fomento_production

		}
	}

	### WORK TOWARDS LAISSEZ-FAIRE
	focus = {
		id = CHL_work_towards_laissex_faire

		icon = GFX_goal_generic_intelligence_exchange

		relative_position_id = CHL_1938_chilean_presidential_election
		x = 2
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_1938_chilean_presidential_election  
		}

		mutually_exclusive = {
			focus = CHL_establish_corfo
		} 
		
		ai_will_do = {
			base = 2
			modifier = {
				factor = 2
				has_country_leader = { 
				    character = CHL_gustavo_ross_santa_maria
				    ruling_only = yes
				}	
			}
			modifier = {
				factor = 0
				has_country_leader = { 
				    character = CHL_pedro_aguirre_cerda
				    ruling_only = yes
				}	
			}
			modifier = {
				factor = 0
				has_country_leader = { 
				    character = CHL_elias_lafertte_gavino
				    ruling_only = yes
				}	
			}
		}

		available = {
			NOT = {
				has_country_leader = { 
				    character = CHL_elias_lafertte_gavino
				    ruling_only = yes
				}
			}
		} 

		search_filters = { FOCUS_FILTER_INDUSTRY }
		
		completion_reward = {

			add_ideas = CHL_laissez_faire

		}
	}



	### LOW COST HOUSING
	focus = {
		id = CHL_low_cost_housing

		icon = GFX_focus_generic_low_cost_housing

		relative_position_id = CHL_establish_corfo
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_establish_corfo  
			focus = CHL_work_towards_laissex_faire
		}

		mutually_exclusive = {
			focus = CHL_privatize_national_industries
		} 
		
		ai_will_do = {
			base = 1.5
			modifier = {
				factor = 0.5
				has_country_leader = { 
				    character = CHL_gustavo_ross_santa_maria
				    ruling_only = yes
				}	
			}
			modifier = {
				factor = 0.8
				has_country_leader = { 
				    character = CHL_carlos_ibanez
				    ruling_only = yes
				}	
			}
			modifier = {
				factor = 0
				is_historical_focus_on = yes	
			}
			modifier = {
				factor = 2
				has_country_leader = { 
				    character = CHL_elias_lafertte_gavino
				    ruling_only = yes
				}	
			}
		}

		available = {
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY FOCUS_FILTER_MANPOWER FOCUS_FILTER_WAR_SUPPORT }
		
		completion_reward = {

			CHL_anarchic_society_level_down = yes

			CHL_mapuche_conflict_level_down = yes
		}
	}

	focus = {
		id = CHL_align_the_police

		icon = GFX_goal_generic_dangerous_deal

		relative_position_id = CHL_commence_the_counter_revolution
		x = 6
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_commence_the_counter_revolution
		}

		mutually_exclusive = {
		} 

		ai_will_do = {
			base = 1
		}

		allow_branch = {
			has_dlc = "La Resistance"
			IF = {
				limit = {
					has_game_rule = {
						rule = obsolete_focus_branches_visibility
						option = HIDE
					}
				}
				NOT = { 
					OR = {
						has_completed_focus = CHL_look_to_tradition
						has_completed_focus = CHL_endorse_the_constitution
					} 
				}
			}
		}

		#offset = {
		#	x = -3
		#	y = 0
		#	trigger = {
		#		has_game_rule = {
		#			rule = obsolete_focus_branches_visibility
		#			option = HIDE
		#		}
		#		has_completed_focus = CHL_denounce_the_anarchy
		#	}
		#}

		available = {
		}

		search_filters = { FOCUS_FILTER_ARMY_XP FOCUS_FILTER_STABILITY FOCUS_FILTER_POLITICAL_CHARACTER }
		
		completion_reward = {

			add_stability = 0.05
			add_war_support = 0.05

			IF = {
				limit = {
					has_intelligence_agency = no
				}
				create_intelligence_agency = yes
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = CHL_humberto_valdivieso

		}
	}

	### PRIVATIZE NATIONAL INDUSTRIES
	focus = {
		id = CHL_privatize_national_industries

		icon = GFX_focus_generic_industry_2

		relative_position_id = CHL_establish_corfo
		x = 4
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_establish_corfo  
			focus = CHL_work_towards_laissex_faire
		}

		mutually_exclusive = {
			focus = CHL_low_cost_housing
		} 
		
		ai_will_do = {
			base = 1.5
			modifier = {
				factor = 1.5
				has_country_leader = { 
				    character = CHL_gustavo_ross_santa_maria
				    ruling_only = yes
				}	
			}
			modifier = {
				factor = 2
				is_historical_focus_on = yes	
			}
			modifier = {
				factor = 0
				has_country_leader = { 
				    character = CHL_elias_lafertte_gavino
				    ruling_only = yes
				}	
			}
		}

		available = {
			NOT = {
				has_country_leader = { 
				    character = CHL_elias_lafertte_gavino
				    ruling_only = yes
				}
			}
		}

		search_filters = { FOCUS_FILTER_INDUSTRY FOCUS_FILTER_HISTORICAL }
		
		completion_reward = {
			random_core_state = {
				limit = {
					is_owned_and_controlled_by = ROOT
					NOT = {
						state = 948
					}
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}	
			}
		}
	}

	### STRENGTHEN THE INSTITUTO NACIONAL
	focus = {
		id = CHL_strengthen_instituto_nacional

		icon = GFX_focus_CHL_strengthen_instituto_nacional

		relative_position_id = CHL_low_cost_housing
		x = 2
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_low_cost_housing  
			focus = CHL_privatize_national_industries
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2.5
		}

		available = {
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_RESEARCH FOCUS_FILTER_HISTORICAL }
		
		completion_reward = {

			add_research_slot = 1

			custom_effect_tooltip = CHL_skip_one_line_tt 

			CHL_anarchic_society_level_down = yes
			
		}
	}

	### ENACT UNIVERSAL SUFFRAGE
	focus = {
		id = CHL_enact_universal_suffrage

		icon = GFX_focus_generic_universal_suffrage

		relative_position_id = CHL_low_cost_housing
		x = -1
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_low_cost_housing  
			focus = CHL_privatize_national_industries
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
			modifier = {
				factor = 0.5
				has_country_leader = { 
				    character = CHL_gustavo_ross_santa_maria
				    ruling_only = yes
				}	
			}
			modifier = {
				factor = 1.5
				has_country_leader = { 
				    character = CHL_carlos_ibanez
				    ruling_only = yes
				}	
			}
			modifier = {
				factor = 0
				is_historical_focus_on = yes	
			}
			modifier = {
				factor = 2
				has_country_leader = { 
				    character = CHL_elias_lafertte_gavino
				    ruling_only = yes
				}	
			}
		}

		available = {
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY FOCUS_FILTER_POLITICAL_CHARACTER }
		
		completion_reward = {
			add_stability = 0.05
			add_war_support = -0.1

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = CHL_elena_caffarena
			show_ideas_tooltip = CHL_maria_de_la_cruz
			show_ideas_tooltip = CHL_rayen_quitral
			show_ideas_tooltip = CHL_marta_vergara
		}
	}

	### HOST SPANISH REFUGEES
	focus = {
		id = CHL_host_spanish_refugees

		dynamic = yes

		icon = {
			trigger = {
				CHL_has_right_wing_government = yes
			}
			value = GFX_focus_intervention_spain_nationalists
		}
		icon = {
			trigger = {
				CHL_has_left_wing_government = yes
			}
			value = GFX_focus_generic_befriend_communist_spain_focus
		} 
		icon = {
			trigger = {
				NOT = {
					OR = {
						CHL_has_left_wing_government = yes
						CHL_has_right_wing_government = yes
					}
				}
			}
			value = GFX_focus_generic_befriend_republican_spain_focus
		} 

		relative_position_id = CHL_low_cost_housing
		x = 5
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_low_cost_housing  
			focus = CHL_privatize_national_industries
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
			has_global_flag = scw_over
			is_subject = no
		}

		search_filters = { FOCUS_FILTER_ARMY_XP FOCUS_FILTER_MANPOWER FOCUS_FILTER_RESEARCH FOCUS_FILTER_HISTORICAL }
		
		completion_reward = {

			add_manpower = 5000

			army_experience = 25

			add_tech_bonus = {
				name = CHL_spanish_refugees
				bonus = 0.25
				uses = 2
				category = electronics
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			random_state = {
				limit = {
					is_core_of = ROOT
					NOT = {
						state = 948
					}
				}
				add_manpower = 14000
				add_extra_state_shared_building_slots = 1
			}

			random_state = {
				limit = {
					is_core_of = ROOT
					NOT = {
						state = 948
					}
				}
				add_manpower = 28000
				add_extra_state_shared_building_slots = 1
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			every_country = {
				limit = {
					original_tag = SPR
				}
				add_opinion_modifier = {
					target = ROOT
					modifier = medium_decrease
				}	
			}

		}
	}

	### EXPAND THE INVESTIGATIONS POLICE OF CHILE
	focus = {
		id = CHL_expand_the_investigations_police

		icon = GFX_focus_generic_secret_service_agency

		relative_position_id = CHL_privatize_national_industries
		x = 3
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_privatize_national_industries
			focus = CHL_low_cost_housing
		}

		mutually_exclusive = {
		} 

		ai_will_do = {
			base = 1
		}

		allow_branch = {
			has_dlc = "La Resistance"
			IF = {
				limit = {
					has_game_rule = {
						rule = obsolete_focus_branches_visibility
						option = HIDE
					}
				}
				NOT = { 
					OR = {
						has_completed_focus = CHL_denounce_the_anarchy
						has_completed_focus = CHL_look_to_tradition 
					}
				}
			}
		}

		#offset = {
		#	x = -15
		#	y = 0
		#	trigger = {
		#		has_game_rule = {
		#			rule = obsolete_focus_branches_visibility
		#			option = HIDE
		#		}
		#		has_completed_focus = CHL_denounce_the_anarchy
		#	}
		#}

		available = {
		}

		search_filters = { FOCUS_FILTER_ARMY_XP FOCUS_FILTER_STABILITY FOCUS_FILTER_POLITICAL_CHARACTER }
		
		completion_reward = {

			army_experience = 25

			add_stability = 0.05

			IF = {
				limit = {
					has_intelligence_agency = no
				}
				create_intelligence_agency = yes
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = CHL_humberto_valdivieso

		}
	}

	### INCREASE PRESIDENTIAL POWERS
	focus = {
		id = CHL_increase_presidential_powers

		icon = GFX_focus_usa_voter_registration_act

		relative_position_id = CHL_strengthen_instituto_nacional
		x = -3
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_strengthen_instituto_nacional  
		}

		mutually_exclusive = {
			focus = CHL_reapproach_america
			focus = CHL_return_to_the_parliamentary_era
		} 
		
		ai_will_do = {
			base = 1.5
			modifier = {
				factor = 0.5
				has_country_leader = { 
				    character = CHL_gustavo_ross_santa_maria
				    ruling_only = yes
				}	
			}
			modifier = {
				factor = 0.5
				has_country_leader = { 
				    character = CHL_pedro_aguirre_cerda
				    ruling_only = yes
				}	
			}
			modifier = {
				factor = 2.5
				has_country_leader = { 
				    character = CHL_carlos_ibanez
				    ruling_only = yes
				}	
			}
			modifier = {
				factor = 0
				is_historical_focus_on = yes	
			}
			modifier = {
				factor = 2.5
				has_country_leader = { 
				    character = CHL_elias_lafertte_gavino
				    ruling_only = yes
				}	
			}
		}

		available = {
			OR = {
				custom_trigger_tooltip = {
					tooltip = CHL_has_idea_near_anarchy
					OR = {
						has_idea = idea_CHL_near_anarchic_society
						has_idea = idea_CHL_near_anarchic_society_2
						has_idea = idea_CHL_near_anarchic_society_3
						has_idea = idea_CHL_near_anarchic_society_4
					}
				}	
				has_country_leader = { 
				    character = CHL_elias_lafertte_gavino
				    ruling_only = yes
				}
			}
			has_government = democratic
			is_subject = no
		}

		bypass = {
			has_government = communism
		}

		search_filters = { FOCUS_FILTER_POLITICAL }
		
		completion_reward = { 

			add_stability = -0.05

			IF = {
				limit = {
					OR = {
						has_country_leader = {
							ruling_only = yes
							character = CHL_pedro_aguirre_cerda
						}
						has_country_leader = {
							ruling_only = yes
							character = CHL_gustavo_ross_santa_maria
						}
						has_country_leader = {
							ruling_only = yes
							character = CHL_arturo_alessandri
						}
					}
				}
				set_politics = {
					ruling_party = ROOT
					elections_allowed = no
				}
				add_popularity = {
					ideology = democratic
					popularity = -0.05
				}	
			}
			ELSE_IF = {
				limit = {
					has_country_leader = {
						ruling_only = yes
						character = CHL_elias_lafertte_gavino
					}
				}
				set_politics = {
					ruling_party = communism
					elections_allowed = no
				}	
				add_popularity = {
					ideology = communism
					popularity = 0.2
				}
			}
			ELSE_IF = {
				limit = {
					has_country_leader = {
						ruling_only = yes
						character = CHL_carlos_ibanez
					}
				}
				set_politics = {
					ruling_party = neutrality
					elections_allowed = no
				}
				add_popularity = {
					ideology = neutrality
					popularity = 0.2
				}
			}

			add_country_leader_trait = dictator

		}
	}
	
	### REAPPROACH AMERICA
	focus = {
		id = CHL_reapproach_america

		icon = GFX_focus_chi_mission_to_the_us

		relative_position_id = CHL_strengthen_instituto_nacional
		x = 0
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_strengthen_instituto_nacional  
		}

		mutually_exclusive = {
			focus = CHL_increase_presidential_powers
			focus = CHL_return_to_the_parliamentary_era
		} 
		
		ai_will_do = {
			base = 2
			modifier = {
				factor = 1.5
				has_country_leader = { 
				    character = CHL_pedro_aguirre_cerda
				    ruling_only = yes
				}	
			}
			modifier = {
				factor = 1.5
				is_historical_focus_on = yes	
			}
		}

		available = {
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_HISTORICAL }
		
		completion_reward = {

			USA = {
				add_opinion_modifier = {
					target = ROOT
					modifier = huge_increase
				}	
			}
			ROOT = {
				add_opinion_modifier = {
					target = USA
					modifier = huge_increase 
				}	
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			IF = {
				limit = {
					NOT = {
						has_dlc = "Arms Against Tyranny"
					}
				}
				custom_effect_tooltip = CHL_reapproach_america_tt
			}
			ELSE = {
				add_equipment_subsidy = {
					cic = 1000
					equipment_type = infantry_equipment
					seller_tags = { USA } 
				}
				add_equipment_subsidy = {
					cic = 1000
					equipment_type = artillery_equipment
					seller_tags = { USA } 
				}
				add_equipment_subsidy = {
					cic = 1000
					equipment_type = support_equipment
					seller_tags = { USA } 
				}
			}

			hidden_effect = {
				IF = {
					limit = {
						has_game_rule = {
							rule = obsolete_focus_branches_visibility
							option = HIDE
						}
					}
					mark_focus_tree_layout_dirty = yes
				}
			}

		}
	}

	### RETURN TO THE PARLIAMENTARY ERA
	focus = {
		id = CHL_return_to_the_parliamentary_era

		icon = GFX_focus_ETH_re-convene_the_parliament

		relative_position_id = CHL_strengthen_instituto_nacional
		x = 3
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_strengthen_instituto_nacional  
		}

		mutually_exclusive = {
			focus = CHL_increase_presidential_powers
			focus = CHL_reapproach_america
		} 
		
		ai_will_do = {
			base = 1
			modifier = {
				factor = 2
				has_country_leader = { 
				    character = CHL_gustavo_ross_santa_maria
				    ruling_only = yes
				}	
			}
			modifier = {
				factor = 0.5
				has_country_leader = { 
				    character = CHL_pedro_aguirre_cerda
				    ruling_only = yes
				}	
			}
			modifier = {
				factor = 0
				is_historical_focus_on = yes	
			}
		}

		available = {
			has_government = democratic
			is_subject = no
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_POLITICAL_CHARACTER }
		
		completion_reward = {

			hidden_effect = {
				remove_trait = {
				    character = CHL_miguel_cruchaga_tacomal
				    slot = political_advisor
				    trait = JUNO_president_of_the_senate
				}
			}

			add_trait = {
			    character = CHL_miguel_cruchaga_tacomal
			    slot = political_advisor
			    trait = JUNO_president_of_the_senate_2
			}

			hidden_effect = {
				set_can_be_fired_in_advisor_role = {
				    character = CHL_miguel_cruchaga_tacomal
				    value = no
				}

				IF = {
					limit = {
						NOT = {
							has_idea = CHL_miguel_cruchaga_tacomal
						}
					}
					add_ideas = CHL_miguel_cruchaga_tacomal
				}
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_return_to_the_parliamentary_era_tt

			hidden_effect = {
				IF = {
					limit = {
						has_game_rule = {
							rule = obsolete_focus_branches_visibility
							option = HIDE
						}
					}
					mark_focus_tree_layout_dirty = yes
				}
			}

		}
	}

	### DEVELOPMENT INWARDS
	focus = {
		id = CHL_development_inwards

		icon = GFX_focus_CHL_development_inwards

		relative_position_id = CHL_increase_presidential_powers
		x = 1
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_increase_presidential_powers
			focus = CHL_reapproach_america 
			focus = CHL_return_to_the_parliamentary_era 
		}

		mutually_exclusive = {
			focus = CHL_kickstart_the_arsenal_of_democracy
		} 
		
		ai_will_do = {
			base = 2
			modifier = {
				factor = 0.5
				has_country_leader = { 
				    character = CHL_gustavo_ross_santa_maria
				    ruling_only = yes
				}	
			}
			modifier = {
				factor = 1.5
				has_country_leader = { 
				    character = CHL_pedro_aguirre_cerda
				    ruling_only = yes
				}	
			}
			modifier = {
				factor = 1.5
				has_country_leader = { 
				    character = CHL_carlos_ibanez
				    ruling_only = yes
				}	
			}
			modifier = {
				factor = 0.5
				has_war = yes	
			}
			modifier = {
				factor = 2.5
				OR = {
					has_government = neutrality
					has_government = communism 
				}
			}
		}

		available = {
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_INDUSTRY FOCUS_FILTER_HISTORICAL }
		
		completion_reward = {

			every_core_state = {   
				limit = {
					is_owned_and_controlled_by = ROOT 
				}
				random_select_amount = 2
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}	
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			add_timed_idea = {
				idea = CHL_development_inwards_idea
				days = 730
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			CHL_anarchic_society_level_down = yes

		}
	}

	### KICKSTART THE ARSENAL OF DEMOCRACY
	focus = {
		id = CHL_kickstart_the_arsenal_of_democracy

		icon = GFX_focus_generic_the_giant_wakes

		relative_position_id = CHL_increase_presidential_powers
		x = 5
		y = 1
		cost = 10

		prerequisite = {
			#focus = CHL_increase_presidential_powers
			focus = CHL_reapproach_america 
			focus = CHL_return_to_the_parliamentary_era 
		}

		mutually_exclusive = {
			focus = CHL_development_inwards
		} 
		
		ai_will_do = {
			base = 2
			modifier = {
				factor = 1.5
				has_country_leader = { 
				    character = CHL_gustavo_ross_santa_maria
				    ruling_only = yes
				}	
			}
			modifier = {
				factor = 0.5
				has_country_leader = { 
				    character = CHL_pedro_aguirre_cerda
				    ruling_only = yes
				}	
			}
			modifier = {
				factor = 1.5
				has_war = yes	
			}
			modifier = {
				factor = 0
				OR = {
					has_government = neutrality
					has_government = communism 
				}
			}
		}

		available = {	
			OR = {
				has_government = democratic
				has_government = neutrality
			}
		}

		search_filters = { FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_INDUSTRY }
		
		completion_reward = {

			every_core_state = {   
				limit = {
					is_owned_and_controlled_by = ROOT 
				}
				random_select_amount = 2
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}	
			}

			add_war_support = 0.05
		}
	}

	### ALIGN THE MARXISTS
	focus = {
		id = CHL_align_the_marxists

		icon = GFX_focus_chi_cooperation_with_the_communists

		relative_position_id = CHL_development_inwards
		x = -2
		y = 2
		cost = 5

		prerequisite = {
			#focus = CHL_low_cost_housing
			#focus = CHL_privatize_national_industries
			focus = CHL_development_inwards
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
		}

		available = {
			NOT = {
				has_government = communism
			}
			CHL_has_left_wing_government = yes
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_POLITICAL_CHARACTER FOCUS_FILTER_MANPOWER }
		
		completion_reward = { 

			add_political_power = 50

			add_popularity = {
				ideology = communism
				popularity = 0.05
			}	

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = CHL_rolando_reyes
			show_ideas_tooltip = CHL_carlos_contreras_labarca
			show_ideas_tooltip = CHL_elias_lafertte_gavino
			show_ideas_tooltip = CHL_manuel_hidalgo_plaza
			show_ideas_tooltip = CHL_oskar_schnake

		}
	}

	### CHILEAN ANTI-COMMUNIST ACTION
	focus = {
		id = CHL_chilean_anti_communist_action

		icon = GFX_focus_CHL_chilean_anti_communist_action

		relative_position_id = CHL_commence_the_counter_revolution
		x = -4
		y = 1
		cost = 10

		prerequisite = {
			#focus = CHL_increase_presidential_powers
			#focus = CHL_reapproach_america 
			#focus = CHL_return_to_the_parliamentary_era 
			focus = CHL_commence_the_counter_revolution 
		}

		mutually_exclusive = {
		} 

		#offset = {
		#	x = -1
		#	y = 0
		#	trigger = {
		#		has_game_rule = {
		#			rule = obsolete_focus_branches_visibility
		#			option = HIDE
		#		}
		#		has_completed_focus = CHL_denounce_the_anarchy
		#	}
		#}
		
		ai_will_do = {
			base = 1
			modifier = {
				factor = 3.5
				has_government = fascism
			}
		}

		available = {
			has_government = fascism
		}

		search_filters = { FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_POLITICAL FOCUS_FILTER_POLITICAL_CHARACTER }
		
		completion_reward = {

			add_ideas = CHL_anti_communist_action

			custom_effect_tooltip = CHL_skip_one_line_tt

			every_country = {
				limit = {
					has_government = communism
				}
				add_opinion_modifier = {
					target = ROOT
					modifier = large_decrease
				}	
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = CHL_arturo_olavaria

		}
	}

	### THE LAW OF PERMANENT DEFENSE OF DEMOCRACY Fascist
	focus = {
		id = CHL_law_of_permanent_defense

		icon = GFX_focus_ger_bulwark_against_bolshevism

		relative_position_id = CHL_chilean_anti_communist_action
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_chilean_anti_communist_action
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
			modifier = {
				factor = 2
				any_country = {
					is_major = yes
					has_government = communism
				}
			}
		}

		available = {
			has_government = fascism
		}

		search_filters = { FOCUS_FILTER_INDUSTRY FOCUS_FILTER_POLITICAL }
		
		completion_reward = {

			every_country = {
				limit = {
					has_government = communism
				}
				add_opinion_modifier = {
					target = ROOT
					modifier = large_decrease
				}	
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			CHL_anarchic_society_level_down = yes

			add_popularity = {
				ideology = communism
				popularity = -0.15
			}	

			add_ideas = CHL_oppressed_working_class

		}
	}

	### ORGANIZE PATRIOTIC LEAGUES
	focus = {
		id = CHL_organize_patriotic_leagues

		icon = GFX_goal_generic_military_sphere

		relative_position_id = CHL_law_of_permanent_defense
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_law_of_permanent_defense
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
			modifier = {
				factor = 2
				has_government = fascism
			}
			modifier = {
				factor = 0.5
				has_government = democratic
			}
		}

		available = {
			has_government = fascism
		}

		search_filters = { FOCUS_FILTER_MANPOWER }
		
		completion_reward = {
			add_ideas = CHL_ligas_patrioticas
		}
	}

	### PREEMPTIVELY STRIKE FOREIGN REVOLUTIONARIES
	focus = {
		id = CHL_preemtively_strike_foreign_revolutionaries

		icon = GFX_goal_anti_comintern_pact

		relative_position_id = CHL_organize_patriotic_leagues
		x = 0
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_organize_patriotic_leagues
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 0.5
			modifier = {
				factor = 2
				has_war_support > 0.8
			}
			modifier = {
				factor = 0
				has_government = democratic
			}
		}

		available = {
			has_government = fascism
			has_war_support > 0.79
			any_country = {
				capital_scope = {
					is_on_continent = south_america
				}
				has_government = communism
			}
		}

		search_filters = { FOCUS_FILTER_ANNEXATION }
		
		completion_reward = {
			custom_effect_tooltip = CHL_preemtively_strike_foreign_revolutionaries_tt
			every_country = {
				limit = {
					capital_scope = {
						is_on_continent = south_america
					}
					has_government = communism
				}
				ROOT = {
					create_wargoal = {
						type = puppet_wargoal_focus
						target = PREV
					} 
				}
			}
		}
	}

	### ENFORCE STRICTER SECULARISM
	focus = {
		id = CHL_enforce_stricter_secularism

		icon = GFX_focus_mex_triumph_over_the_cristeros

		relative_position_id = CHL_kickstart_the_arsenal_of_democracy
		x = 2
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_kickstart_the_arsenal_of_democracy
			focus = CHL_development_inwards
		}

		mutually_exclusive = {
			focus = CHL_repeal_the_separation_of_church_an_state
		} 
		
		ai_will_do = {
			base = 2
			modifier = {
				factor = 1.5
				CHL_has_left_wing_government = yes
			}
		}

		available = {
			OR = {
				has_government = communism
				CHL_has_left_wing_government = yes
				CHL_has_right_wing_government = yes
			}
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_RESEARCH FOCUS_FILTER_HISTORICAL }
		
		completion_reward = {

			IF = {
				limit = {
					AND = {
						has_dlc = "By Blood Alone"
						ITA = {
							exists = yes 
							has_completed_focus = ITA_seek_papal_support
						}
					}
				}
				ITA = {
					add_opinion_modifier = {
						target = ROOT
						modifier = denounced_catholicism
					}
				}
			}

			IF = {
				limit = {
					AND = {
						has_dlc = "La Resistance"
						POR = {
							has_completed_focus = POR_concordat_with_the_holy_see
						}
					}
				}
				POR = {
					add_opinion_modifier = {
						target = ROOT
						modifier = denounced_catholicism
					}
				}
			}

			IF = {
				limit = {
					AND = {
						has_dlc = "La Resistance"
						SPR = {
							has_completed_focus = SPA_defenders_of_catholicism
						}
					}
				}
				SPR = {
					add_opinion_modifier = {
						target = ROOT
						modifier = denounced_catholicism
					}
				}
			}

			add_ideas = CHL_strict_secularism

		}
	}

	### REPEAL THE SEPARATION OF THE CHURCH FROM THE STATE
	focus = {
		id = CHL_repeal_the_separation_of_church_an_state

		icon = GFX_focus_por_concordat

		relative_position_id = CHL_kickstart_the_arsenal_of_democracy
		x = 4
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_kickstart_the_arsenal_of_democracy
			focus = CHL_development_inwards
		}

		mutually_exclusive = {
			focus = CHL_enforce_stricter_secularism
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
			NOT = {
				has_government = communism
			}
			CHL_has_right_wing_government = yes
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY FOCUS_FILTER_WAR_SUPPORT }
		
		completion_reward = {

			IF = {
				limit = {
					AND = {
						has_dlc = "By Blood Alone"
						ITA = {
							exists = yes 
							has_completed_focus = ITA_seek_papal_support
						}
					}
				}
				ITA = {
					add_opinion_modifier = {
						target = ROOT
						modifier = embraced_catholicism
					}
				}
			}

			IF = {
				limit = {
					AND = {
						has_dlc = "La Resistance"
						POR = {
							has_completed_focus = POR_concordat_with_the_holy_see
						}
					}
				}
				POR = {
					add_opinion_modifier = {
						target = ROOT
						modifier = embraced_catholicism
					}
				}
			}

			IF = {
				limit = {
					AND = {
						has_dlc = "La Resistance"
						SPR = {
							has_completed_focus = SPA_defenders_of_catholicism
						}
					}
				}
				SPR = {
					add_opinion_modifier = {
						target = ROOT
						modifier = embraced_catholicism
					}
				} 
			}

			add_ideas = CHL_catholic_church_holding_political_power

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = CHL_guido_beck
			show_ideas_tooltip = CHL_osvaldo_lira_perez

		}
	}

	### CHILEAN ANTI-COMMUNIST ACTION
	focus = {
		id = CHL_chilean_anti_communist_action_dem_version

		icon = GFX_focus_CHL_chilean_anti_communist_action

		relative_position_id = CHL_repeal_the_separation_of_church_an_state
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_repeal_the_separation_of_church_an_state
			focus = CHL_enforce_stricter_secularism
		}

		mutually_exclusive = {
			#focus = CHL_socialist_youth
		} 

		offset = {
			x = -1
			y = 0
			trigger = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
				has_completed_focus = CHL_denounce_the_anarchy
			}
		}
		
		ai_will_do = {
			base = 1
			modifier = {
				factor = 3.5
				has_government = fascism
			}
		}

		available = {
			CHL_has_right_wing_government = yes
		}

		search_filters = { FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_POLITICAL FOCUS_FILTER_POLITICAL_CHARACTER FOCUS_FILTER_HISTORICAL }
		
		completion_reward = {

			add_ideas = CHL_anti_communist_action

			custom_effect_tooltip = CHL_skip_one_line_tt

			every_country = {
				limit = {
					has_government = communism
				}
				add_opinion_modifier = {
					target = ROOT
					modifier = large_decrease
				}	
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = CHL_arturo_olavaria

		}
	}

	### THE LAW OF PERMANENT DEFENSE OF DEMOCRACY
	focus = {
		id = CHL_law_of_permanent_defense_of_democracy

		icon = GFX_focus_usa_voter_registration_act

		relative_position_id = CHL_chilean_anti_communist_action_dem_version
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_chilean_anti_communist_action_dem_version
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
			modifier = {
				factor = 2
				any_country = {
					is_major = yes
					has_government = communism
				}
			}
		}

		available = {
			CHL_has_right_wing_government = yes
		}

		search_filters = { FOCUS_FILTER_INDUSTRY FOCUS_FILTER_POLITICAL FOCUS_FILTER_HISTORICAL }
		
		completion_reward = {
			every_country = {
				limit = {
					has_government = communism
				}
				add_opinion_modifier = {
					target = ROOT
					modifier = large_decrease
				}	
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			CHL_anarchic_society_level_down = yes

			add_popularity = {
				ideology = communism
				popularity = -0.15
			}	

			add_ideas = CHL_oppressed_working_class

		}
	}

	### BAN LIBERALISM
	focus = {
		id = CHL_ban_liberalism

		icon = GFX_goal_generic_political_pressure

		relative_position_id = CHL_commence_the_counter_revolution
		x = -2
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_commence_the_counter_revolution
		}

		mutually_exclusive = {
		} 

		ai_will_do = {
			base = 1
		}
		
		search_filters = { FOCUS_FILTER_POLITICAL }

		available = {
			has_government = fascism
		}
		
		completion_reward = {

			add_political_power = 50

			hidden_effect = {
				set_temp_variable = {
					var = ban_ideology_var
					value = party_popularity@democratic
				}
				multiply_temp_variable = {
					var = ban_ideology_var
					value = -1
				}
				add_popularity = {
					ideology = democratic
					popularity = ban_ideology_var
				}
				multiply_temp_variable = {
					var = ban_ideology_var
					value = 0.66
				}
				set_country_flag = banned_democratic_flag				
			}
			remove_democratic_spirits_effect = yes 
			custom_effect_tooltip = ban_democratic_party_tt
			add_stability = ban_ideology_var
		}
	}

	### RECRUIT YOUNG OFFICERS
	focus = {
		id = CHL_recruit_young_officers

		icon = GFX_focus_generic_military_academy

		relative_position_id = CHL_commence_the_counter_revolution
		x = 0
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_commence_the_counter_revolution
		}

		mutually_exclusive = {
		} 
		 
		ai_will_do = {
			base = 2
		}

		available = {
			has_government = fascism
		}

		search_filters = { FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_MILITARY_CHARACTER FOCUS_FILTER_ARMY_XP }
		
		completion_reward = {

			add_command_power = 25

			army_experience = 15

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_recruit_young_officers_tt

		}
	}

	### ENFORCE THE CHILEAN IDENTITY
	focus = {
		id = CHL_enforce_the_chilean_identity

		icon = GFX_focus_CHL_enforce_the_chilean_identity

		relative_position_id = CHL_recruit_young_officers
		x = 0
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_recruit_young_officers
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
			has_government = fascism
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY }
		
		completion_reward = {

			IF = {
				limit = {
					has_idea = CHL_the_mapuche_conflict_rebellion
				}
				remove_ideas = CHL_the_mapuche_conflict_rebellion
			}
			ELSE_IF = {
				limit = {
					has_idea = CHL_the_mapuche_conflict_much_worse
				}
				remove_ideas = CHL_the_mapuche_conflict_much_worse
			}
			ELSE_IF = {
				limit = {
					has_idea = CHL_the_mapuche_conflict_worse
				}
				remove_ideas = CHL_the_mapuche_conflict_worse
			}
			ELSE_IF = {
				limit = {
					has_idea = CHL_the_mapuche_conflict
				}
				remove_ideas = CHL_the_mapuche_conflict
			}
			ELSE_IF = {
				limit = {
					has_idea = CHL_the_mapuche_conflict_calmed
				}
				remove_ideas = CHL_the_mapuche_conflict_calmed
			}
			ELSE_IF = {
				limit = {
					has_idea = CHL_the_mapuche_conflict_near_gone
				}
				remove_ideas = CHL_the_mapuche_conflict_near_gone
			}
			ELSE_IF = {
				limit = {
					has_idea = CHL_mapuche_conflict_done
				}
				remove_ideas = CHL_mapuche_conflict_done
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			IF = {
				limit = {
					950 = {
						is_core_of = ROOT
					}
				}
				950 = { 
					remove_core_of = ROOT
				}
			} 

			add_timed_idea = {
				idea = CHL_ancestral_mapuche_resistance
				days = 480
			}	

			custom_effect_tooltip = CHL_enforce_the_chilean_identity_tt

			custom_effect_tooltip = CHL_skip_one_line_tt

			add_stability = 0.1
 
			custom_effect_tooltip = CHL_skip_one_line_tt

			country_event = {
				id = CHL_political_events.70 
				hours = 0
			}	 
   
		} 
	}

	### PROMOTE BROAD ANTI-AMERICANISM
	focus = {
		id = CHL_promote_broad_anti_americansim

		icon = GFX_focus_ARG_anti_american_propaganda

		relative_position_id = CHL_enforce_the_chilean_identity
		x = 0
		y = 1
		cost = 5

		prerequisite = { 
			#focus = CHL_chilean_anti_communist_action 
			focus = CHL_enforce_the_chilean_identity 
		}

		mutually_exclusive = {
		} 
		

		available = {
			has_government = fascism
		}

		search_filters = { FOCUS_FILTER_WAR_SUPPORT }
		
		completion_reward = { 

			add_ideas = CHL_anti_americanism

		}
	}

	### COOPERATE WITH OPERATION BOLIVAR
	focus = {
		id = CHL_cooperate_with_operation_bolivar

		icon = GFX_focus_chi_mission_to_germany

		relative_position_id = CHL_enforce_the_chilean_identity
		x = -2
		y = 2
		cost = 5

		allow_branch = {
			IF = {
				limit = {
					has_game_rule = {
						rule = obsolete_focus_branches_visibility
						option = HIDE
					}
				}
				NOT = { has_completed_focus = CHL_look_to_tradition }
				NOT = { has_completed_focus = CHL_endorse_the_constitution }
			}
		}

		prerequisite = {
			focus = CHL_enforce_the_chilean_identity
		}

		mutually_exclusive = {
			focus = CHL_abide_by_the_francoist_model
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available = {
			has_government = fascism
			#has_completed_focus = CHL_enforce_the_chilean_identity
			any_country = {
				original_tag = GER
				has_government = fascism
				is_faction_leader = yes
			}
			is_subject = no
			is_in_faction = no
		}

		bypass = {
			is_in_faction_with = GER
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_WAR_SUPPORT }
		
		completion_reward = {

			add_war_support = 0.10

			add_political_power = 35

			random_country = {
				limit = {
					original_tag = GER
					has_government = fascism
					is_faction_leader = yes
					is_subject = no
				}
				country_event = {
					id = CHL_political_events.32
					days = 2
				}
			}

		}
	}

	### ABIDE BY THE FRANCOIST MODEL
	focus = {
		id = CHL_abide_by_the_francoist_model

		icon = GFX_focus_spa_caudillo_of_spain

		relative_position_id = CHL_enforce_the_chilean_identity
		x = 2
		y = 2
		cost = 5

		prerequisite = {
			focus = CHL_enforce_the_chilean_identity
		}

		#prerequisite = {
		#	focus = CHL_promote_broad_anti_americansim
		#}

		mutually_exclusive = {
			focus = CHL_cooperate_with_operation_bolivar
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available = {
			has_government = fascism
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_INDUSTRY FOCUS_FILTER_POLITICAL_CHARACTER FOCUS_FILTER_MILITARY_CHARACTER }
		
		completion_reward = {

			custom_effect_tooltip = CHL_abide_by_the_francoist_model_tt
			hidden_effect = {
				set_rule = { can_join_factions = no }
			}
 
			add_ideas = CHL_the_francoist_model

			custom_effect_tooltip = CHL_skip_one_line_tt

			IF = {
				limit = {
					has_dlc = "La Resistance"
					SPA = {
						exists = no
					}
				}
				SPR = {
					SPA_juan_yague = { set_nationality = ROOT }
					SPA_manuel_hedilla = { set_nationality = ROOT }
					SPR_mohamed_meziane = { set_nationality = ROOT }
					SPA_francisco_franco = { set_nationality = ROOT }
					SPA_agustin_munoz_grandes = { set_nationality = ROOT }
				}
			}
		}
	}

	### HOST GERMAN INTELLIGENCE
	focus = {
		id = CHL_host_german_intelligence

		icon = GFX_goal_generic_intelligence_exchange

		relative_position_id = CHL_cooperate_with_operation_bolivar
		x = -1
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_cooperate_with_operation_bolivar
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
			has_government = fascism
		}

		search_filters = { FOCUS_FILTER_STABILITY }
		
		completion_reward = {

			add_stability = 0.05

			IF = {
				limit = {
					has_dlc = "La Resistance"
				}
				add_ideas = CHL_hosting_german_intel_lar
			}
			ELSE = {
				add_ideas = CHL_hosting_german_intel_non_lar
			}

		}
	}

	### MILITARIZE THE STATE
	focus = {
		id = CHL_militarize_the_state

		icon = GFX_goal_generic_construct_mil_factory

		relative_position_id = CHL_host_german_intelligence
		x = 0
		y = 2
		cost = 10

		prerequisite = {
			focus = CHL_host_german_intelligence
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
			has_government = fascism
		}

		search_filters = { FOCUS_FILTER_INDUSTRY }
		
		completion_reward = {

			random_state = {
				limit = {
					is_owned_and_controlled_by = ROOT
					is_core_of = ROOT
					free_building_slots = {
						building = dockyard
						size > 2
						include_locked = yes
					}	
					is_coastal = yes
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = dockyard
					level = 2
					instant_build = yes
				}	
			}

			random_state = {
				limit = {
					is_owned_and_controlled_by = ROOT
					is_core_of = ROOT
					free_building_slots = {
						building = arms_factory
						size > 2
						include_locked = yes
					}	
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}	
			}

		}
	}

	### THE SPIRIT OF THE WAR OF THE PACIFIC
	focus = {
		id = CHL_the_spirit_of_the_war_of_the_pacific

		icon = GFX_focus_CHL_the_spirit_of_the_war_of_the_pacific

		relative_position_id = CHL_militarize_the_state
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_militarize_the_state
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
			has_government = fascism
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY FOCUS_FILTER_ANNEXATION }
		
		completion_reward = {

			add_ideas = CHL_spirit_of_the_pacific_war

			custom_effect_tooltip = CHL_skip_one_line_tt

			IF = {
				limit = {
					947 = {
						NOT = {
							OR = {
								is_claimed_by = ROOT
								is_owned_by = ROOT
							}
						}
					}
				}
				947 = {
					add_claim_by = ROOT
				}
			}

			IF = {
				limit = {
					302 = {
						NOT = {
							OR = {
								is_claimed_by = ROOT
								is_owned_by = ROOT
							}
						}
					}
				}
				302 = {
					add_claim_by = ROOT
				}
			}

			IF = {
				limit = {
					492 = {
						NOT = {
							OR = {
								is_claimed_by = ROOT
								is_owned_by = ROOT
							}
						}
					}
				}
				492 = {
					add_claim_by = ROOT
				}
			}

			IF = {
				limit = {
					270 = {
						NOT = {
							OR = {
								is_claimed_by = ROOT
								is_owned_by = ROOT
							}
						}
					}
				}
				270 = {
					add_claim_by = ROOT
				}
			}

			IF = {
				limit = {
					649 = {
						NOT = {
							OR = {
								is_claimed_by = ROOT
								is_owned_by = ROOT
							}
						}
					}
				}
				649 = {
					add_claim_by = ROOT
				}
			}

			IF = {
				limit = {
					641 = {
						NOT = {
							OR = {
								is_claimed_by = ROOT
								is_owned_by = ROOT
							}
						}
					}
				}
				641 = {
					add_claim_by = ROOT
				}
			}

			IF = {
				limit = {
					727 = {
						NOT = {
							OR = {
								is_claimed_by = ROOT
								is_owned_by = ROOT
							}
						}
					}
				}
				727 = {
					add_claim_by = ROOT
				}
			}

		}
	}

	### SYNDICALIZE THE PRODUCTION SECTOR
	focus = {
		id = CHL_syndicalize_the_production_sector

		icon = GFX_focus_spa_the_phalanx_ascendant

		relative_position_id = CHL_commence_the_counter_revolution
		x = 4
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_commence_the_counter_revolution
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
			has_government = fascism
		}

		search_filters = { FOCUS_FILTER_INDUSTRY }
		
		completion_reward = {

			remove_ideas = idea_CHL_the_Hacienda_inquilinaje_system

			random_owned_controlled_state = {
				limit = {
					is_core_of = ROOT
					NOT = {
						OR = {
							state = 950
							state = 948
						}
					}
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}	
			}

		}
	}

	### EXPAND THE MOUNTAIN REGIMENTS
	focus = {
		id = CHL_expand_the_mountain_regiments

		icon = GFX_focus_mex_caudillo_private_armies

		relative_position_id = CHL_commence_the_counter_revolution
		x = 2
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_commence_the_counter_revolution
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
		}

		available = {
			has_government = fascism
		}

		search_filters = { FOCUS_FILTER_MILITARY_CHARACTER }
		
		completion_reward = {

			every_army_leader = {
				limit = {
					NOT = {
						OR = {
							has_trait = winter_expert
							has_trait = desert_fox
							has_trait = swamp_fox
							has_trait = trait_mountaineer
							has_trait = hill_fighter
							has_trait = jungle_rat
							has_trait = ranger
							has_trait = urban_assault_specialist
							has_trait = adaptable
						}
					}
				}

				add_trait = {
					trait = trait_mountaineer
				}
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			IF = {
				limit = {
					NOT = {
						has_tech = mountain_gun
					}
				}
				custom_effect_tooltip = ROM_mountain_artillery_tech_tt
				hidden_effect = { set_technology = { mountain_gun = 1 } }
			}
		}
	}

	### DEPARTEMENTO DE LAS TROPAS NACISTAS DE ASALTO
	focus = {
		id = CHL_departemento_de_las_tropas_nacistas_de_asalto

		icon = GFX_focus_CHL_departemento_de_las_tropas_nacistas_de_asalto

		relative_position_id = CHL_syndicalize_the_production_sector
		x = 1
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_syndicalize_the_production_sector
		}

		mutually_exclusive = {
			focus = CHL_departamento_de_la_juventad_nacista
		} 
		
		ai_will_do = {
			base = 1
		}

		search_filters = { FOCUS_FILTER_MANPOWER }

		available = {
			has_government = fascism
		}
		
		completion_reward = {
			custom_effect_tooltip = ITA_battaglioni_d_assalto_tt
			hidden_effect = {
				set_technology = { blackshirt_assault_battalion_tech = 1 popup = no }
			}

			add_ideas = CHL_fascist_assault_department
		}
	}

	### DEPARTEMENTO DE LA JUVENTAD NACISTA
	focus = {
		id = CHL_departamento_de_la_juventad_nacista

		icon = GFX_focus_generic_manpower

		relative_position_id = CHL_syndicalize_the_production_sector
		x = -1
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_syndicalize_the_production_sector
		}

		mutually_exclusive = {
			focus = CHL_departemento_de_las_tropas_nacistas_de_asalto
		} 
		
		ai_will_do = {
			base = 1
		}

		search_filters = { FOCUS_FILTER_MANPOWER }

		available = {
			has_government = fascism
		}
		
		completion_reward = {
			add_ideas = CHL_fascist_youth_department
		}
	}

	### ENLARGE THE DEPARTMENT OF PROVINCES
	focus = {
		id = CHL_expand_the_department_of_provinces

		icon = GFX_goal_generic_position_armies

		relative_position_id = CHL_departamento_de_la_juventad_nacista
		x = 1
		y = 1
		cost = 5

		#prerequisite = {
		#	focus = CHL_syndicalize_the_production_sector
		#}

		prerequisite = {
			focus = CHL_departamento_de_la_juventad_nacista
			focus = CHL_departemento_de_las_tropas_nacistas_de_asalto
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
			has_government = fascism
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_ANNEXATION }
		
		completion_reward = {

			IF = {
				limit = {
					947 = {
						NOT = {
							OR = {
								is_owned_by = ROOT
								is_claimed_by = ROOT
							}
						}
					}
				}
				947 = {
					add_claim_by = ROOT
				}
			}

			IF = {
				limit = {
					953 = {
						NOT = {
							OR = {
								is_owned_by = ROOT
								is_claimed_by = ROOT
							}
						}
					}
				}
				953 = {
					add_claim_by = ROOT
				}
			}
 
			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_expand_the_department_of_provinces_coring_tt

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_expand_the_department_of_provinces_change_tt
			IF = {
				limit = {
					has_idea = CHL_fascist_assault_department
				}
				swap_ideas = {
					remove_idea = CHL_fascist_assault_department
					add_idea = CHL_fascist_assault_and_provinces_department
				}
			}
			ELSE_IF = {
				limit = {
					has_idea = CHL_fascist_youth_department
				}
				swap_ideas = {
					remove_idea = CHL_fascist_youth_department
					add_idea = CHL_fascist_youth_and_provinces_department
				}
			}

		}
	}

	### REVOKE THE TREATY OF LIMA
	focus = {
		id = CHL_revoke_the_treaty_of_lima

		icon = GFX_focus_renounce_the_treaty_of_trianon

		relative_position_id = CHL_cooperate_with_operation_bolivar
		x = 2
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_cooperate_with_operation_bolivar
			focus = CHL_abide_by_the_francoist_model
		}

		mutually_exclusive = {
		}  
		
		will_lead_to_war_with = PRU

		available = {
			has_government = fascism
			NOT = {
				owns_state = 947
			}
			has_army_manpower = {
				size > 175000
			}
			any_country = {
				owns_state = 947
				NOT = {
					OR = {
						is_in_faction_with = ROOT
						is_subject_of = ROOT
						has_war_with = ROOT
					}
				}
			}
			is_subject = no
		}

		bypass = {
			owns_state = 947
		}

		ai_will_do = {
			base = 2.5
		}

		search_filters = { FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_ANNEXATION }
		
		completion_reward = {

			add_war_support = 0.05

			random_country = {
				limit = {
					owns_state = 947
				}
				country_event = {
					id = CHL_political_events.52
					days = 2
				}
			}

		}
	}

	### DEMAND THE FIRELAND
	focus = {
		id = CHL_demand_the_fireland

		icon = GFX_focus_CHL_dispute_over_tierra_del_fuego

		relative_position_id = CHL_revoke_the_treaty_of_lima
		x = -1
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_revoke_the_treaty_of_lima
		}

		mutually_exclusive = {
		} 
		
		will_lead_to_war_with = ARG

		available = {
			has_government = fascism
			NOT = {
				owns_state = 953
			}
			has_army_manpower = {
				size > 200000
			}
			any_country = {
				owns_state = 953 
				NOT = {
					OR = {
						is_in_faction_with = ROOT
						is_subject_of = ROOT
						has_war_with = ROOT
					}
				}
			}
			is_subject = no
		}

		bypass = {
			OR = {
				owns_state = 953
				any_country = {
					owns_state = 953
					has_war_with = ROOT
				}
			}
		}

		ai_will_do = {
			base = 3
		}

		search_filters = { FOCUS_FILTER_ANNEXATION }
		
		completion_reward = {

			random_country = {
				limit = {
					owns_state = 953
				}
				country_event = {
					id = CHL_political_events.55
					days = 2
				}
			}

		}
	}

	### ESCALATE THE LAGUNA DEL DESIERTO ISSUE
	focus = {
		id = CHL_escalate_the_laguna_del_desierto_issue

		icon = GFX_focus_prc_infiltration

		relative_position_id = CHL_revoke_the_treaty_of_lima
		x = 1
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_revoke_the_treaty_of_lima
		}

		mutually_exclusive = {
		} 
		
		will_lead_to_war_with = ARG

		available = {
			has_government = fascism
			NOT = {
				owns_state = 954
			}
			has_army_manpower = {
				size > 210000
			}
			any_country = {
				owns_state = 954 
				NOT = {
					OR = {
						is_in_faction_with = ROOT
						is_subject_of = ROOT
						has_war_with = ROOT
					}
				}
			}
			is_subject = no
		}

		bypass = {
			OR = {
				owns_state = 954
				any_country = {
					owns_state = 954 
					NOT = {
						original_tag = ROOT
					}
					OR = {
						is_in_faction_with = ROOT
						is_subject_of = ROOT
						has_war_with = ROOT
					}
				}
			}
		}

		ai_will_do = {
			base = 2
		}

		search_filters = { FOCUS_FILTER_ARMY_XP FOCUS_FILTER_ANNEXATION FOCUS_FILTER_STABILITY }
		
		completion_reward = {

			random_country = {
				limit = { 
					owns_state = 954
				}
				country_event = {
					id = CHL_political_events.58
					days = 2
				}
			}

		}
	}

	### DEMAND DEMILITARIZATION OF PATAGONIA
	focus = {
		id = CHL_demand_demilitarization_of_patagonia

		icon = GFX_focus_CHL_demand_demilitarization_of_patagonia

		relative_position_id = CHL_demand_the_fireland
		x = 1
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_demand_the_fireland
			focus = CHL_escalate_the_laguna_del_desierto_issue
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
			any_other_country = {
				NOT = {
					OR = {
						is_in_faction_with = ROOT
						is_subject_of = ROOT
						has_war_with = ROOT
					}
				}
				AND = {
					owns_state = 512
					owns_state = 955 
				}
			}  
			is_subject = no
		}

		bypass = {
			OR = {
				AND = {
					owns_state = 512
					owns_state = 955
					owns_state = 954
					owns_state = 953
				}
				ARG = {	
					OR = {
						is_in_faction_with = ROOT
						is_subject_of = ROOT
						has_war_with = ROOT
					}
				}
			}
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY }
		
		completion_reward = {

			add_stability = 0.05

			random_country = {
				limit = {
					AND = {
						owns_state = 512
						owns_state = 955 
					}
				}
				country_event = {
					id = CHL_political_events.61
					days = 2
				}	
			}

		}
	}

	### ENTER PATAGONIA
	focus = {
		id = CHL_enter_patagonia

		icon = GFX_focus_generic_attack_argentina

		relative_position_id = CHL_demand_demilitarization_of_patagonia
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_demand_demilitarization_of_patagonia
		}

		mutually_exclusive = {
		} 
		
		will_lead_to_war_with = ARG

		available = {
			has_government = fascism
			NOT = {
				AND = {
					owns_state = 512
					owns_state = 955
					owns_state = 954
					owns_state = 953
				}
			}
			is_subject = no
		}

		bypass = {
			OR = {
				AND = {
					owns_state = 512
					owns_state = 955
					owns_state = 954
					owns_state = 953
				}
				ARG = {
					OR = {
						is_in_faction_with = ROOT
						has_war_with = ROOT
					}
				}
			}
		}

		ai_will_do = {
			base = 2
		}

		search_filters = { FOCUS_FILTER_ANNEXATION FOCUS_FILTER_WAR_SUPPORT }
		
		completion_reward = {

			add_war_support = 0.05

			IF = {
				limit = {
					512 = {
						NOT = {
							OR = {
								is_claimed_by = ROOT
								is_owned_by = ROOT
								is_core_of =ROOT
							}
						}
					}
				}
				512 = {
					add_claim_by = ROOT
				}
			}

			IF = {
				limit = {
					955 = {
						NOT = {
							OR = {
								is_claimed_by = ROOT
								is_owned_by = ROOT
								is_core_of =ROOT
							}
						}
					}
				}
				955 = {
					add_claim_by = ROOT
				}
			}

			IF = {
				limit = {
					954 = {
						NOT = {
							OR = {
								is_claimed_by = ROOT
								is_owned_by = ROOT
								is_core_of =ROOT
							}
						}
					}
				}
				954 = {
					add_claim_by = ROOT
				}
			}

			IF = {
				limit = {
					953 = {
						NOT = {
							OR = {
								is_claimed_by = ROOT
								is_owned_by = ROOT
								is_core_of =ROOT
							}
						}
					}
				}
				953 = {
					add_claim_by = ROOT
				}
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			every_country = {
				limit = {
					NOT = {
						OR = {
							original_tag = CHL
							is_in_faction_with = CHL
							is_subject_of = CHL
						}
					}
					OR = {
						owns_state = 512
						owns_state = 955
						owns_state = 954
						owns_state = 953
					}
				}
				ROOT = {
					declare_war_on = {
						target = PREV
						type = take_claimed_state
					}	
				}
			}

		}
	}

	### CONTROLLED EDUCATION
	focus = {
		id = CHL_controlled_education

		icon = GFX_focus_generic_university_2

		relative_position_id = CHL_enter_patagonia
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_enter_patagonia
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
			has_government = fascism
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY }
		
		completion_reward = {

			add_stability = 0.1

			add_popularity = {
				ideology = fascism
				popularity = 0.1
			}	

			add_research_slot = 1

		}
	}

	### PROMOTE PAN-HISPANIC RHETORIC
	focus = {
		id = CHL_promote_pan_hispanic_rhetoric

		icon = GFX_focus_CHL_promote_pan_hispanic_rhetoric

		relative_position_id = CHL_abide_by_the_francoist_model
		x = 2
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_abide_by_the_francoist_model
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
			has_government = fascism
		}

		search_filters = { FOCUS_FILTER_STABILITY FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_POLITICAL }
		
		completion_reward = {
			add_ideas = CHL_pan_hispanic_rhetoric
		}
	}

	### MILITARY EXCERCISES
	focus = {
		id = CHL_military_excercises

		icon = GFX_focus_generic_little_entente

		relative_position_id = CHL_promote_pan_hispanic_rhetoric
		x = 0
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_promote_pan_hispanic_rhetoric
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		search_filters = { FOCUS_FILTER_ARMY_XP FOCUS_FILTER_NAVY_XP FOCUS_FILTER_AIR_XP FOCUS_FILTER_WAR_SUPPORT }

		available = { 
			has_government = fascism
		}
		
		completion_reward = {
			add_timed_idea = {
				idea = CHL_fascist_military_excercises
				days = 365
			}	
		}
	}

	### CULTIVATE FANATICISM
	focus = {
		id = CHL_cultivate_fanaticism

		icon = GFX_goal_generic_attack_allies

		relative_position_id = CHL_military_excercises
		x = -2
		y = 2
		cost = 5

		prerequisite = {
			focus = CHL_military_excercises
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		search_filters = { FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_POLITICAL }

		available = {
			has_government = fascism
			has_idea = CHL_pan_hispanic_rhetoric	
		}
		
		completion_reward = {

			every_army_leader = {
				add_attack = 1
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			swap_ideas = {
				remove_idea = CHL_pan_hispanic_rhetoric
				add_idea = CHL_pan_hispanic_rhetoric_2
			}	

		}
	}

	### THE PATH TO CONQUEST
	focus = {
		id = CHL_the_path_to_conquest

		icon = GFX_goal_generic_major_war

		relative_position_id = CHL_military_excercises
		x = 1
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_military_excercises
		}

		mutually_exclusive = {
			focus = CHL_the_hispanic_alliance
		} 
		
		ai_will_do = {
			base = 1.5
		}
		available_if_capitulated = no

		search_filters = { FOCUS_FILTER_ANNEXATION FOCUS_FILTER_POLITICAL }

		available = {
			is_subject = no
			has_government = fascism
			has_war_support > 0.79
			has_idea = CHL_the_francoist_model
		}
		
		completion_reward = {

			IF = {
				limit = {
					is_faction_leader = no
				}
				create_faction_from_template = {
					template = faction_template_hipanic_alliance_faction
					name = CHL_hispanic_supremacy_pact_faction
				}
			}

			swap_ideas = {
				remove_idea = CHL_the_francoist_model 
				add_idea = CHL_the_francoist_model_conquest
			}	

			every_state = {
				limit = {
					is_on_continent = south_america
					NOT = {
						Or = {
							is_owned_by = ROOT
							is_claimed_by = ROOT
							is_core_of = ROOT
						}
					}
				}
				add_claim_by = ROOT
			}

		}
	}

	### THE HISPANIC ALLIANCE
	focus = {
		id = CHL_the_hispanic_alliance

		icon = GFX_goal_tripartite_pact

		relative_position_id = CHL_military_excercises
		x = 6
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_military_excercises
		}

		mutually_exclusive = {
			focus = CHL_the_path_to_conquest
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available_if_capitulated = no

		search_filters = { FOCUS_FILTER_STABILITY FOCUS_FILTER_POLITICAL }

		available = {

			has_government = fascism

			any_country = {
				NOT = {
					OR = {
						tag = ROOT
						has_war_with = ROOT
					}
				}
				capital_scope = {
					is_on_continent = south_america
				}
				OR = {
					has_government = fascism
					has_government = neutrality
				}
				is_in_faction = no
			}

			is_in_faction = no
			is_subject = no
			
		}
		
		completion_reward = {

			IF = {
				limit = {
					is_faction_leader = no
				}
				create_faction_from_template = {
					template = faction_template_hipanic_alliance_faction
					name = CHL_hipanic_alliance_faction
				}
			}

			every_country = {
				limit = {
					NOT = {
						OR = {
							tag = ROOT
							has_war_with = ROOT
						}
					}
					capital_scope = {
						is_on_continent = south_america
					}
					OR = {
						has_government = fascism
						has_government = neutrality
					}
					is_in_faction = no
					NOT = {
						OR = {
							original_tag = GYA
							original_tag = SUR
							original_tag = CAY
							original_tag = HAI
							original_tag = BAH
							original_tag = BRA
							original_tag = JAM
							original_tag = GDL
							original_tag = BAS
							original_tag = TRI
							original_tag = RIG
							original_tag = YUC
						}
					}
				}
				country_event = { 
					id = CHL_political_events.35
					days = 2
				}	
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			add_stability = 0.1

		}
	}

	### LATIN AMERICAN ALLIANCE
	focus = {
		id = CHL_the_latin_american_alliance

		icon = GFX_goal_generic_national_unity

		relative_position_id = CHL_the_hispanic_alliance
		x = -1
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_the_hispanic_alliance
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
		}

		search_filters = { FOCUS_FILTER_STABILITY FOCUS_FILTER_POLITICAL }

		available = {
			has_government = fascism
			is_faction_leader = yes
			any_country = {
				OR = {
					original_tag = GYA
					original_tag = SUR
					original_tag = CAY
					original_tag = HAI
					original_tag = BAH
					original_tag = BRA
					original_tag = JAM
					original_tag = GDL
					original_tag = BAS
					original_tag = TRI
					original_tag = QUE
				}
			
				OR = {
					has_government = fascism
					has_government = neutrality
				}
				
			}
		}
		
		completion_reward = {

			add_political_power = 100

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_the_latin_american_alliance_tt

			every_country = {
				limit = {
					NOT = {
						tag = ROOT
					}
					capital_scope = {
						is_on_continent = south_america
					}

					OR = {
						has_government = fascism
						has_government = neutrality
					}

					is_subject = no
					is_in_faction = no
					
					OR = {
						original_tag = GYA
						original_tag = SUR
						original_tag = CAY
						original_tag = HAI
						original_tag = BAH
						original_tag = BRA
						original_tag = QUE
					}
					
				}
				country_event = {  
					id = CHL_political_events.49
					days = 2
				}	
			}

		}
	}

	### SPONSOR ANTI-COLONIALIST REBELLIONS
	focus = {
		id = CHL_sponsor_anti_colonialist_rebellions

		icon = GFX_goal_tfv_saf_anti_colonialist_crusade

		relative_position_id = CHL_the_hispanic_alliance
		x = 1
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_the_hispanic_alliance
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		search_filters = { FOCUS_FILTER_ANNEXATION FOCUS_FILTER_POLITICAL }

		available = {
			has_government = fascism
			all_owned_state = { is_controlled_by_ROOT_or_ally = yes }
			is_subject = no
		}
		
		completion_reward = {

			custom_effect_tooltip = CHL_sponsor_anti_colonialist_rebellions_tt

			hidden_effect = {
				CHL_set_up_american_resistance_states = yes
			}

		}
	}

	### JOINT DEVELOPMENT AND RESEARCH
	focus = {
		id = CHL_joint_development_and_research

		icon = GFX_goal_generic_construction2

		relative_position_id = CHL_the_hispanic_alliance
		x = 0
		y = 2
		cost = 10

		prerequisite = {
			focus = CHL_the_hispanic_alliance
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		search_filters = { FOCUS_FILTER_INDUSTRY FOCUS_FILTER_RESEARCH }

		available = {
			has_government = fascism
			is_faction_leader = yes
			any_country = {
				NOT = {
					original_tag = CHL
				}
				is_in_faction_with = CHL
			}
		}
		
		completion_reward = {

			custom_effect_tooltip = CHL_joint_research_initiatives_tt

			custom_effect_tooltip = CHL_skip_one_line_tt

			every_country = {
				limit = {
					has_government = fascism
					NOT = { has_war_with = ROOT }
					OR = {
						tag = CHL
						is_in_faction_with = ROOT
						is_subject_of = ROOT
					} 
				}
				add_to_tech_sharing_group = CHL_fascist_tech_sharing_group 
			}

			every_country = {
				limit = {
					NOT = {
						original_tag = CHL
					}
					is_in_faction_with = CHL
					has_government = fascism
				}
				random_state = {
					limit = {
						is_owned_and_controlled_by = PREV
						is_core_of = PREV
					}
					add_extra_state_shared_building_slots = 2
					add_building_construction = {
						type = industrial_complex
						level = 2
						instant_build = yes
					}
				}
			}

			random_state = {
				limit =	{
					is_capital = yes
					is_owned_and_controlled_by = ROOT
					is_core_of = ROOT
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}

		}
	}

	### PUSH PAST THE DARIEN GAP
	focus = {
		id = CHL_push_past_the_darien_gap

		icon = GFX_goal_generic_occupy_states_ongoing_war

		relative_position_id = CHL_the_path_to_conquest
		x = -1
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_the_path_to_conquest
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
		}

		search_filters = { FOCUS_FILTER_ANNEXATION }

		available = {
			has_government = fascism
			OR = {
				has_war_support > 0.84
				has_war = yes
			}
			controls_state = 493
			is_subject = no
		}
		
		completion_reward = {

			every_country = {
				limit = {
					OR = {
						original_tag = MEX
						original_tag = ELS
						original_tag = GUA
						original_tag = HON
						original_tag = BLZ
						original_tag = NIC
						original_tag = COS
						original_tag = PAN
					}
					exists = yes
					NOT = {
						OR = {
							is_in_faction_with = ROOT
							is_subject_of = ROOT
						}
					}
				}
				ROOT = {
					create_wargoal = {
						type = annex_everything
						target = PREV
					}
				}
			}

		}
	}

	### THE MIGHT TO DEFEND OUR HOMES
	focus = {
		id = CHL_the_might_to_defend_our_homes

		icon = GFX_focus_ETH_freedom_at_gunpoint

		relative_position_id = CHL_cultivate_fanaticism
		x = 0
		y = 2
		cost = 10

		prerequisite = {
			focus = CHL_cultivate_fanaticism
		}

		prerequisite = {
			#focus = CHL_push_past_the_darien_gap
			#focus = CHL_enter_patagonia
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_WAR_SUPPORT }

		available = {
			has_government = fascism
			has_idea = CHL_pan_hispanic_rhetoric_2
		}
		
		completion_reward = { 

			swap_ideas = {
				remove_idea = CHL_pan_hispanic_rhetoric_2
				add_idea = CHL_pan_hispanic_rhetoric_3
			}	

		}
	}

	### UNDO COLONIALIST OCCUPATIONS
	focus = {
		id = CHL_undo_colonialist_occupations

		icon = GFX_focus_attack_britain

		relative_position_id = CHL_push_past_the_darien_gap
		x = 0
		y = 2
		cost = 5

		prerequisite = {
			focus = CHL_push_past_the_darien_gap
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_ANNEXATION }

		available = {
			has_government = fascism
			OR = {
				controls_state = 304
				controls_state = 313
				controls_state = 474
			}
			NOT = {
				owns_state = 685
				owns_state = 311
			}
			is_subject = no
		}
		
		completion_reward = {

			add_political_power = 50

			custom_effect_tooltip = CHL_undo_colonialist_occupations_tt

		}
	}

	### UNITE HISPANIC AMERICA
	focus = {
		id = CHL_unite_hispanic_america

		icon = GFX_focus_CHL_unite_hispanic_america

		relative_position_id = CHL_the_might_to_defend_our_homes
		x = 1
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_the_might_to_defend_our_homes
			focus = CHL_undo_colonialist_occupations
		}

		mutually_exclusive = {
			focus = CHL_restore_the_old_kingdom
		} 
		
		search_filters = { FOCUS_FILTER_POLITICAL }

		available = {
			has_government = fascism
			# South America
			custom_trigger_tooltip = {
				tooltip = form_country_south_america_required_states_tt

				# Chile
				controls_state = 279
				#controls_state = 948
				controls_state = 950
				controls_state = 949
				controls_state = 507
				controls_state = 952
				controls_state = 506
				controls_state = 951

				# Argentina
				controls_state = 953
				controls_state = 954
				controls_state = 955
				controls_state = 512
				controls_state = 278
				controls_state = 958
				controls_state = 511
				controls_state = 960
				controls_state = 956
				controls_state = 510
				controls_state = 509
				controls_state = 957
				controls_state = 508
				controls_state = 959

				# Uruguay
				controls_state = 300
				controls_state = 946
				controls_state = 945

				# Paraguay
				controls_state = 301
				controls_state = 688

				# Bolivia
				controls_state = 302
				controls_state = 487

				# Peru
				controls_state = 947
				controls_state = 492
				controls_state = 494
				controls_state = 303
				controls_state = 491

				# Ecuador
				controls_state = 490
				controls_state = 305
				#controls_state = 649

				# Colombia
				controls_state = 486
				controls_state = 306
				controls_state = 493

				# Venezuela
				controls_state = 489
				controls_state = 307
				controls_state = 488

				# Guianas
				controls_state = 687
				controls_state = 309
				controls_state = 310

				# Brazil
				controls_state = 939
				controls_state = 495
				controls_state = 940
				controls_state = 938
				controls_state = 942
				controls_state = 280
				controls_state = 941
				controls_state = 497
				controls_state = 937
				controls_state = 935
				controls_state = 498
				controls_state = 936
				controls_state = 499
				controls_state = 505
				controls_state = 943
				controls_state = 496
				controls_state = 500
				controls_state = 501
				controls_state = 504
				controls_state = 944
				controls_state = 503
				controls_state = 502
				controls_state = 969
			}
		}

		ai_will_do = {
			base = 8
		}
		
		completion_reward = {

			every_state = {
				limit = {
					OR = {
						state = 279
						state = 948
						state = 950
						state = 949
						state = 507
						state = 952
						state = 506
						state = 951
						state = 953
						state = 954
						state = 955
						state = 512
						state = 278
						state = 958
						state = 511
						state = 960
						state = 956
						state = 510
						state = 509
						state = 957
						state = 508
						state = 959
						state = 300
						state = 946
						state = 945
						state = 301
						state = 688
						state = 302
						state = 487
						state = 947
						state = 492
						state = 303
						state = 491
						state = 490
						state = 305
						state = 649
						state = 486
						state = 306
						state = 493
						state = 489
						state = 307
						state = 488
						state = 687
						state = 309
						state = 310
						state = 939
						state = 495
						state = 940
						state = 938
						state = 942
						state = 280
						state = 941
						state = 497
						state = 937
						state = 935
						state = 498
						state = 936
						state = 499
						state = 505
						state = 943
						state = 496
						state = 500
						state = 501
						state = 504
						state = 944
						state = 503
						state = 502
						state = 695
						state = 691
						state = 299
						state = 720
						state = 494
						state = 969
					}
				}
				add_core_of = ROOT
			}

			every_state = {
				limit = {
					NOT = {
						is_owned_by = ROOT
					}
					OR = {
						state = 304
						state = 685
						state = 692
						state = 694
						state = 308
						state = 686
						state = 316
						state = 317
					}
				}
				add_claim_by = ROOT
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			drop_cosmetic_tag = yes
			set_cosmetic_tag = CHL_hispanic_union

			hidden_effect = {
				news_event = { 
					id = CHL_news_events.3 
					days = 2
					random_days = 5
				}
			}

		}
	}

	### THE TRUE ENEMY
	focus = {
		id = CHL_the_true_enemy

		icon = GFX_focus_generic_attack_usa

		relative_position_id = CHL_unite_hispanic_america
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_unite_hispanic_america
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		search_filters = { FOCUS_FILTER_INDUSTRY FOCUS_FILTER_ANNEXATION }

		available = {
			has_government = fascism
			is_subject = no
		}
		
		completion_reward = {

			
			create_wargoal = {
				type = annex_everything
				target = USA
			} 

			custom_effect_tooltip = CHL_skip_one_line_tt

			add_timed_idea = {
				idea = CHL_the_true_enemy_idea
				days = 824
			}
			

		}
	}

	### DEMAND THE GUYANAS
	focus = {
		id = CHL_demand_the_guayanas

		icon = GFX_goal_demand_sudetenland

		relative_position_id = CHL_the_path_to_conquest
		x = 1
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_the_path_to_conquest
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		search_filters = { FOCUS_FILTER_ANNEXATION }

		available = {
			has_government = fascism
			OR = {
				controls_state = 488
				controls_state = 939
			}
			is_subject = no
		}

		bypass = {
			AND = {
				controls_state = 687
				controls_state = 309
				controls_state =310
			}
		}
		
		completion_reward = {

			IF = {
				limit = {
					GYA = {
						exists = yes
					}
				}
				create_wargoal = {
					type = annex_everything
					target = GYA
				}
			}

			IF = {
				limit = {
					SUR = {
						exists = yes
					}
				}
				create_wargoal = {
					type = annex_everything
					target = SUR
				}
			}

			IF = {
				limit = {
					CAY = {
						exists = yes
					}
				}
				create_wargoal = {
					type = annex_everything
					target = CAY
				}
			}

			every_other_country = {
				limit = {
					OR = {
						owns_state = 687
						owns_state = 309
						owns_state = 310
					}
					NOT = {
						OR = {
							original_tag = GYA
							original_tag = SUR
							original_tag = CAY
						}
					}
				}
				country_event = {
					id = CHL_political_events.66
					days = 1
				}	
			}

		}
	}

	### LIBERATE THE CARIBBEAN
	focus = {
		id = CHL_liberate_the_caribbean

		icon = GFX_focus_CHL_liberate_the_caribbean

		relative_position_id = CHL_demand_the_guayanas
		x = -1
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_demand_the_guayanas
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		search_filters = { FOCUS_FILTER_ANNEXATION }

		available = {
			has_government = fascism
			OR = {
				controls_state = 307
				controls_state = 489
				controls_state = 493
				controls_state = 304
				controls_state = 316
				controls_state = 317
				controls_state = 312
				controls_state = 313
				controls_state = 311
				controls_state = 474
				controls_state = 476
			}
			is_subject = no
		}

		will_lead_to_war_with = CUB
		will_lead_to_war_with = DOM
		will_lead_to_war_with = HAI
	    will_lead_to_war_with = BAH
	    will_lead_to_war_with = BAS
	    will_lead_to_war_with = JAM
	    will_lead_to_war_with = PUE
	    will_lead_to_war_with = CRC
	    will_lead_to_war_with = TRI
	    will_lead_to_war_with = GDL	
		
		completion_reward = {
			every_state = {
				limit = {
					OR = {
						is_core_of = CUB
						is_core_of = DOM
						is_core_of = HAI
					}
					NOT = {
						is_core_of = ROOT
					}
					NOT = {
						is_claimed_by = ROOT
					}
				}
				add_claim_by = ROOT
			}
            IF = {
            	limit = {
            		CUB = {
						exists = yes
            			NOT = {
            				OR = {
            					is_in_faction_with = ROOT
                            	is_subject_of = ROOT
            				}
            			}
            		}
            	}
            	create_wargoal = {
                    type = annex_everything
                    target = CUB
                    expire = 0
                }
            }
            IF = {
            	limit = {
            		DOM = {
						exists = yes
            			NOT = {
            				OR = {
            					is_in_faction_with = ROOT
                            	is_subject_of = ROOT
            				}
            			}
            		}
            	}
            	create_wargoal = {
                    type = annex_everything
                    target = DOM
                    expire = 0
                }
            }
            IF = {
            	limit = {
            		HAI = {
						exists = yes
            			NOT = {
            				OR = {
            					is_in_faction_with = ROOT
                            	is_subject_of = ROOT
            				}
            			}
            		}
            	}
            	create_wargoal = {
                    type = annex_everything
                    target = HAI
                    expire = 0
                }
            }
            IF = {
            	limit = {
            		BAH = {
						exists = yes
            			NOT = {
            				OR = {
            					is_in_faction_with = ROOT
                            	is_subject_of = ROOT
            				}
            			}
            		}
            	}
            	create_wargoal = {
                    type = annex_everything
                    target = BAH
                    expire = 0
                }
            }
            IF = {
            	limit = {
            		BAS = {
						exists = yes
            			NOT = {
            				OR = {
            					is_in_faction_with = ROOT
                            	is_subject_of = ROOT
            				}
            			}
            		}
            	}
            	create_wargoal = {
                    type = annex_everything
                    target = BAS
                    expire = 0
                }
            }
            IF = {
            	limit = {
            		JAM = {
						exists = yes
            			NOT = {
            				OR = {
            					is_in_faction_with = ROOT
                            	is_subject_of = ROOT
            				}
            			}
            		}
            	}
            	create_wargoal = {
                    type = annex_everything
                    target = JAM
                    expire = 0
                }
            }
            IF = {
            	limit = {
            		PUE = {
						exists = yes
            			NOT = {
            				OR = {
            					is_in_faction_with = ROOT
                            	is_subject_of = ROOT
            				}
            			}
            		}
            	}
            	create_wargoal = {
                    type = annex_everything
                    target = PUE
                    expire = 0
                }
            }
            IF = {
            	limit = {
            		CRC = {
						exists = yes
            			NOT = {
            				OR = {
            					is_in_faction_with = ROOT
                            	is_subject_of = ROOT
            				}
            			}
            		}
            	}
            	create_wargoal = {
                    type = annex_everything
                    target = CRC
                    expire = 0
                }
            }
            IF = {
            	limit = {
            		TRI = {
						exists = yes
            			NOT = {
            				OR = {
            					is_in_faction_with = ROOT
                            	is_subject_of = ROOT
            				}
            			}
            		}
            	}
            	create_wargoal = {
                    type = annex_everything
                    target = TRI
                    expire = 0
                }
            }
            IF = {
            	limit = {
            		GDL = {
						exists = yes
            			NOT = {
            				OR = {
            					is_in_faction_with = ROOT
                            	is_subject_of = ROOT
            				}
            			}
            		}
            	}
            	create_wargoal = {
                    type = annex_everything
                    target = GDL
                    expire = 0
                }
            }
		}
	}

	### PRESS OUR DEMANDS
	focus = {
		id = CHL_press_our_demands

		icon = GFX_focus_generic_attack_the_guyanas

		relative_position_id = CHL_demand_the_guayanas
		x = 1
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_demand_the_guayanas
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 5
		}

		search_filters = { FOCUS_FILTER_ANNEXATION FOCUS_FILTER_POLITICAL }

		available = {
			has_government = fascism
			AND = {
				controls_state = 687
				controls_state = 309
				controls_state = 310
			}
			has_war = yes
			NOT = {
				AND = {
					owns_state = 687
					owns_state = 309
					owns_state = 310
				}
			}
		}
		
		completion_reward = {

			custom_effect_tooltip = CHL_press_our_demands_tt

			custom_effect_tooltip = CHL_skip_one_line_tt

			every_country = {
				limit = {
					has_war_with = ROOT
					OR = {
						owns_state = 687
						owns_state = 309
						owns_state = 310 
					}
				}
				country_event = {
					id = CHL_political_events.69
					hours = 6
					random_hours = 12
				}
				white_peace = {
					tag = ROOT
				}

				every_country = {
					limit = {
						OR = {
							is_in_faction_with = PREV
							is_subject_of = PREV
							has_subject = PREV
						}
						has_War_with = ROOT
					}
					white_peace = {
						tag = ROOT
					}
				}

			}
			
			hidden_effect = {
				ROOT = {
					transfer_state = 687
				}
				
				ROOT = {
					transfer_state = 309
				}
				
				ROOT = {
					transfer_state = 310
				}
			}

		}
	}

	### DEFENSE OF THE HEMISPHERE
	focus = {
		id = CHL_defense_of_the_hemisphere

		icon = GFX_goal_generic_defence 

		relative_position_id = CHL_the_spirit_of_the_war_of_the_pacific
		x = -1
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_the_spirit_of_the_war_of_the_pacific
		}

		mutually_exclusive = {
		} 
		

		available = {
			has_government = fascism
			is_in_faction_with = GER
			GER = {
				is_faction_leader = yes
			}
			is_subject = no
		}

		ai_will_do = {
			base = 2
		}

		search_filters = { FOCUS_FILTER_POLITICAL }
		
		completion_reward = {

			add_political_power = 75

			every_country = {
				limit = {
					NOT = {
						tag = ROOT
					}
					capital_scope = {
						is_on_continent = south_america
					}
					OR = {
						has_government = fascism
						has_government = neutrality
					}
					NOT = {
						OR = {
							original_tag = GYA
							original_tag = SUR
							original_tag = CAY
							original_tag = HAI
							original_tag = BAH
							original_tag = BRA
						}
					}
					is_in_faction = no
					is_subject = no
					NOT = {
						has_war_with = ROOT
					}
				}
				country_event = { 
					id = CHL_political_events.38
					days = 1
				}	
			}

		}
	}

	### SUPPORT THE COLONIAL PLAN
	focus = {
		id = CHL_support_the_colonial_plan

		icon = GFX_focus_CHL_support_the_colonial_plan

		relative_position_id = CHL_the_spirit_of_the_war_of_the_pacific
		x = -3
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_the_spirit_of_the_war_of_the_pacific
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2.5
		}

		search_filters = { FOCUS_FILTER_POLITICAL }

		available = {
			has_government = fascism
			is_in_faction_with = GER
			GER = {
				is_faction_leader = yes
				has_government = fascism
			}
			URG = {
				NOT = {
					has_government = fascism
				}
				exists = yes
				is_subject = no
				NOT = {
					has_war_with = ROOT
				}
			}
			is_subject = no
		}

		bypass = {
			URG = {
				OR = {
					exists = no
					has_war_with = ROOT
					is_subject = yes
				}
			}
		}
		
		completion_reward = {

			URG = {
				country_event = {
					id = CHL_political_events.41
					days = 2
				}
			}

		}
	}

	### UNITE WITH OUR BROTHERS IN HISPANIA
	focus = {
		id = CHL_unite_with_our_brothers_in_hispania

		icon = GFX_focus_por_iberian_summit

		relative_position_id = CHL_support_the_colonial_plan
		x = 1
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_support_the_colonial_plan
			focus = CHL_defense_of_the_hemisphere
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
			modifier = {
				factor = 0
				GER = {
					has_war_with = FRA
				}
				date < 1940.06.1
				FRA = { has_capitulated = no }
			}

			modifier = {
				factor = 50
				FRA = { has_capitulated = yes }
				date > 1940.07.1
			}
		}

		search_filters = { FOCUS_FILTER_POLITICAL }

		available = {
			has_government = fascism
			is_in_faction_with = GER
			GER = {
				is_faction_leader = yes
				has_government = fascism
				has_war = yes
			}
			OR = {
				SPR = {
					OR = {
						has_government = neutrality
						has_government = fascism
					}
					is_subject = no
					is_in_faction = no
					has_war = no
				}
				POR = {
					OR = {
						has_government = neutrality
						has_government = fascism
					}
					is_subject = no
					is_in_faction = no
					has_war = no
				}
			}
			is_subject = no
		}
		
		completion_reward = {

			every_country = {
				limit = {
					OR = {
						original_tag = POR
						original_tag = SPR
					}
					OR = {
						has_government = neutrality
						has_government = fascism
					}
					is_subject = no
					is_in_faction = no
				}
				country_event = {
					id = CHL_political_events.45
					days = 2
				}	
			}

		}
	}

	### RESTORE THE OLD KINGDOM
	focus = {
		id = CHL_restore_the_old_kingdom

		icon = GFX_focus_CHL_restore_the_old_kingdom

		relative_position_id = CHL_the_spirit_of_the_war_of_the_pacific
		x = 1
		y = 3
		cost = 10

		prerequisite = {
			focus = CHL_the_spirit_of_the_war_of_the_pacific
			focus = CHL_enter_patagonia
		}

		#prerequisite = {
		#	focus = CHL_enter_patagonia
		#}

		mutually_exclusive = {
			focus = CHL_unite_hispanic_america
		} 
		
		ai_will_do = {
			base = 5
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_MANPOWER }

		available = {
			has_government = fascism
			all_owned_state = {
				is_controlled_by = ROOT
			}
			959 = {
				is_controlled_by = ROOT
			}
			508 = {
				is_controlled_by = ROOT
			}
			960 = {
				is_controlled_by = ROOT
			}
			512 = {
				is_controlled_by = ROOT
			}
			958 = {
				is_controlled_by = ROOT
			}
			511 = {
				is_controlled_by = ROOT
			}
			278 = {
				is_controlled_by = ROOT
			}
			955 = {
				is_controlled_by = ROOT
			}
			954 = {
				is_controlled_by = ROOT
			}
			953 = {
				is_controlled_by = ROOT
			}
		}
		
		completion_reward = {

			add_stability = 0.1
			add_war_support = 0.1

			every_state = {
				limit = {
					NOT = {
						is_core_of = ROOT
					}
					OR = {
						state = 959
						state = 508
						state = 960
						state = 512
						state = 958
						state = 511
						state = 278
						state = 955
						state = 954
						state = 953
					}
				}
				add_core_of = ROOT
				transfer_state_to = ROOT
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			drop_cosmetic_tag = yes
			set_cosmetic_tag = CHL_fascist_kingdom	

			hidden_effect = {
				news_event = { 
					id = CHL_news_events.2 
					days = 2
					random_days = 5
				}
			}
    
		}
	}

	### AN EMPIRE ON THE PACIFIC
	focus = {
		id = CHL_an_empire_on_the_pacific

		icon = GFX_goal_generic_occupy_states_coastal

		relative_position_id = CHL_restore_the_old_kingdom
		x = -1
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_restore_the_old_kingdom
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 5
		}

		search_filters = { FOCUS_FILTER_POLITICAL }

		available = {
			has_government = fascism
			
		}
		
		completion_reward = {

			every_state = {
				limit = {
					NOT = {
						OR = {
							is_claimed_by = ROOT
							is_core_of = ROOT
							is_owned_by = ROOT
						}
					}
					OR = {
						is_core_of = RAP
						is_core_of = HAW
						is_core_of = TAH
						is_core_of = SAM
						is_core_of = NZL
						is_core_of = SOL
						is_core_of = PNG
						is_core_of = AST
						is_core_of = FIJ
						is_core_of = FSM
						is_core_of = PHI
						is_core_of = INS
						is_core_of = MAL
					}
				}
				add_claim_by = ROOT
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			add_ideas = CHL_an_empire_in_the_pacific_idea
	   
		}
	}

	### MODERN CONQUISTADORS
	focus = {
		id = CHL_modern_conquistadors

		icon = GFX_focus_generic_pope

		relative_position_id = CHL_restore_the_old_kingdom
		x = 1
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_restore_the_old_kingdom
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 15
		}

		search_filters = { FOCUS_FILTER_WAR_SUPPORT }

		available = {
			has_government = fascism
			surrender_progress < 0.49
		}
		
		completion_reward = {

			add_ideas = CHL_spirit_of_the_conquistadors
	   
		}
	}

	### THE FUTURE OF CHILE
	focus = {
		id = CHL_the_future_of_Chile

		icon = GFX_focus_CHL_the_future_of_Chile

		relative_position_id = CHL_increase_presidential_powers
		x = -4
		y = 1
		cost = 10

		allow_branch = {
			IF = {
				limit = {
					has_game_rule = {
						rule = obsolete_focus_branches_visibility
						option = HIDE
					}
				}
				NOT = { has_completed_focus = CHL_reapproach_america }
				NOT = { has_completed_focus = CHL_return_to_the_parliamentary_era }
				NOT = { has_completed_focus = CHL_denounce_the_anarchy }
				NOT = { has_completed_focus = CHL_look_to_tradition }
			}
		}

		prerequisite = {
			focus = CHL_increase_presidential_powers 
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2.5
		}

		available = {
			has_government = communism
			#communism > 0.4
		}

		search_filters = { FOCUS_FILTER_POLITICAL }
		
		completion_reward = {

			add_political_power = 75

			country_event = {
				id = CHL_political_events.20  
				hours = 0
			}	 

		}
	}

	### A SOCIALIST YOUTH ORGANIZATION
	focus = {
		id = CHL_socialist_youth

		icon = GFX_focus_SOV_builder_of_the_red_army

		relative_position_id = CHL_enforce_stricter_secularism
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_repeal_the_separation_of_church_an_state
			focus = CHL_enforce_stricter_secularism
		}

		mutually_exclusive = {
			#focus = CHL_chilean_anti_communist_action_dem_version
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
			OR = {
				has_government = communism
				CHL_has_left_wing_government = yes
			}
		}

		search_filters = { FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_MANPOWER FOCUS_FILTER_HISTORICAL }
		
		completion_reward = {

			add_ideas = CHL_socialist_youth_idea

		}
	}

	### WORK TO COUNTER OPERATION BOLIVAR
	focus = {
		id = CHL_counter_operation_bolivar

		icon = GFX_focus_CHL_counter_operation_bolivar

		relative_position_id = CHL_development_inwards
		x = -1
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_development_inwards
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
			modifier = {
				factor = 2.5
				any_country = {
					is_major = yes
					has_government = fascism
					has_war = yes
				}
			}
		}

		available = {
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_HISTORICAL }
		
		completion_reward = {

			IF = {
				limit = {
					NOT = {
						has_dlc = "La Resistance"
					}
				}
				add_ideas = CHL_non_lar_encryption
			}
			ELSE_IF = {
				limit = {
					has_dlc = "La Resistance"
				}
				add_ideas = CHL_lar_encryption 
			}

		}
	}



	### SUPPORT FOR THE INTERNATIONAL REVOLUTION
	focus = {
		id = CHL_support_for_the_international_revolution

		icon = GFX_focus_ger_great_red_menace

		relative_position_id = CHL_the_future_of_Chile
		x = -2
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_the_future_of_Chile
		}

		mutually_exclusive = {
			focus = CHL_align_with_the_russian_soviet
		} 
		
		ai_will_do = {
			base = 2.5
		}

		available = {
			has_government = communism
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_ARMY_XP FOCUS_FILTER_AIR_XP }
		
		completion_reward = {

			add_ideas = CHL_the_international_revolution

			custom_effect_tooltip = CHL_skip_one_line_tt

			every_neighbor_country = {
				add_popularity = {
					ideology = communism
					popularity = 0.03
				}	
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			set_rule = { 
				can_send_volunteers = yes
			} 

			set_rule = { 
				can_create_factions = yes
			}

		}
	}

	### SPONSOR AMERICAN REVOLUTIONS
	focus = {
		id = CHL_sponsor_american_revolutions

		icon = GFX_focus_por_latin_american_communism

		relative_position_id = CHL_support_for_the_international_revolution
		x = 0
		y = 2
		cost = 5

		prerequisite = {
			focus = CHL_support_for_the_international_revolution
		}

		#mutually_exclusive = {
		#	focus = CHL_strike_down_south_american_fascism
		#	#focus = CHL_an_attempt_to_maintain_our_neutrality
		#} 
		
		ai_will_do = {
			base = 2
		}

		available = {
			has_government = communism
			is_subject = no
		}

		search_filters = { FOCUS_FILTER_POLITICAL }
		
		completion_reward = {

			every_country = {
				limit = {
					capital_scope = {
						OR = {
							is_on_continent = south_america
							is_on_continent = north_america
						}
					}
					NOT = {
						original_tag = CHL
					}
					NOT = { 
						original_tag = USA
					}
				}
				add_popularity = {
					ideology = communism
					popularity = 0.05
				}	
				#add_stability = -0.1
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_sponsor_american_revolutions_tt

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_sponsor_anti_colonialist_rebellions_tt

			hidden_effect = {
				CHL_set_up_american_resistance_states = yes
			}

		}
	}

	### THE UNION OF HISPANIC REPUBLICS
	focus = {
		id = CHL_union_of_hispanic_republics

		icon = GFX_focus_CHL_union_of_hispanic_republics

		relative_position_id = CHL_sponsor_american_revolutions
		x = 2
		y = 1
		cost = 10

		allow_branch = {
			IF = {
				limit = {
					has_game_rule = {
						rule = obsolete_focus_branches_visibility
						option = HIDE
					}
				}
				NOT = { has_completed_focus = CHL_reapproach_america }
				NOT = { has_completed_focus = CHL_return_to_the_parliamentary_era }
				NOT = { has_completed_focus = CHL_denounce_the_anarchy }
				NOT = { has_completed_focus = CHL_look_to_tradition }
			}
		}

		prerequisite = {
			focus = CHL_sponsor_american_revolutions
			focus = CHL_strike_down_south_american_fascism
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 5
		}

		available = {
			has_government = communism
			# South America
			custom_trigger_tooltip = {
				tooltip = form_country_south_america_required_states_tt

				# Chile
				controls_state = 279
				#controls_state = 948
				controls_state = 950
				controls_state = 949
				controls_state = 507
				controls_state = 952
				controls_state = 506
				controls_state = 951

				# Argentina
				controls_state = 953
				controls_state = 954
				controls_state = 955
				controls_state = 512
				controls_state = 278
				controls_state = 958
				controls_state = 511
				controls_state = 960
				controls_state = 956
				controls_state = 510
				controls_state = 509
				controls_state = 957
				controls_state = 508
				controls_state = 959

				# Uruguay
				controls_state = 300
				controls_state = 946
				controls_state = 945

				# Paraguay
				controls_state = 301
				controls_state = 688

				# Bolivia
				controls_state = 302
				controls_state = 487

				# Peru
				controls_state = 947
				controls_state = 492
				controls_state = 494
				controls_state = 303
				controls_state = 491

				# Ecuador
				controls_state = 490
				controls_state = 305
				#controls_state = 649

				# Colombia
				controls_state = 486
				controls_state = 306
				controls_state = 493

				# Venezuela
				controls_state = 489
				controls_state = 307
				controls_state = 488

				# Guianas
				controls_state = 687
				controls_state = 309
				controls_state = 310

				# Brazil
				controls_state = 939
				controls_state = 495
				controls_state = 940
				controls_state = 938
				controls_state = 942
				controls_state = 280
				controls_state = 941
				controls_state = 497
				controls_state = 937
				controls_state = 935
				controls_state = 498
				controls_state = 936
				controls_state = 499
				controls_state = 505
				controls_state = 943
				controls_state = 496
				controls_state = 500
				controls_state = 501
				controls_state = 504
				controls_state = 944
				controls_state = 503
				controls_state = 502
				controls_state = 969
			}
		} 

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY FOCUS_FILTER_WAR_SUPPORT FOCUS_FILTER_ANNEXATION }
		
		completion_reward = {

			add_stability = 0.1
			add_war_support = 0.1

			add_political_power = 120

			custom_effect_tooltip = CHL_skip_one_line_tt

			every_state = {
				limit = {
					OR = {
						state = 279
						state = 948
						state = 950
						state = 949
						state = 507
						state = 952
						state = 506
						state = 951
						state = 953
						state = 954
						state = 955
						state = 512
						state = 278
						state = 958
						state = 511
						state = 960
						state = 956
						state = 510
						state = 509
						state = 957
						state = 508
						state = 959
						state = 300
						state = 946
						state = 945
						state = 301
						state = 688
						state = 302
						state = 487
						state = 947
						state = 492
						state = 303
						state = 491
						state = 490
						state = 305
						state = 649
						state = 486
						state = 306
						state = 493
						state = 489
						state = 307
						state = 488
						state = 687
						state = 309
						state = 310
						state = 939
						state = 495
						state = 940
						state = 938
						state = 942
						state = 280
						state = 941
						state = 497
						state = 937
						state = 935
						state = 498
						state = 936
						state = 499
						state = 505
						state = 943
						state = 496
						state = 500
						state = 501
						state = 504
						state = 944
						state = 503
						state = 502
						state = 695
						state = 691
						state = 299
						state = 720
						state = 494
						state = 969
					}
				}
				add_core_of = ROOT
			}

			every_state = {
				limit = {
					NOT = {
						is_owned_by = ROOT
					}
					OR = {
						state = 304
						state = 685
						state = 692
						state = 694
						state = 308
						state = 686
						state = 316
						state = 317
					}
				}
				add_claim_by = ROOT
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			set_cosmetic_tag = CHL_hispanic_union

			hidden_effect = {
				news_event = { 
					id = CHL_news_events.3 
					days = 2
					random_days = 5
				}
			}
			
		}
	}

	### PROPOSE CLOSER COOPERATION
	focus = {
		id = CHL_propose_closer_cooperation
	
		icon = GFX_goal_generic_national_unity
	
		relative_position_id = CHL_sponsor_american_revolutions
		x = 0
		y = 1
		cost = 10
	
		prerequisite = {
			focus = CHL_sponsor_american_revolutions
		}
	
		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
			modifier = {
				factor = 2
				any_country = {
					is_subject_of = ROOT
				}
			}
		}
	
		available = {
			has_government = communism
	
			any_country = {
				capital_scope = {
					OR = {
						is_on_continent = south_america
						is_on_continent = north_america
					}
				}
				has_government = communism
				is_subject_of = ROOT
				NOT = {
					OR = {
						original_tag = USA
						tag = ROOT
					}
				}
			}

			is_subject = no
		}
	
		search_filters = { FOCUS_FILTER_ANNEXATION }
		
		completion_reward = {
	
			custom_effect_tooltip = CHL_propose_closer_cooperation_tt
			every_country = {
				limit = {
					capital_scope = {
						OR = {
							is_on_continent = south_america
							is_on_continent = north_america
						}
					}
					has_government = communism
					NOT = {
						OR = {
							original_tag = USA 
							tag = ROOT
						}
					} 
					NOT = {
						has_war_with = ROOT
					}
					is_subject_of = ROOT
				}
				country_event = {
					id = CHL_political_events.25
					days = 2
				}	
			}
	
		}
	}

	### NATIONALIZE FOREIGN INDUSTRIES
	focus = {
		id = CHL_nationalize_foreign_industries

		icon = GFX_focus_eng_concessions_to_the_trade_unions

		relative_position_id = CHL_the_future_of_Chile
		x = -1
		y = 2
		cost = 10

		prerequisite = {
			focus = CHL_support_for_the_international_revolution
			focus = CHL_align_with_the_russian_soviet
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
			has_government = communism
		}

		search_filters = { FOCUS_FILTER_INDUSTRY }
		
		completion_reward = {

			custom_effect_tooltip = CHL_modify_chilean_economy_ns_intro
			add_to_variable = { CHL_economy_production_speed_buildings_factor = 0.1 tooltip = production_speed_buildings_factor_tt }
			add_to_variable = { CHL_economy_industrial_capacity_factory = 0.1 tooltip = industrial_capacity_factory_tt }
			add_to_variable = { CHL_economy_industrial_capacity_dockyard = 0.1 tooltip = industrial_capacity_dockyard_tt }
			add_to_variable = { CHL_economy_consumer_goods_factor = -0.05 tooltip = consumer_goods_factor_tt }

			custom_effect_tooltip = CHL_skip_one_line_tt

			random_owned_controlled_state = {
				limit = {
					is_core_of = ROOT
					NOT = {
						state = 948
					}
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}	
			}

		}
	}

	### ALIGN WITH THE RUSSIAN SOVIET
	focus = {
		id = CHL_align_with_the_russian_soviet

		icon = GFX_focus_chi_mission_to_the_soviet_union

		relative_position_id = CHL_support_for_the_international_revolution
		x = 4
		y = 0
		cost = 5

		#offset = {
		#	x = -5
		#	y = 0
		#	trigger = {
		#		has_game_rule = {
		#			rule = obsolete_focus_branches_visibility
		#			option = HIDE
		#		}
		#		has_completed_focus = CHL_address_the_mapuche_conflict
		#	}
		#}

		prerequisite = {
			focus = CHL_the_future_of_Chile
		#	focus = CHL_silverworking
		}

		mutually_exclusive = {
			focus = CHL_support_for_the_international_revolution
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {

			has_government = communism
			#OR = {
			#	AND = {
			#		if = {
			#			limit = {
			#				SOV = {
			#					has_completed_focus = SOV_the_centre
			#					is_faction_leader = yes
			#				}
			#				has_country_leader = { 
			#				    character =  CHL_carlos_contreras_labarca
			#				    ruling_only = yes
			#				}
			#			}
			#		}
			#	}
			#	AND = {
			#		SOV = {
			#			has_completed_focus = SOV_the_left_opposition
			#			is_faction_leader = yes
			#		}
			#		has_country_leader = { 
			#		    character =  CHL_manuel_hidalgo_plaza
			#		    ruling_only = yes
			#		}
			#	}
			#	AND = {
			#		SOV = {
			#			has_completed_focus = SOV_the_right_opposition
			#			is_faction_leader = yes
			#		}
			#		has_country_leader = { 
			#		    character = CHL_elias_lafertte_gavino
			#		    ruling_only = yes
			#		}
			#	}
			#	AND = {
			#		has_government = neutrality
			#		has_country_flag = CHL_mapuche_commuist_cultural_cross_pollination
			#	}
			#}
			is_in_faction = no
			is_subject = no
			SOU = {
				exists = yes
				has_government = communism
				is_faction_leader = yes
			}
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_WAR_SUPPORT }
		
		completion_reward = {

			add_popularity = {
				ideology = communism
				popularity = 0.1
			}

			add_war_support = 0.05

			custom_effect_tooltip = CHL_skip_one_line_tt

			random_country = {
				limit = {
					original_tag = SOV
					is_faction_leader = yes
					has_government = communism
				}
				country_event = {
					id = CHL_political_events.22
					days = 2
				}
			}

		}
	}

	### STRIKE DOWN SOUTH AMERICAN FASCISM
	focus = {
		id = CHL_strike_down_south_american_fascism

		icon = GFX_focus_ITA_liberation_or_death

		relative_position_id = CHL_align_with_the_russian_soviet
		x = 0
		y = 2
		cost = 10

		prerequisite = {
			focus = CHL_align_with_the_russian_soviet
		}

		#mutually_exclusive = {
		#	focus = CHL_sponsor_american_revolutions
		#	#focus = CHL_an_attempt_to_maintain_our_neutrality
		#} 
		
		ai_will_do = {
			base = 0.5
			modifier = {
				factor = 2
				has_government = communism
				has_war_support > 0.8
			}
		}

		available = {
			OR = {
				has_government = communism
				CHL_has_left_wing_government = yes
			}
			has_war_support > 0.89
			any_country = {
				capital_scope = {
					is_on_continent = south_america
				}
				has_government = fascism
			}
			is_subject = no
		}

		search_filters = { FOCUS_FILTER_ANNEXATION }
		
		completion_reward = {
			every_country = {
				limit = {
					capital_scope = {
						is_on_continent = south_america
					}
					has_government = fascism
					NOT = {
						original_tag = DOM
					}
				}
				ROOT = {
					create_wargoal = {
						type = puppet_wargoal_focus
						target = PREV
					} 
				}
			}
		}
	}

	### HUB OF THE WORLD REVOLUTION
	focus = {
		id = CHL_hub_of_the_world_revolution
		icon = GFX_focus_SWE_refuge_for_revolutionaries
		relative_position_id = CHL_the_future_of_Chile 
		x = 1
		y = 1
		cost = 10
		allow_branch = {
			has_country_flag = CHL_enable_hub_of_the_world
		}
		#prerequisite = {
		#	focus = CHL_the_future_of_Chile
		#}
		#mutually_exclusive = {
		#	focus = CHL_align_with_the_russian_soviet
		#} 
		
		ai_will_do = {
			base = 1.5
		}
		available = {
			
		}
		#search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_POLITICAL_CHARACTER FOCUS_FILTER_MILITARY_CHARACTER }
		
		completion_reward = {
			add_war_support = 0.1
			add_political_power = 35
			custom_effect_tooltip = CHL_skip_one_line_tt
			custom_effect_tooltip = CHL_modify_chilean_economy_ns_intro
			add_to_variable = { CHL_economy_consumer_goods_factor = -0.05 tooltip = consumer_goods_factor_tt }
			add_to_variable = { CHL_economy_stability_factor = 0.15 tooltip = stability_factor_tt }
		}
	}

	### JOINT DEVELOPMENT PROGRAMS
	focus = {
		id = CHL_joint_development_programs

		icon = GFX_goal_generic_soviet_construction

		relative_position_id = CHL_align_with_the_russian_soviet
		x = -1
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_align_with_the_russian_soviet
			focus = CHL_support_for_the_international_revolution
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
			#OR = {
				#has_country_flag = CHL_mapuche_commuist_cultural_cross_pollination
				has_government = communism
			#}
			is_in_faction = yes
		}

		search_filters = { FOCUS_FILTER_INDUSTRY }
		
		completion_reward = {

			every_country = {
				limit = {
					NOT = {
						original_tag = CHL
					}
					is_in_faction_with = CHL
				}
				random_state = {
					limit = {
						is_owned_and_controlled_by = PREV
						is_core_of = PREV
					}
					add_extra_state_shared_building_slots = 2
					add_building_construction = {
						type = industrial_complex
						level = 2
						instant_build = yes
					}
				}
			}

			random_state = {
				limit =	{
					is_capital = yes
					is_owned_and_controlled_by = ROOT
					is_core_of = ROOT
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}

		}
	}

	### JOINT RESEARCH INITIATIVES
	focus = {
		id = CHL_joint_research_initiatives

		icon = GFX_focus_generic_socialist_science

		relative_position_id = CHL_align_with_the_russian_soviet
		x = -2
		y = 2
		cost = 10

		prerequisite = {
			focus = CHL_joint_development_programs
			focus = CHL_nationalize_foreign_industries
			#focus = CHL_socialist_youth
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
			#OR = {
				#has_country_flag = CHL_mapuche_commuist_cultural_cross_pollination
				has_government = communism
			#}
			is_in_faction = yes
		}

		search_filters = { FOCUS_FILTER_RESEARCH }
		
		completion_reward = {

			custom_effect_tooltip = CHL_joint_research_initiatives_tt

			custom_effect_tooltip = CHL_skip_one_line_tt

			every_country = {
				limit = {
					OR = {
						has_government = communism
						has_government = neutrality
					}
					NOT = { has_war_with = ROOT }
					OR = {
						tag = CHL
						is_in_faction_with = ROOT
						is_subject_of = ROOT
					} 
				}
				add_to_tech_sharing_group = CHL_communist_tech_sharing_group
			}

		}
	}

	### AN ATTEMPT TO MAINTAIN OUR NEUTRALITY
	focus = {
		id = CHL_an_attempt_to_maintain_our_neutrality

		icon = GFX_goal_generic_neutrality_focus

		relative_position_id = CHL_development_inwards
		x = 1
		y = 1
		cost = 10

		prerequisite = {
			#focus = CHL_land_reforms
			#focus = CHL_counter_operation_bolivar
			focus = CHL_development_inwards
			focus = CHL_kickstart_the_arsenal_of_democracy
		}

		mutually_exclusive = {
			focus = CHL_support_the_democracies
			#focus = CHL_strike_down_south_american_fascism
			#focus = CHL_sponsor_american_revolutions
		} 
		
		ai_will_do = {
			base = 1
			modifier = {
				factor = 2.5
				OR = {
					has_government = neutrality
					has_government = democratic
				}
			}
		}

		available = {
			NOT = {
				has_government = communism
			}
			any_country = {
				original_tag = USA
				has_war = yes
			}
			has_war = no
		}

		bypass ={
			has_government = communism
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY FOCUS_FILTER_HISTORICAL }
		
		completion_reward = {

			add_stability = 0.1

			custom_effect_tooltip = CHL_skip_one_line_tt

			USA = {
				add_opinion_modifier = {
					target = ROOT
					modifier = CHL_stubbornly_maintaining_neutrality
				}	
			}

			ENG = {
				add_opinion_modifier = {
					target = ROOT
					modifier = CHL_stubbornly_maintaining_neutrality
				}	
			}

			FRA = {
				add_opinion_modifier = {
					target = ROOT
					modifier = CHL_stubbornly_maintaining_neutrality
				}	
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			CHL_anarchic_society_level_down = yes

		}
	}


	### LAND REFORMS
	focus = {
		id = CHL_land_reforms

		icon = GFX_focus_generic_land_reclamation

		relative_position_id = CHL_an_attempt_to_maintain_our_neutrality 
		x = 1
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_an_attempt_to_maintain_our_neutrality 
			focus = CHL_support_the_democracies
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
			modifier = {
				factor = 2
				has_war = no
			}
		} 

		available = {
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_MANPOWER FOCUS_FILTER_STABILITY FOCUS_FILTER_HISTORICAL }
		 
		completion_reward = {

			remove_ideas = idea_CHL_the_Hacienda_inquilinaje_system

			IF = {
				limit = {
					AND = {
						has_government = democratic
						CHL_has_left_wing_government = yes
					} 
				}
				add_ideas = CHL_socialist_land_reform
			}
			ELSE_IF = {
				limit = {
					has_government = communism
				}
				add_political_power = 50
				add_stability = 0.1
				add_ideas = CHL_socialist_land_reform
			}
			ELSE_IF = {
				limit = {
					CHL_has_right_wing_government = yes
				}
				add_ideas = CHL_abolished_serfdom
			}

		}
	}

	### SUPPORT THE DEMOCRACIES
	focus = { 
		id = CHL_support_the_democracies

		icon = GFX_focus_generic_league_of_nations

		relative_position_id = CHL_kickstart_the_arsenal_of_democracy
		x = -1
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_kickstart_the_arsenal_of_democracy
		}

		mutually_exclusive = {
			focus = CHL_an_attempt_to_maintain_our_neutrality
		} 
		
		ai_will_do = {
			base = 2
			modifier = {
				factor = 0
				NOT = {
					has_government = democratic
				}
			}
		}

		available = {
			has_government = democratic

			any_country = {
				has_government = democratic
				has_war = yes
				NOT = {
					TAG = ROOT
				}
			}
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_ANNEXATION FOCUS_FILTER_ARMY_XP FOCUS_FILTER_AIR_XP }
		
		completion_reward = {

			add_ideas = CHL_democratic_volunteer_corps

			#hidden_effect = {
				set_rule = {
					can_send_volunteers = yes
				}
			#}

		}
	}

	### MAPUCHE RECONCILLIATION CAMPAIGNS
	focus = {
		id = CHL_mapuche_reconcilliation_campaigns

		icon = GFX_focus_CHL_mapuche_reconcilliation_campaigns_export

		relative_position_id = CHL_land_reforms
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_land_reforms
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
		}

		available = { 
			NOT = {
				OR = {
					has_government = fascism
					has_government = neutrality
				}
			}
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY FOCUS_FILTER_MANPOWER FOCUS_FILTER_POLITICAL_CHARACTER FOCUS_FILTER_MILITARY_CHARACTER }
		
		completion_reward = {	
			custom_effect_tooltip = CHL_mapuche_reconcilliation_campaigns_tt
			custom_effect_tooltip = available_political_advisor
			show_ideas_tooltip = CHL_manuel_panguilef
		}
	}

	### FOUND THE CONTALORIA GENERAL DE LA REPUBLICA
	focus = {
		id = CHL_found_the_contraloria_general_de_la_republica

		icon = GFX_focus_CHL_found_the_contraloria_general_de_la_republica

		relative_position_id = CHL_an_attempt_to_maintain_our_neutrality
		x = -1
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_an_attempt_to_maintain_our_neutrality
			#focus = CHL_work_towards_laissex_faire
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
		}

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY FOCUS_FILTER_HISTORICAL }
		
		completion_reward = {

			CHL_anarchic_society_level_down = yes

			add_ideas = CHL_comptroller_general_of_chile

		}
	}

	### EMBARGO STRATEGIES
	focus = {
		id = CHL_embargo_strategies

		icon = GFX_goal_generic_trade

		relative_position_id = CHL_support_the_democracies
		x = 1
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_support_the_democracies
			#focus = CHL_land_reforms
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available = {
			OR = {
				USA = {
					has_government = democratic
					has_war = yes
					NOT = {
						has_war_with = ROOT
					}
				}
				FRA = {
					has_government = democratic
					has_war = yes
					NOT = {
						has_war_with = ROOT
					}
				}
				ENG = {
					has_government = democratic
					has_war = yes
					NOT = {
						has_war_with = ROOT
					}
				}
			}
		}

		search_filters = { FOCUS_FILTER_POLITICAL }
		
		completion_reward = {
			custom_effect_tooltip = CHL_embargo_strategies_tt
			IF = {
				limit = {
					has_dlc = "By Blood Alone"
				}
				every_country = {
					limit = {
						OR = {
							has_war_with = ENG
							has_war_with = FRA
							has_war_with = USA
						}
						NOT = {
							has_government = democratic
						}
					}
					ROOT = {
						send_embargo = PREV
					}
				}
			}
			ELSE_IF = {
				limit = {
					NOT = {
						has_dlc = "By Blood Alone"
					}
				}
				every_country = {
					limit = {
						OR = {
							has_war_with = ENG
							has_war_with = FRA
							has_war_with = USA
						}
						NOT = {
							has_government = democratic
						}
					}
					ROOT = {
						add_opinion_modifier = {
						    target = PREV
						    modifier = embargo
						}
					}
				}
			}

		}
	}

	### ENACT STRICTER LABOR LAWS
	focus = {
		id = CHL_enact_stricter_labor_laws

		icon = GFX_focus_generic_population_growth

		relative_position_id = CHL_an_attempt_to_maintain_our_neutrality
		x = -1
		y = 3
		cost = 10

		prerequisite = {
			#focus = CHL_an_attempt_to_maintain_our_neutrality
			#focus = CHL_embargo_strategies
			focus = CHL_land_reforms
		}

		mutually_exclusive = {
			focus = CHL_found_national_steelworks
		} 
		
		ai_will_do = {
			base = 1.5
			modifier = {
				factor = 2
				has_country_leader = { 
				    character = CHL_elias_lafertte_gavino
				    ruling_only = yes
				}
			}
		}

		available = {
		}

		search_filters = { FOCUS_FILTER_INDUSTRY FOCUS_FILTER_STABILITY }
		
		completion_reward = {

			add_timed_idea = {
				idea = CHL_stricter_labor_laws
				days = 360
			}	

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_enact_stricter_labor_laws_tt

		}
	}

	### FOUND NATIONAL STEELWORKS
	focus = {
		id = CHL_found_national_steelworks

		icon = GFX_focus_generic_steel

		relative_position_id = CHL_an_attempt_to_maintain_our_neutrality
		x = 3
		y = 3
		cost = 10

		prerequisite = {
			#focus = CHL_an_attempt_to_maintain_our_neutrality
			#focus = CHL_embargo_strategies
			focus = CHL_land_reforms
		}

		mutually_exclusive = {
			focus = CHL_enact_stricter_labor_laws
		} 
		
		ai_will_do = {
			base = 2.5
			modifier = {
				factor = 0
				has_country_leader = { 
				    character = CHL_elias_lafertte_gavino
				    ruling_only = yes
				}
			}
		}

		available = {
			950 = {
				is_owned_and_controlled_by = ROOT
			}
			NOT = {
				has_country_flag = CHL_protecting_mapuche_lands
			}
		}

		search_filters = { FOCUS_FILTER_INDUSTRY FOCUS_FILTER_HISTORICAL }
		
		completion_reward = {
 
			950 = {
				add_resource = {
					type = steel
					amount = 24
				}
			}

			custom_effect_tooltip = CHL_skip_one_line_tt 

			custom_effect_tooltip = CHL_found_national_steelworks_tt

		}
	}

	### A JOINT APPLICATION TO THE ALLIES
	focus = {
		id = CHL_a_joint_application_to_the_allies

		icon = GFX_focus_CHL_a_joint_application_to_the_allies

		relative_position_id = CHL_enact_stricter_labor_laws
		x = 1
		y = 3
		cost = 10

		prerequisite = {
			focus = CHL_enact_stricter_labor_laws
			focus = CHL_found_national_steelworks
		}
		mutually_exclusive = {
			focus = CHL_dispute_over_tierra_del_fuego
		} 
		
		ai_will_do = {
			base = 2
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

		available = {
			has_government = democratic
			ARG = {
				NOT = {
					OR = {
						has_government = fascism
						has_government = communism
					}
				}
				is_in_faction = no
			}
			any_country = {
				is_major = yes
				has_government = democratic 
				is_faction_leader = yes 
			}
			is_in_faction = no
			is_subject = no
		}

		search_filters = { FOCUS_FILTER_POLITICAL }
		
		completion_reward = {
			ARG = {  
				country_event = { 
					id = CHL_political_events.1 
					days = 2 
				} 
			}
		}
	}

	### DISPUTE OVER TIERRA DEL FUEGO
	focus = {
		id = CHL_dispute_over_tierra_del_fuego

		icon = GFX_focus_CHL_dispute_over_tierra_del_fuego

		relative_position_id = CHL_a_joint_application_to_the_allies
		x = 2
		y = 0
		cost = 10

		prerequisite = {
			focus = CHL_enact_stricter_labor_laws
			focus = CHL_found_national_steelworks
		}

		mutually_exclusive = {
			focus = CHL_a_joint_application_to_the_allies
		} 

		ai_will_do = {
			base = 2
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
		
		will_lead_to_war_with = ARG

		available = {

			NOT = {
				has_government = communism
			}

			CHL_has_right_wing_government = yes

			507 = {
				is_owned_and_controlled_by = ROOT
			}

			953 = {
				NOT = {
					is_owned_and_controlled_by = ROOT
				}
			}

			has_war_support > 0.89

			is_subject = no

		}

		search_filters = { FOCUS_FILTER_ANNEXATION FOCUS_FILTER_HISTORICAL }
		
		completion_reward = {

			custom_effect_tooltip = CHL_dispute_over_tierra_del_fuego_tt

			random_country = {  
				limit = {
					owns_state = 953
				}
				country_event = {  
					id = CHL_political_events.4 
					days = 2 
				} 
			}
		}
	}

	### PROTECT THE EASTER ISLAND
	focus = {
		id = CHL_protect_the_easter_island

		icon = GFX_focus_CHL_protect_the_easter_island

		relative_position_id = CHL_an_attempt_to_maintain_our_neutrality
		x = 1
		y = 4
		cost = 5

		prerequisite = {
			focus = CHL_enact_stricter_labor_laws
			focus = CHL_found_national_steelworks
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
			modifier = {
				factor = 0
				is_historical_focus_on = yes
				date > 1944.1.1
			}
		}

		available = {
			threat > 0.7

			948 = {
				is_owned_and_controlled_by = ROOT
			}

			is_subject = no

			any_country = {
				OR = {
					has_war_with = JAP
					has_war_with = AST
					has_war_with = NZL
				}
				capital_scope = {
					OR = {
						is_on_continent = north_america
						is_on_continent = south_america
					}
				}
				has_government = democratic
			}	
		}

		search_filters = { FOCUS_FILTER_INDUSTRY FOCUS_FILTER_ARMY_XP FOCUS_FILTER_NAVY_XP FOCUS_FILTER_HISTORICAL }
		
		completion_reward = {

			948 = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = dockyard
					level = 2
					instant_build = yes
				}	
				add_building_construction = {
					type = coastal_bunker
					level = 4
					instant_build = yes
					province = 13294
				}	
				add_building_construction = {
					type = naval_base
					level = 2
					instant_build = yes
					province = 13294
				}	
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			navy_experience = 25

			army_experience = 25

			custom_effect_tooltip = CHL_skip_one_line_tt
			custom_effect_tooltip = CHL_protect_the_easter_island_tt
			IF = {
				limit = {
					JAP = {
						exists = yes
						OR = {
							has_government = fascism
							has_government = neutrality
						}
						is_subject = no
						any_country = {
							has_war_with = PREV
							capital_scope = {
								OR = {
									is_on_continent = north_america
									is_on_continent = south_america
								}
							}
							has_government = democratic
						}	
					}
				}
				create_wargoal = {
					type = topple_government
					target = JAP
				}
			}
			IF = {
				limit = {
					NZL = { 
						exists = yes
						OR = {
							has_government = fascism
							has_government = neutrality
						}
						is_subject = no
						any_country = {
							has_war_with = PREV
							capital_scope = {
								OR = {
									is_on_continent = north_america
									is_on_continent = south_america
								}
							}
							has_government = democratic
						}	
					}
				}
				create_wargoal = {
					type = topple_government
					target = NZL
				}
			}
			IF = {
				limit = { 
					AST = {
						exists = yes
						OR = {
							has_government = fascism
							has_government = neutrality
						}
						is_subject = no
						any_country = {
							has_war_with = PREV
							capital_scope = {
								OR = {
									is_on_continent = north_america
									is_on_continent = south_america
								}
							}
							has_government = democratic
						}	
					}
				}
				create_wargoal = {
					type = topple_government
					target = AST
				}
			}

			hidden_effect = {
				news_event = { 
					id = CHL_news_events.7 
					days = 1
				}
			}
 
		}
	}   

	### OFFER TO PROTECT PITCAIRN
	focus = {
		id = CHL_offer_to_protect_pitcairn

		icon = GFX_focus_chi_british_cooperation

		relative_position_id = CHL_protect_the_easter_island
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_protect_the_easter_island
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

		available = {
			is_subject = no
		}

		search_filters = { FOCUS_FILTER_ANNEXATION FOCUS_FILTER_MANPOWER FOCUS_FILTER_WAR_SUPPORT }
		
		completion_reward = {

			random_country = {
				limit = {
					owns_state = 270
				} 
				country_event = {
					id = CHL_political_events.89
					days = 2
				}	
			}

			custom_effect_tooltip = if_they_accept_tt
			effect_tooltip = {

				add_war_support = 0.05

				add_manpower = 1500

				270 = {
					transfer_state_to = ROOT
					add_core_of = ROOT
				}

			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			IF = {
				limit = {
					JAP = {
						OR = {
							has_government = fascism
							has_government = neutrality
						}
						OR = {
							owns_state = 633
							owns_state = 684
							owns_state = 647
						}
					}
				}
				633 = {
					add_claim_by = ROOT
				}
				684 = {
					add_claim_by = ROOT
				}
				647 = {
					add_claim_by = ROOT
				}
			}

			IF = {
				limit = {
					NZL = {
						OR = {
							has_government = fascism
							has_government = neutrality
						}
						owns_state = 726
					}
				}
				726 = {
					add_claim_by = ROOT
				}
			}
	
		}
	} 
 







	### PUBLIC WORKS
	focus = {
		id = CHL_public_works

		icon = GFX_focus_generic_public_works

		relative_position_id = CHL_look_to_tradition
		x = 56
		y = 0
		cost = 10

		mutually_exclusive = {
			focus = CHL_dissolve_covensa
		} 
		
		ai_will_do = {
			base = 2
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
		}

		offset = {
			x = -29
			y = 0
			trigger = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
				has_completed_focus = CHL_look_to_tradition
			}
		}

		offset = {
			x = -38
			y = 0
			trigger = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
				has_completed_focus = CHL_endorse_the_constitution
			}
		}

		offset = {
			x = -41
			y = 0
			trigger = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
				has_completed_focus = CHL_denounce_the_anarchy
			}
		}

		offset = {
			x = -10
			y = 0
			trigger = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
				has_completed_focus = CHL_address_the_mapuche_conflict
			}
		}


		offset = {
			x = -7
			y = 0
			trigger = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
				has_completed_focus = CHL_rule_by_decree
			}
		}

		available = {
			any_core_state = {
				is_owned_and_controlled_by = ROOT
			}
		}

		search_filters = { FOCUS_FILTER_INDUSTRY FOCUS_FILTER_HISTORICAL }
		
		completion_reward = {

			custom_effect_tooltip = CHL_modify_chilean_economy_ns_intro
			add_to_variable = { CHL_economy_production_speed_buildings_factor = 0.1 tooltip = production_speed_buildings_factor_tt }
			add_to_variable = { CHL_economy_industrial_capacity_factory = 0.05 tooltip = industrial_capacity_factory_tt }

			custom_effect_tooltip = CHL_skip_one_line_tt 

			random_core_state = {
				limit = {
					is_fully_controlled_by = ROOT
					free_building_slots = {
						building = infrastructure
						size > 0
					}
				}
				prioritize = { 506 279 507 950 952 951 949 } 
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			random_core_state = { 
				limit = {
					is_fully_controlled_by = ROOT
					free_building_slots = {
						building = infrastructure
						size > 0
					}
				}
				prioritize = { 506 279 507 950 952 951 949 } 
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			every_owned_state = {
				limit = {
					is_core_of = ROOT
					is_fully_controlled_by = ROOT
				}
				add_dynamic_modifier = {
					modifier = CHL_public_works_modifier
					scope = CHL
					days = 365
				}
			}	

		}
	} 

	### DISSOLVE COVENSA
	focus = {
		id = CHL_dissolve_covensa

		icon = GFX_focus_renounce_the_treaty_of_trianon

		relative_position_id = CHL_look_to_tradition
		x = 45
		y = 0
		cost = 10

		mutually_exclusive = {
			focus = CHL_public_works
		} 
		
		ai_will_do = {
			base = 2
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

		available = { 
			any_core_state = {
				is_owned_and_controlled_by = ROOT
			}
		}

		offset = {
			x = -29
			y = 0
			trigger = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
				has_completed_focus = CHL_look_to_tradition
			}
		}

		offset = {
			x = -38
			y = 0
			trigger = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
				has_completed_focus = CHL_endorse_the_constitution
			}
		}

		offset = {
			x = -41
			y = 0
			trigger = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
				has_completed_focus = CHL_denounce_the_anarchy
			}
		}

		offset = {
			x = -10
			y = 0
			trigger = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
				has_completed_focus = CHL_address_the_mapuche_conflict
			}
		}


		offset = {
			x = -7
			y = 0
			trigger = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
				has_completed_focus = CHL_rule_by_decree
			}
		}

		search_filters = { FOCUS_FILTER_INDUSTRY }
		
		completion_reward = { 

			custom_effect_tooltip = CHL_modify_chilean_economy_ns_intro
			add_to_variable = { CHL_economy_local_resources_factor = 0.15 tooltip = local_resources_factor_tt }
			add_to_variable = { CHL_economy_industrial_capacity_dockyard = 0.1 tooltip = industrial_capacity_dockyard_tt }

			custom_effect_tooltip = CHL_skip_one_line_tt 

			custom_effect_tooltip = CHL_expand_mining_prospection_tt
			every_core_state = {
				limit = {
					is_fully_controlled_by = ROOT
					has_resources_amount = {
						resource = steel 
						amount > 0
					}
				}
				add_resource = {
					show_state_in_tooltip = no
					type = steel
					amount = 4
				}
			}  
			every_core_state = {
				limit = {
					is_fully_controlled_by = ROOT
					has_resources_amount = {
						resource = tungsten 
						amount > 0
					}
				}
				add_resource = {
					show_state_in_tooltip = no
					type = tungsten
					amount = 4
				}
			}
			every_core_state = {
				limit = {
					is_fully_controlled_by = ROOT
					has_resources_amount = {
						resource = chromium 
						amount > 0
					}
				}
				add_resource = {
					show_state_in_tooltip = no
					type = chromium
					amount = 4
				}
			}
			every_core_state = {
				limit = {
					is_fully_controlled_by = ROOT
					has_resources_amount = {
						resource = aluminium 
						amount > 0
					}
				}
				add_resource = {
					show_state_in_tooltip = no
					type = aluminium
					amount = 4
				}
			}

		}  
	} 

	### CONSTRUCT NEW HYDROELECTRIC STATIONS
	focus = {
		id = CHL_construct_new_hydroelectric_stations

		icon = GFX_focus_generic_hydroelectric_energy

		relative_position_id = CHL_dissolve_covensa
		x = 4
		y = 1
		cost = 10

		#offset = {
		#	x = -6
		#	y = 0
		#	trigger = {
		#		has_game_rule = {
		#			rule = obsolete_focus_branches_visibility
		#			option = HIDE
		#		}
		#		has_completed_focus = CHL_look_to_tradition
		#	}
		#}

		prerequisite = {
			#focus = CHL_endorse_the_constitution  
			#focus = CHL_look_to_tradition
			focus = CHL_dissolve_covensa
			focus = CHL_public_works
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
			modifier = {
				factor = 2
				has_completed_focus = CHL_look_to_tradition
			}
		}

		available = {
			NOT = {
				OR = {
					has_country_flag = CHL_protecting_mapuche_lands
					has_completed_focus = CHL_avenge_the_pacification_of_araucania
				}
			}
			950 = {
				is_owned_and_controlled_by = ROOT
			}
		}

		search_filters = { FOCUS_FILTER_INDUSTRY }
		
		completion_reward = {

			random_core_state = {
				limit = {
					is_fully_controlled_by = ROOT
					free_building_slots = {
						building = industrial_complex
						size > 0
						include_locked = yes
					}
				}
				prioritize = { 950 } 
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}

			add_ideas = CHL_hydroelectric_power

			IF = {
				limit = {
					has_mapuche_conflict = yes
				}
				CHL_mapuche_conflict_level_up = yes
			}

		}
	}

	### IMPOSE NEW TAXES
	focus = {
		id = CHL_impose_new_taxes

		icon = GFX_focus_mex_privatisation

		relative_position_id = CHL_public_works
		x = -3
		y = 1
		cost = 5

		prerequisite = {
			#focus = CHL_endorse_the_constitution   
			#focus = CHL_denounce_the_anarchy  
			focus = CHL_dissolve_covensa
			focus = CHL_public_works
		}

		offset = {
			x = 0
			y = 0
			trigger = {
				has_game_rule = {
					rule = obsolete_focus_branches_visibility
					option = HIDE
				}
				has_completed_focus = CHL_denounce_the_anarchy
			}
		}
	
		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
			modifier = {
				factor = 1.5
				has_government = fascism
			}
		}
	 
		available = {
			OR = {
				has_completed_focus = CHL_endorse_the_constitution
				has_government = fascism 
				has_completed_focus = CHL_crown_antoine_as_sovereign_king
			}
		}

		search_filters = { FOCUS_FILTER_INDUSTRY }
		
		completion_reward = {
	
			add_timed_idea = {
				idea = CHL_imposed_new_taxes
				days = 360
			}	

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_impose_new_taxes_tt

		}
	} 

	### ISSUE BONDS
	focus = {
		id = CHL_issue_bonds

		icon = GFX_focus_SWI_issue_war_bonds

		relative_position_id = CHL_public_works
		x = -5
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_public_works  
			focus = CHL_dissolve_covensa  
		}

		mutually_exclusive = { 
		}  
		 
		ai_will_do = {
			base = 2
		}

		available = {
			OR = {
				custom_trigger_tooltip = {
					tooltip = CHL_has_idea_near_anarchy
					OR = {
						has_idea = idea_CHL_near_anarchic_society
						has_idea = idea_CHL_near_anarchic_society_2
						has_idea = idea_CHL_near_anarchic_society_3
						has_idea = idea_CHL_near_anarchic_society_4
					}
				}	
				has_war = yes
			}
		}

		search_filters = { FOCUS_FILTER_INDUSTRY FOCUS_FILTER_STABILITY }
		
		completion_reward = {

			custom_effect_tooltip = CHL_modify_chilean_economy_ns_intro
			add_to_variable = { CHL_economy_consumer_goods_factor = -0.1 tooltip = consumer_goods_factor_tt }
			add_to_variable = { CHL_economy_stability_factor = 0.05 tooltip = stability_factor_tt }

		}
	} 

	### CONTRACT EMPRESA DE LOS FERROCARRILLES DEL ESTADO
	focus = {
		id = CHL_contract_efe
 
		icon = GFX_focus_CHL_contract_efe

		relative_position_id = CHL_public_works
		x = -1
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_public_works  
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available = {
		}

		search_filters = { FOCUS_FILTER_INDUSTRY FOCUS_FILTER_HISTORICAL }
		
		completion_reward = {

			random_core_state = {
				limit = {
					is_fully_controlled_by = ROOT
					free_building_slots = {
						building = infrastructure
						size > 0
					}
				}
				prioritize = { 506 279 507 950 952 951 949 } 
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}

			custom_effect_tooltip = CHL_skip_one_line_tt
			custom_effect_tooltip = available_industrial_concern
			show_ideas_tooltip = CHL_empresa_ferrocarries_del_estado

		}
	} 

	### BEGIN WORK ON THE PAN-AMERICAN HIGHWAY
	focus = {
		id = CHL_work_on_the_pan_american_highway

		icon = GFX_focus_CHL_work_on_the_panamerican_highway

		relative_position_id = CHL_dissolve_covensa
		x = 2
		y = 1
		cost = 10

		prerequisite = {
			#focus = CHL_endorse_the_constitution  
			#focus = CHL_denounce_the_anarchy 
			focus = CHL_dissolve_covensa
			focus = CHL_public_works
		}

		#offset = {
		#	x = -30 
		#	y = 0
		#	trigger = {
		#		has_game_rule = {
		#			rule = obsolete_focus_branches_visibility
		#			option = HIDE
		#		}
		#		has_completed_focus = CHL_denounce_the_anarchy
		#	}
		#}

		mutually_exclusive = {
		} 
		
		search_filters = { FOCUS_FILTER_INDUSTRY }

		available = {
			OR = {
				has_completed_focus = CHL_endorse_the_constitution
				has_government = fascism
				has_completed_focus = CHL_crown_antoine_as_sovereign_king
			}
		}
		
		completion_reward = {

			add_timed_idea = {
				idea = pan_american_highway_connections
				days = 365
			}	

			custom_effect_tooltip = CHL_skip_one_line_tt

			random_state = {
				limit = {
					is_owned_and_controlled_by = ROOT
					NOT = {
						state = 948
					}
					free_building_slots = {
						building = infrastructure
						size > 1
					}	
				}
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
			random_state = {
				limit = {
					is_owned_and_controlled_by = ROOT
					NOT = {
						state = 948
					}
					free_building_slots = {
						building = infrastructure
						size > 1
					}	
				}
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}

			custom_effect_tooltip = CHL_skip_one_line_tt
			
			every_country = {
				limit = {
					exists = yes
					NOT = {
						has_war_with = ROOT
					}
					OR = {
						original_tag = CAN
						original_tag = USA
						original_tag = MEX
						original_tag = GUA
						original_tag = HON
						original_tag = ECU
						original_tag = NIC
						original_tag = COS
						original_tag = PAN
						original_tag = COL
						original_tag = VEN
						original_tag = ECU
						original_tag = PRU
						original_tag = BOL
						original_tag = ARG
						original_tag = BRA
						original_tag = CHL
					}
					NOT = {
						original_tag = ROOT
					}
				}
				add_opinion_modifier = {
					target = ROOT
					modifier = working_on_the_pan_american_highway
				}	
			}
		}
	} 

	### EXPAND THE FORESTRY INDUSTRY
	focus = {
		id = CHL_expand_the_forestry

		icon = GFX_focus_CHL_expand_the_forestry

		relative_position_id = CHL_public_works
		x = 1 
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_public_works   
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
		}

		available = {
			AND = {
				279 = {
					is_owned_and_controlled_by = ROOT
				}
				950 = {
					is_owned_and_controlled_by = ROOT
				}
			}
		}

		search_filters = { FOCUS_FILTER_INDUSTRY FOCUS_FILTER_HISTORICAL }
		
		completion_reward = {

			custom_effect_tooltip = CHL_expand_the_forestry_decision_tt

			custom_effect_tooltip = CHL_skip_one_line_tt

			every_core_state = {   
				limit = {
					is_owned_and_controlled_by = ROOT 
					NOT = {
						state = 948
					}
				}
				random_select_amount = 3
				add_extra_state_shared_building_slots = 1
			}
			279 = {
				add_extra_state_shared_building_slots = 1
			}
			950 = {
				add_extra_state_shared_building_slots = 3
			}

			custom_effect_tooltip = CHL_skip_one_line_tt
			custom_effect_tooltip = available_industrial_concern
			show_ideas_tooltip = CHL_compania_manufacura_cartones

		}
	} 

	### GOVERNMENT MANDATED CONTRACTS
	focus = {
		id = CHL_government_mandated_contracts

		icon = GFX_focus_generic_treaty

		relative_position_id = CHL_expand_the_forestry
		x = 0
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_expand_the_forestry  
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
		}

		available = {

		}

		search_filters = { FOCUS_FILTER_POLITICAL_CHARACTER }
		
		completion_reward = {

			add_political_power = 50

			custom_effect_tooltip = CHL_skip_one_line_tt
			
			custom_effect_tooltip = CHL_modify_chilean_economy_ns_intro
			add_to_variable = { CHL_economy_political_advisor_cost_factor = -0.25 tooltip = political_advisor_cost_factor_tt }

		}
	} 

	### WE MUST DIG DEEPER
	focus = {
		id = CHL_we_must_dig_deeper

		icon = GFX_focus_generic_mining_industry

		relative_position_id = CHL_dissolve_covensa 
		x = 0
		y = 1
		cost = 5
 
		prerequisite = {
			focus = CHL_dissolve_covensa  
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}

		available = {
		}

		search_filters = { FOCUS_FILTER_INDUSTRY }
		
		completion_reward = {

			every_core_state = {   
				limit = {
					is_owned_and_controlled_by = ROOT 
					OR = {
						has_resources_amount = {
							resource = steel
							amount > 1
						}
						has_resources_amount = {
							resource = tungsten
							amount  > 1
						}
						has_resources_amount = {
							resource = chromium
							amount > 1
						}
					}
				}
				random_select_amount = 2
				add_dynamic_modifier = {
					modifier = CHL_deeper_mines_modifier
					scope = CHL
				}
				
			} 

			random_core_state = {
				limit = {
					is_owned_and_controlled_by = ROOT
				}

				add_resource = {
					type = steel
					amount = 2
				}
				
				add_resource = {
					type = tungsten
					amount = 4
				}

			}

		}
	} 

	### ESTABLISH BENEFICIAL TRADE RELATIONSHIPS
	focus = {
		id = CHL_establish_trade_relationships

		icon = GFX_goal_generic_positive_trade_relations

		relative_position_id = CHL_dissolve_covensa
		x = -2
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_dissolve_covensa  
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		available = { 
		}

		search_filters = { FOCUS_FILTER_INDUSTRY FOCUS_FILTER_POLITICAL }
		
		completion_reward = {

			every_country = {
				limit = {
					capital_scope = {
						is_on_continent = south_america
					}
				}
				add_opinion_modifier = {
					target = CHL
					modifier = chilean_trade_deals_opinion_modifier
				}
			}

			custom_effect_tooltip = CHL_modify_chilean_economy_ns_intro
			add_to_variable = { CHL_economy_local_resources_factor = 0.05 tooltip = local_resources_factor_tt }
			add_to_variable = { CHL_economy_min_export_factor = 0.15 tooltip = min_export_tt }

		}
	} 

	### INTERNATIONAL LOANS
	focus = {
		id = CHL_international_loans

		icon = GFX_focus_generic_concessions

		relative_position_id = CHL_establish_trade_relationships
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_establish_trade_relationships  
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
		}

		search_filters = { FOCUS_FILTER_INDUSTRY FOCUS_FILTER_POLITICAL }
		 
		completion_reward = {

			add_political_power = 100

			custom_effect_tooltip = CHL_CHL_international_loans_tt

		}
	} 
 
	### CONNECT THE NORHTERN RAILWAYS
	focus = {
		id = CHL_connect_the_northern_railways

		icon = GFX_focus_CHL_connect_the_northern_railways

		relative_position_id = CHL_contract_efe
		x = -1
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_contract_efe  
			focus = CHL_we_must_dig_deeper  
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
		}

		available = {
			AND = {
				controls_state = 951
				controls_state = 506
				controls_state = 952
			}
		}

		search_filters = { FOCUS_FILTER_INDUSTRY FOCUS_FILTER_HISTORICAL }
		
		completion_reward = {

			build_railway = {
				level = 1
			    build_only_on_allied = yes
			    start_province = 5228
			    target_province = 5131
			}	

			custom_effect_tooltip = CHL_skip_one_line_tt

			506 = { 
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}	
			}

			IF = {
				limit = {
					951 = {
						free_building_slots = {
							building = infrastructure
							size > 0
						}
					}
				}
				951 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = infrastructure
						level = 1
						instant_build = yes
					}
				}
			}

			IF = {
				limit = {
					controls_state = 947
					947 = {
						free_building_slots = {
							building = infrastructure
							size > 0
						}
					}
				}
				947 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = infrastructure
						level = 1
						instant_build = yes
					}
				}
			}

		}
	} 

	### EXPAND SOUTHERN INRFASTRUCTURE
	focus = {
		id = CHL_expand_southern_infrastructure

		icon = GFX_focus_CHL_expand_southern_infrastructure

		relative_position_id = CHL_we_must_dig_deeper
		x = 1
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_contract_efe  
			focus = CHL_we_must_dig_deeper  
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
		}
 
		available = {
			AND = {
				controls_state = 507
				controls_state = 949
				controls_state = 950
			}
		}

		search_filters = { FOCUS_FILTER_INDUSTRY }
		
		completion_reward = {

			build_railway = {
				level = 1
			    build_only_on_allied = yes
			    start_province = 5169
			    target_province = 5215
			}	

			build_railway = {
				level = 1
			    build_only_on_allied = yes
			    start_province = 5215
			    target_province = 5201
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			IF = {
				limit = {
					507 = {
						free_building_slots = {
							building = infrastructure
							size > 0
						}
					}
				}
				507 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = infrastructure
						level = 1
						instant_build = yes
					}
				}
			}

			IF = {
				limit = {
					949 = {
						free_building_slots = {
							building = infrastructure
							size > 0
						}
					}
				}
				949 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = infrastructure
						level = 1
						instant_build = yes
					}
				}
			}

			IF = {
				limit = {
					950 = {
						free_building_slots = {
							building = infrastructure
							size > 0
						}
					}
				}
				950 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = infrastructure
						level = 1
						instant_build = yes
					}
				}
			}

		}
	} 

	### DEVALUE THE PESO
	focus = {
		id = CHL_devalue_the_peso

		dynamic = yes

		icon = GFX_focus_CHL_devalue_the_peso_export

		relative_position_id = CHL_contract_efe
		x = -5
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_contract_efe  
			focus = CHL_we_must_dig_deeper  
		}

		mutually_exclusive = { 
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
		}

		search_filters = { FOCUS_FILTER_INDUSTRY }
		
		completion_reward = {

			add_stability = -0.05

			IF = {
				limit = {
					NOT = {
						has_completed_focus = CHL_introduce_the_franc
					}
				}
				add_timed_idea = {
					idea = CHL_devalue_the_peso_idea
					days = 365
				}
			}
			ELSE = {
				add_timed_idea = {
					idea = CHL_devalue_the_franc_idea
					days = 365
				}
			}
			

		}
	} 

	focus = {
		id = CHL_promote_immigration_to_chile
		icon = GFX_focus_generic_promote_SA_immigration
		prerequisite = { focus = CHL_devalue_the_peso  }
		x = 2
		y = 1
		relative_position_id = CHL_devalue_the_peso
		cost = 5
		ai_will_do = {
			factor = 5
		}
		available = {
			NOT = {
				OR = {
					has_idea = CHL_devalue_the_peso_idea
					has_idea = CHL_devalue_the_franc_idea
				}
			}
		}

		search_filters = { }

		completion_reward = {
			set_country_flag = JUNO_promote_immigration_flag
			custom_effect_tooltip = BRA_promote_immigration_to_brazil_tt
		}
	}

	### ESTABLISH THE MINISTRY OF MINING
	focus = {
		id = CHL_establish_the_ministry_of_mining

		icon = GFX_focus_generic_improve_the_administration

		relative_position_id = CHL_devalue_the_peso
		x = -2
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_devalue_the_peso
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
			NOT = {
				OR = {
					has_idea = CHL_devalue_the_peso_idea
					has_idea = CHL_devalue_the_franc_idea
				}
			}
		}

		search_filters = { FOCUS_FILTER_INDUSTRY FOCUS_FILTER_HISTORICAL }
		
		completion_reward = {

			custom_effect_tooltip = CHL_modify_chilean_economy_ns_intro
			add_to_variable = { CHL_economy_local_resources_factor = 0.1 tooltip = local_resources_factor_tt }
			add_to_variable = { CHL_economy_consumer_goods_factor = -0.05 tooltip = consumer_goods_factor_tt }

		}
	}

	### THE NATIONALIZATION OF COPPER
	focus = {
		id = CHL_the_nationalization_of_copper

		icon = GFX_focus_generic_self_management

		relative_position_id = CHL_establish_the_ministry_of_mining
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_establish_the_ministry_of_mining
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2
		}

		available = {
			has_stability > 0.69
			#has_war = no
			OR = {
				is_in_faction = no
				is_faction_leader = yes
			}
		} 

		search_filters = { FOCUS_FILTER_INDUSTRY FOCUS_FILTER_HISTORICAL }
		
		completion_reward = {

			every_country = {
				limit = {
					is_major = yes
				}
				add_opinion_modifier = {
					target = ROOT
					modifier = medium_decrease
				}	
				add_opinion_modifier = {
					target = ROOT
					modifier = minor_sanctions
				}
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			custom_effect_tooltip = CHL_modify_chilean_economy_ns_intro
			add_to_variable = { CHL_economy_local_resources_factor = 0.1 tooltip = local_resources_factor_tt }
			add_to_variable = { CHL_economy_consumer_goods_factor = -0.1 tooltip = consumer_goods_factor_tt }

		}
	}

	### UTILIZE FAMAE
	focus = {
		id = CHL_utlilize_famae

		icon = GFX_focus_CHL_utilize_famae

		relative_position_id = CHL_devalue_the_peso
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_devalue_the_peso  
		}

		mutually_exclusive = { 
		} 
		
		ai_will_do = {
			base = 1.5
			modifier = {
				factor = 2
				has_war = yes
			}
		}
 
		available = {
			NOT = {
				OR = {
					has_idea = CHL_devalue_the_peso_idea
					has_idea = CHL_devalue_the_franc_idea
				}
			}
		}

		search_filters = { FOCUS_FILTER_INDUSTRY }
		
		completion_reward = {

			mio:CHL_famae_organization = {
				add_mio_size = 1
			}

			custom_effect_tooltip = CHL_modify_chilean_economy_ns_intro
			add_to_variable = { CHL_economy_industrial_capacity_factory = 0.05 tooltip = industrial_capacity_factory_tt }

			custom_effect_tooltip = generic_skip_one_line_tt

			random_state = {
				limit = {
					is_owned_and_controlled_by = ROOT
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}	
			}

		}
	} 

	### DOMESTIC PRODUCTION OF THE WILLYS MB
	focus = {
		id = CHL_domestic_production_of_the_willys_mb

		icon = GFX_focus_CHL_domestic_production_of_the_willys_mb

		relative_position_id = CHL_utlilize_famae
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_utlilize_famae  
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
			modifier = {
				factor = 2
				has_war = yes
			}
		}

		available = {
		}

		search_filters = { FOCUS_FILTER_INDUSTRY }
		
		completion_reward = {

			mio:CHL_willys_famae_corvo_organization = {
				add_mio_size = 1
			}

			add_breakthrough_progress = {
				specialization = specialization_land
				value = 0.25
			}

			custom_effect_tooltip = generic_skip_one_line_tt

			random_state = {
				limit = {
					is_owned_and_controlled_by = ROOT
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}	
			}

		}
	} 

	### HIGH QUALITY NITRATE
	focus = {
		id = CHL_high_quality_nitrate

		icon = GFX_focus_CHL_high_quality_nitrate

		relative_position_id = CHL_devalue_the_peso
		x = -4
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_devalue_the_peso  
		}

		mutually_exclusive = { 
		} 
		
		ai_will_do = {
			base = 1.5
			modifier = {
				factor = 2
				has_war = yes
			}
		}

		available = {
			NOT = {
				OR = {
					has_idea = CHL_devalue_the_peso_idea
					has_idea = CHL_devalue_the_franc_idea
				}
			}
		}
		
		completion_reward = {

			add_ideas = CHL_high_quality_nitrate

		}
	} 

	### THEY SHALL NOT PASS
	focus = {
		id = CHL_they_shall_not_pass

		icon = GFX_goal_fortify_the_westwall

		relative_position_id = CHL_high_quality_nitrate
		x = 0
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_high_quality_nitrate  
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
			modifier = {
				factor = 2
				has_war = yes
			}
		}

		available = {
		}
		
		completion_reward = {

			every_state = {
				limit = {
					is_owned_and_controlled_by = ROOT
				}
				add_building_construction = {
					type = bunker
					level = 2
					instant_build = yes
					province =  {
						all_provinces = yes
						limit_to_border = yes
					}
				}
			}

		}
	} 

	### STRENGHTEN THE CENTRAL BANK
	focus = {
		id = CHL_strengthen_the_central_bank

		icon = GFX_focus_CHL_strengthen_the_central_bank

		relative_position_id = CHL_devalue_the_peso
		x = -6
		y = 2
		cost = 5

		prerequisite = {
			focus = CHL_devalue_the_peso  
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1
			modifier = {
				factor = 2
				has_war = no
			}
		}

		available = {
			NOT = {
				OR = {
					has_idea = CHL_devalue_the_peso_idea
					has_idea = CHL_devalue_the_franc_idea
				}
			}
		} 

		search_filters = { FOCUS_FILTER_POLITICAL FOCUS_FILTER_STABILITY }
		
		completion_reward = {
			
			add_political_power = 50

			add_stability = 0.05

			IF = {
				limit = {
					NOT = {
						has_completed_focus = CHL_inflation_control_by_the_central_bank
					}
				}
				custom_effect_tooltip = CHL_skip_one_line_tt
				custom_effect_tooltip = available_industrial_concern
				show_ideas_tooltip = CHL_banco_central_de_chile
			}

		}
	} 

	### EXPAND THE NAVAL ARSENAL
	focus = {
		id = CHL_expand_the_naval_arsenal

		icon = GFX_goal_generic_build_navy

		relative_position_id = CHL_devalue_the_peso
		x = 4
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_devalue_the_peso  
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
			modifier = {
				factor = 2
				has_war = yes
			}
		}

		available = {
			NOT = {
				OR = {
					has_idea = CHL_devalue_the_peso_idea
					has_idea = CHL_devalue_the_franc_idea
				}
			}
		}

		search_filters = { FOCUS_FILTER_INDUSTRY }
		
		completion_reward = {
			custom_effect_tooltip = CHL_modify_chilean_economy_ns_intro
			add_to_variable = { CHL_economy_industrial_capacity_dockyard = 0.05 tooltip = industrial_capacity_dockyard_tt }
			IF = {
				limit = { 
					has_dlc = "Arms Against Tyranny" 
				}
				
				mio:CHL_arsenales_de_marina_organization = {
					add_mio_size = 2
				}
				
				mio:CHL_csav_organization = {
					add_mio_size = 2
				}
				
				random_state = {
					limit = {
						is_capital = yes 
						is_owned_and_controlled_by = ROOT
					}
					add_extra_state_shared_building_slots = 2
					add_building_construction = {
						type = dockyard
						level = 2
						instant_build = yes
					}	
				}
			}
			ELSE = {
				random_state = {
					limit = {
						is_capital = yes 
						is_owned_and_controlled_by = ROOT
					}
					add_extra_state_shared_building_slots = 4
					add_building_construction = {
						type = dockyard
						level = 4
						instant_build = yes
					}	
				}
			}
		}
	} 

	### FORTIFY THE COASTLINES
	focus = {
		id = CHL_fortify_the_coastlines

		icon = GFX_focus_generic_coastal_fort

		relative_position_id = CHL_expand_the_naval_arsenal
		x = -1
		y = 1
		cost = 5

		prerequisite = {
			focus = CHL_expand_the_naval_arsenal  
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
			modifier = {
				factor = 2
				has_war = yes
			}
		}

		available = {
		}
		
		completion_reward = {

			every_state = {
				limit = {
					is_owned_and_controlled_by = ROOT
					is_coastal = yes
				}
				add_building_construction = {
					type = coastal_bunker
					level = 2
					instant_build = yes
					province =  {
						all_provinces = yes
						limit_to_coastal = yes
					}
				}
			}

		}
	} 

	### INVEST IN SHIPPING 
	focus = {
		id = CHL_invest_in_shipping

		icon = GFX_focus_POL_develop_polish_shipbuilding

		relative_position_id = CHL_expand_the_naval_arsenal
		x = 1
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_expand_the_naval_arsenal  
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 1.5
			modifier = {
				factor = 2
				has_war = yes
			}
		}

		available = {
		}

		search_filters = { FOCUS_FILTER_INDUSTRY FOCUS_FILTER_RESEARCH }
		
		completion_reward = {

			random_state = {
				limit = {
					is_owned_and_controlled_by = ROOT
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = dockyard
					level = 2
					instant_build = yes
				}	
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			add_equipment_to_stockpile = { 
				type = convoy
				amount = 25
				producer = ROOT
			}

			custom_effect_tooltip = CHL_skip_one_line_tt

			IF = {
				limit = {
					NOT = {	
						has_tech = mtg_landing_craft
					}
					has_dlc = "Man the Guns"
				}
				set_technology = { mtg_landing_craft = 1 }
			}

			custom_effect_tooltip = CHL_skip_one_line_tt
			custom_effect_tooltip = available_industrial_concern
			show_ideas_tooltip = CHL_compania_sudamerica_vapores

		}
	} 

	### ADVANCEMENTS IN TELECOMMUNICATIONS
	focus = {
		id = CHL_advancements_in_telecommunications

		icon = GFX_focus_research

		relative_position_id = CHL_domestic_production_of_the_willys_mb
		x = 0
		y = 1
		cost = 10

		prerequisite = {
			focus = CHL_domestic_production_of_the_willys_mb  
			focus = CHL_strengthen_the_central_bank
			focus = CHL_they_shall_not_pass
			focus = CHL_fortify_the_coastlines
			focus = CHL_invest_in_shipping
		}

		mutually_exclusive = {
		} 
		
		ai_will_do = {
			base = 2.5
		}

		available = {
			num_of_factories > 30
		}

		search_filters = { FOCUS_FILTER_RESEARCH }
		
		completion_reward = {

			add_research_slot = 1

			custom_effect_tooltip = CHL_skip_one_line_tt
			custom_effect_tooltip = available_industrial_concern
			show_ideas_tooltip = CHL_via_trans_radio

		}
	} 
	 

}