LAT_historical = {
	name = "Latvian historical plan"
	desc = ""

	allowed = {
		original_tag = LAT
	}
	enable = {
		NOT = { has_global_flag = SOV_no_purge_collaboration }
		NOT = { has_global_flag = SOV_welfare_disabled }
		has_dlc = "No Step Back"
		OR = {
			AND = {
				is_historical_focus_on = yes
				has_game_rule = {
					rule = LAT_ai_behavior
					option = DEFAULT
				}
			}
			has_country_flag = LAT_AI_RANDOM_HISTORICAL
			has_game_rule = {
				rule = LAT_ai_behavior
				option = HISTORICAL
			}
		}
	}
	abort = {
		OR = {
			has_global_flag = SOV_welfare_disabled
			has_global_flag = SOV_no_purge_collaboration
		}
	}

	ai_national_focuses = {
		LAT_suspend_the_constitution
		LAT_empower_paramilitarists
		LAT_the_sun_shines_equally
		BALTIC_rejoin_the_railways
		LAT_banish_clemens
		BALTIC_attract_workers_to_capital
		BALTIC_modernize_industry
		BALTIC_natural_resources
		BALTIC_rebuild_forts
		BALTIC_arm_the_nation
		BALTIC_defence_of_our_nation
		BALTIC_original_designs
		BALTIC_arms_industry
		BALTIC_domestic_motors
		BALTIC_axis_investments
		BALTIC_german_war_economics
		BALTIC_german_tank_licences
		BALTIC_autobahn
		LAT_appease_democrats
		LAT_renew_kviesis_term
		LAT_restore_saeima
		LAT_what_is_socialism
	}

	research = {
		industry = 50.0
		infantry_tech = 15.0
		artillery = 8.0
		support_tech = 6.5
	}

	ideas = {
		
	}

	traits = {
		captain_of_industry = 5
		war_industrialist = 5
	}

	# Keep small, as it is used as a factor for some things (such as research needs)
	# Recommended around 1.0. Useful for relation between plans
	weight = {
		factor = 1.0
		modifier = {
			factor = 1.0
		}
	}

	focus_factors = {
		LAT_formalize_baltic_entente = 0
		LAT_beyond_the_baltic = 0.01
	}

}
LAT_historical2 = {
	name = "Latvian historical plan"
	desc = ""

	allowed = {
		original_tag = LAT
	}
	enable = {
		has_global_flag = SOV_welfare_disabled
		has_dlc = "No Step Back"
		OR = {
			AND = {
				is_historical_focus_on = yes
				has_game_rule = {
					rule = LAT_ai_behavior
					option = DEFAULT
				}
			}
			has_country_flag = LAT_AI_RANDOM_HISTORICAL
			has_game_rule = {
				rule = LAT_ai_behavior
				option = HISTORICAL
			}
		}
	}
	abort = {
		NOT = { has_global_flag = SOV_welfare_disabled }
	}

	ai_national_focuses = {
		LAT_suspend_the_constitution
		LAT_empower_paramilitarists
		LAT_the_sun_shines_equally
		BALTIC_rejoin_the_railways
		BALTIC_renew_allied_trade
		LAT_banish_clemens
		LAT_appease_democrats
		LAT_martial_prime_minister
		LAT_improve_military_life
		LAT_establish_chambers_of_professions
		BALTIC_attract_workers_to_capital
		BALTIC_modernize_industry
		LAT_nationalised_industry
		LAT_merge_presidential_titles
		BALTIC_school_of_aviation
		LAT_aizsargi
		BALTIC_ford_motors
		BALTIC_british_aircraft
		BALTIC_allied_shipments
		LAT_womens_aizsargi
		LAT_supply_forest_brothers
		LAT_multicultural_latvia
		LAT_threat_on_our_border
		BALTIC_natural_resources
		BALTIC_rebuild_forts
		BALTIC_unchain_education
		BALTIC_arm_the_nation
		#LAT_cave_to_enemy_pressure #Removing from fixed historical plan, and prevented AI from taking this when historical focus is on, under historical conditions so that Baltics get annexed by Soviets by default on historical.
		#TODO - Communist focuses
	}

	research = {
		industry = 50.0
		infantry_tech = 15.0
		artillery = 8.0
		support_tech = 6.5
	}

	ideas = {
		
	}

	traits = {
		captain_of_industry = 5
		war_industrialist = 5
	}

	# Keep small, as it is used as a factor for some things (such as research needs)
	# Recommended around 1.0. Useful for relation between plans
	weight = {
		factor = 1.0
		modifier = {
			factor = 1.0
		}
	}

	focus_factors = {
		LAT_formalize_baltic_entente = 0
		LAT_beyond_the_baltic = 0.01
	}

}

LAT_entente = {
	name = "Latvian democratic plan"
	desc = ""

	enable = {
		original_tag = LAT
		has_dlc = "No Step Back"
		OR = {
			has_country_flag = LAT_AI_RANDOM_DEMOCRATIC
			has_game_rule = {
				rule = LAT_ai_behavior
				option = DEMOCRATIC
			}
		}
	}
	abort = {
		
	}

	ai_national_focuses = {
		LAT_suspend_the_constitution
		LAT_empower_paramilitarists
		LAT_the_sun_shines_equally
		LAT_banish_clemens
		LAT_appease_democrats
		LAT_renew_kviesis_term
		LAT_restore_saeima
		LAT_what_is_socialism
		LAT_establish_chambers_of_professions
		LAT_what_is_capitalism
		LAT_renew_the_constitution
		LAT_formalize_baltic_entente
		LAT_baltic_economic_union
		LAT_baltic_defence_army
		LAT_pan_baltic_bank
		LAT_propose_baltic_union

		BALTIC_rejoin_the_railways
		BALTIC_renew_allied_trade
		BALTIC_modernize_industry
		BALTIC_ford_motors
		BALTIC_crossley_motors
		
		LAT_baltic_unification
		LAT_look_north
		LAT_aizsargi
		LAT_womens_aizsargi
		LAT_supply_forest_brothers
		LAT_multicultural_latvia


		BALTIC_attract_workers_to_capital
		LAT_threat_on_our_border
		BALTIC_natural_resources
		BALTIC_rebuild_forts
		BALTIC_unchain_education
		BALTIC_arm_the_nation
		BALTIC_technology_sharing
		BALTIC_defence_of_our_nation
		BALTIC_arms_industry
	}

	research = {
		industry = 50.0
		infantry_tech = 15.0
		artillery = 8.0
		support_tech = 6.5
	}

	ideas = {
		
	}

	traits = {
		democratic_reformer = 15
	}

	# Keep small, as it is used as a factor for some things (such as research needs)
	# Recommended around 1.0. Useful for relation between plans
	weight = {
		factor = 1.0
		modifier = {
			factor = 1.0
		}
	}

	focus_factors = {
		
	}

}

LAT_historical_ahistorical_1 = {
	name = "Latvian historical plan"
	desc = ""

	allowed = {
		original_tag = LAT
	}
	enable = {
		is_historical_focus_on = no
		has_dlc = "No Step Back"
		OR = {
			AND = {
				is_historical_focus_on = yes
				has_game_rule = {
					rule = LAT_ai_behavior
					option = DEFAULT
				}
			}
			has_country_flag = LAT_AI_RANDOM_HISTORICAL
			has_game_rule = {
				rule = LAT_ai_behavior
				option = HISTORICAL
			}
		}
	}
	abort = {
		has_completed_focus = BALTIC_modernize_industry
	}

	ai_national_focuses = {
		LAT_suspend_the_constitution
		LAT_empower_paramilitarists
		LAT_the_sun_shines_equally
		LAT_banish_clemens
		BALTIC_rejoin_the_railways
		BALTIC_modernize_industry
	}

	research = {
		industry = 5.0
		infantry_tech = 1.0
		artillery = 8.0
		support_tech = 6.5
	}
	weight = {
		factor = 1.0
		modifier = {
			factor = 1
		}
	}

	focus_factors = {
		LAT_renew_kviesis_term = 0
		LAT_latvia_for_latvians = 0
	}

}

LAT_historical_ahistorical_2a = {
	name = "Latvian historical plan"
	desc = ""

	allowed = {
		original_tag = LAT
	}
	enable = {
		is_historical_focus_on = no
		has_dlc = "No Step Back"
		OR = {
			AND = {
				is_historical_focus_on = yes
				has_game_rule = {
					rule = LAT_ai_behavior
					option = DEFAULT
				}
			}
			has_country_flag = LAT_AI_RANDOM_HISTORICAL
			has_game_rule = {
				rule = LAT_ai_behavior
				option = HISTORICAL
			}
		}

		has_completed_focus = BALTIC_modernize_industry
		OR = {
			GER = { has_completed_focus = GER_rhineland }
			ITA = { has_completed_focus = ITA_culto_del_duce }
			ITA = { has_completed_focus = ITA_italo_balbo_focus }
			ITA = { has_completed_focus = ITA_dino_grandi_focus }
			any_country = {
				has_government = fascism
				is_faction_leader = yes
			}
		}
	}
	abort = {
		has_completed_focus = BALTIC_domestic_motors
	}

	ai_national_focuses = {
		LAT_banish_clemens
		BALTIC_axis_investments
		BALTIC_german_war_economics
		BALTIC_german_tank_licences
		BALTIC_autobahn


		BALTIC_renew_allied_trade
		BALTIC_ford_motors
		BALTIC_crossley_motors
		BALTIC_british_designers
		BALTIC_domestic_motors
	}

	research = {
		industry = 50.0
		infantry_tech = 15.0
		artillery = 8.0
		support_tech = 6.5
	}
	weight = {
		factor = 1.0
		modifier = {
			factor = 1.0
		}
	}

	focus_factors = {
		LAT_renew_kviesis_term = 0
		LAT_latvia_for_latvians = 0
	}

}

LAT_historical_ahistorical_2b = {
	name = "Latvian historical plan"
	desc = ""

	allowed = {
		original_tag = LAT
	}
	enable = {
		is_historical_focus_on = no
		has_dlc = "No Step Back"
		OR = {
			AND = {
				is_historical_focus_on = yes
				has_game_rule = {
					rule = LAT_ai_behavior
					option = DEFAULT
				}
			}
			has_country_flag = LAT_AI_RANDOM_HISTORICAL
			has_game_rule = {
				rule = LAT_ai_behavior
				option = HISTORICAL
			}
		}

		has_completed_focus = BALTIC_modernize_industry
		NOT = {
			OR = {
				GER = { has_completed_focus = GER_rhineland }
				ITA = { has_completed_focus = ITA_culto_del_duce }
				ITA = { has_completed_focus = ITA_italo_balbo_focus }
				ITA = { has_completed_focus = ITA_dino_grandi_focus }
				any_country = {
					has_government = fascism
					is_faction_leader = yes
				}
			}
		}
	}
	abort = {
		has_completed_focus = BALTIC_domestic_motors
	}

	ai_national_focuses = {
		LAT_banish_clemens
		BALTIC_renew_allied_trade
		BALTIC_ford_motors
		BALTIC_crossley_motors
		BALTIC_british_designers


		BALTIC_axis_investments
		BALTIC_german_war_economics
		BALTIC_german_tank_licences
		BALTIC_autobahn
		BALTIC_domestic_motors
	}

	research = {
		industry = 50.0
		infantry_tech = 15.0
		artillery = 8.0
		support_tech = 6.5
	}
	weight = {
		factor = 1.0
		modifier = {
			factor = 1.0
		}
	}

	focus_factors = {
		LAT_renew_kviesis_term = 0
		LAT_latvia_for_latvians = 0
	}

}

LAT_historical_ahistorical_3 = {
	name = "Latvian historical plan"
	desc = ""

	allowed = {
		original_tag = LAT
	}
	enable = {
		is_historical_focus_on = no
		has_dlc = "No Step Back"
		OR = {
			AND = {
				is_historical_focus_on = yes
				has_game_rule = {
					rule = LAT_ai_behavior
					option = DEFAULT
				}
			}
			has_country_flag = LAT_AI_RANDOM_HISTORICAL
			has_game_rule = {
				rule = LAT_ai_behavior
				option = HISTORICAL
			}
		}

		has_completed_focus = BALTIC_domestic_motors
	}
	abort = {
	}

	ai_national_focuses = {
		LAT_banish_clemens
		LAT_appease_democrats
		LAT_martial_prime_minister
		LAT_improve_military_life
		LAT_military_diarchy
		LAT_military_dictatorship
		LAT_establish_chambers_of_professions
		LAT_nationalised_industry
		LAT_aizsargi
		LAT_womens_aizsargi
		LAT_supply_forest_brothers
		LAT_multicultural_latvia
		
		LAT_formalize_baltic_entente
		LAT_beyond_the_baltic
		LAT_join_the_allies
		LAT_threat_on_our_border

		BALTIC_natural_resources
		BALTIC_trade_with_neighbors
		BALTIC_attract_workers_to_capital
		BALTIC_rebuild_forts
		BALTIC_unchain_education
		BALTIC_technology_sharing
		BALTIC_arm_the_nation
		BALTIC_defence_of_our_nation
		BALTIC_original_designs
		BALTIC_arms_industry
	}

	research = {
		industry = 50.0
		infantry_tech = 15.0
		artillery = 8.0
		support_tech = 6.5
	}
	weight = {
		factor = 1.0
		modifier = {
			factor = 1.0
		}
	}

	focus_factors = {
		LAT_renew_kviesis_term = 0
		LAT_latvia_for_latvians = 0
	}

}

LAT_historical_ahistorical_wartime = {
	name = "Latvian historical plan"
	desc = ""

	allowed = {
		original_tag = LAT
	}
	enable = {
		has_war = yes
		is_historical_focus_on = no
		has_dlc = "No Step Back"
		OR = {
			AND = {
				is_historical_focus_on = yes
				has_game_rule = {
					rule = LAT_ai_behavior
					option = DEFAULT
				}
			}
			has_country_flag = LAT_AI_RANDOM_HISTORICAL
			has_game_rule = {
				rule = LAT_ai_behavior
				option = HISTORICAL
			}
		}
	}
	abort = {
	}

	ai_national_focuses = {
		LAT_banish_clemens
		LAT_ready_the_resistance
		LAT_prepare_underground_resistance
		LAT_prepare_covert_resistance
	}

	research = {
		industry = 50.0
		infantry_tech = 15.0
		artillery = 8.0
		support_tech = 6.5
	}
	weight = {
		factor = 1.0
		modifier = {
			factor = 1.0
		}
	}

	focus_factors = {
		LAT_renew_kviesis_term = 0
		LAT_latvia_for_latvians = 0
	}

}