add_namespace = AAT_Sweden_flashpoints
add_namespace = Sweden_rearnament
add_namespace = AAT_Sweden
add_namespace = AAT_Sweden_BoP
add_namespace = AAT_Sweden_ball_bearing			# REMOVED
add_namespace = AAT_Sweden_strike
add_namespace = AAT_Sweden_nationalists
add_namespace = AAT_Sweden_nordic_defense_council
add_namespace = AAT_Sweden_communism

 country_event = { #Army rearnament
	id = Sweden_rearnament.1
	title = Sweden_rearnament.1.t
	desc = Sweden_rearnament.1.desc

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			calculate_folkhemmet_no_army_tooltip = yes
			calculate_folkhemmet_low_army_tooltip = yes  #this has to be run for tooltips to work
			calculate_folkhemmet_medium_army_tooltip = yes
			calculate_folkhemmet_high_army_tooltip = yes
		}
	}

	option = { #Disarm
		name = Sweden_rearnament.1.a
		ai_chance = {
			base = 10
		}
		trigger = {
			NOT = { check_variable = { folkhemmet_army_part = 0 }}
		}

		custom_effect_tooltip = SWE_folkhemmet_event_result_tt
		effect_tooltip = {

			add_to_variable = { folkhemmet_stability = tooltip_folkhemmet_stability_result_none tooltip = stability_factor_neutral_tt }
			add_to_variable = { folkhemmet_war_support = tooltip_folkhemmet_war_support_result_none  tooltip = war_support_factor_neutral_tt } 
			add_to_variable = { folkhemmet_mil = tooltip_folkhemmet_mil_result_none tooltip = production_speed_arms_factory_factor_tt }
			add_to_variable = { folkhemmet_civ = tooltip_folkhemmet_civ_result_none tooltip = production_speed_industrial_complex_factor_tt }
			add_to_variable = { folkhemmet_dockyard = tooltip_folkhemmet_dockyard_result_none tooltip = production_speed_dockyard_factor_tt }

		}
		#set_variable = { folkhemmet_army_part = 0 }
		#add_to_variable = { folkhemmet_intactness = folkhemmet_max_constituent_parts }

		set_temp_variable = { folkhemmet_army_part_delta = folkhemmet_army_part }
		set_variable = { folkhemmet_army_part = 0 }
		subtract_from_temp_variable = { folkhemmet_army_part_delta = folkhemmet_army_part }
		add_to_variable = { folkhemmet_intactness = folkhemmet_army_part_delta } 
		calculate_folkhemmet = yes

		#custom_effect_tooltip = Sweden_rearnament_delta
		clr_country_flag = army_budget_event_active
	}

	option = { #Low rearm
		name = Sweden_rearnament.1.b
		ai_chance = {
			base = 0
		}
		trigger = {
			NOT = { check_variable = { folkhemmet_army_part = 1 }}
		}
		custom_effect_tooltip = SWE_folkhemmet_event_result_tt
		effect_tooltip = {

			add_to_variable = { folkhemmet_stability = tooltip_folkhemmet_stability_result_low tooltip = stability_factor_neutral_tt }
			add_to_variable = { folkhemmet_war_support = tooltip_folkhemmet_war_support_result_low  tooltip = war_support_factor_neutral_tt } 
			add_to_variable = { folkhemmet_mil = tooltip_folkhemmet_mil_result_low tooltip = production_speed_arms_factory_factor_tt }
			add_to_variable = { folkhemmet_civ = tooltip_folkhemmet_civ_result_low tooltip = production_speed_industrial_complex_factor_tt }
			add_to_variable = { folkhemmet_dockyard = tooltip_folkhemmet_dockyard_result_low tooltip = production_speed_dockyard_factor_tt }

		}
		log = "folkhemmet_stab: [?folkhemmet_stability]"
		log = "tooltip: [?tooltip_folkhemmet_stability_result_low]"
		set_temp_variable = { folkhemmet_army_part_delta = folkhemmet_army_part }
		set_variable = { folkhemmet_army_part = 1 }
		subtract_from_temp_variable = { folkhemmet_army_part_delta = folkhemmet_army_part }
		add_to_variable = { folkhemmet_intactness = folkhemmet_army_part_delta } 
		calculate_folkhemmet = yes
		#calculate_folkhemmet_tt = yes
		#custom_effect_tooltip = Sweden_rearnament_delta
		clr_country_flag = army_budget_event_active
     }

 	option = { #Medium rearm
		name = Sweden_rearnament.1.c
		ai_chance = {
			base = 0
		}
		trigger = {
			NOT = { check_variable = { folkhemmet_army_part = 2 }}
		}
		custom_effect_tooltip = SWE_folkhemmet_event_result_tt
		effect_tooltip = {
			add_to_variable = { folkhemmet_stability = tooltip_folkhemmet_stability_result_medium tooltip = stability_factor_neutral_tt }
			add_to_variable = { folkhemmet_war_support = tooltip_folkhemmet_war_support_result_medium  tooltip = war_support_factor_neutral_tt } 
			add_to_variable = { folkhemmet_mil = tooltip_folkhemmet_mil_result_medium tooltip = production_speed_arms_factory_factor_tt }
			add_to_variable = { folkhemmet_civ = tooltip_folkhemmet_civ_result_medium tooltip = production_speed_industrial_complex_factor_tt }
			add_to_variable = { folkhemmet_dockyard = tooltip_folkhemmet_dockyard_result_medium tooltip = production_speed_dockyard_factor_tt }

		}
		set_temp_variable = { folkhemmet_army_part_delta = folkhemmet_army_part }
		set_variable = { folkhemmet_army_part = 2 }
		subtract_from_temp_variable = { folkhemmet_army_part_delta = folkhemmet_army_part }
		add_to_variable = { folkhemmet_intactness = folkhemmet_army_part_delta }
		calculate_folkhemmet = yes 
				#custom_effect_tooltip = Sweden_rearnament_delta
		clr_country_flag = army_budget_event_active
     }

 	option = { #High Rearm
		name = Sweden_rearnament.1.d
		ai_chance = {
			base = 0
		}
		trigger = {
			NOT = { check_variable = { folkhemmet_army_part = 3 }}
		}

		custom_effect_tooltip = SWE_folkhemmet_event_result_tt
		effect_tooltip = {
			add_to_variable = { folkhemmet_stability = tooltip_folkhemmet_stability_result_high tooltip = stability_factor_neutral_tt }
			add_to_variable = { folkhemmet_war_support = tooltip_folkhemmet_war_support_result_high  tooltip = war_support_factor_neutral_tt } 
			add_to_variable = { folkhemmet_mil = tooltip_folkhemmet_mil_result_high tooltip = production_speed_arms_factory_factor_tt }
			add_to_variable = { folkhemmet_civ = tooltip_folkhemmet_civ_result_high tooltip = production_speed_industrial_complex_factor_tt }
			add_to_variable = { folkhemmet_dockyard = tooltip_folkhemmet_dockyard_result_high tooltip = production_speed_dockyard_factor_tt }

		}

		set_temp_variable = { folkhemmet_army_part_delta = folkhemmet_army_part }
		set_variable = { folkhemmet_army_part = 3 }
		subtract_from_temp_variable = { folkhemmet_army_part_delta = folkhemmet_army_part }
		add_to_variable = { folkhemmet_intactness = folkhemmet_army_part_delta } 
		calculate_folkhemmet = yes
				#custom_effect_tooltip = Sweden_rearnament_delta
		clr_country_flag = army_budget_event_active
     }
}

#Air rearnament
country_event = { #
	id = Sweden_rearnament.2
	title = Sweden_rearnament.2.t
	desc = Sweden_rearnament.2.desc

	is_triggered_only = yes

	immediate = {
		hidden_effect = {

			calculate_folkhemmet_no_air_tooltip = yes
			calculate_folkhemmet_low_air_tooltip = yes  #this has to be run for tooltips to work
			calculate_folkhemmet_medium_air_tooltip = yes
			calculate_folkhemmet_high_air_tooltip = yes
		}

	}

	option = { #Disarm
		name = Sweden_rearnament.1.a
		ai_chance = {
			base = 10
		}
		trigger = {
			NOT = { check_variable = { folkhemmet_air_part = 0 }}
		}

		custom_effect_tooltip = SWE_folkhemmet_event_result_tt
		effect_tooltip = {
			add_to_variable = { folkhemmet_stability = tooltip_folkhemmet_stability_result_none tooltip = stability_factor_neutral_tt }
			add_to_variable = { folkhemmet_war_support = tooltip_folkhemmet_war_support_result_none  tooltip = war_support_factor_neutral_tt } 
			add_to_variable = { folkhemmet_mil = tooltip_folkhemmet_mil_result_none tooltip = production_speed_arms_factory_factor_tt }
			add_to_variable = { folkhemmet_civ = tooltip_folkhemmet_civ_result_none tooltip = production_speed_industrial_complex_factor_tt }
			add_to_variable = { folkhemmet_dockyard = tooltip_folkhemmet_dockyard_result_none tooltip = production_speed_dockyard_factor_tt }

		}
		set_temp_variable = { folkhemmet_air_part_delta = folkhemmet_air_part }
		set_variable = { folkhemmet_air_part = 0 }
		subtract_from_temp_variable = { folkhemmet_air_part_delta = folkhemmet_air_part }
		add_to_variable = { folkhemmet_intactness = folkhemmet_air_part_delta } 
		calculate_folkhemmet = yes


		clr_country_flag = air_budget_event_active
	}

	option = { #Low rearm
		name = Sweden_rearnament.1.b
		ai_chance = {
			base = 0
		}
		trigger = {
			NOT = { check_variable = { folkhemmet_air_part = 1 }}
		}
		custom_effect_tooltip = SWE_folkhemmet_event_result_tt
		effect_tooltip = {
			add_to_variable = { folkhemmet_stability = tooltip_folkhemmet_stability_result_low tooltip = stability_factor_neutral_tt }
			add_to_variable = { folkhemmet_war_support = tooltip_folkhemmet_war_support_result_low  tooltip = war_support_factor_neutral_tt } 
			add_to_variable = { folkhemmet_mil = tooltip_folkhemmet_mil_result_low tooltip = production_speed_arms_factory_factor_tt }
			add_to_variable = { folkhemmet_civ = tooltip_folkhemmet_civ_result_low tooltip = production_speed_industrial_complex_factor_tt }
			add_to_variable = { folkhemmet_dockyard = tooltip_folkhemmet_dockyard_result_low tooltip = production_speed_dockyard_factor_tt }

		}
		set_temp_variable = { folkhemmet_air_part_delta = folkhemmet_air_part }
		set_variable = { folkhemmet_air_part = 1 }
		subtract_from_temp_variable = { folkhemmet_air_part_delta = folkhemmet_air_part }
		add_to_variable = { folkhemmet_intactness = folkhemmet_air_part_delta } 
		calculate_folkhemmet = yes
		custom_effect_tooltip = Sweden_rearnament_delta_low
		clr_country_flag = air_budget_event_active
     }

 	option = { #Medium rearm
		name = Sweden_rearnament.1.c
		ai_chance = {
			base = 0
		}
		trigger = {
			NOT = { check_variable = { folkhemmet_air_part = 2 }}
		}
		custom_effect_tooltip = SWE_folkhemmet_event_result_tt
		effect_tooltip = {
			add_to_variable = { folkhemmet_stability = tooltip_folkhemmet_stability_result_medium tooltip = stability_factor_neutral_tt }
			add_to_variable = { folkhemmet_war_support = tooltip_folkhemmet_war_support_result_medium  tooltip = war_support_factor_neutral_tt } 
			add_to_variable = { folkhemmet_mil = tooltip_folkhemmet_mil_result_medium tooltip = production_speed_arms_factory_factor_tt }
			add_to_variable = { folkhemmet_civ = tooltip_folkhemmet_civ_result_medium tooltip = production_speed_industrial_complex_factor_tt }
			add_to_variable = { folkhemmet_dockyard = tooltip_folkhemmet_dockyard_result_medium tooltip = production_speed_dockyard_factor_tt }
		}
		set_temp_variable = { folkhemmet_air_part_delta = folkhemmet_air_part }
		set_variable = { folkhemmet_air_part = 2 }
		subtract_from_temp_variable = { folkhemmet_air_part_delta = folkhemmet_air_part }
		add_to_variable = { folkhemmet_intactness = folkhemmet_air_part_delta } 
		calculate_folkhemmet = yes
		custom_effect_tooltip = Sweden_rearnament_delta_medium
		clr_country_flag = air_budget_event_active
     }

 	option = { #High Rearm
		name = Sweden_rearnament.1.d
		ai_chance = {
			base = 0
		}
		trigger = {
			NOT = { check_variable = { folkhemmet_air_part = 3 }}
		}

		custom_effect_tooltip = SWE_folkhemmet_event_result_tt
		effect_tooltip = {
			add_to_variable = { folkhemmet_stability = tooltip_folkhemmet_stability_result_high tooltip = stability_factor_neutral_tt }
			add_to_variable = { folkhemmet_war_support = tooltip_folkhemmet_war_support_result_high tooltip = war_support_factor_neutral_tt } 
			add_to_variable = { folkhemmet_mil = tooltip_folkhemmet_mil_result_high tooltip = production_speed_arms_factory_factor_tt }
			add_to_variable = { folkhemmet_civ = tooltip_folkhemmet_civ_result_high tooltip = production_speed_industrial_complex_factor_tt }
			add_to_variable = { folkhemmet_dockyard = tooltip_folkhemmet_dockyard_result_high tooltip = production_speed_dockyard_factor_tt }

		}
		set_temp_variable = { folkhemmet_air_part_delta = folkhemmet_air_part }
		set_variable = { folkhemmet_air_part = 3 }
		subtract_from_temp_variable = { folkhemmet_air_part_delta = folkhemmet_air_part }
		add_to_variable = { folkhemmet_intactness = folkhemmet_air_part_delta } 
		calculate_folkhemmet = yes
		clr_country_flag = air_budget_event_active
     }
}

#NAVY rearnament
country_event = { 
	id = Sweden_rearnament.3
	title = Sweden_rearnament.3.t
	desc = Sweden_rearnament.3.desc

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			calculate_folkhemmet_no_navy_tooltip = yes
			calculate_folkhemmet_low_navy_tooltip = yes
			calculate_folkhemmet_medium_navy_tooltip = yes
			calculate_folkhemmet_high_navy_tooltip = yes
		}
	}

	option = { #Disarm
		name = Sweden_rearnament.1.a
		ai_chance = {
			base = 10
		}
		trigger = {
			NOT = { check_variable = { folkhemmet_navy_part = 0 }}
		}
		custom_effect_tooltip = SWE_folkhemmet_event_result_tt
		effect_tooltip = {

			add_to_variable = { folkhemmet_stability = tooltip_folkhemmet_stability_result_none tooltip = stability_factor_neutral_tt }
			add_to_variable = { folkhemmet_war_support = tooltip_folkhemmet_war_support_result_none  tooltip = war_support_factor_neutral_tt } 
			add_to_variable = { folkhemmet_mil = tooltip_folkhemmet_mil_result_none tooltip = production_speed_arms_factory_factor_tt }
			add_to_variable = { folkhemmet_civ = tooltip_folkhemmet_civ_result_none tooltip = production_speed_industrial_complex_factor_tt }
			add_to_variable = { folkhemmet_dockyard = tooltip_folkhemmet_dockyard_result_none tooltip = production_speed_dockyard_factor_tt }
		}
		set_temp_variable = { folkhemmet_navy_part_delta = folkhemmet_navy_part }
		set_variable = { folkhemmet_navy_part = 0 }
		subtract_from_temp_variable = { folkhemmet_navy_part_delta = folkhemmet_navy_part }
		add_to_variable = { folkhemmet_intactness = folkhemmet_navy_part_delta } 
		calculate_folkhemmet = yes
		clr_country_flag = navy_budget_event_active
	}

	option = { #Low rearm
		name = Sweden_rearnament.1.b
		ai_chance = {
			base = 0
		}
		trigger = {
			NOT = { check_variable = { folkhemmet_navy_part = 1 }}
		}
		custom_effect_tooltip = SWE_folkhemmet_event_result_tt
		effect_tooltip = {
			add_to_variable = { folkhemmet_stability = tooltip_folkhemmet_stability_result_low tooltip = stability_factor_neutral_tt }
			add_to_variable = { folkhemmet_war_support = tooltip_folkhemmet_war_support_result_low  tooltip = war_support_factor_neutral_tt } 
			add_to_variable = { folkhemmet_mil = tooltip_folkhemmet_mil_result_low tooltip = production_speed_arms_factory_factor_tt }
			add_to_variable = { folkhemmet_civ = tooltip_folkhemmet_civ_result_low tooltip = production_speed_industrial_complex_factor_tt }
			add_to_variable = { folkhemmet_dockyard = tooltip_folkhemmet_dockyard_result_low tooltip = production_speed_dockyard_factor_tt }

		}
		set_temp_variable = { folkhemmet_navy_part_delta = folkhemmet_navy_part }
		set_variable = { folkhemmet_navy_part = 1 }
		subtract_from_temp_variable = { folkhemmet_navy_part_delta = folkhemmet_navy_part }
		add_to_variable = { folkhemmet_intactness = folkhemmet_navy_part_delta } 
		calculate_folkhemmet = yes
		clr_country_flag = navy_budget_event_active
     }

 	option = { #Medium rearm
		name = Sweden_rearnament.1.c
		ai_chance = {
			base = 0
		}
		trigger = {
			NOT = { check_variable = { folkhemmet_navy_part = 2 }}
		}
		custom_effect_tooltip = SWE_folkhemmet_event_result_tt
		effect_tooltip = {
			add_to_variable = { folkhemmet_stability = tooltip_folkhemmet_stability_result_medium tooltip = stability_factor_neutral_tt }
			add_to_variable = { folkhemmet_war_support = tooltip_folkhemmet_war_support_result_medium  tooltip = war_support_factor_neutral_tt } 
			add_to_variable = { folkhemmet_mil = tooltip_folkhemmet_mil_result_medium tooltip = production_speed_arms_factory_factor_tt }
			add_to_variable = { folkhemmet_civ = tooltip_folkhemmet_civ_result_medium tooltip = production_speed_industrial_complex_factor_tt }
			add_to_variable = { folkhemmet_dockyard = tooltip_folkhemmet_dockyard_result_medium tooltip = production_speed_dockyard_factor_tt }
		}
		set_temp_variable = { folkhemmet_navy_part_delta = folkhemmet_navy_part }
		set_variable = { folkhemmet_navy_part = 2 }
		subtract_from_temp_variable = { folkhemmet_navy_part_delta = folkhemmet_navy_part }
		add_to_variable = { folkhemmet_intactness = folkhemmet_navy_part_delta } 
		calculate_folkhemmet = yes
		clr_country_flag = navy_budget_event_active
     }

 	option = { #High Rearm
		name = Sweden_rearnament.1.d
		ai_chance = {
			base = 0
		}
		trigger = {
			NOT = { check_variable = { folkhemmet_navy_part = 3 }}
		}
		custom_effect_tooltip = SWE_folkhemmet_event_result_tt
		effect_tooltip = {

			add_to_variable = { folkhemmet_stability = tooltip_folkhemmet_stability_result_high tooltip = stability_factor_neutral_tt }
			add_to_variable = { folkhemmet_war_support = tooltip_folkhemmet_war_support_result_high  tooltip = war_support_factor_neutral_tt } 
			add_to_variable = { folkhemmet_mil = tooltip_folkhemmet_mil_result_high tooltip = production_speed_arms_factory_factor_tt }
			add_to_variable = { folkhemmet_civ = tooltip_folkhemmet_civ_result_high tooltip = production_speed_industrial_complex_factor_tt }
			add_to_variable = { folkhemmet_dockyard = tooltip_folkhemmet_dockyard_result_high tooltip = production_speed_dockyard_factor_tt }
		}
		set_temp_variable = { folkhemmet_navy_part_delta = folkhemmet_navy_part }
		set_variable = { folkhemmet_navy_part = 3 }
		subtract_from_temp_variable = { folkhemmet_navy_part_delta = folkhemmet_navy_part }
		add_to_variable = { folkhemmet_intactness = folkhemmet_navy_part_delta } 
		calculate_folkhemmet = yes
		clr_country_flag = navy_budget_event_active
     }
}

#Remind me pls
country_event = { 
	id = Sweden_rearnament.4
	title = Sweden_rearnament.4.t
	desc = Sweden_rearnament.4.desc
	is_triggered_only = yes

	option = {
		name = Sweden_rearnament.4.a
	}

}


##################### Flashpoints #####################

##### Pajala Bombing ####

# Bombing of Pajala - Swedish Event
country_event = {
	id = AAT_Sweden_flashpoints.10
	title = AAT_Sweden_flashpoints.10.t
	desc = AAT_Sweden_flashpoints.10.desc
	#picture = GFX_report_event_SWE_pajala_bombed_building
	fire_only_once = yes
	is_triggered_only = no
	trigger = {
	    tag = SWE
	    SOV = {
	    	has_war_with = FIN
	    	NOT = {
	    		has_war_with = SWE
	    	}
	    	num_planes_stationed_in_regions = {
	    		value > 0
	    		regions = { 277 12 191 }
	    	}
	    }
	}

	mean_time_to_happen = {
	    days = 20
	}
	
	# Publicly denounce Soviets
	option = { 
		name = AAT_Sweden_flashpoints.10.a
		ai_chance = {
			base = 0
			modifier = {
				add = 30
				OR = {
					has_government = fascism
					has_government = neutrality
				}
			}
		}
		SOV = {
			country_event = { 
				id = AAT_Sweden_flashpoints.11
				days = 3
			}
		}
		add_stability = -0.03
		add_war_support = 0.05
	}
	# contact Soviets
	option = { 
		name = AAT_Sweden_flashpoints.10.b
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				has_war_with = SOV
			}
			modifier = {
				factor = 10
				SWE_is_historical_ai = yes
			}
		}
		SOV = {
			country_event = { 
				id = AAT_Sweden_flashpoints.12
				days = 3
			}
		}
	}
	# Drop the issue
	option = { 
		name = AAT_Sweden_flashpoints.10.c
		ai_chance = {
			base = 0
		}
		add_stability = -0.05
		add_political_power = -50
	}
}

# Soviet Event - Sweden denounce us
country_event = { 
	id = AAT_Sweden_flashpoints.11
	title = AAT_Sweden_flashpoints.11.t
	desc = AAT_Sweden_flashpoints.11.desc
	picture = GFX_report_event_generic_rally
	is_triggered_only = yes
	# Apologize and pay reperations
	option = {
		name = AAT_Sweden_flashpoints.11.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 10
				FROM = { SWE_is_historical_ai = yes }
			}
		}
		FROM = {	
			country_event = { 
				id = AAT_Sweden_flashpoints.13
				days = 3
			}
		}
		add_war_support = -0.05
		# TODO_ASD: Reduce factories by 1 for 1 year
		# Could use IM bank system instead
	}
	# Reject Swedish Accusations
	option = {
		name = AAT_Sweden_flashpoints.11.b
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				FROM = { SWE_is_historical_ai = yes }
			}
		}
		FROM = {
			country_event = {
				id = AAT_Sweden_flashpoints.14
				days = 2
			}
		}
     }
}

# Soviet Event - Sweden contact us regarding incident
country_event = { 
	id = AAT_Sweden_flashpoints.12
	title = AAT_Sweden_flashpoints.12.t
	desc = AAT_Sweden_flashpoints.12.desc
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes
	# Apologize and pay reperations
	option = {
		name = AAT_Sweden_flashpoints.12.a
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				has_war_with = FROM
			}
		}
		FROM = {	
			country_event = { 
				id = AAT_Sweden_flashpoints.13
				days = 3
			}
		}
		add_war_support = -0.05
	}
	# Reject Swedish Accusations
	option = {
		name = AAT_Sweden_flashpoints.12.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
		FROM = {
			country_event = { 
				id = AAT_Sweden_flashpoints.14
				days = 3
			}
		}
     }
}

# Sweden Event - Soviet Union apologizes for bombing
country_event = { 
	id = AAT_Sweden_flashpoints.13
	title = AAT_Sweden_flashpoints.13.t
	desc = AAT_Sweden_flashpoints.13.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes

	option = {
		name = AAT_Sweden_flashpoints.13.a
		ai_chance = {
			base = 10
		}		
		add_offsite_building = {
			type = industrial_complex 
			level = 1
		}
	}
}

# Sweden Event - Soviet Union refuses to acknowledge bombing
country_event = { 
	id = AAT_Sweden_flashpoints.14
	title = AAT_Sweden_flashpoints.14.t
	desc = AAT_Sweden_flashpoints.14.desc
	picture = GFX_report_event_SOV_purge_aircraft_2
	is_triggered_only = yes
	# Denounce the Soviets and increase aid to Finland
	option = {
		name = AAT_Sweden_flashpoints.14.a
		trigger = {
			NOT = {
				has_war_with = FIN
			}
			FIN = {
				has_war_with = SOV
			}
		}
		ai_chance = {
			base = 10
		}
		add_war_support = 0.05
		IF = {
			limit = {
				FIN = {
					has_war_with = SOV
				}
			}
			FIN = {
				country_event = {
					id = AAT_Sweden_flashpoints.15
					days = 4
				}
			}
			FROM = {
				country_event = {
					id = AAT_Sweden_flashpoints.17
					days = 7
				}
			}
		}
	}
	# Drop the issue
	option = {
		name = AAT_Sweden_flashpoints.14.b
		ai_chance = {
			base = 10
		}
		add_stability = 0.03	
	}
}


# Finland Event - Sweden send aid
country_event = { 
	id = AAT_Sweden_flashpoints.15
	title = AAT_Sweden_flashpoints.15.t
	desc = AAT_Sweden_flashpoints.15.desc
	picture = GFX_report_event_generic_rifles
	is_triggered_only = yes
	# Thanks Sweden!
	option = {
		name = AAT_Sweden_flashpoints.15.a
		ai_chance = {
			base = 10
		}
		#TODO_ASD: Should probably use IM system for this, for fallback we can just add equipment the old way
		add_equipment_to_stockpile = {
			type = infantry_equipment_1
			amount = 500
			producer = SWE
		}
	}
}

# Soviet Event - Sweden backs down
country_event = { 
	id = AAT_Sweden_flashpoints.16
	title = AAT_Sweden_flashpoints.16.t
	desc = AAT_Sweden_flashpoints.16.desc
	picture = GFX_report_event_finnish_soldiers_snow
	is_triggered_only = yes
	# Great
	option = {
		name = AAT_Sweden_flashpoints.16.a
		ai_chance = {
			base = 10
		}
		add_stability = 0.03
	}
}

# Soviet Event - Sweden sending support to Finland in retaliation
country_event = { 
	id = AAT_Sweden_flashpoints.17
	title = AAT_Sweden_flashpoints.17.t
	desc = AAT_Sweden_flashpoints.17.desc
	picture = GFX_report_event_finnish_soldiers_snow
	is_triggered_only = yes
	# Demand end to involvement in Finland
	option = {
		name = AAT_Sweden_flashpoints.17.a
		ai_chance = {
			base = 10
		}
		add_war_support = 0.05
		FROM = {
			country_event = {
				id = AAT_Sweden_flashpoints.18
				days = 2
			}
		}
	}
	# Apologize and de-escalate
	option = {
		name = AAT_Sweden_flashpoints.17.b
		ai_chance = {
			base = 0
		}
		FROM = {
			country_event = { 
				id = AAT_Sweden_flashpoints.13
				days = 4
			}
		}
	}
}

# Sweden Event - Soviet Union demands we stop aiding Finland
country_event = { 
	id = AAT_Sweden_flashpoints.18
	title = AAT_Sweden_flashpoints.18.t
	desc = AAT_Sweden_flashpoints.18.desc
	picture = GFX_report_event_soviet_tanks
	is_triggered_only = yes
	# Reject Soviet Ultimatum but prepare for war
	option = {
		name = AAT_Sweden_flashpoints.18.a
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				is_in_faction_with = SOV
			}
		}	
		FROM = {
			country_event = {
				id = AAT_Sweden_flashpoints.19
				days = 3
			}	
		}
	}
	# Agree to back down
	option = {
		name = AAT_Sweden_flashpoints.18.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 0
				has_war_with = SOV
			}
		}
		FROM = {
			country_event = {
				id = AAT_Sweden_flashpoints.16
				days = 3
			}
		}
	}
}

# Soviet Event - Sweden Refuses to backdown
country_event = { 
	id = AAT_Sweden_flashpoints.19
	title = AAT_Sweden_flashpoints.19.t
	desc = AAT_Sweden_flashpoints.19.desc
	picture = GFX_report_event_soviet_soldiers_tank
	is_triggered_only = yes
	# Declare war on Sweden
	option = {
		name = AAT_Sweden_flashpoints.19.a
		ai_chance = {
			base = 30
			modifier = {
				factor = 0 
				OR = {
					is_in_faction_with = SWE
					has_war_with_major = yes
					has_civil_war = yes
				}
			}
		}	
		create_wargoal = {
			target = SWE
			type = puppet_wargoal_focus
		}
		SWE = {
			country_event = {
				id = AAT_Sweden_flashpoints.21
				days = 2
			}
		}
	}
	# Drop the issue
	option = {
		name = AAT_Sweden_flashpoints.19.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 0
				has_war_with = SWE
			}
		}
		FROM = {
			country_event = {
				id = AAT_Sweden_flashpoints.13
				days = 2
			}
		}
	}
	# TODO_ASD: News Events for war/peace
}

# Finland Event - Sweden propose alliance against Soviets
country_event = { 
	id = AAT_Sweden_flashpoints.20
	title = AAT_Sweden_flashpoints.20.t
	desc = AAT_Sweden_flashpoints.20.desc
	picture = GFX_report_event_finnish_soldiers_snow
	is_triggered_only = yes
	# We will join
	option = {
		name = AAT_Sweden_flashpoints.20.a
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				has_war_with = SWE
			}
			modifier = {
				factor = 0
				is_in_faction = yes
			}
		}
		SWE = {
			IF = { 
				limit = { is_in_faction = no }
				create_faction = SWE_nordic_defense_pact 
			}
			add_to_faction = FIN
		}
	}
	# We do not need Sweden (reject alliance)
	option = {
		name = AAT_Sweden_flashpoints.20.b
		ai_chance = {
			base = 0
			modifier = {
				add = 10
				has_war_with = SWE
			}
			modifier = {
				add = 10
				is_in_faction = yes
			}
		}
		FROM = {
			country_event = {
				id = AAT_Sweden_flashpoints.22
				days = 2
			}
		}
	}
}

# Sweden Event - Propose alliance with Finland
country_event = { 
	id = AAT_Sweden_flashpoints.21
	title = AAT_Sweden_flashpoints.21.t
	desc = AAT_Sweden_flashpoints.21.desc
	picture = GFX_report_event_finnish_soldiers_snow
	is_triggered_only = yes
	# Propose alliance with Finland
	option = {
		name = AAT_Sweden_flashpoints.21.a
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				has_war_with = FIN
			}
			modifier = {
				factor = 0
				FIN = { is_in_faction = yes }
			}
		}
		FIN = {
			country_event = {
				id = AAT_Sweden_flashpoints.20
				hours = 12
			}
		}
	}
	# No need to invite Finland
	option = {
		name = AAT_Sweden_flashpoints.21.b
		ai_chance = {
			base = 0
			modifier = {
				add = 10
				has_war_with = FIN
			}
		}
	}
}

# Sweden Event - Finland reject alliance
country_event = { 
	id = AAT_Sweden_flashpoints.22
	title = AAT_Sweden_flashpoints.22.t
	desc = AAT_Sweden_flashpoints.22.desc
	picture = GFX_report_event_soviet_soldiers_tank
	is_triggered_only = yes

	# No need to invite Finland
	option = {
		name = AAT_Sweden_flashpoints.22.a
		ai_chance = {
			base = 10
		}
	}
}


###### Permittenttrafiken ######


# German Event - Should we begin requesting access to Swedish infrastructure to support the invasion/occupation of Norway?
country_event = {
	id = AAT_Sweden_flashpoints.30
	title = AAT_Sweden_flashpoints.30.t
	desc = AAT_Sweden_flashpoints.30.desc
	picture = GFX_report_event_german_inspect_troops
	fire_only_once = yes
	is_triggered_only = no
	trigger = {
	    tag = GER
	    SWE = {
	    	exists = yes
	    }
	    NOT = {
	    	has_war_with = SWE
	    	is_in_faction_with = SWE
	    }
	    OR = {
	    	any_allied_country = {
	    		any_controlled_state = {
	    			is_core_of = NOR
	    		}
	    		OR = {
    				NOT = { original_tag = NOR }
					has_country_leader = { character = NOR_vidkun_quisling }  #Eff u Quisling
	    		}
	    	}
	    	any_controlled_state = {
	    		is_core_of = NOR
	    	}
	    	any_allied_country = {
	    		any_controlled_state = {
	    			is_core_of = FIN
	    		}
	    	}
	    	any_controlled_state = {
	    		is_core_of = FIN
	    	}
	    	AND = {
	    		has_war_with = SOV
	    		FIN = {
	    			has_war_with = SOV
	    		}
	    		has_military_access_to = FIN
	    	}
	    }
	}

	mean_time_to_happen = {
	    days = 3
	}
	
	# We will request 'humanitarian' transit rights from Sweden
	option = { 
		name = AAT_Sweden_flashpoints.30.a
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				has_war_with = SWE
			}
			modifier = {
				factor = 0
				SWE = {
					is_in_faction = yes
				}
			}
			modifier = {
				factor = 0
				SWE = { SWE_is_historical_ai = yes }
			}
		}
		SWE = {
			set_country_flag = GER_want_transit
			country_event = {
				id = AAT_Sweden_flashpoints.31
				days = 1
			}
		}
	}
	# Don't ask for access, ends event chain here.
	option = { 
		name = AAT_Sweden_flashpoints.30.b
		ai_chance = {
			base = 0
			modifier = {
				add = 10
				has_war_with = SWE
			}
			modifier = {
				add = 10
				SWE = {
					is_in_faction = yes
				}
			}
			modifier = {
				factor = 10
				SWE = { SWE_is_historical_ai = yes }
			}
		}
	}

}

# Sweden Event - Germany requests 'humanitarian' transit rights
country_event = { 
	id = AAT_Sweden_flashpoints.31
	title = AAT_Sweden_flashpoints.31.t
	desc = AAT_Sweden_flashpoints.31.desc
	picture = GFX_report_event_german_troops
	is_triggered_only = yes

	# Give the Germans what they want (Reduces neutrality)
	option = {
		name = AAT_Sweden_flashpoints.31.a
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				has_war_with = FROM
			}
			modifier = {
				factor = 0
				is_in_faction = yes
			}
		}
		SWE_permittentrafiken_response_picker = yes
	}
	# No, maintain neutrality 
	option = {
		name = AAT_Sweden_flashpoints.31.b
		ai_chance = {
			base = 0
			# TODO_ASD: Add historical AI check
			#modifier = {
			#	add = 10 
			#}
		}
		FROM = {
			country_event = {
				id = AAT_Sweden_flashpoints.32
				days = 3
			}
			add_opinion_modifier = {
				target = SWE
				modifier = refused_GER_transit_request
			}
		}
	}
}

# German Event - Sweden refuses request
country_event = { 
	id = AAT_Sweden_flashpoints.32
	title = AAT_Sweden_flashpoints.32.t
	desc = AAT_Sweden_flashpoints.32.desc
	picture = GFX_report_event_generic_train
	is_triggered_only = yes

	# Escalate tensions
	option = {
		name = AAT_Sweden_flashpoints.32.a
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				NOT = {
					OR = {
						any_allied_country = {
							any_controlled_state = {
								is_core_of = NOR
							}
						}
						any_controlled_state = {
							is_core_of = NOR
						}
						any_allied_country = {
							any_controlled_state = {
								is_core_of = FIN
							}
						}
						any_controlled_state = {
							is_core_of = FIN
						}
						AND = {
							has_war_with = SOV
							FIN = {
								has_war_with = SOV
							}
							has_military_access_to = FIN
						}
					}
				}
			}
		}
		SWE = {
			country_event = {
				id = AAT_Sweden_flashpoints.33
				days = 3
			}
		}
	}
	# drop the issue
	option = {
		name = AAT_Sweden_flashpoints.32.b
		ai_chance = {
			base = 0
			modifier = {
				add = 10
				NOT = {
					OR = {
						any_allied_country = {
							any_controlled_state = {
								is_core_of = NOR
							}
						}
						any_controlled_state = {
							is_core_of = NOR
						}
						any_allied_country = {
							any_controlled_state = {
								is_core_of = FIN
							}
						}
						any_controlled_state = {
							is_core_of = FIN
						}
						AND = {
							has_war_with = SOV
							FIN = {
								has_war_with = SOV
							}
							has_military_access_to = FIN
						}
					}
				}
			}
		}
		SWE = {
			country_event = {
				id = AAT_Sweden_flashpoints.36
				days = 3
			}
		}
	}
}

# Sweden Event - Germany questions neutrality of Sweden
country_event = { 
	id = AAT_Sweden_flashpoints.33
	title = AAT_Sweden_flashpoints.33.t
	desc = AAT_Sweden_flashpoints.33.desc
	picture = GFX_report_event_generic_sign_treaty1
	is_triggered_only = yes

	# allow them access
	option = {
		name = AAT_Sweden_flashpoints.33.a
		ai_chance = {
			base = 10
		}
		SWE_permittentrafiken_response_picker = yes
	}
	# refuse request, increase tensions by increasing mobilization
	option = {
		name = AAT_Sweden_flashpoints.33.b
		ai_chance = {
			base = 0
		}
		GER = {
			country_event = {
				id = AAT_Sweden_flashpoints.34
				days = 3
			}
		}
	}
}

# Germany Event - Sweden increases mobilization
country_event = { 
	id = AAT_Sweden_flashpoints.34
	title = AAT_Sweden_flashpoints.34.t
	desc = AAT_Sweden_flashpoints.34.desc
	picture = GFX_report_event_swedish_soldier
	is_triggered_only = yes

	# Begin moving forces to the Swedish border and send ultimatum
	option = {
		name = AAT_Sweden_flashpoints.34.a
		ai_chance = {
			base = 10
		}
		SWE = {
			country_event = {
				id = AAT_Sweden_flashpoints.35
				days = 3
			}
		}
	}
	# Give up and end escalation
	option = {
		name = AAT_Sweden_flashpoints.34.b
		ai_chance = {
			base = 0
		}
		SWE = {
			country_event = {
				id = AAT_Sweden_flashpoints.36
				days = 3
			}
		}
	}
}

# Sweden Event - Germany sends ultimatum
country_event = { 
	id = AAT_Sweden_flashpoints.35
	title = AAT_Sweden_flashpoints.35.t
	desc = AAT_Sweden_flashpoints.35.desc
	picture = GFX_report_event_german_troops
	is_triggered_only = yes

	# Cave to the Germans
	option = {
		name = AAT_Sweden_flashpoints.35.a
		ai_chance = {
			base = 10
		}
		SWE_permittentrafiken_response_picker = yes
	}
	# Pre-emptive strike on Germany
	option = {
		name = AAT_Sweden_flashpoints.35.b
		ai_chance = {
			base = 0
		}
		GER = {
			country_event = {
				id = AAT_Sweden_flashpoints.38
				hours = 12
			}
		}
		create_wargoal = {
			target = GER
			type = puppet_wargoal_focus
		}
	}
	# Refuse to abandon neutrality
	option = {
		name = AAT_Sweden_flashpoints.35.c
		ai_chance = {
			base = 0
		}
		GER = {
			country_event = {
				id = AAT_Sweden_flashpoints.37
				days = 3
			}
		}
	}
}

# Sweden Event - Tensions with Germany decrease
country_event = { 
	id = AAT_Sweden_flashpoints.36
	title = AAT_Sweden_flashpoints.36.t
	desc = AAT_Sweden_flashpoints.36.desc
	picture = GFX_report_event_german_reichstag_gathering
	is_triggered_only = yes

	# Great
	option = {
		name = AAT_Sweden_flashpoints.36.a
		ai_chance = {
			base = 10
		}
	}
}

# German Event - Sweden rejects ultimatum
country_event = { 
	id = AAT_Sweden_flashpoints.37
	title = AAT_Sweden_flashpoints.37.t
	desc = AAT_Sweden_flashpoints.37.desc
	picture = GFX_report_event_swedish_soldier
	is_triggered_only = yes

	# We have to back down
	option = {
		name = AAT_Sweden_flashpoints.37.a
		ai_chance = {
			base = 10
		}
		SWE = {
			country_event = {
				id = AAT_Sweden_flashpoints.36
				days = 3
			}
		}
	}
	# Begin the invasion of Sweden
	option = {
		name = AAT_Sweden_flashpoints.37.b
		ai_chance = {
			base = 20
			modifier = {
				factor = 0.5
				FROM = {
					is_in_faction = yes
				}
			}
			modifier = {
				factor = 0
				NOT = {
					OR = {
						any_allied_country = {
							any_controlled_state = {
								is_core_of = NOR
							}
						}
						any_controlled_state = {
							is_core_of = NOR
						}
						any_allied_country = {
							any_controlled_state = {
								is_core_of = FIN
							}
						}
						any_controlled_state = {
							is_core_of = FIN
						}
						AND = {
							has_war_with = SOV
							FIN = {
								has_war_with = SOV
							}
							has_military_access_to = FIN
						}
					}
				}
			}
		}
		create_wargoal = {
			target = SWE
			type = puppet_wargoal_focus
		}
	}
}

# German Event - Sweden attacks positions in Norway and Denmark
country_event = { 
	id = AAT_Sweden_flashpoints.38
	title = AAT_Sweden_flashpoints.38.t
	desc = AAT_Sweden_flashpoints.38.desc
	picture = GFX_report_event_sweden_tank
	is_triggered_only = yes

	# We shall fight them in the Fjords and in the streets...
	option = {
		name = AAT_Sweden_flashpoints.38.a
		ai_chance = {
			base = 10
		}
	}
}

# German Event - Sweden allows transit of humanitarian stuff 
country_event = { 
	id = AAT_Sweden_flashpoints.39
	title = AAT_Sweden_flashpoints.39.t
	desc = AAT_Sweden_flashpoints.39.desc
	picture = GFX_report_event_generic_train
	is_triggered_only = yes

	# Great - End event chain
	option = {
		name = AAT_Sweden_flashpoints.39.a
		ai_chance = {
			base = 0
			modifier = {
				add = 10
				has_war_with = FROM
			}
			modifier = {
				factor = 0.25
				FROM = { is_in_faction = yes }
			}
		}
	}
	# Push for more concessions - telephone, telegraph
	option = {
		name = AAT_Sweden_flashpoints.39.b
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				has_war_with = FROM
			}
			modifier = {
				factor = 2
				FROM = { is_in_faction = yes }
			}
		}
		
		FROM = {
			set_country_flag = GER_want_communications
			country_event = {
				id = AAT_Sweden_flashpoints.40
				days = 30
			}
			# Note: Setting flag here so it's one place to maintain rather than every event where Sweden concedes. Will only be relevant if the event chain continues from here anyway.
			set_country_flag = SWE_gave_germany_humanitarian_access_flag
		}
	}
}

# Sweden Event - Germany requests access to our comms infrastructure
country_event = { 
	id = AAT_Sweden_flashpoints.40
	title = AAT_Sweden_flashpoints.40.t
	desc = AAT_Sweden_flashpoints.40.desc
	picture = GFX_report_event_radar_01
	is_triggered_only = yes

	# Allow them access to the communications system
	option = {
		name = AAT_Sweden_flashpoints.40.a
		ai_chance = {
			base = 0
		}
		SWE_permittentrafiken_response_picker = yes
	}
	# Sure but we're going to spy on German comms 
	option = {
		trigger = {
			has_dlc = "La Resistance"
		}
		name = AAT_Sweden_flashpoints.40.b
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				has_war_with = FROM
			}
			modifier = {
				factor = 0
				is_in_faction = yes
			}
		}
		SWE_permittentrafiken_response_picker = yes
		set_country_flag = SWE_spying_on_GER
		custom_effect_tooltip = AAT_Sweden_flashpoints_tt_arne_beurling
		
	}
	# We will not budge from our neutrality any further
	option = {
		name = AAT_Sweden_flashpoints.40.c
		ai_chance = {
			base = 0
		}
		FROM = {
			country_event = {
				id = AAT_Sweden_flashpoints.32
				days = 3
			}
			add_opinion_modifier = {
				target = SWE
				modifier = refused_GER_military_access_request
			}
		}
	}
}

# German Event - Sweden allows access to comms
country_event = { 
	id = AAT_Sweden_flashpoints.41
	title = AAT_Sweden_flashpoints.41.t
	desc = AAT_Sweden_flashpoints.41.desc
	picture = GFX_report_event_radar_01
	is_triggered_only = yes

	# Great - End event chain
	option = {
		name = AAT_Sweden_flashpoints.41.a
		ai_chance = {
			base = 0
		}
	}
	# Push for more concessions - military access
	option = {
		name = AAT_Sweden_flashpoints.41.b
		ai_chance = {
			base = 10
		}		
		SWE = {
			set_country_flag = GER_want_military_access
			country_event = {
				id = AAT_Sweden_flashpoints.42
				days = 30
			}
			# Note: Setting flag here so it's one place to maintain rather than every event where Sweden concedes. Will only be relevant if the event chain continues from here anyway.
			set_country_flag = SWE_gave_germany_comms_access
		}
	}
}

# Sweden Event - Germany requests military access
country_event = { 
	id = AAT_Sweden_flashpoints.42
	title = AAT_Sweden_flashpoints.42.t
	desc = AAT_Sweden_flashpoints.42.desc
	picture = GFX_report_event_german_troops_paris
	is_triggered_only = yes

	# allow access

	option = {
		name = AAT_Sweden_flashpoints.42.a
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				has_war_with = FROM
			}
			modifier = {
				factor = 0
				is_in_faction = yes
			}
		}
		SWE_permittentrafiken_response_picker = yes

	}
	# maintain neutrality
	option = {
		name = AAT_Sweden_flashpoints.42.b
		ai_chance = {
			base = 0
			modifier = {
				add = 10
				has_war_with = FROM
			}
			modifier = {
				factor = 10
				is_in_faction = yes
			}
		}
		FROM = {
			country_event = {
				id = AAT_Sweden_flashpoints.32
				days = 3
			}
			add_opinion_modifier = {
				target = SWE
				modifier = refused_GER_military_access_request
			}
		}
	}
}

# Germany Event - Sweden allows military access
country_event = { 
	id = AAT_Sweden_flashpoints.43
	title = AAT_Sweden_flashpoints.43.t
	desc = AAT_Sweden_flashpoints.43.desc
	picture = GFX_report_event_german_troops_paris
	is_triggered_only = yes

	# Great
	option = {
		name = AAT_Sweden_flashpoints.43.a
		ai_chance = {
			base = 0
		}
		set_country_flag = SWE_gave_germany_military_access
		FROM = {
			give_military_access = PREV
		}
	}
}


 country_event = { 
	id = AAT_Sweden.1
	title = AAT_Sweden.1.t
	desc = AAT_Sweden.1.desc
	picture = GFX_report_event_german_troops_paris
	is_triggered_only = yes
	immediate = {
		hidden_effect = {
			country_event = { id = AAT_Sweden.3 days = 100 random_days = 20 }
		}
	}
	# Axel Pehrsson (historical)
	option = {

		#retire_country_leader = yes
		name = AAT_Sweden.1.a
		ai_chance = {
			base = 1
		}
		retire_country_leader = yes
		SWE_axel_pehrssonbramstorp = {
				promote_leader = yes
		}
		set_party_name = {
			ideology = democratic
			name = SWE_aat_farmers_union
			long_name = SWE_aat_farmers_union_long
		}
		set_country_flag = SWE_1936_axel_pehrssonbramstorp_is_pm
		effect_tooltip = {
			SWE_axel_pehrssonbramstorp = {
				add_trait = {
					trait = SWE_rearnament_proponent
				}

				add_trait = {
					trait = SWE_support_party_in_power

				}
			}
		}
		#show_ideas_tooltip = SWE_rearnament_proponent
		custom_effect_tooltip = SWE_defense_act_tt
	}

	#Keep Beep Beep
	option = {
		name = AAT_Sweden.1.b
		ai_chance = {
			base = 0
			modifier = {
				add = 0.5
				is_historical_focus_on = no
			}
		}
		country_event = {
			id = AAT_Sweden.2
			hours = 6 
			random_days = 2 
		}
		custom_effect_tooltip = AAT_Sweden.1.b_tt
		set_country_flag = SWE_1936_per_albin_is_pm
		effect_tooltip = {
			SWE_fallen_riksdag = {
				add_country_leader_role = {
					country_leader = {
						ideology = liberalism
						expire="1965.1.1.1"
						traits = { SWE_fallen_riksdag_trait } 
					}
					promote_leader = yes
				}
			}
		}
		custom_effect_tooltip = SWE_defense_act_tt
	}

	#Switch to right
	option = {
		retire_country_leader = yes
		name = AAT_Sweden.1.c
		ai_chance = {
			base = 0
			modifier = {
				add = 0.5
				is_historical_focus_on = no
			}
		}
		hidden_effect = {
			retire_country_leader = yes
			set_party_name = {
				ideology = democratic
				name = SWE_aat_hogern
				long_name = SWE_aat_hogern_long
			}

			set_party_name = {
				ideology = neutrality
				name = SWE_neutrality_party
				long_name = SWE_neutrality_party_long
			}

			set_cosmetic_tag = SWE_democratic
		}
		
		set_country_flag = SWE_1936_gosta_bagge_is_pm

		effect_tooltip = {
			SWE_gosta_bagge = {
				add_trait = {
					trait = minister_of_ecclesiastical_affairs
				}

				add_trait = {
					trait = SWE_minor_opposition_party_in_power

				}
			}
		}
		custom_effect_tooltip = SWE_defense_act_tt
	}
}

#Vote of no confidence
country_event = { 
	id = AAT_Sweden.2
	title = AAT_Sweden.2.t
	desc = AAT_Sweden.2.desc
	picture = GFX_report_event_german_troops_paris
	is_triggered_only = yes

	option = {
		name = AAT_Sweden.2.a	
		retire_country_leader = yes
		SWE_fallen_riksdag = {
			add_country_leader_role = {
				country_leader = {
					ideology = liberalism
					expire="1965.1.1.1"
					traits = { SWE_fallen_riksdag_trait } 
				}
				promote_leader = yes
			}
		}
		clr_country_flag = SWE_1936_per_albin_is_pm
		set_country_flag = SWE_1936_fallen_riksdag
		hidden_effect = {
			random_list = {
				seed = random #optional. if specified, it will use this seed instead of scope seed for picking a random 
				1 = {  
					country_event = { id = AAT_Sweden.4 days = 12 random_days = 6 }
				}
				99 = {
					#set_country_flag = SWE_normal_events
				}
			}
		}
	}
}

#1936 election
country_event = { 
	id = AAT_Sweden.3
	title = AAT_Sweden.3.t
	desc = AAT_Sweden.3.desc
	picture = GFX_report_event_german_troops_paris
	is_triggered_only = yes

	#Beep Beep comes back
	option = {
		name = AAT_Sweden.3.a
		ai_chance = {
			base = 1
			modifier = {
				has_game_rule = {
					rule = SWE_ai_behavior
					option = SWE_DEMOCRATIC_DEM_ALT
				}
				factor = 0
			}
		}
		retire_country_leader = yes
		promote_character = SWE_per_albin_hansson
		SWE_per_albin_hansson = {
			add_trait = {
				trait = SWE_solidified_mandate
				ideology = socialism
			}
			add_trait = {
				trait = SWE_reluctant_towards_rearmament
				ideology = socialism
			}
		}
		set_party_name = {
			ideology = democratic
			name = SWE_democratic_party
			long_name = SWE_democratic_party_long
		}
		hidden_effect = {
			set_politics = {
				ruling_party = democratic
				last_election = "1936.11.20"
				election_frequency = 48
				elections_allowed = yes
			}
		}
	}
	#Keep the summer government
	option = {
		name = AAT_Sweden.3.b
		ai_chance = {
			base = 0
			modifier = {
				add = 0.5
				OR = {
					is_historical_focus_on = no
					has_game_rule = {
					rule = SWE_ai_behavior
					option = SWE_DEMOCRATIC_DEM_ALT
					}
				}
			}
		}
		if = {
			limit = {
				NOT = {
					has_country_leader = {
						ruling_only = yes
						character = SWE_axel_pehrssonbramstorp
					}
				}
			}
			retire_country_leader = yes
			IF = {
				limit = {
					NOT = {
						SWE_axel_pehrssonbramstorp = {
							AND = {
								has_ideology = liberalism
								has_trait = SWE_support_party_in_power
								has_trait = SWE_rearnament_proponent
							}
						}
					}
				}
			}
			promote_character = SWE_axel_pehrssonbramstorp
			hidden_effect = {
				set_politics = {
					ruling_party = democratic
					last_election = "1936.11.20"
					election_frequency = 48
					elections_allowed = yes
				}
			}
			set_party_name = {
				ideology = democratic
				name = SWE_aat_farmers_union
				long_name = SWE_aat_farmers_union_long
			}
		}
	}
	#Keep the right
	option = {
		name = AAT_Sweden.3.c
		ai_chance = {
			base = 0
			modifier = {
				add = 0.5
				OR = {
					is_historical_focus_on = no
					has_game_rule = {
						rule = SWE_ai_behavior
						option = SWE_DEMOCRATIC_DEM_ALT
					}
				}
			}
		}
		if = {
			limit = {
				NOT = {
					has_country_leader = {
						ruling_only = yes
						character = SWE_gosta_bagge
					}
				}
			}
			retire_country_leader = yes
			SWE_gosta_bagge = {
				add_country_leader_role = {
					country_leader = {
						ideology = conservatism
						expire="1965.1.1.1"
						traits = { minister_of_ecclesiastical_affairs } 
					}
					promote_leader = yes
				}
			}
			hidden_effect = {
				set_politics = {
					ruling_party = democratic
					last_election = "1936.11.20"
					election_frequency = 48
					elections_allowed = yes
				}

				set_party_name = {
					ideology = neutrality
					name = SWE_neutrality_party
					long_name = SWE_neutrality_party_long
				}
			}
			set_party_name = {
				ideology = democratic
				name = SWE_aat_hogern
				long_name = SWE_aat_hogern_long
			}		
		}
	}

	#Wigfors
	option = {
		name = AAT_Sweden.3.d
		ai_chance = {
			base = 0
			modifier = {
				add = 1
				is_historical_focus_on = no
			}

			modifier = {
				OR = {
					is_historical_focus_on = no
					has_game_rule = {
						rule = SWE_ai_behavior
						option = SWE_DEMOCRATIC_DEM_ALT
					}
				}
				factor = 0.5
			}
		}
		trigger = {
			has_country_leader = {
				ruling_only = yes
				character = SWE_fallen_riksdag 
			}
		}	
		retire_country_leader = yes
			SWE_ernst_wigforss = {
			add_country_leader_role = {
				country_leader = {
					ideology = socialism
					expire="1965.1.1.1"
					traits = { captain_of_industry } 
				}
				promote_leader = yes
			}
		}
	}
}

#Shitposting, dog 

country_event = { 
	id = AAT_Sweden.4
	title = AAT_Sweden.4.t
	desc = AAT_Sweden.4.desc
	picture = GFX_report_event_german_troops_paris
	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			country_event = {
				id = AAT_Sweden.5
				days = 12
				random_days = 5
			}
		}
	}
	option = {
		name = AAT_Sweden.4.a
	}

}

country_event = { 
	id = AAT_Sweden.5
	title = AAT_Sweden.5.t
	desc = AAT_Sweden.5.desc
	picture = GFX_report_event_german_troops_paris
	is_triggered_only = yes


	immediate = {
		hidden_effect = {
			country_event = {
				id = AAT_Sweden.6
				days = 12
				random_days = 5
			}
		}
	}
	option = {
		name = AAT_Sweden.5.a
	}

}

country_event = { 
	id = AAT_Sweden.6
	title = AAT_Sweden.6.t
	desc = AAT_Sweden.6.desc
	picture = GFX_report_event_german_troops_paris
	is_triggered_only = yes


	immediate = {
		hidden_effect = {
			country_event = {
				id = AAT_Sweden.7
				days = 12
				random_days = 5
			}
		}
	}
	option = {
		name = AAT_Sweden.6.a
	}
}

country_event = { 
	id = AAT_Sweden.7
	title = AAT_Sweden.7.t
	desc = AAT_Sweden.7.desc
	picture = GFX_report_event_german_troops_paris
	is_triggered_only = yes

	option = {
		name = AAT_Sweden.7.a
		add_manpower = -12
		hidden_effect = {
			country_event = { id = AAT_Sweden.8 months = 6 }
		}
	}
}

#11 people being arrested are released
country_event = { 
	id = AAT_Sweden.8
	title = AAT_Sweden.8.t
	desc = AAT_Sweden.8.desc
	picture = GFX_report_event_german_troops_paris
	is_triggered_only = yes

	option = {
		name = AAT_Sweden.7.a
		add_manpower = 11
		hidden_effect = {
			country_event = { id = AAT_Sweden.9 months = 26 random_days = 70 }
		}
	}
}

#Persson is released
country_event = { 
	id = AAT_Sweden.9
	title = AAT_Sweden.9.t
	desc = AAT_Sweden.9.desc
	picture = GFX_report_event_german_troops_paris
	is_triggered_only = yes

	option = {
		name = AAT_Sweden.9.a
		add_manpower = 1
		SWE_rikard_persson = {
			set_character_flag = has_rikard_persson
		}
		show_unit_leaders_tooltip = SWE_rikard_persson
	}
}

#Sods off to make booze
country_event = { 
	id = AAT_Sweden.10
	title = AAT_Sweden.10.t
	desc = AAT_Sweden.10.desc
	picture = GFX_report_event_german_troops_paris
	fire_only_once = yes
	trigger = {
		date > 1944.01.02
		original_tag = SWE
		SWE = { SWE_herman_eriksson = { has_character_flag = is_hired} }
		
	}
	mean_time_to_happen = { days = 14 }
		#He needs to stay
	option = {
		name = AAT_Sweden.10.a
		add_political_power = -60
	}

	#let him go
	option = {
		name = AAT_Sweden.10.b
		retire_character = SWE_herman_eriksson
		add_ideas = SWE_vin_och_sprit_ab
	}
}

#Landsverk is seized by Germany
country_event = { 
	id = AAT_Sweden.11
	title = AAT_Sweden.11.t
	desc = AAT_Sweden.11.desc
	picture = GFX_report_event_german_troops_paris
	fire_only_once = yes
	trigger = {
		original_tag = SWE
		has_war_with = GER
		has_completed_focus = SWE_allow_landsverk_to_operate
		
	}
	mean_time_to_happen = { days = 14 }
		#He needs to stay
	option = {
		name = AAT_Sweden.11.a
		activate_mission = SWE_landsverk_is_siezed
		random_core_state = {
			prioritize = { 138 }
			limit = {
				is_fully_controlled_by = ROOT
			}
			add_extra_state_shared_building_slots = -1
			add_building_construction = {
				type = arms_factory
				level = -1
				instant_build = yes
			}
		}

		random_core_state = {
			prioritize = { 138 }
			limit = {
				is_fully_controlled_by = ROOT
			}
			add_extra_state_shared_building_slots = -1
			add_building_construction = {
				type = arms_factory
				level = -1
				instant_build = yes
			}
		}
	}
}

#Per Albin bus gets caught
country_event = { 
	id = AAT_Sweden.12
	title = AAT_Sweden.12.t
	desc = AAT_Sweden.12.desc
	picture = GFX_report_event_german_troops_paris
	fire_only_once = yes
	is_triggered_only = yes

	immediate = {

	}

	option = {
		name = AAT_Sweden.12.a
		kill_country_leader = yes
		SWE_tage_erlander = {
			add_country_leader_role = {
				promote_leader = yes
				country_leader = {
					ideology = socialism
				}
			}
		}
	}
}

#Sweden requests control of Narvik
country_event = {
	id = AAT_Sweden.13
	title = AAT_Sweden.13.t
	desc = AAT_Sweden.13.desc
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	option = { # okidoke
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				FROM = { #FROM = SWE
					is_ai = yes
				}
				is_historical_focus_on = yes
			}

			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value >  70
				}
			}

			modifier = {
				factor = 3
				core_resistance = {
					occupied_country_tag = NOR
					value > 24
				}
			}

			modifier = {
				factor = 1.5
				SWE = {
					is_ai = no
				}
			}

			modifier = {
				factor = 1.1
				has_political_power < 30
			}

			modifier = {
				is_subject = yes
				overlord = {
					is_ai = no
				}
				factor = 0
			}

			modifier = {
				factor = 0
				OR = {
					SWE = {
						FROM = {
							has_war_with = PREV
							has_wargoal_against = PREV
							is_justifying_wargoal_against = PREV
						}
					}

					OR = {
						has_war_with = FROM
						has_wargoal_against = FROM
						is_justifying_wargoal_against = FROM
					}
				}
			}
		}
		name = AAT_Sweden.13.a
		add_political_power = 70
		FROM = { country_event = { id = AAT_Sweden.14 days = 3 random_days = 2 }}
		effect_tooltip = {
			if = {
				limit = {
					controls_state = 144 
				}

				FROM = {
					transfer_state = 144
					144 = {
						set_demilitarized_zone = yes
						add_compliance = 70
					}
				}
			}

			if = {
				limit = {
					controls_state = 924 
				}


				FROM = {
					transfer_state = 924
					924 = {
						set_demilitarized_zone = yes
						add_compliance = 70
					}
				}
			}

			if = {
				limit = {
					controls_state = 925
				}

				FROM = {
					transfer_state = 925
					925 = {
						set_demilitarized_zone = yes
						add_compliance = 70
					}
				}
			}
		} 
 
	}

	option = { #no
		ai_chance = {
			base = 10
		}
		name = AAT_Sweden.13.b
		FROM = { country_event = { id = AAT_Sweden.15 days = 4 random_days = 3 }}
	}
}

#Norweigan occupier accepts occupation
country_event = {
	id = AAT_Sweden.14
	title = AAT_Sweden.14.t
	desc = AAT_Sweden.14.desc
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	immediate = {
		hidden_effect = {
			if = {
				limit = {
					FROM = { controls_state = 144 }
				}


				transfer_state = 144
				144 = {
					add_compliance = 70
					set_demilitarized_zone = yes
				}
			}

			if = {
				limit = {
					FROM = { controls_state = 924 }
				}

				transfer_state = 924
				924 = {
					add_compliance = 70
					set_demilitarized_zone = yes
				}
			}

			if = {
				limit = {
					FROM = { controls_state = 925 }
				}


				transfer_state = 925
				925 = {
					add_compliance = 70
					set_demilitarized_zone = yes
				}
			}
		}
	}
	option = { # okidoke
		name = AAT_Sweden.14.a

	}
}

#Norweigan occupier declines occupation, Sweden gets a chance to escalate
country_event = {
	id = AAT_Sweden.15
	title = AAT_Sweden.15.t
	desc = AAT_Sweden.15.desc
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	option = { # okidoke
		name = AAT_Sweden.15.a

		ai_chance = {
			base = 1
		}
	}

	option = { #threaten war
		name = AAT_Sweden.15.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
				FROM = {
					is_ai = yes
				}
			}

			modifier = {
				factor = 10
				FROM = { 
					tag = GER 
					has_war_with = SOV
				}
			}

			modifier = {
				factor = 2
				strength_ratio = {
					tag = FROM
					ratio > 0.15
				}
			}

			modifier = {
				factor = 10
				strength_ratio = {
					tag = FROM
					ratio > 0.3
				}
			}
		}
		FROM = { country_event = { id = AAT_Sweden.16 days = 5 random_days = 4 }}
	}
}



#Sweden threatens war over Norway
country_event = {
	id = AAT_Sweden.16
	title = AAT_Sweden.16.t
	desc = AAT_Sweden.16.desc
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	option = { # surrender
		name = AAT_Sweden.16.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 1.5
				FROM = {
					is_ai = no
				}

			}
			modifier = {
				factor = 2
				tag = GER
				has_war_with = SOV
			}

			modifier = {
				factor = 1.5
				strength_ratio = {
					tag = FROM
					ratio > 0.15
				}
			}

			modifier = {
				factor = 10
				strength_ratio = {
					tag = FROM
					ratio > 0.25
				}
			}
		}
		FROM = { 
			country_event = { id = AAT_Sweden.14 days = 5 random_days = 4 } 

		}
	}

	option = { #sod off
		ai_chance = {
			base = 1
		}
		name = AAT_Sweden.16.b
		FROM = { country_event = { id = AAT_Sweden.17 }}
		effect_tooltip = {
			SWE = {
				add_timed_idea = { idea = SWE_save_norway days = 120 }
				add_war_support = 0.05
				create_wargoal = {
					type = liberate_wargoal
					target = PREV
					generator = { 144 }  
				}
			}
		}
	}
}


#Sweden gets a wargoal to liberate Sweden
country_event = {
	id = AAT_Sweden.17
	title = AAT_Sweden.17.t
	desc = AAT_Sweden.17.desc
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	option = { # liberate Norway
		name = AAT_Sweden.17.a
		add_timed_idea = { idea = SWE_save_norway days = 120 }
		add_war_support = 0.05
		create_wargoal = {
			type = liberate_wargoal
			target = FROM
			generator = { 144 }  
		}
	}
}

#Norway is liberated, return Narvik pls
country_event = {
	id = AAT_Sweden.18
	title = AAT_Sweden.18.t
	desc = AAT_Sweden.18.desc
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	option = { # liberate Norway
		ai_chance = {
			base = 10
			modifier = {
				factor = 10
				OR = {
					has_government = democratic
					has_government = neutrality
				}
				NOR = {
					OR = {
						has_government = democratic
						has_government = neutrality
					}
				}
			}
			modifier = {
				factor = 10
				is_in_faction_with = NOR
			}
		}
		name = AAT_Sweden.18.a
		if = {
			limit = { controls_state = 144 }
			NOR = { transfer_state = 144 }
		}

		if = {
			limit = { controls_state = 924 }
			NOR = { transfer_state = 924 }
		}

		if = {
			limit = { controls_state = 925 }
			NOR = { transfer_state = 925 }
			
		}

		custom_effect_tooltip = AAT_Sweden.19_tt
		set_country_flag = SWE_hero_of_narvik 
		NOR = { country_event = { id = AAT_Sweden.19 days = 6 random_days = 5 } }

	}

	option = {
		ai_chance = {
			base = 0
			modifier = {
				NOR = {
					OR = {
						has_government = fascism
						has_government = communism
					}
					NOT = { is_in_faction_with = SWE }
				}
				add = 30
			}
		}
		name = AAT_Sweden.18.b
		effect_tooltip = {
			NOR = {
				create_wargoal = {
					type = liberate_wargoal
					target = PREV
					generator = { 144 }  
				}
			}
		}
		NOR = { country_event = { id = AAT_Sweden.20 days = 6 random_days = 5 } }
	}
}

#Sweden hands over Narvik
country_event = {
	id = AAT_Sweden.19
	title = AAT_Sweden.19.t
	desc = AAT_Sweden.19.desc
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	option = { # liberate Norway
		name = AAT_Sweden.19.a
		144 = { set_demilitarized_zone = no }
		924 = { set_demilitarized_zone = no }
		925 = { set_demilitarized_zone = no }

	}
}


#SWeden refuses to hand over narvik
country_event = {
	id = AAT_Sweden.20
	title = AAT_Sweden.20.t
	desc = AAT_Sweden.20.desc
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	option = { 
		name = AAT_Sweden.20.a
		create_wargoal = {
			type = liberate_wargoal
			target = SWE
			generator = { 144 }  
		}
	}
}

#Sweden invites us to Scandi Defense Union
country_event = {
	id = AAT_Sweden.21
	title = AAT_Sweden.21.t
	desc = AAT_Sweden.21.desc
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	option = { 
		name = AAT_Sweden.21.a
		ai_chance = {
			base = 10
			modifier = {
				factor = 10
				OR = {
					has_war = no
					is_in_faction = no
				}
			}
		}
		FROM = {
			country_event = {
				id = AAT_Sweden.22
				hours = 1
			}
		}
	}
	option = { 
		name = AAT_Sweden.21.b
		ai_chance = {
			base = 5
			modifier = {
				factor = 0
				AND = {
					has_war = yes
					is_in_faction = yes
				}
			}
			modifier = {
				factor = 10
				AND = {
					has_war = yes
					is_in_faction = no
				}
			}
			modifier = {
				factor = 0
				NOT = {
					has_government = FROM
				}
			}
		}
		FROM = {
			add_to_faction = PREV
		}
	}
}

#FROM rejects faction invite
country_event = {
	id = AAT_Sweden.22
	title = AAT_Sweden.22.t
	desc = AAT_Sweden.22.desc
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	option = { 
		name = AAT_Sweden.22.a
		ai_chance = {
			base = 10
		}
	}
}

#Sweden requests to join our faction
country_event = {
	id = AAT_Sweden.23
	title = AAT_Sweden.23.t
	desc = AAT_Sweden.23.desc
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	option = { 
		name = AAT_Sweden.23.a
		ai_chance = {
			base = 1
			modifier = {
				add = 10
				any_country = {
					AND = {
						has_war_with = FROM
						NOT = { has_war_with = ROOT }
					}
				}
			}
		}
		FROM = {
			country_event = {
				id = AAT_Sweden.24
				hours = 1
			}
		}
	}
	option = { 
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				NOT = { has_government = FROM }
			}
			modifier = {
				factor = 10
				any_country = {
					AND = {
						has_war_with = FROM
						has_war_with = ROOT
					}
				}
			}
		}
		name = AAT_Sweden.23.b
		add_to_faction = FROM		
	}
}

#FROM rejects faction invite
country_event = {
	id = AAT_Sweden.24
	title = AAT_Sweden.24.t
	desc = AAT_Sweden.24.desc
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	option = { 
		name = AAT_Sweden.24.a
		ai_chance = {
			base = 10
		}
	}
}

#Special Forces Specialization
country_event = {
	id = AAT_Sweden.25
	title = AAT_Sweden.25.t
	desc = AAT_Sweden.25.desc
	picture = GFX_report_event_001
	is_triggered_only = yes
	# Rangers
	option = { 
		name = AAT_Sweden.25.a
		ai_chance = {
			base = 10
		}
		IF = {
			limit = { NOT = { has_tech = tech_mountaineers }}
			set_technology = { tech_mountaineers = 1 }
		}
		ELSE_IF = {
			limit = { NOT = { has_tech = tech_mountaineers2 }}
			set_technology = { tech_mountaineers2 = 1 }
		}
		ELSE_IF = {
			limit = { NOT = { has_tech = tech_mountaineers3 }}
			set_technology = { tech_mountaineers3 = 1 }
		}
		set_country_flag = SWE_has_rangers
		add_doctrine_cost_reduction = {
		 	cost_reduction = 0.65
		 	uses = 1
		 	category = mountaineers_tech
		 } 
	}
	# Marines
	option = { 
		name = AAT_Sweden.25.b
		ai_chance = {
			base = 10
		}
		IF = {
			limit = { NOT = { has_tech = marines }}
			set_technology = { marines = 1 }
		}
		ELSE_IF = {
			limit = { NOT = { has_tech = marines2 }}
			set_technology = { marines2 = 1 }
		}
		ELSE_IF = {
			limit = { NOT = { has_tech = marines3 }}
			set_technology = { marines3 = 1 }
		}
		set_country_flag = SWE_has_marines
		add_doctrine_cost_reduction = {
		 	cost_reduction = 0.65
		 	uses = 1
		 	category = marine_tech
		 } 
	}
	# Paratroopers
	option = { 
		name = AAT_Sweden.25.c
		ai_chance = {
			base = 10
		}
		IF = {
			limit = { NOT = { has_tech = paratroopers }}
			set_technology = { paratroopers = 1 }
		}
		ELSE_IF = {
			limit = { NOT = { has_tech = paratroopers2 }}
			set_technology = { paratroopers2 = 1 }
		}
		ELSE_IF = {
			limit = { NOT = { has_tech = paratroopers3 }}
			set_technology = { paratroopers3 = 1 }
		}
		set_country_flag = SWE_has_paratroopers
		add_doctrine_cost_reduction = {
			cost_reduction = 0.65
			uses = 1
			category = para_tech
		} 
	}
}

#Sweden or Finland siezes Leningrad in the winter war, sent to SOV
country_event = {
	id = AAT_Sweden.26
	title = AAT_Sweden.26.t
	desc = AAT_Sweden.26.desc
	picture = GFX_report_event_generic_destroyed_vehicles

	is_triggered_only = yes
	# white peace
	option = { 
		name = AAT_Sweden.26.a
		ai_chance = {
			base = 3
		}

		every_enemy_country = {
			limit = {
				OR = {
					original_tag = SWE
					original_tag = FIN
					AND = {
						is_in_faction_with = SWE
						has_government = SWE
						NOT = {
							date > 1940.1.1 #Do not cancel Barb by accident
							original_tag = GER
							original_tag = JAP
						}
					}

					AND = {
						is_in_faction_with = FIN
						has_government = FIN
						NOT = {
							date > 1940.1.1 #Do not cancel Barb by accident
							original_tag = GER
							original_tag = JAP
						}
					}	
				}
			}
			PREV = { white_peace = PREV }
			country_event = { id = AAT_Sweden.27 hours = 2  }
		}

		add_political_power = -120
	}
	#no
	option = { 
		name = AAT_Sweden.26.b
		ai_chance = {
			base = 0.1
			modifier = {
				has_country_leader = { character = SOV_iosif_stalin ruling_only = yes }
				add = 0.1	
			}
		}

		add_ideas = SWE_SOV_embarassment_of_the_red_army
	}
}

#response event
country_event = {
	id = AAT_Sweden.27
	title = AAT_Sweden.27.t
	desc = AAT_Sweden.27.desc
	picture = GFX_report_event_bul_troops_dobrudja
	is_triggered_only = yes
	# white peace
	option = { 
		name = AAT_Sweden.27.a
		ai_chance = {
			base = 3
		}
		add_ideas = SWE_the_miracle_at_karjala
	}
}


#Sweden asks for colonies from allies
country_event = {
	id = AAT_Sweden.28
	title = AAT_Sweden.28.t
	desc = AAT_Sweden.28.desc
	picture = GFX_report_event_bul_troops_dobrudja
	is_triggered_only = yes
	timeout_days = 6

	immediate = {
		set_variable = { SWE_state_to_transfer = SWE.SWE_states_to_transfers^0 } 
		SWE = {
			remove_from_array = { array = SWE_states_to_transfers index = 0 } 	
		}
	}

	#no
	option = { 
		name = AAT_Sweden.28.a
		ai_chance = {
			base = 1

			modifier = {
				factor = 10
				original_tag = USA
				has_opinion = {
					target = SWE
					value < 79 # Use < or >
				}
			}
		}

		hidden_effect = {
			if = { 
				limit = {
					check_variable = { SWE.SWE_states_to_transfers^num > 0 }
				}
				var:SWE.SWE_states_to_transfers^0 = {
					controller = {
						country_event = { id = AAT_Sweden.28 hours = 6 }
					}
				} 
			}
		}
		SWE = { country_event = { id = AAT_Sweden.29 hours = 2 } }
	}

	option = {  #yes
		name = AAT_Sweden.28.b
		ai_chance = {
			base = 1
			modifier = {
				original_tag = USA
				factor = 0.1
			}

			modifier = {
				OR = { #France is in a weak position
					AND = {
						country_exists = VIC
		 				VIC = { 
		 					NOT = { has_war_with = SWE } 

	 					}
		 				tag = VIC
					}

					AND = {
						tag = FRA
						VIC = { exists = yes }
						FRA = { NOT = { has_war_with = SWE } }
					}

				}

				add = 1
			}
			
			modifier = {
				NOT = { original_tag = USA } 
				has_opinion = {
					target = SWE
					value  > 79 # Use < or >
				}

				add = 1
			}
		}
		
		var:SWE_state_to_transfer = {
			transfer_state_to = SWE
		}

		hidden_effect = {
			if = { 
				limit = {
					check_variable = { SWE.SWE_states_to_transfers^num > 0 }
				}
				var:SWE.SWE_states_to_transfers^0 = {
					controller = {
						country_event = { id = AAT_Sweden.28 hours = 6 }
					}
				} 
			}
		}

		SWE = { country_event = { id = AAT_Sweden.30 hours = 2 } }
	}
}

#Country refuses to return territories
country_event = {
	id = AAT_Sweden.29
	title = AAT_Sweden.29.t
	desc = AAT_Sweden.29.desc
	picture = GFX_report_event_generic_sign_treaty1
	is_triggered_only = yes
	timeout_days = 6

	option = {
		name = AAT_Sweden.29.a
	}
}

#Country agrees to return territories
country_event = {
	id = AAT_Sweden.30
	title = AAT_Sweden.30.t
	desc = AAT_Sweden.30.desc
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes
	timeout_days = 6

	option = {
		name = AAT_Sweden.30.a
	}
}

#Bornholm crisis, Sweden requests Bornholm
country_event = { #yes
	id = AAT_Sweden.31
	title = AAT_Sweden.31.t
	desc = AAT_Sweden.31.desc
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes

	option = { #Cave
		ai_chance = {
			base = 1
			modifier = {
				has_war_support < 0.4
				factor = 1.25
			}
			
			modifier = {
				is_in_faction = no
				add = 8
			}

			modifier = {
				has_opinion = {
				 	target = FROM
				 	value > 0.79 # Use < or >
				 }
				factor = 1.25
			}

			modifier = {
				is_in_faction = yes
				strength_ratio = {
					tag = FROM
					ratio < 2.5
				}
				factor = 0.5
			}

			modifier = {
				FROM = {
					is_ai = no
				}
				factor = 1.25
			}
		}

		name = AAT_Sweden.31.a
		FROM = {
			transfer_state = 910
			country_event = { id = AAT_Sweden.32 hours = 6 }
			set_country_flag = SWE_DEN_gave_bornholm
		}

		custom_effect_tooltip = AAT_Sweden.31.a_tt
	}

	option = { #no
		name = AAT_Sweden.31.b
		ai_chance = {
			base = 1

			modifier = {
				is_in_faction = yes
				factor = 5
			}

			modifier = {
				strength_ratio = {
					tag = FROM
					ratio < 0.6
				}
				factor = 3
			}
		}
		effect_tooltip = {
			FROM = {
				create_wargoal = {
					type = take_state_focus
					target = PREV
					generator = { 910 } # optional 
				}
			}
		}

		FROM = { country_event = { id = AAT_Sweden.33 hours = 6 } }
	}
}
country_event = { #BOrnhom is accepted
	id = AAT_Sweden.32
	title = AAT_Sweden.32.t
	desc = AAT_Sweden.32.desc
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes

	option = {
		name = AAT_Sweden.32.a
		effect_tooltip = {
			910 = {
				set_state_owner_to = ROOT 
			}
		}
	}
}

country_event = { #Bornhom is rejected
	id = AAT_Sweden.33
	title = AAT_Sweden.33.t
	desc = AAT_Sweden.33.desc
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes

	option = {
		name = AAT_Sweden.33.a
		create_wargoal = {
			type = take_state_focus
			target = FROM
			generator = { 910 } # optional 
		}
	}
}

#Sweden asks for Iceland, Faroe and Greenland
country_event = { #yes
	id = AAT_Sweden.34
	title = AAT_Sweden.34.t
	desc = AAT_Sweden.34.desc
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes

	option = { #Cave
		name = AAT_Sweden.34.a
		ai_chance = {
			base = 1
			modifier = {
				has_war_support < 0.4
				factor = 1.15
			}

			modifier = {
				has_opinion = {
				 	target = FROM
				 	value > 0.79 # Use < or >
				 }
				factor = 1.25
			}
			
			modifier = {
				is_in_faction = no
				add = 8
			}

			modifier = {
				is_in_faction = yes
				strength_ratio = {
					tag = FROM
					ratio < 2.5
				}
				factor = 0.5
			}

			modifier = {
				FROM = {
					is_ai = no
				}
				factor = 1.25
			}

			modifier = {

				910 = {
					is_owned_and_controlled_by = FROM
				}

				add = 8
			}

			modifier = {
				ICE = {
					has_completed_focus = ICE_break_with_the_crown 
				}
				factor = 0.5
			}
		}

		if = {
			limit = {
				337 = {
					is_owned_and_controlled_by = ROOT  
				}
			}

			FROM = { transfer_state = 337 }
		}

		if = {
			limit = {
				101 = {
					is_owned_and_controlled_by = ROOT  
				}
			}

			FROM = { transfer_state = 101 }
		}

		if = {
			limit = {
				ICE = {
					has_capitulated = no
					exists = yes
					is_subject_of = ROOT
				}
			}

			FROM = {
				set_autonomy = {
					target = ICE
					autonomy_state = autonomy_integrated_puppet
					end_wars = no
				}
			}
		}

		FROM = {
			country_event = { id = AAT_Sweden.35 hours = 6 }
			set_country_flag = SWE_DEN_surrendered_islands
		}

		if = {
			limit = {
				FROM = { has_country_flag = SWE_DEN_gave_bornholm }
			}
			custom_effect_tooltip = AAT_Sweden.34.a_tt
		}
	}

	option = { #no
		name = AAT_Sweden.34.b
		ai_chance = {
			base = 1

			modifier = {
				is_in_faction = yes
				factor = 2
			}

			modifier = {
				factor = 3
				strength_ratio = {
					tag = FROM
					ratio < 0.7
				}
			}
		}
		effect_tooltip = {
			FROM = {
				create_wargoal = {
					type = take_state_focus
					target = PREV
					generator = { 337 101 } # optional 
				}

				create_wargoal = {
					type = puppet_wargoal_focus
					target = ICE
				}
			}
		}

		FROM = { country_event = { id = AAT_Sweden.36 hours = 6 } }
	}
}

country_event = { #overseas territories is accepted
	id = AAT_Sweden.35
	title = AAT_Sweden.35.t
	desc = AAT_Sweden.35.desc
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes

	option = {
		name = AAT_Sweden.35.a
		effect_tooltip = {
			if = {
				limit = {
					337 = {
						is_owned_and_controlled_by = ROOT
					}
				}

				337 = {
					set_state_owner_to = ROOT 
				}
			}

			if = {
				limit = {
					101 = {
						is_owned_and_controlled_by = ROOT
					}
				}

				101 = {
					set_state_owner_to = ROOT 
				}
			}

			if = {
				limit = {
					ICE = {
						is_subject_of = ROOT
					}
				}

				ROOT = {
					puppet = ICE 
				}
			}
		}
	}
}

country_event = { #overseas is rejected
	id = AAT_Sweden.36
	title = AAT_Sweden.36.t
	desc = AAT_Sweden.36.desc
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes

	option = {
		name = AAT_Sweden.36.a
		create_wargoal = {
			type = take_state_focus
			target = FROM
			generator = { 337 101 } # optional 
		}

		create_wargoal = {
			type = puppet_wargoal_focus
			target = ICE
		}
	}
}

country_event = {
	id = AAT_Sweden.37
	title = AAT_Sweden.37.t
	desc = AAT_Sweden.37.desc
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes


	option = { #Sweden puppets denmark
		ai_chance = {
			factor = 1.5
		}
		name = AAT_Sweden.37.a
		trigger = {
			has_country_flag = SWE_DEN_surrendered_islands
			has_country_flag = SWE_DEN_gave_bornholm
		}

		DEN = { country_event = { id = AAT_Sweden.38 hours = 4 }}
	}

	option = { #Sweden requests to puppet Denmark
		ai_chance = {
			factor = 1
		}
		name = AAT_Sweden.37.b
		trigger = {
			OR = {
				NOT = { has_country_flag = SWE_DEN_surrendered_islands }
				NOT = { has_country_flag = SWE_DEN_gave_bornholm }
			}
		}

		DEN = { country_event = { id = AAT_Sweden.39 hours = 4 }}
	}
}


#Sweden puppets Denmark
country_event = {
	id = AAT_Sweden.38
	title = AAT_Sweden.38.t
	desc = AAT_Sweden.38.desc
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes

	option = {
		name = AAT_Sweden.38.a
		FROM = { 
			set_autonomy = {
				target = ROOT
				autonomy_state = autonomy_integrated_puppet
				end_wars = no
			}
		}
	}
}


#Sweden puppets DEN or DEN rejects
country_event = {
	id = AAT_Sweden.39
	title = AAT_Sweden.39.t
	desc = AAT_Sweden.39.desc
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes

	option = {
		name = AAT_Sweden.39.a
		ai_chance = {
			base = 9
		}

		FROM = {
			create_wargoal = {
				type = puppet_wargoal_focus
				target = PREV 
			}
		}
	}

	option = {
		name = AAT_Sweden.39.b
		ai_chance = {
			base = 1
			modifier = {
				has_war_support < 0.3
				factor = 1.15
			}

			modifier = {
				has_opinion = {
				 	target = FROM
				 	value > 0.85 # Use < or >
				 }
				factor = 1.25
			}
			
			modifier = {
				is_in_faction = no
				add = 10
			}

			modifier = {
				is_in_faction = yes
				strength_ratio = {
					tag = FROM
					ratio < 2.5
				}
				factor = 0.5
			}

			modifier = {
				FROM = {
					is_ai = no
				}
				factor = 1.25
			}

			modifier = {

				910 = {
					is_owned_and_controlled_by = FROM
				}

				add = 5
			}
		}
		FROM = { 
			set_autonomy = {
				target = ROOT
				autonomy_state = autonomy_integrated_puppet
				end_wars = no
			}
		}
	}
}

#Sweden demand (fascist) Åland
country_event = { #yes
	id = AAT_Sweden.40
	title = AAT_Sweden.40.t
	desc = AAT_Sweden.40.desc
	picture = GFX_report_event_soldiers_marching
	is_triggered_only = yes

	option = { #Cave
		name = AAT_Sweden.40.a
		ai_chance = {
			base = 1
			modifier = {
				has_war_support < 0.4
				factor = 1.15
			}

			modifier = {
				has_opinion = {
				 	target = FROM
				 	value > 0.79 # Use < or >
				 }
				factor = 1.25
			}
			
			modifier = {
				is_major = no
				is_in_faction = no
				add = 8
			}

			modifier = {
				is_in_faction = yes
				strength_ratio = {
					tag = FROM
					ratio < 2.5
				}
				factor = 0.5
			}

			modifier = {
				FROM = {
					is_ai = no
				}
				factor = 1.25
			}

		}

		if = {
			limit = {
				145 = {
					is_owned_and_controlled_by = ROOT  
				}
			}

			FROM = { transfer_state = 145 }
		}

		FROM = {
			country_event = { id = AAT_Sweden.41 hours = 6 }
			set_country_flag = SWE_FIN_surrendered_aland
		}

	}

	option = { #no
		name = AAT_Sweden.40.b
		ai_chance = {
			base = 1

			modifier = {
				OR = {
					is_in_faction = yes
					is_major = yes
				}
				factor = 2
			}

			modifier = {
				factor = 3
				strength_ratio = {
					tag = FROM
					ratio < 0.7
				}
			}
		}
		effect_tooltip = {
			FROM = {
				create_wargoal = {
					type = take_state_focus
					target = PREV
					generator = { 145 } # optional 
				}
			}
		}

		FROM = { country_event = { id = AAT_Sweden.42 hours = 6 } }
	}
}

#Finland cedes Åland
country_event = {
	id = AAT_Sweden.41
	title = AAT_Sweden.41.t
	desc = AAT_Sweden.41.desc
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes

	option = { #Sweden annexes Åland
		name = AAT_Sweden.41.a
		transfer_state = 145
		if = {
			limit = { 145 = { is_demilitarized_zone = yes }}
			145 = { set_demilitarized_zone = no }
		}

		145 = { 
			add_extra_state_shared_building_slots = 2 
			add_core_of = ROOT
		}
	}
}


#Finland refuses to cede Åland
country_event = {
	id = AAT_Sweden.42
	title = AAT_Sweden.42.t
	desc = AAT_Sweden.42.desc
	picture = GFX_report_event_generic_sign_treaty1
	is_triggered_only = yes

	option = { #Sweden annexes Denmark
		name = AAT_Sweden.42.a
		create_wargoal = {
			type = take_state_focus
			target = FROM
			generator = { 145 } # optional 
		}
	}
}

#Sweden demand (fascist) demilitarization
country_event = { #yes
	id = AAT_Sweden.43
	title = AAT_Sweden.43.t
	desc = AAT_Sweden.43.desc
	picture = GFX_report_event_soldiers_marching
	is_triggered_only = yes

	option = { #Cave
		name = AAT_Sweden.43.a
		ai_chance = {
			base = 1
			modifier = {
				has_war_support < 0.3
				factor = 1.15
			}

			modifier = {
				has_opinion = {
				 	target = FROM
				 	value > 0.69 # Use < or >
				 }
				factor = 1.25
			}
			
			modifier = {
				is_major = no
				is_in_faction = no
				add = 8
			}

			modifier = {
				is_in_faction = yes
				strength_ratio = {
					tag = FROM
					ratio < 2.5
				}
				factor = 0.5
			}

			modifier = {
				FROM = {
					is_ai = no
				}
				factor = 1.25
			}


			modifier = {
				FROM = {
					is_ai = no
				}
				factor = 1.25
			}

			modifier = {
				FROM = {
					is_ai = no
				}
				factor = 1.25
			}

			modifier = {
				FROM = {
					is_ai = no
				}
				factor = 1.25
			}

			modifier = {
				divisions_in_state = {
					state = 148
					size > 8
				}

				factor = 0.6
			}

			modifier = {
				divisions_in_state = {
					state = 666
					size > 15
				}

				factor = 1.4
			}


		}

		148 = {
			set_demilitarized_zone = yes
		}

		FROM = {
			country_event = { id = AAT_Sweden.44 hours = 4 }
		}

		effect_tooltip = {
			FROM = {
				add_war_support = 0.06
			}
		}
	}

	option = { #no
		name = AAT_Sweden.43.b
		ai_chance = {
			base = 1

			modifier = {
				OR = {
					is_in_faction = yes
					is_major = yes
				}
				factor = 2
			}

			modifier = {
				factor = 3
				strength_ratio = {
					tag = FROM
					ratio < 0.7
				}
			}
		}
		effect_tooltip = {
			FROM = {
				create_wargoal = {
					type = take_state_focus
					target = PREV
					generator = { 145 } # optional 
				}
			}
		}

		FROM = { country_event = { id = AAT_Sweden.45 hours = 6 } }
	}
}

#Finland demilitarizes zone
country_event = {
	id = AAT_Sweden.44
	title = AAT_Sweden.44.t
	desc = AAT_Sweden.44.desc
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes

	option = { 
		name = AAT_Sweden.44.a
		effect_tooltip = {
			148 = { set_demilitarized_zone = yes }
		}
		add_war_support = 0.06
		hidden_effect = { set_country_flag = SWE_FIN_demilitarized_zone } 
	}
}


#Finland refuses to demilitarize zone
country_event = {
	id = AAT_Sweden.45
	title = AAT_Sweden.45.t
	desc = AAT_Sweden.45.desc
	picture = GFX_report_event_soldiers_marching
	is_triggered_only = yes

	option = { 
		name = AAT_Sweden.45.a
		add_stability = -0.05
		create_wargoal = {
			type = take_state_focus
			target = FROM
			generator = { 148 } 
		}
	}
}

#Fasch Sweden moves to annex Fin
country_event = {
	id = AAT_Sweden.46
	title = AAT_Sweden.46.t
	desc = AAT_Sweden.46.desc
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes

	option = { 
		ai_chance = {
			factor = 1.5
		}
		name = AAT_Sweden.46.a
		trigger = {
			has_country_flag = SWE_FIN_demilitarized_zone
			has_country_flag = SWE_FIN_surrendered_aland
		}

		effect_tooltip = {
			puppet = FIN
		}

		FIN = { country_event = { id = AAT_Sweden.47 hours = 4 }}
	}

	option = { 
		ai_chance = {
			factor = 1
		}
		name = AAT_Sweden.46.b
		trigger = {

			OR = {
				NOT = { has_country_flag = SWE_FIN_demilitarized_zone }
				
				NOT = { has_country_flag = SWE_FIN_surrendered_aland }
			}

		}

		FIN = { country_event = { id = AAT_Sweden.48 hours = 4 }}
	}
}

#Sweden puppets Finland
country_event = {
	id = AAT_Sweden.47
	title = AAT_Sweden.47.t
	desc = AAT_Sweden.47.desc
	picture = GFX_report_event_soldiers_marching
	is_triggered_only = yes

	option = {
		name = AAT_Sweden.47.a
		FROM = { 
			set_autonomy = {
				target = ROOT
				autonomy_state = autonomy_integrated_puppet
				end_wars = no
			}
		}
	}
}

#Sweden puppets FIN or FIN rejects
country_event = {
	id = AAT_Sweden.48
	title = AAT_Sweden.48.t
	desc = AAT_Sweden.48.desc
	picture = GFX_report_event_soldiers_marching
	is_triggered_only = yes

	option = {
		name = AAT_Sweden.48.a
		ai_chance = {
			base = 9
		}

		FROM = {
			create_wargoal = {
				type = puppet_wargoal_focus
				target = PREV 
			}

			country_event = { id = AAT_Sweden.49 hours = 8 }
		}
	}

	option = {
		name = AAT_Sweden.48.b
		ai_chance = {
			base = 1
			modifier = {
				has_war_support < 0.3
				factor = 1.15
			}

			modifier = {
				has_opinion = {
				 	target = FROM
				 	value > 0.85 # Use < or >
				 }
				factor = 1.25
			}
			
			modifier = {
				is_in_faction = no
				add = 10
			}

			modifier = {
				is_in_faction = yes
				strength_ratio = {
					tag = FROM
					ratio < 2.5
				}
				factor = 0.5
			}

			modifier = {
				FROM = {
					is_ai = no
				}
				factor = 1.25
			}

			modifier = {

				148 = {
					is_demilitarized_zone = yes
				}

				add = 5
			}
		}
		FROM = { 
			set_autonomy = {
				target = ROOT
				autonomy_state = autonomy_integrated_puppet
				end_wars = no
			}
		}
	}
}

#FIN refuse Swedens Demands, 
country_event = {
	id = AAT_Sweden.49
	title = AAT_Sweden.49.t
	desc = AAT_Sweden.49.desc
	picture = GFX_report_event_soldiers_marching
	is_triggered_only = yes

	option = {
		name = AAT_Sweden.49.a
		effect_tooltip = {
			create_wargoal = {
				type = puppet_wargoal_focus
				target = FROM 
			}
		}
	}
}

#Sweden (fascist) demand Narvik
country_event = { #yes
	id = AAT_Sweden.50
	title = AAT_Sweden.50.t
	desc = AAT_Sweden.50.desc
	picture = GFX_report_event_soldiers_marching
	is_triggered_only = yes

	option = { #Cave
		name = AAT_Sweden.50.a
		ai_chance = {
			base = 1
			modifier = {
				has_war_support < 0.4
				factor = 1.15
			}

			modifier = {
				has_opinion = {
				 	target = FROM
				 	value > 0.79 # Use < or >
				 }
				factor = 1.25
			}
			
			modifier = {
				is_major = no
				is_in_faction = no
				add = 8
			}

			modifier = {
				is_in_faction = yes
				strength_ratio = {
					tag = FROM
					ratio < 2.5
				}
				factor = 0.5
			}

			modifier = {
				FROM = {
					is_ai = no
				}
				factor = 1.25
			}

		}

		if = {
			limit = {
				144 = {
					is_owned_and_controlled_by = ROOT  
				}
			}

			FROM = { transfer_state = 144 }
		}

		if = {
			limit = {
				924 = {
					is_owned_and_controlled_by = ROOT  
				}
			}

			FROM = { transfer_state = 924 }
		}

		if = {
			limit = {
				925 = {
					is_owned_and_controlled_by = ROOT  
				}
			}

			FROM = { transfer_state = 925 }
		}

		FROM = {
			country_event = { id = AAT_Sweden.51 hours = 6 }
			set_country_flag = SWE_NOR_surrendered_narvik
		}
		custom_effect_tooltip = AAT_Sweden.50.a_tt
	}

	option = { #no
		name = AAT_Sweden.50.b
		ai_chance = {
			base = 1

			modifier = {
				OR = {
					is_in_faction = yes
					is_major = yes
				}
				factor = 2
			}

			modifier = {
				factor = 3
				strength_ratio = {
					tag = FROM
					ratio < 0.7
				}
			}
		}
		effect_tooltip = { #Don't need to add cores because we can integrate them properly this way
			FROM = {
				create_wargoal = {
					type = take_state_focus
					target = PREV
					generator = { 144 } # optional 
				}
			}
		}

		FROM = { country_event = { id = AAT_Sweden.52 hours = 6 } }
	}
}

#NOR Hands over Narvik
country_event = {
	id = AAT_Sweden.51
	title = AAT_Sweden.51.t
	desc = AAT_Sweden.51.desc
	picture = GFX_report_event_soldiers_marching
	is_triggered_only = yes

	option = {
		name = AAT_Sweden.51.a
		effect_tooltip = {
			transfer_state = 144
			transfer_state = 924
			transfer_state = 925
		}
	}
}

#NOR refuse Swedens Demands, 
country_event = {
	id = AAT_Sweden.52
	title = AAT_Sweden.52.t
	desc = AAT_Sweden.52.desc
	picture = GFX_report_event_soldiers_marching
	is_triggered_only = yes

	option = {
		name = AAT_Sweden.52.a
		create_wargoal = {
			type = take_state_focus
			target = FROM
			generator = { 144 } # optional 
		}
	}
}

#Sweden puppets NOR or NOR rejects
country_event = {
	id = AAT_Sweden.53
	title = AAT_Sweden.53.t
	desc = AAT_Sweden.53.desc
	picture = GFX_report_event_soldiers_marching
	is_triggered_only = yes

	option = {
		name = AAT_Sweden.53.a
		ai_chance = {
			base = 9
		}

		trigger = { FROM = { NOT = { has_country_flag = SWE_NOR_surrendered_narvik  } }}

		FROM = {
			create_wargoal = {
				type = puppet_wargoal_focus
				target = PREV 
			}

			country_event = { id = AAT_Sweden.49 hours = 8 }
		}
	}

	option = {
		name = AAT_Sweden.53.b
		ai_chance = {
			base = 1
			modifier = {
				has_war_support < 0.3
				factor = 1.15
			}

			modifier = {
				has_opinion = {
				 	target = FROM
				 	value > 0.85 # Use < or >
				 }
				factor = 1.25
			}
			
			modifier = {
				is_in_faction = no
				add = 10
			}

			modifier = {
				is_in_faction = yes
				strength_ratio = {
					tag = FROM
					ratio < 2.5
				}
				factor = 0.5
			}

			modifier = {
				FROM = {
					is_ai = no
				}
				factor = 1.25
			}

			modifier = {

				has_country_flag = SWE_NOR_surrendered_narvik
				add = 5
			}
		}
		
		
		
		FROM = { 
			set_autonomy = {
				target = ROOT
				autonomy_state = autonomy_integrated_puppet
				end_wars = no
			}
		}
	}
}


# Sweden Event - Lock up communists etc. for affiliation with the Soviet Union (winter-war)
country_event = { 
	id = AAT_Sweden_flashpoints.50
	title = AAT_Sweden_flashpoints.50.t
	desc = AAT_Sweden_flashpoints.50.desc
	#picture = GFX_report_event_SWE_internment_camp
	is_triggered_only = no
	fire_only_once = yes
	trigger = {
		original_tag = SWE
		has_civil_war = no
		is_subject = no
		NOT = { has_country_flag = SWE_communist_revolution_started }
		NOT = { has_government = communism } 
		communism > 0.1
		SOV = {
			exists = yes
			has_war = yes
			has_government = communism
		}
	}
	mean_time_to_happen = {
	    days = 65
	}
	# Round them up
	immediate = {
		hidden_effect = {
			clear_variable = var:SWE_comm_pop_invert
			set_variable = {
				var = SWE_comm_pop_invert
				value = party_popularity@communism
			}
			multiply_variable = { SWE_comm_pop_invert = -0.20 }

			clear_variable = var:SWE_fascist_pop_invert
			set_variable = {
				var = SWE_fascist_pop_invert
				value = party_popularity@fascism
			}
			multiply_variable = { SWE_fascist_pop_invert = -0.20 }
		}
	}
	option = {
		name = AAT_Sweden_flashpoints.50.a
		trigger = {
			has_civil_war = no
		}
		ai_chance = {
			base = 10
			modifier = {
				factor = 10
				SWE_is_historical_ai = yes
			}
		}
		IF = {
			limit = {
				communism > 0.2
				has_civil_war = no
			}
			country_event = {
				id = AAT_Sweden_flashpoints.51
				days = 7
				random_days = 20
			}
			custom_effect_tooltip = AAT_Sweden_flashpoints_civil_war_tt
		}
		add_stability = var:SWE_comm_pop_invert		
	}
	# This is a breach of their democratic rights
	option = {
		name = AAT_Sweden_flashpoints.50.b
		ai_chance = {
			base = 10
		}
		add_stability = SWE_fascist_pop_invert
		add_popularity = {
			ideology = fascism
			popularity = 0.1
		}
	}
}

# Sweden Event - Resistance to raids
country_event = { 
	id = AAT_Sweden_flashpoints.51
	title = AAT_Sweden_flashpoints.51.t
	desc = AAT_Sweden_flashpoints.51.desc
	picture = GFX_report_event_worker_protests
	is_triggered_only = yes

	# Maintain the policy
	option = {
		name = AAT_Sweden_flashpoints.51.a
		trigger = {
			has_civil_war = no
		}
		ai_chance = {
			base = 10
		}
		IF = {
			limit = {
				NOT = {
					SWE_is_historical_ai = yes
				}
				has_civil_war = no
			}

			if = {
				limit = {
					has_civil_war = no
				}

				country_event = {
					id = AAT_Sweden_flashpoints.52
					days = 7
					random_days = 20
				}

				add_stability = -0.1
				add_popularity = {
					ideology = communism 
					popularity = 0.1
				}
				custom_effect_tooltip = AAT_Sweden_flashpoints_civil_war_tt
			}
		}
	}
	# Reverese the policy
	option = {
		name = AAT_Sweden_flashpoints.51.b
		ai_chance = {
			base = 10
		}
		add_stability = 0.05
	}
}

# Sweden Event - Violent clashes with left
country_event = { 
	id = AAT_Sweden_flashpoints.52
	title = AAT_Sweden_flashpoints.52.t
	desc = AAT_Sweden_flashpoints.52.desc
	picture = GFX_report_event_worker_protests
	is_triggered_only = yes

	# Maintain the policy
	option = {
		name = AAT_Sweden_flashpoints.52.a
		ai_chance = {
			base = 10
		}
		add_stability = -0.1
		add_popularity = {
			ideology = communism 
			popularity = 0.1 
		}
		custom_effect_tooltip = AAT_Sweden_flashpoints_civil_war_tt
	}
	# Reverse the policy
	option = {
		name = AAT_Sweden_flashpoints.52.b
		ai_chance = {
			base = 10
		}
		add_stability = 0.5
	}
}

country_event = {
	id = AAT_Sweden_flashpoints.53
	title = AAT_Sweden_flashpoints.53.t
	desc = AAT_Sweden_flashpoints.53.desc
	picture = GFX_report_event_ger_civil_war
	fire_only_once = yes
	is_triggered_only = no
	immediate = { 
		set_country_flag = SWE_communist_revolution_started  
	}
	trigger = {
	    tag = SWE
	    NOT = { 
	    	has_government = communism 
	    	has_country_flag = SWE_communist_revolution_started
	    }
	    has_civil_war = no
	    communism > 0.35
	    has_stability < 0.5
	    SOV = {
	    	exists = yes
	    	has_government = communism
	    }
	}

	mean_time_to_happen = {
		#For testing
	    #days = 3
	    days = 1
	}
	
	# Stand with the people - Would be cool to play as communists at this point but might be abused to go communist faster
	#option = { 
	#	name = AAT_Sweden_flashpoints.53.a
	#	ai_chance = {
	#		base = 0
	#	}
	#	set_variable = { SWE_opposition = 1.0}
	#	subtract_from_variable = {
	#		var = SWE_opposition
	#		value = party_popularity@communism
	#	}
	#	set_variable = { SWE_opposition_party = ROOT@ideology}
	#	set_politics = {
	#		ruling_party = communism
	#	    elections_allowed = no
	#	}
	#	start_civil_war = {
	#		ideology = var:SWE_opposition_party #SPLITTING TAG
	#		size = var:SWE_opposition
	#	}
	#}
	# Play as current government against the communists
	option = { 
		name = AAT_Sweden_flashpoints.53.b
		ai_chance = {
			base = 10
		}
		add_popularity = {
			ideology = communism
			popularity = -1
		}
		start_civil_war = {
			ideology = communism #SPLITTING TAG
			size = party_popularity@communism
			hidden_effect = {
				country_event = {
					id = AAT_Sweden_flashpoints.55
					days = 1
				}
				124 = { set_state_controller_to = SWE }
				124 = {
					teleport_armies = { 
						limit = { 
							divisions_in_state = {
								state = 124
								size > 0 
							}
						 }
					}
				}
			}
		}
		
	}
}

# Sweden Event - Tensions reduce
country_event = { 
	id = AAT_Sweden_flashpoints.54
	title = AAT_Sweden_flashpoints.54.t
	desc = AAT_Sweden_flashpoints.54.desc
	picture = GFX_report_event_worker_protests
	is_triggered_only = yes

	# We're lucky things didn't escalate
	option = {
		name = AAT_Sweden_flashpoints.54.a
		ai_chance = {
			base = 10
		}
	}
}

# Hidden Swedish event to add communist militia during CW - only triggered via event chain though
country_event = { 
	id = AAT_Sweden_flashpoints.55
	title = AAT_Sweden_flashpoints.55.t
	desc = AAT_Sweden_flashpoints.55.desc
	#picture = GFX_report_event_worker_protests
	is_triggered_only = yes
	hidden = yes

	immediate = {
		division_template = {
			name = "Workers Militia"
			is_locked = yes
			priority = 2
			template_counter = 69
			#override_model = ETH_infantry_alt_0_entity
			#override_model = ETH_infantry_2_alt_0_entity
			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 = 2 }
			}				
		}
		random_owned_controlled_state = {
			create_unit = {
				division = "name = \"Workers Militia Division\" division_template = \"Workers Militia\" start_experience_factor = 0.1 start_equipment_factor = 0.7 start_manpower_factor = 0.7"
				owner = ROOT
			}
			create_unit = {
				division = "name = \"Workers Militia Division\" division_template = \"Workers Militia\" start_experience_factor = 0.1 start_equipment_factor = 0.7 start_manpower_factor = 0.7"
				owner = ROOT
			}
			create_unit = {
				division = "name = \"Workers Militia Division\" division_template = \"Workers Militia\" start_experience_factor = 0.1 start_equipment_factor = 0.7 start_manpower_factor = 0.7"
				owner = ROOT
			}
			create_unit = {
				division = "name = \"Workers Militia Division\" division_template = \"Workers Militia\" start_experience_factor = 0.1 start_equipment_factor = 0.7 start_manpower_factor = 0.7"
				owner = ROOT
			}
		}
	}
}

# Swedish government retreats to Gotland
country_event = {
	id = AAT_Sweden_flashpoints.56
	title = AAT_Sweden_flashpoints.56.t
	desc = AAT_Sweden_flashpoints.56.desc
	picture = GFX_report_event_ger_civil_war
	fire_only_once = yes
	is_triggered_only = no
	trigger = {
	    tag = SWE
	    NOT = { 
	    	OR = {
	    		has_government = communism 
	    		has_government = fascism
	    	}
	    }
	    has_country_flag = SWE_communist_revolution_started
	    has_civil_war = yes   
	    controls_state = 124
	}

	mean_time_to_happen = {
		#For testing
	    #days = 3
	    days = 14
	}
	# We will not abandon the mainland
	option = { 
		name = AAT_Sweden_flashpoints.56.a
		ai_chance = {
			base = 10
		}
	}
	# We need to survive and build our strength 
	option = { 
		name = AAT_Sweden_flashpoints.56.b
		ai_chance = {
			base = 0
		}
		set_capital = {
			state = 124
		}

		add_victory_points = {
			province = 408
			value = 10
		}

		add_victory_points = {
			province = 6258
			value = 5
		}
			

		every_country = {
			limit = {
				original_tag = SWE
				has_civil_war = yes
			}

			transfer_navy = {
				target = SWE
			}
		}

		add_timed_idea = {
			idea = SWE_escaping_the_mainland
			days = 365
		}

		add_ideas = SWE_hedgehog_of_the_baltic

		hidden_effect = {
			set_global_flag = achivement_has_retreated_from_the_mainland
		}
		set_cosmetic_tag = GOT

		set_politics = {
			ruling_party = neutrality
		    elections_allowed = no
		}
		news_event = {
			id = AAT_Sweden_flashpoints.57
			hours = 2 # optional - can take hours/days/months
			random_hours = 2 # optional - can take hours/days/months
		}

		SWE_king_gustaf_v = {
			add_country_leader_role = {
				country_leader={
					ideology=centrism
					expire="1965.1.1.1"
					id = -1
				}
				promote_leader = yes
			}
			set_portraits = {
				civilian = { large =GFX_portrait_SWE_gustaf_v_patches }
			}
		}
		hidden_effect = {
			add_popularity = {
				ideology = neutrality
				popularity = 0.75
			}
			set_party_name = {
				ideology = neutrality
				name = SWE_kings_party
				long_name = SWE_kings_party_long
			}

			random_list = {
				12.5 = {
					SWE_king_gustaf_v = {
						add_trait = { trait = the_spider ideology = centrism }
					}
				}

				12.5 = {
					SWE_king_gustaf_v = {
						add_trait = { trait = untethered ideology = centrism }
					}
				}
				12.5 = {
					if = {
						limit = { has_dlc = "La Resistance" }
						SWE_king_gustaf_v = {
							add_trait = { trait = mild_mannered ideology = centrism }
						}
					}
					else = {
						SWE_king_gustaf_v = {
							add_trait = { trait = mild_mannered_no_lar ideology = centrism }
						}
					}
				}

				12.5 = {
					SWE_king_gustaf_v = {
						add_trait = { trait = hyena ideology = centrism }
					}
				}

				12.5 = {
					SWE_king_gustaf_v = {
						add_trait = { trait = lucky ideology = centrism }
					}
				}

				12.5 = {
					SWE_king_gustaf_v = {
						add_trait = { trait = amnesiac ideology = centrism }
					}
				}

				12.5 = {
					SWE_king_gustaf_v = {
						add_trait = { trait = unbreakable ideology = centrism }
					}
				}

				12.5 = {
					if = {
						limit = { has_dlc = "La Resistance" }
						SWE_king_gustaf_v = {
							add_trait = { trait = trusty ideology = centrism }
						}
					}
					else = {
						SWE_king_gustaf_v = {
							add_trait = { trait = trusty_no_lar ideology = centrism }
						}
					}
				}
			}
			#retire_country_leader = yes
		}
	}
}

news_event = {  #
	id = AAT_Sweden_flashpoints.57
	title = AAT_Sweden_flashpoints.57.t
	desc = AAT_Sweden_flashpoints.57.desc
	picture = GFX_news_event_spr_spanish_civil_war2
	is_triggered_only = yes

	option = {
		name = AAT_Sweden_flashpoints.57.a
	}
}

# Swedish Government Seizes Landsverk
country_event = { 
	id = AAT_Sweden_flashpoints.60
	title = AAT_Sweden_flashpoints.60.t
	desc = AAT_Sweden_flashpoints.60.desc
	picture = GFX_report_event_sweden_tank
	is_triggered_only = yes

	# Seize Swedish assets
	option = {
		name = AAT_Sweden_flashpoints.60.a
		ai_chance = {
			base = 0
			modifier = {
				add = 10
				has_war_with = SWE
			}
			modifier = {
				add = 10
				has_opinion = {
					target = SWE
					value < -20
				}
			}
			modifier = {
				factor = 0.5
				has_war_with_major = yes
			}
			modifier = {
				factor = 0
				SWE = { SWE_is_historical_ai = yes }
			}
		}

		SWE = {
			add_opinion_modifier = {
				target = GER
				modifier = SWE_GER_seized_swedish_assets
			}
			country_event = {
				id = AAT_Sweden_flashpoints.61
				random_days = 7
				days = 3
			}
		}
	}
	# Drop issue
	option = {
		name = AAT_Sweden_flashpoints.60.b
		ai_chance = {
			base = 5
			modifier = {
				factor = 0
				has_war_with = SWE
			}
			modifier = {
				factor = 10
				SWE = { SWE_is_historical_ai = yes }
			}
		}
	}
}

# German government seizes Swedish assets
country_event = { 
	id = AAT_Sweden_flashpoints.61
	title = AAT_Sweden_flashpoints.61.t
	desc = AAT_Sweden_flashpoints.61.desc
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes

	# Suspend trade
	option = {
		name = AAT_Sweden_flashpoints.61.a
		trigger = {
			NOT = {
				has_war_with = FROM
			}
		}
		ai_chance = {
			base = 0
		}
		if = {
			limit = { has_dlc = "By Blood Alone" }
			send_embargo = FROM
		}
		else = {
			add_opinion_modifier = {
				target = FROM # target of the relation
				modifier = SWE_embargoed_us
			}
		}
		
		FROM = {
			country_event = {
				id = AAT_Sweden_flashpoints.62
				hours = 1
			}
		}
	}
	# drop issue
	option = {
		name = AAT_Sweden_flashpoints.61.b
		ai_chance = {
			base = 10
		}
	}
}

# Sweden cuts off trade
country_event = { 
	id = AAT_Sweden_flashpoints.62
	title = AAT_Sweden_flashpoints.62.t
	desc = AAT_Sweden_flashpoints.62.desc
	picture = GFX_report_event_merchant_ship_01
	is_triggered_only = yes

	# Threaten war
	option = {
		name = AAT_Sweden_flashpoints.62.a
		trigger = {
			NOT = {
				has_war_with = FROM
			}
		}
		ai_chance = {
			base = 0
			modifier = {
				add = 20
				has_opinion = {
					target = SWE
					value < -40
				}
			}
			modifier = {
				factor = 0
				has_war_with = SWE
			}
			modifier = {
				factor = 0.5
				has_war_with_major = yes
			}
		}
		FROM = {
			country_event = {
				id = AAT_Sweden_flashpoints.63
				random_days = 7
				days = 3
			}
		}
	}
	# drop the issue
	option = {
		name = AAT_Sweden_flashpoints.62.b
		ai_chance = {
			base = 1
		}
		FROM = {
			country_event = {
				id = AAT_Sweden_flashpoints.36
				random_days = 7
				days = 3
			}
		}
	}
}

# Germany threatens war
country_event = { 
	id = AAT_Sweden_flashpoints.63
	title = AAT_Sweden_flashpoints.63.t
	desc = AAT_Sweden_flashpoints.63.desc
	picture = GFX_report_event_german_troops
	is_triggered_only = yes

	# Reject ultimatum
	option = {
		name = AAT_Sweden_flashpoints.63.a
		ai_chance = {
			base = 0
			modifier = {
				add = 10
				has_opinion = {
					target = GER
					value < -40
				}
			}
			modifier = {
				add = 10
				GER = {
					has_war_with_major = yes
				}
			}
		}
		FROM = {
			country_event = {
				id = AAT_Sweden_flashpoints.64
				random_days = 7
				days = 3
			}
		}
		add_opinion_modifier = {
			target = FROM
			modifier = SWE_GER_threatened_war
		}
	}
	# Begin trading again
	option = {
		name = AAT_Sweden_flashpoints.63.b
		trigger = {
			NOT = {
				has_war_with = FROM
			}
		}
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				has_war_with = GER
			}
		}
		FROM = {
			country_event = {
				id = AAT_Sweden_flashpoints.65
				random_days = 7
				days = 3
			}
		}
		break_embargo = FROM
		add_opinion_modifier = {
			target = FROM
			modifier = SWE_GER_threatened_war
		}
	}
}

# Sweden rejects ultimatum
country_event = { 
	id = AAT_Sweden_flashpoints.64
	title = AAT_Sweden_flashpoints.64.t
	desc = AAT_Sweden_flashpoints.64.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes

	# declare war on Sweden
	option = {
		name = AAT_Sweden_flashpoints.64.a
		trigger = {
			NOT = {
				has_war_with = FROM
			}
		}
		ai_chance = {
			base = 10
			modifier = {
				add = 10
				has_opinion = {
					target = SWE
					value < -60
				}
			}
		}
		create_wargoal = {
			type = puppet_wargoal_focus
			target = FROM
		}
	}
	# Drop the issue
	option = {
		name = AAT_Sweden_flashpoints.64.b
		ai_chance = {
			base = 5
			# pointless triggering more events if already at war with SWE
			modifier = {
				factor = 0
				has_war_with = SWE
			}
			modifier = {
				add = 20
				has_war_with_major = yes
			}
		}
		IF = {
			limit = {
				NOT = {
					has_war_with = FROM
				}
			}
			FROM = {
				country_event = {
					id = AAT_Sweden_flashpoints.36
					random_days = 7
					days = 3
				}
			}
		}
	}
}

# Sweden begins trading again
country_event = { 
	id = AAT_Sweden_flashpoints.65
	title = AAT_Sweden_flashpoints.65.t
	desc = AAT_Sweden_flashpoints.65.desc
	picture = GFX_report_event_merchant_ship_01
	is_triggered_only = yes

	# Great
	option = {
		name = AAT_Sweden_flashpoints.65.a
		ai_chance = {
			base = 10
		}
		FROM = {
			country_event = {
				id = AAT_Sweden_flashpoints.36
				random_days = 7
				days = 3
			}
		}
	}
}

# Ships leave Italian ports
country_event = { 
	id = AAT_Sweden_flashpoints.70
	title = AAT_Sweden_flashpoints.70.t
	desc = AAT_Sweden_flashpoints.70.desc
	picture = GFX_report_event_ast_navy
	is_triggered_only = yes

	# Great 
	option = {
		name = AAT_Sweden_flashpoints.70.a
		ai_chance = {
			base = 10
		}
		IF = {
			limit = {
				ENG = { 
					exists = yes 
					ITA = { 
						exists = yes 
						has_war_with = PREV
					}
					SWE = {
						exists = yes
						NOT = { has_war_with = PREV }
					}
					OR = {
						337 = { is_controlled_by = PREV }
						112 = { is_controlled_by = PREV }
						135 = { is_controlled_by = PREV }
					}
				}
			}
			hidden_effect = {
				ENG = {
					country_event = {
						id = AAT_Sweden_flashpoints.71
						days = 14
					}
				}
			}
		}
		ELSE = {
			country_event = {
				id = AAT_Sweden_flashpoints.77
				days = 21
			}
		}
	}
}


# Should we (UK) capture ships?
country_event = { 
	id = AAT_Sweden_flashpoints.71
	title = AAT_Sweden_flashpoints.71.t
	desc = AAT_Sweden_flashpoints.71.desc
	picture = GFX_report_event_ast_navy
	is_triggered_only = yes

	# Capture ships
	option = {
		name = AAT_Sweden_flashpoints.71.a
		trigger = {
			NOT = {
				is_in_faction_with = SWE
			}
		}
		ai_chance = {
			base = 0
			modifier = {
				add = 20 
				has_opinion = {
					target = SWE
					value < 0
				}
			}
			modifier = {
				add = 10
				has_war_with = ITA
			}
			modifier = {
				factor = 0
				is_in_faction_with = SWE
			}
			modifier = {
				factor = 10
				SWE = { SWE_is_historical_ai = yes }
			}
		}
		SWE = {
			country_event = {
				id = AAT_Sweden_flashpoints.72
				days = 3
			}
			add_opinion_modifier = {
				modifier = SWE_ENG_seized_ships
				target = ENG
			}
		}
	}
	# Respect neutrality of ships
	option = {
		trigger = {
			NOT = {
				has_war_with = SWE
			}
		}
		name = AAT_Sweden_flashpoints.71.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 0
				SWE = { SWE_is_historical_ai = yes }
			}
		}
		SWE = {
			country_event = {
				id = AAT_Sweden_flashpoints.77
				days = 7
			}
		}
	}
}

# Uk has captured our ships
country_event = { 
	id = AAT_Sweden_flashpoints.72
	title = AAT_Sweden_flashpoints.72.t
	desc = AAT_Sweden_flashpoints.72.desc
	picture = GFX_report_event_ast_navy
	is_triggered_only = yes

	# Demand release - threaten war
	option = {
		name = AAT_Sweden_flashpoints.72.a
		trigger = {
			NOT = {
				has_war_with = ENG
			}
		}
		ai_chance = {
			base = 0
			modifier = {
				add = 10
				has_opinion = {
					target = FROM
					value < 0
				}
			}
			modifier = {
				add = 10
				is_in_faction = yes
			}
			modifier = {
				factor = 10
				SWE_is_historical_ai = yes
			}
		}
		FROM = {
			country_event = {
				id = AAT_Sweden_flashpoints.73
				days = 7
			}
		}
	}
	# Drop the issue
	option = {
		name = AAT_Sweden_flashpoints.72.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 0
				SWE_is_historical_ai = yes
			}
		}
		FROM = {
			country_event = {
				id = AAT_Sweden_flashpoints.74
				days = 7
			}
		}
	}
}

# UK event - Sweden demands release of ships
country_event = { 
	id = AAT_Sweden_flashpoints.73
	title = AAT_Sweden_flashpoints.73.t
	desc = AAT_Sweden_flashpoints.73.desc
	picture = GFX_report_event_ast_navy
	is_triggered_only = yes

	# Agree
	option = {
		name = AAT_Sweden_flashpoints.73.a
		trigger = {
			NOT = {
				has_war_with = FROM
			}
		}
		ai_chance = {
			base = 10
			modifier = {
				add = 10
				is_in_faction_with = FROM
			}
			modifier = {
				add = 10
				has_opinion = {
					target = FROM
					value > 20
				}
			}
			modifier = {
				factor = 10
				FROM = { SWE_is_historical_ai = yes }
			}
		}
		FROM = {
			country_event = {
				id = AAT_Sweden_flashpoints.76
				days = 1
			}
		}
	}
	# Refuse
	option = {
		name = AAT_Sweden_flashpoints.73.b
		ai_chance = {
			base = 0
			modifier = {
				add = 10 
				has_war_with = FROM
			}
			modifier = {
				add = 10
				has_opinion = {
					target = FROM 
					value < 0
				}
			}
			modifier = {
				factor = 0
				FROM = { SWE_is_historical_ai = yes }
			}
		}
		FROM = {
			country_event = {
				id = AAT_Sweden_flashpoints.75
				days = 1
			}
		}
	}
}

# Sweden gives up ships - UK takes control of them
country_event = { 
	id = AAT_Sweden_flashpoints.74
	title = AAT_Sweden_flashpoints.74.t
	desc = AAT_Sweden_flashpoints.74.desc
	picture = GFX_report_event_ast_navy
	is_triggered_only = yes

	# Great
	option = {
		name = AAT_Sweden_flashpoints.74.a
		ai_chance = {
			base = 10
		}
		SWE_psilander_fleet_creation = yes
	}
}

# 
country_event = { 
	id = AAT_Sweden_flashpoints.75
	title = AAT_Sweden_flashpoints.75.t
	desc = AAT_Sweden_flashpoints.75.desc
	picture = GFX_report_event_ast_navy
	is_triggered_only = yes

	# Declare war
	option = {
		name = AAT_Sweden_flashpoints.75.a
		ai_chance = {
			base = 0
			modifier = {
				add = 10 
				is_in_faction = yes
			}
			modifier = {
				add = 10
				has_opinion = {
					target = FROM
					value < -30
				}
			}
		}
		IF = {
			limit = {
				NOT = { has_war_with = FROM }
			}
			create_wargoal = {
				type = puppet_wargoal_focus
				target = FROM
			}
		}
	}
	# Drop issue
	option = {
		trigger = {
			NOT = {
				has_war_with = FROM
			}
		}
		name = AAT_Sweden_flashpoints.75.b
		ai_chance = {
			base = 10
			modifier = {
				add = 10
				has_civil_war = yes
			}
			modifier = {
				add = 10
				has_opinion = {
					target = FROM
					value > 20
				}
			}
		}
		FROM = {
			country_event = {
				id = AAT_Sweden_flashpoints.74
				days = 7
			}
		}
	}
}

# UK releases ships, arrive in Sweden - Was going to add delay but don't want to spam players with events
country_event = { 
	id = AAT_Sweden_flashpoints.76
	title = AAT_Sweden_flashpoints.76.t
	desc = AAT_Sweden_flashpoints.76.desc
	picture = GFX_report_event_ast_navy
	is_triggered_only = yes

	# Great
	option = {
		name = AAT_Sweden_flashpoints.76.a
		ai_chance = {
			base = 10
		}
		SWE_psilander_fleet_creation = yes
	}
}

# Ships arrive without issue
country_event = { 
	id = AAT_Sweden_flashpoints.77
	title = AAT_Sweden_flashpoints.77.t
	desc = AAT_Sweden_flashpoints.77.desc
	picture = GFX_report_event_ast_navy
	is_triggered_only = yes

	# Great
	option = {
		name = AAT_Sweden_flashpoints.77.a
		ai_chance = {
			base = 10
		}
		SWE_psilander_fleet_creation = yes
	}
}

#Åland Islands issue
country_event = { #Sweden requests control of the Aland islands
	id = AAT_Sweden_flashpoints.78
	title = AAT_Sweden_flashpoints.78.t
	desc = AAT_Sweden_flashpoints.78.desc
	picture = GFX_report_event_generic_funeral
	
	is_triggered_only = yes

	option = { 
		name = AAT_Sweden_flashpoints.78.a
		ai_chance = { #no
			factor = 0 #Ask for a price by default
			modifier = {
				FROM = {
					is_ai = yes
					is_historical_focus_on = yes
				}

				add = 300
			}

			modifier = {
				factor = 8
				OR = {
					has_government = communism
					has_government = fascism
				}
			}
		}

		FROM = { country_event = { id = AAT_Sweden_flashpoints.79 hours = 4 }}

	}

	option = { #sure
		name = AAT_Sweden_flashpoints.78.b
		ai_chance = { 
			base = 1
			modifier = {
				has_war_with = SOV
				factor = 1.5
			}

			modifier = {
				has_opinion = {
					target = FROM
					value > 69 
				}
				factor = 3
			}

			modifier = {
				FROM = {
					has_government = democratic
				}
				factor = 1.5
			}
		}
		
		if = {
			limit = {
				145 = {
					is_claimed_by = FROM
				}
			}
			FROM = { remove_state_claim = 145 }
		}
		FROM = { transfer_state = 145 }
		145 = {
			add_core_of = FROM
			add_extra_state_shared_building_slots = 2
			add_building_construction = {
				type = industrial_complex
				level = 1
				instant_build = yes
			}
		}
		FROM = {
			country_event = { id = AAT_Sweden_flashpoints.80 hours = 4 }
		}
	}

	option = { #sure...for a price
		ai_chance = { #no
			factor = 5
		}
		name = AAT_Sweden_flashpoints.78.c
		FROM = { country_event = { id = AAT_Sweden_flashpoints.81 hours = 4 }}
	}
}

country_event = { #Declined control
	id = AAT_Sweden_flashpoints.79
	title = AAT_Sweden_flashpoints.79.t
	desc = AAT_Sweden_flashpoints.79.desc
	picture = GFX_report_event_generic_funeral
	

	is_triggered_only = yes
		
	option = { 
		name = AAT_Sweden_flashpoints.79.a
		set_country_flag = FIN_rejected_aland_question_permanently
	}
}

country_event = { #agreed
	id = AAT_Sweden_flashpoints.80
	title = AAT_Sweden_flashpoints.80.t
	desc = AAT_Sweden_flashpoints.80.desc
	picture = GFX_report_event_generic_funeral
	

	is_triggered_only = yes
		
	option = { 
		name = AAT_Sweden_flashpoints.80.a
	}
}

country_event = { #agreed for a price
	id = AAT_Sweden_flashpoints.81
	title = AAT_Sweden_flashpoints.81.t
	desc = AAT_Sweden_flashpoints.81.desc
	picture = GFX_report_event_generic_funeral
	

	is_triggered_only = yes
		
	option = { #pay
		name = AAT_Sweden_flashpoints.81.a
		ai_chance = {
			factor = 8
		}
		
		if = {
			limit = {
				145 = {
					is_claimed_by = FROM
				}
			}
			FROM = { remove_state_claim = 145 }
		}
		transfer_state = 145
		145 = {
			add_core_of = ROOT
			add_extra_state_shared_building_slots = 2
			add_building_construction = {
				type = industrial_complex
				level = 1
				instant_build = yes
			}
		}

		add_timed_idea = { idea = SWE_aland_agreement_swe days = 365 }
		FROM = {
			country_event = { id = AAT_Sweden_flashpoints.82 hours = 4 }
		}

		effect_tooltip = {
			FROM = {
				add_timed_idea = { idea = SWE_aland_agreement_fin days = 365 }
			}
		}
	}

	option = { #dont pay
		name = AAT_Sweden_flashpoints.81.b
		ai_chance = {
			factor = 1
		}

		FROM = { country_event = { id = AAT_Sweden_flashpoints.83 hours = 4 }}
	}
}

country_event = { #sweden paid
	id = AAT_Sweden_flashpoints.82
	title = AAT_Sweden_flashpoints.82.t
	desc = AAT_Sweden_flashpoints.82.desc
	picture = GFX_report_event_generic_funeral
	

	is_triggered_only = yes
		
	option = { #cool
		name = AAT_Sweden_flashpoints.82.a
		add_timed_idea = { idea = SWE_aland_agreement_fin days = 365 }
	}
}

country_event = { #sweden no pay
	id = AAT_Sweden_flashpoints.83
	title = AAT_Sweden_flashpoints.83.t
	desc = AAT_Sweden_flashpoints.83.desc
	picture = GFX_report_event_generic_funeral
	

	is_triggered_only = yes
		
	option = { 
		name = AAT_Sweden_flashpoints.83.a
	}
}


# Election Economic Issues
country_event = {
	id = AAT_Sweden_BoP.10
	title = AAT_Sweden_BoP.10.t
	desc = AAT_Sweden_BoP.10.desc
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	# The Socialists!
	option = {
		name = AAT_Sweden_BoP.10.a
		ai_chance = {
			base = 0
		}
		add_popularity = {
			ideology = communism
			popularity = 0.05
		}
		country_event = {
			id = AAT_Sweden_BoP.11
			days = 10
			random_days = 3
		}
	}
	# The Social Democrats!
	option = {
		name = AAT_Sweden_BoP.10.b
		ai_chance = {
			base = 10
		}
		add_popularity = {
			ideology = democratic
			popularity = 0.05
		}
		country_event = {
			id = AAT_Sweden_BoP.11
			days = 10
			random_days = 3
		}
	}
	# The Conservatives!
	option = {
		name = AAT_Sweden_BoP.10.c
		ai_chance = {
			base = 0
		}
		add_popularity = {
			ideology = neutrality
			popularity = 0.05
		}
		country_event = {
			id = AAT_Sweden_BoP.11
			days = 10
			random_days = 3
		}
	}
	# The Fascists!
	option = {
		name = AAT_Sweden_BoP.10.d
		ai_chance = {
			base = 0
		}
		add_popularity = {
			ideology = fascism
			popularity = 0.05
		}
		country_event = {
			id = AAT_Sweden_BoP.11
			days = 10
			random_days = 3
		}
	}
}

# Election domestic Issues
country_event = {
	id = AAT_Sweden_BoP.11
	title = AAT_Sweden_BoP.11.t
	desc = AAT_Sweden_BoP.11.desc
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes
	# The Socialists!
	option = {
		name = AAT_Sweden_BoP.11.a
		ai_chance = {
			base = 0
		}
		add_popularity = {
			ideology = communism
			popularity = 0.05
		}
		country_event = {
			id = AAT_Sweden_BoP.12
			days = 10
			random_days = 3
		}
	}
	# The Social Democrats!
	option = {
		name = AAT_Sweden_BoP.11.b
		ai_chance = {
			base = 10
		}
		add_popularity = {
			ideology = democratic
			popularity = 0.05
		}
		country_event = {
			id = AAT_Sweden_BoP.12
			days = 10
			random_days = 3
		}
	}
	# The Conservatives!
	option = {
		name = AAT_Sweden_BoP.11.c
		ai_chance = {
			base = 0
		}
		add_popularity = {
			ideology = neutrality
			popularity = 0.05
		}
		country_event = {
			id = AAT_Sweden_BoP.12
			days = 10
			random_days = 3
		}
	}
	# The Fascists!
	option = {
		name = AAT_Sweden_BoP.11.d
		ai_chance = {
			base = 0
		}
		add_popularity = {
			ideology = fascism
			popularity = 0.05
		}
		country_event = {
			id = AAT_Sweden_BoP.12
			days = 10
			random_days = 3
		}
	}
}

# Election foreign policy
country_event = {
	id = AAT_Sweden_BoP.12
	title = AAT_Sweden_BoP.12.t
	desc = AAT_Sweden_BoP.12.desc
	picture = GFX_report_event_generic_panzer_attack
	is_triggered_only = yes
	# The Socialists!
	option = {
		name = AAT_Sweden_BoP.12.a
		ai_chance = {
			base = 0
		}
		add_popularity = {
			ideology = communism
			popularity = 0.05
		}
		country_event = {
			id = AAT_Sweden_BoP.13
			days = 10
			random_days = 3
		}
	}
	# The Social Democrats!
	option = {
		name = AAT_Sweden_BoP.12.b
		ai_chance = {
			base = 10
		}
		add_popularity = {
			ideology = democratic
			popularity = 0.05
		}
		country_event = {
			id = AAT_Sweden_BoP.13
			days = 10
			random_days = 3
		}
	}
	# The Conservatives!
	option = {
		name = AAT_Sweden_BoP.12.c
		ai_chance = {
			base = 0
		}
		add_popularity = {
			ideology = neutrality
			popularity = 0.05
		}
		country_event = {
			id = AAT_Sweden_BoP.13
			days = 10
			random_days = 3
		}
	}
	# The Fascists!
	option = {
		name = AAT_Sweden_BoP.12.d
		ai_chance = {
			base = 0
		}
		add_popularity = {
			ideology = fascism
			popularity = 0.05
		}
		country_event = {
			id = AAT_Sweden_BoP.13
			days = 10
			random_days = 3
		}
	}
}

# Election calculator (hidden event)
country_event = {
	id = AAT_Sweden_BoP.13
	title = AAT_Sweden_BoP.13.t
	desc = AAT_Sweden_BoP.13.desc
	picture = GFX_report_event_election_vote
	is_triggered_only = yes
	hidden = yes
	immediate = {
		hidden_effect = {
			set_variable = {
				SWE_combined_left_support = 0
			}
			set_variable = {
				SWE_combined_right_support = 0
			}
			add_to_variable = {
				SWE_combined_left_support = party_popularity@communism
			}
			add_to_variable = {
				SWE_combined_left_support = party_popularity@democratic
			}
			add_to_variable = {
				SWE_combined_right_support = party_popularity@fascism
			}
			add_to_variable = {
				SWE_combined_right_support = party_popularity@neutrality
			}
		}
		IF = {
			limit = {
				OR = {
					has_country_flag = SWE_1936_fallen_riksdag
					has_country_flag = SWE_1936_axel_pehrssonbramstorp_is_pm
				}
			}
			promote_character = SWE_per_albin_hansson
			SWE_per_albin_hansson = {
				add_trait = {
					trait = SWE_solidified_mandate
					ideology = socialism
				}
				add_trait = {
					trait = SWE_reluctant_towards_rearmament
					ideology = socialism
				}
			}
			set_party_name = {
				ideology = democratic
				name = SWE_democratic_party
				long_name = SWE_democratic_party_long
			}
		}
	}
	option = {
		name = AAT_Sweden_BoP.13.a
		ai_chance = {
			base = 10
		}		
		#log = "Swedish Communism Support: [?party_popularity@communism]"
		#log = "Swedish Democratic Support: [?party_popularity@democratic]"
		#log = "Swedish Non-Aligned Support: [?party_popularity@neutrality]"
		#log = "Swedish Fascism Support: [?party_popularity@fascism]"
		#log = "Swedish Right Support: [?ROOT.SWE_combined_right_support]"
		#log = "Swedish Left Support: [?ROOT.SWE_combined_left_support]"
		IF = {
			limit = {
				communism > 0.5
			}
			# Socialists have a majority
			set_power_balance = {
				id = SWE_riksdag_political_balance
				set_value = -0.8
			} 
			set_country_flag = SWE_socialist_victory
			country_event = {
				id = AAT_Sweden_BoP.14
				hours = 1
			}
		}
		ELSE_IF = {
			limit = {
				democratic > 0.5
			}
			set_power_balance = {
				id = SWE_riksdag_political_balance
				set_value = -0.3
			}
			set_country_flag = SWE_democratic_victory
			country_event = {
				id = AAT_Sweden_BoP.14
				hours = 1
			}
		}
		ELSE_IF = {
			limit = {
				neutrality > 0.5
			}
			set_power_balance = {
				id = SWE_riksdag_political_balance
				set_value = 0.3
			}
			set_country_flag = SWE_non_aligned_victory
			country_event = {
				id = AAT_Sweden_BoP.14
				hours = 1
			}
		}
		ELSE_IF = {
			limit = {
				fascism > 0.5
			}
			set_power_balance = {
				id = SWE_riksdag_political_balance
				set_value = 0.9
			}
			set_country_flag = SWE_fascist_victory
			country_event = {
				id = AAT_Sweden_BoP.14
				hours = 1
			}
		}
		ELSE_IF = {
			limit = {
				check_variable = { var = SWE_combined_left_support value = 0.5 compare = greater_than_or_equals }
			}
			set_power_balance = {
				id = SWE_riksdag_political_balance
				set_value = -0.5
			}
			set_country_flag = SWE_left_coalition_victory
			country_event = {
				id = AAT_Sweden_BoP.14
				hours = 1
			}
		}
		ELSE_IF = {
			limit = {
				check_variable = { var = SWE_combined_right_support value = 0.5 compare = greater_than_or_equals }
			}
			set_power_balance = {
				id = SWE_riksdag_political_balance
				set_value = 0.5
			}
			set_country_flag = SWE_right_coalition_victory
			country_event = {
				id = AAT_Sweden_BoP.14
				hours = 1
			}
		}
	}
}

# Election Results 
country_event = {
	id = AAT_Sweden_BoP.14
	title = AAT_Sweden_BoP.14.t
	picture = GFX_report_event_generic_panzer_attack
	is_triggered_only = yes
	# The Socialists won
	desc = {
		text = AAT_Sweden_BoP.14.d_socialist
		trigger = {
			has_country_flag = SWE_socialist_victory
		}
	}
	# The Social Democrats won
	desc = {
		text = AAT_Sweden_BoP.14.d_democratic
		trigger = {
			has_country_flag = SWE_democratic_victory
		}
	}
	# The Conservatives won
	desc = {
		text = AAT_Sweden_BoP.14.d_non_aligned
		trigger = {
			has_country_flag = SWE_non_aligned_victory
		}
	}
	# The Fascists won
	desc = {
		text = AAT_Sweden_BoP.14.d_fascist
		trigger = {
			has_country_flag = SWE_fascist_victory
		}
	}
	# Left Coalition won
	desc = {
		text = AAT_Sweden_BoP.14.d_left
		trigger = {
			has_country_flag = SWE_left_coalition_victory
		}
	}
	# Right Coalition won
	desc = {
		text = AAT_Sweden_BoP.14.d_right
		trigger = {
			has_country_flag = SWE_right_coalition_victory
		}
	}
	option = {
		name = AAT_Sweden_BoP.14.a
		ai_chance = {
			base = 10
		}
		IF = {
			limit = { has_country_flag = SWE_socialist_victory }
			set_politics = {
				ruling_party = communism
			}
		}
		IF = {
			limit = { has_country_flag = SWE_democratic_victory }
			set_politics = {
				ruling_party = democratic
			}
		}
		IF = {
			limit = { has_country_flag = SWE_non_aligned_victory }
			set_politics = {
				ruling_party = neutrality
			}
		}
		IF = {
			limit = { has_country_flag = SWE_fascist_victory }
			set_politics = {
				ruling_party = fascism
			}
		}
		IF = {
			limit = { has_country_flag = SWE_right_coalition }
			IF = {
				limit = { neutrality > fascism }
				set_politics = {
					ruling_party = neutrality
				}
			}
			ELSE = {
				set_politics = {
					ruling_party = fascism
				}
			}
		}
		IF = {
			limit = { has_country_flag = SWE_left_coalition }
			IF = {
				limit = { democratic > communism }
				set_politics = {
					ruling_party = democratic
				}
			}
			ELSE = {
				set_politics = {
					ruling_party = communism
				}
			}
		}
		clr_country_flag = SWE_socialist_victory
		clr_country_flag = SWE_democratic_victory
		clr_country_flag = SWE_non_aligned_victory
		clr_country_flag = SWE_fascist_victory
		clr_country_flag = SWE_left_coalition_victory
		clr_country_flag = SWE_right_coalition_victory
		clr_country_flag = SWE_election_active 
#		set_variable = { SWE_election_countdown = var:SWE_4_years }
#		activate_mission = SWE_BoP_election_countdown
	}
}

#Minor strike event
country_event = {
	id = AAT_Sweden_strike.1
	title = AAT_Sweden_strike.1.t
	desc = AAT_Sweden_strike.1.desc
	is_triggered_only = yes
	option = {
		name =  AAT_Sweden_strike.1.b
		hidden_effect = {
			if = {
				limit = {
					has_idea = SWE_minor_hungershield_strike
				}
				remove_ideas = SWE_minor_hungershield_strike
			}
		}
		add_timed_idea = {
			idea = SWE_minor_hungershield_strike
			days = 180
		}
	}	

	option = {
		name =  AAT_Sweden_strike.1.b
		hidden_effect = {
			if = {
				limit = {
					has_idea = SWE_minor_hungershield_strike
				}
				remove_ideas = SWE_minor_hungershield_strike
			}
		}
		add_timed_idea = {
			idea = SWE_minor_hungershield_strike
			days = 180
		}
		add_stability = 0.05
		add_political_power = -80
	}
}

#Major strike event
country_event = {
	id = AAT_Sweden_strike.2
	title = AAT_Sweden_strike.2.t
	desc = AAT_Sweden_strike.2.desc
	is_triggered_only = yes
	option = {
		name = AAT_Sweden_strike.2.a
		if = {
			limit = { has_idea = SWE_major_hungershield_strike }
			hidden_effect = { remove_ideas = SWE_major_hungershield_strike }
			random_army_leader = {
				limit = {
					NOT = { 
						has_trait = SWE_wounded_in_protests
						has_trait = SWE_disillusioned_with_the_government
					}
				}

				random_list = {
					50 = { 
						add_timed_unit_leader_trait = {
							trait = SWE_wounded_in_protests
							days = 120
						}
					}
					50 = { 

						add_timed_unit_leader_trait = {
							trait = SWE_disillusioned_with_the_government
							days = 270
						} 
					} 
				}
			}
		}

		if = {
			limit = { #dont double punish
				has_idea = SWE_minor_hungershield_strike
			}
			remove_ideas = SWE_major_hungershield_strike
		}
		add_timed_idea = {
			idea = SWE_major_hungershield_strike
			days = 180
		}
	}	

	option = {
		name = AAT_Sweden_strike.2.b
		trigger = {
			has_political_power > -100
		}
		if = {
			limit = { has_idea = SWE_major_hungershield_strike }
			hidden_effect = { remove_ideas = SWE_major_hungershield_strike }
			random_army_leader = {
				limit = {
					NOT = { 
						has_trait = SWE_wounded_in_protests
						has_trait = SWE_disillusioned_with_the_government
					}
				}

				random_list = {
					50 = { 
						add_timed_unit_leader_trait = {
							trait = SWE_wounded_in_protests
							days = 120
						}
					}
					50 = { 

						add_timed_unit_leader_trait = {
							trait = SWE_disillusioned_with_the_government
							days = 270
						} 
					} 
				}
			}
		}

		if = {
			limit = { #dont double punish
				has_idea = SWE_minor_hungershield_strike
			}
			remove_ideas = SWE_major_hungershield_strike
		}
		add_timed_idea = {
			idea = SWE_major_hungershield_strike
			days = 180
		}

		add_political_power = -150
		add_stability = 0.08
	}	
}



#National Socialist Uprising in Sweden
country_event = {
	id = AAT_Sweden_nationalists.1
	title = AAT_Sweden_nationalists.1.t
	desc = AAT_Sweden_nationalists.1.desc
	picture = GFX_report_event_fascist_gathering
	is_triggered_only = yes
	option = {
		name =  AAT_Sweden_nationalists.1.a
		ai_chance = {
			base = 0
		}
		FROM = {
			country_event = {
				id = AAT_Sweden_nationalists.2
				hours = 1
			}
			effect_tooltip = {
				add_manpower = 2000
				add_equipment_to_stockpile = {
					type = infantry_equipment
					amount = 2000
					producer = FROM
				}
			}
		}
	}	

	option = {
		name =  AAT_Sweden_nationalists.1.b
		ai_chance = {
			base = 10
		}
		FROM = {
			country_event = {
				id = AAT_Sweden_nationalists.3
				hours = 1
			}
		}
		effect_tooltip = {
			puppet = {
    			target = FROM
    			end_civil_wars = no
			}
			every_other_country = {
				limit = {
					original_tag = SWE
					NOT = {
						has_government = fascism
						is_subject_of = ROOT
					}
				}
				ROOT = {
					create_wargoal = {
						target = PREV
						type = puppet_wargoal_focus
					}
				}
			}
		}
	}
}

#Germany refuses to attack
country_event = {
	id = AAT_Sweden_nationalists.2
	title = AAT_Sweden_nationalists.2.t
	desc = AAT_Sweden_nationalists.2.desc
	picture = GFX_report_event_german_volunteers
	is_triggered_only = yes
	option = {
		name =  AAT_Sweden_nationalists.2.a
		ai_chance = {
			base = 10
		}
		add_manpower = 2000
		add_equipment_to_stockpile = {
			type = infantry_equipment
			amount = 2000
			producer = FROM
		}
	}	
}

#Germany agrees to attack
country_event = {
	id = AAT_Sweden_nationalists.3
	title = AAT_Sweden_nationalists.3.t
	desc = AAT_Sweden_nationalists.3.desc
	picture = GFX_report_event_german_inspect_troops
	is_triggered_only = yes
	option = {
		name =  AAT_Sweden_nationalists.3.a
		ai_chance = {
			base = 10
		}
		set_country_flag = SWE_is_reichsprotectorate_flag
		set_cosmetic_tag = SWE_reichs_protectorate
		FROM = {
			puppet = {
    			target = FROM
    			end_civil_wars = no
			}
			# Find all non-fascist breakaway Sweden's 
			every_other_country = {
				limit = {
					original_tag = SWE
					NOT = {
						has_government = fascism
					}
				}
				# Go back to German scope, create war goal targeting non-fascist Sweden
				PREV = {
					create_wargoal = {
						target = PREV
						type = puppet_wargoal_focus
					}
				}
			}
		}
	}	
}


#Unify the nationalist movement event chain - pick a leader
country_event = {
	id = AAT_Sweden_nationalists.4
	title = AAT_Sweden_nationalists.4.t
	desc = AAT_Sweden_nationalists.4.desc
	picture = GFX_report_event_german_inspect_troops
	is_triggered_only = yes
	# Lindholm
	option = {
		name =  AAT_Sweden_nationalists.4.a
		ai_chance = {
			base = 10
		}
		SWE_sven_olov_lindholm = {
			add_country_leader_role = {
				promote_leader = yes
				country_leader = {
					ideology = nazism
					expire = "1965.1.1"
					traits = { anti_democrat }
				}

			}
		}
	}	
	# Birger
	option = {
		name =  AAT_Sweden_nationalists.4.b
		ai_chance = {
			base = 10
		}
		SWE_birger_furugard = {
			add_country_leader_role = {
				promote_leader = yes
				country_leader = {
					ideology = nazism
					expire = "1965.1.1"
					traits = { national_socialist_veterinarian }
				}
			}
		}
	}
}


#Fascist march in state - bad
country_event = {
	id = AAT_Sweden_nationalists.5
	title = AAT_Sweden_nationalists.5.t
	desc = AAT_Sweden_nationalists.5.desc
	picture = GFX_report_event_gathering_protest
	is_triggered_only = yes
	option = {
		name =  AAT_Sweden_nationalists.5.a
		ai_chance = {
			base = 10
		}
		add_stability = -0.07
		add_popularity = { ideology = fascism popularity = 0.03 }
	}	
}

#Fascist march in state - average
country_event = {
	id = AAT_Sweden_nationalists.6
	title = AAT_Sweden_nationalists.6.t
	desc = AAT_Sweden_nationalists.6.desc
	picture = GFX_report_event_gathering_protest
	is_triggered_only = yes
	option = {
		name =  AAT_Sweden_nationalists.6.a
		ai_chance = {
			base = 10
		}
		add_stability = -0.04
		add_popularity = { ideology = fascism popularity = 0.06 }
	}	
}

#Fascist march in state - good
country_event = {
	id = AAT_Sweden_nationalists.7
	title = AAT_Sweden_nationalists.7.t
	desc = AAT_Sweden_nationalists.7.desc
	picture = GFX_report_event_gathering_protest
	is_triggered_only = yes
	option = {
		name =  AAT_Sweden_nationalists.7.a
		ai_chance = {
			base = 10
		}
		add_stability = -0.02
		add_war_support = 0.07

		add_popularity = { ideology = fascism popularity = 0.09 }
	}	
}

country_event = {
	id = AAT_Sweden_nationalists.8
	title = AAT_Sweden_nationalists.8.t
	desc = AAT_Sweden_nationalists.8.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name =  AAT_Sweden_nationalists.8.a
		ai_chance = {
			base = 10
		}
		if = {
			limit = {
				has_completed_focus = SWE_undermine_the_fascists
			}
			add_popularity = { ideology = neutrality popularity = 0.10 }
		}
		else = {
			add_popularity = { ideology = fascism popularity = 0.10 }
		}

		IF = {
			limit = {
				has_completed_focus	= SWE_mythologize_swedish_history
			}
			activate_mission = SWE_implement_aristocracy_reforms_countdown
		}
		#SWE_increase_stormtrupper_cap = yes
		clr_country_flag = SWE_appeal_for_support_in_progress
		custom_effect_tooltip = SWE_appeal_for_support_dec_tt
	}	
}

country_event = {
	id = AAT_Sweden_nationalists.9
	title = AAT_Sweden_nationalists.9.t
	desc = AAT_Sweden_nationalists.9.desc
	picture = GFX_report_event_tank_factory
	is_triggered_only = yes
	option = {
		name =  AAT_Sweden_nationalists.9.a
		ai_chance = {
			base = 10
		}
		if = {
			limit = {
				has_completed_focus = SWE_undermine_the_fascists
			}
			add_popularity = { ideology = neutrality popularity = 0.10 }
		}
		else = {
			add_popularity = { ideology = fascism popularity = 0.10 }
		}
		IF = {
			limit = {
				has_completed_focus	= SWE_mythologize_swedish_history
			}
			activate_mission = SWE_implement_industrialist_reforms_countdown
		}
		#SWE_increase_stormtrupper_cap = yes
		clr_country_flag = SWE_appeal_for_support_in_progress
		custom_effect_tooltip = SWE_appeal_for_support_dec_tt
	}	
}

country_event = {
	id = AAT_Sweden_nationalists.10
	title = AAT_Sweden_nationalists.10.t
	desc = AAT_Sweden_nationalists.10.desc
	picture = GFX_report_event_swedish_soldier
	is_triggered_only = yes
	option = {
		name =  AAT_Sweden_nationalists.10.a
		ai_chance = {
			base = 10
		}
		if = {
			limit = {
				has_completed_focus = SWE_undermine_the_fascists
			}
			add_popularity = { ideology = neutrality popularity = 0.10 }
		}
		else = {
			add_popularity = { ideology = fascism popularity = 0.10 }
		}
		IF = {
			limit = {
				has_completed_focus	= SWE_mythologize_swedish_history
			}
			activate_mission = SWE_implement_military_reforms_countdown
		}
		#SWE_increase_stormtrupper_cap = yes
		clr_country_flag = SWE_appeal_for_support_in_progress
		custom_effect_tooltip = SWE_appeal_for_support_dec_tt
	}	
}

country_event = {
	id = AAT_Sweden_nationalists.11
	title = AAT_Sweden_nationalists.11.t
	desc = AAT_Sweden_nationalists.11.desc
	picture = GFX_report_event_gre_rural_rebels
	is_triggered_only = yes
	option = {
		name =  AAT_Sweden_nationalists.11.a
		ai_chance = {
			base = 10
		}
		if = {
			limit = {
				has_completed_focus = SWE_undermine_the_fascists
			}
			add_popularity = { ideology = neutrality popularity = 0.10 }
		}
		else = {
			add_popularity = { ideology = fascism popularity = 0.10 }
		}
		IF = {
			limit = {
				has_completed_focus = SWE_mythologize_swedish_history
			}
			activate_mission = SWE_implement_rural_reforms_countdown
		}
		#SWE_increase_stormtrupper_cap = yes
		clr_country_flag = SWE_appeal_for_support_in_progress
		custom_effect_tooltip = SWE_appeal_for_support_dec_tt
	}	
}

country_event = {
	id = AAT_Sweden_nationalists.12
	title = AAT_Sweden_nationalists.12.t
	desc = AAT_Sweden_nationalists.12.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name = AAT_Sweden_nationalists.12.a
		ai_chance = {
			base = 10
		}
	}	
}

country_event = {
	id = AAT_Sweden_nationalists.13
	title = AAT_Sweden_nationalists.13.t
	desc = AAT_Sweden_nationalists.13.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name = AAT_Sweden_nationalists.13.a
		ai_chance = {
			base = 10
		}
	}	
}

country_event = {
	id = AAT_Sweden_nationalists.14
	title = AAT_Sweden_nationalists.14.t
	desc = AAT_Sweden_nationalists.14.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name = AAT_Sweden_nationalists.14.a
		ai_chance = {
			base = 10
		}
	}	
}

country_event = {
	id = AAT_Sweden_nationalists.15
	title = AAT_Sweden_nationalists.15.t
	desc = AAT_Sweden_nationalists.15.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	option = {
		name = AAT_Sweden_nationalists.15.a
		ai_chance = {
			base = 10
		}
	}	
}

#Royal march in state - bad
country_event = {
	id = AAT_Sweden_nationalists.16
	title = AAT_Sweden_nationalists.16.t
	desc = AAT_Sweden_nationalists.16.desc
	picture = GFX_report_event_gathering_protest
	is_triggered_only = yes
	option = {
		name =  AAT_Sweden_nationalists.16.a
		ai_chance = {
			base = 10
		}
		add_stability = -0.02
		add_popularity = { ideology = neutrality popularity = 0.04 }
		clr_country_flag = SWE_royal_visit_in_progress
	}	
}

#Royal march in state - average
country_event = {
	id = AAT_Sweden_nationalists.17
	title = AAT_Sweden_nationalists.17.t
	desc = AAT_Sweden_nationalists.17.desc
	picture = GFX_report_event_gathering_protest
	is_triggered_only = yes
	option = {
		name =  AAT_Sweden_nationalists.17.a
		ai_chance = {
			base = 10
		}
		add_popularity = { ideology = neutrality popularity = 0.08 }
		clr_country_flag = SWE_royal_visit_in_progress
	}	
}

#Royal march in state - good
country_event = {
	id = AAT_Sweden_nationalists.18
	title = AAT_Sweden_nationalists.18.t
	desc = AAT_Sweden_nationalists.18.desc
	picture = GFX_report_event_gathering_protest
	is_triggered_only = yes
	option = {
		name =  AAT_Sweden_nationalists.18.a
		ai_chance = {
			base = 10
		}
		add_popularity = { ideology = neutrality popularity = 0.12 }
		clr_country_flag = SWE_royal_visit_in_progress
	}	
}

#Fika time
country_event = {
	id = AAT_Sweden_nationalists.19
	title = AAT_Sweden_nationalists.19.t
	desc = AAT_Sweden_nationalists.19.desc
	picture = GFX_report_event_gathering_protest
	is_triggered_only = yes
	option = {
		name =  AAT_Sweden_nationalists.19.a
		ai_chance = {
			base = 10
		}
	}	
}

#SWE_establish_nordland request
country_event = {
	id = AAT_Sweden_nationalists.20
	title = AAT_Sweden_nationalists.20.t
	desc = AAT_Sweden_nationalists.20.desc
	picture = GFX_report_event_gathering_protest
	is_triggered_only = yes
	
	#yes
	option = {
		name =  AAT_Sweden_nationalists.20.a
		ai_chance = {
			base = 10
		}
		FROM = {
			country_event = {
				id = AAT_Sweden_nationalists.21
				hours = 4 
				random_hours = 8 
			}
		}
	}

	#No
	option = {
		name =  AAT_Sweden_nationalists.20.b
		ai_chance = {
			base = 0
		}
		FROM = {
			country_event = {
				id = AAT_Sweden_nationalists.22
				hours = 4 # 
				random_hours = 8 # 
			}
		}
	}
}


#Germany accepts
country_event = {
	id = AAT_Sweden_nationalists.21
	title = AAT_Sweden_nationalists.21.t
	desc = AAT_Sweden_nationalists.21.desc
	picture = GFX_report_event_gathering_protest
	is_triggered_only = yes
	
	#yes
	option = {
		name =  AAT_Sweden_nationalists.21.a
		ai_chance = {
			base = 10
		}

		every_state = {
			limit = {
				has_state_flag = SWE_nordland_claims
			}
			IF = {
				limit = {
					OWNER = {
						NOT = { tag = ROOT }
						
					}
				}
				add_claim_by = ROOT
			}				
		    IF = {
		    	limit = {
		    		OWNER = {
		    			original_tag = GER
		    		}
		    	}
		    	ROOT = {
		    		transfer_state = PREV
		    	}
		    }

		    add_compliance = 5
		    add_resistance = -5
		}
	}
}

#Germany declines
country_event = {
	id = AAT_Sweden_nationalists.22
	title = AAT_Sweden_nationalists.22.t
	desc = AAT_Sweden_nationalists.22.desc
	picture = GFX_report_event_gathering_protest
	is_triggered_only = yes
	
	#yes
	option = {
		name =  AAT_Sweden_nationalists.22.a
		ai_chance = {
			base = 10
		}
	}
}

#Sweden wants to stap Ger in the back and is a bad bad boy
country_event = {
	id = AAT_Sweden_nationalists.23
	title = AAT_Sweden_nationalists.23.t
	desc = AAT_Sweden_nationalists.23.desc
	picture = GFX_report_event_gathering_protest
	is_triggered_only = yes
	
	#yes
	option = {
		name =  AAT_Sweden_nationalists.23.a
		ai_chance = {
			base = 10
		}
		hidden_effect = {
			set_country_flag = SWE_peace_out_when_sweden_stabs_ger_in_the_back
		}
		custom_effect_tooltip = AAT_Sweden_nationalists.23.a_tt
		if = { 
			limit = {
				is_major = yes #dont spam with endless accept events from minors
				is_ai = yes
			}

			FROM = {
				country_event = { id = AAT_Sweden_nationalists.24 hours = 2 }
			}
		}

	}

	#no
	option = {
		name =  AAT_Sweden_nationalists.23.b
		ai_chance = {
			base = 0
		}
		FROM = {
			country_event = { id = AAT_Sweden_nationalists.24 hours = 2 }
		}
	}
}

#FROM response event yes
country_event = {
	id = AAT_Sweden_nationalists.24
	title = AAT_Sweden_nationalists.24.t
	desc = AAT_Sweden_nationalists.24.desc
	picture = GFX_report_event_generic_read_write
	is_triggered_only = yes
	
	#yes
	option = {
		name =  AAT_Sweden_nationalists.24.a
		ai_chance = {
			base = 10
		}
	}
}

#Germany declines
country_event = {
	id = AAT_Sweden_nationalists.25
	title = AAT_Sweden_nationalists.25.t
	desc = AAT_Sweden_nationalists.25.desc
	picture = GFX_report_event_gathering_protest
	is_triggered_only = yes
	
	#yes
	option = {
		name =  AAT_Sweden_nationalists.25.a
		ai_chance = {
			base = 10
		}
	}
}

#Sweden breaks free
country_event = {
	id = AAT_Sweden_nationalists.26
	title = AAT_Sweden_nationalists.26.t
	desc = AAT_Sweden_nationalists.26.desc
	picture = GFX_report_event_chinese_army_training
	is_triggered_only = yes
	
	option = {
		name =  AAT_Sweden_nationalists.26.a
		ai_chance = {
			base = 10
		}
		hidden_effect = {
			set_country_flag = sweden_was_a_puppet_and_has_broken_free
		}
		create_wargoal = {
			target = FROM
			type = puppet_wargoal_focus
		}
	}
}


#SWE claim Finland request
country_event = {
	id = AAT_Sweden_nationalists.27
	title = AAT_Sweden_nationalists.27.t
	desc = AAT_Sweden_nationalists.27.desc
	picture = GFX_report_event_gathering_protest
	is_triggered_only = yes
	
	#yes
	option = {
		name =  AAT_Sweden_nationalists.27.a
		ai_chance = {
			base = 10
		}
		FROM = {
			country_event = {
				id = AAT_Sweden_nationalists.28
				hours = 4 
				random_hours = 8 
			}
		}

		effect_tooltip = {
			SWE = {
				every_state = {
					limit = {
						is_core_of = FIN
						is_owned_and_controlled_by = GER
					}

					 PREV = { transfer_state = PREV }
				}
			}
		}
	}

	#No
	option = {
		name =  AAT_Sweden_nationalists.20.b
		ai_chance = {
			base = 0
		}
		FROM = {
			country_event = {
				id = AAT_Sweden_nationalists.29
				hours = 4 # 
				random_hours = 8 # 
			}
		}
	}
}

#Germany accepts
country_event = {
	id = AAT_Sweden_nationalists.28
	title = AAT_Sweden_nationalists.28.t
	desc = AAT_Sweden_nationalists.28.desc
	picture = GFX_report_event_gathering_protest
	is_triggered_only = yes
	
	#yes
	option = {
		name =  AAT_Sweden_nationalists.28.a
		ai_chance = {
			base = 10
		}

		every_state = {
			limit = {
				is_core_of = FIN
				is_owned_and_controlled_by = GER
			}
			ROOT = { transfer_state = PREV }
		}
	}
}

#Germany declines
country_event = {
	id = AAT_Sweden_nationalists.29
	title = AAT_Sweden_nationalists.29.t
	desc = AAT_Sweden_nationalists.29.desc
	picture = GFX_report_event_gathering_protest
	is_triggered_only = yes
	
	#yes
	option = {
		name =  AAT_Sweden_nationalists.29.a
		ai_chance = {
			base = 10
		}
	}
}


#SWE claim Finland request
news_event = {
	id = AAT_Sweden_nationalists.30
	title = AAT_Sweden_nationalists.30.t
	desc = AAT_Sweden_nationalists.30.desc
	picture = GFX_news_event_polish_army
	is_triggered_only = yes
	
	#yes
	option = {
		name =  AAT_Sweden_nationalists.27.a
		ai_chance = {
			base = 10
		}
	}
}


#Sweden invites us to the norid defense council
country_event = {
	id = AAT_Sweden_nordic_defense_council.1
	title = AAT_Sweden_nordic_defense_council.1.t
	desc = AAT_Sweden_nordic_defense_council.1.desc
	picture = GFX_report_event_generic_panzer_attack
	is_triggered_only = yes
	immediate = {
        hidden_effect = {
            set_variable = { temp_opinion = ROOT.opinion@FROM }
            multiply_variable = { temp_opinion = 0.1 }
        }
    }
	
	#no
	option = {
		name = AAT_Sweden_nordic_defense_council.1.a
		ai_chance = {
			base = 5
			modifier = {
				is_subject = yes
				add = 100
			}
		}

		FROM = { country_event = { id = AAT_Sweden_nordic_defense_council.3 hours = 3 } }

		#Lone Wolf Finland can't join any factions - Tooltip for player
		if = {
			limit = {	
				FIN_is_lone_wolf_finland = yes
			}
			custom_effect_tooltip = FIN_the_lone_wolf_no_faction_tt
		}
		
		FROM = {
            create_wargoal = {
                type = puppet_wargoal_focus
                target = ROOT
            }
		}
		clear_variable = ROOT.temp_opinion
	}

	#yes, as a member
	option = {
		name = AAT_Sweden_nordic_defense_council.1.b
		trigger = {
			SWE = {
				has_completed_focus = SWE_decentralized_nordic_army_command
			}
		}
		ai_chance = {
			base = 2
			modifier = {
				SWE = {
					is_ai = no
				}
				factor = 1.5
			}

			modifier = {
				is_in_faction = yes
				factor = 0
			}

			modifier = {
				is_subject = yes
				factor = 0
			}

			modifier = {
				OR = {
					has_government = SWE
					AND = {
						original_tag = FIN
						has_government = neutrality 
						SWE = { has_government = democratic }
					}
				}
				factor = 2
			}
			
			modifier = {
                always = yes 
                add = ROOT.temp_opinion
            }
			
			modifier = {
				strength_ratio = {
					tag = SWE
					ratio < 0.8
				}
				add = 4
			}

			modifier = {
				strength_ratio = {
					tag = SWE
					ratio < 0.4
				}
				add = 20
			}
		}

		trigger = {
			#Lone Wolf Finland can't join any factions
			FIN_is_lone_wolf_finland = no
		}

		hidden_effect = {
			if = {
				limit = {
					SWE = { 
						is_in_faction = yes 
						is_faction_leader = no
					}
				}
				SWE = { leave_faction = yes }
			}

			set_country_flag = rejected_nordic_defense_council
		}

		SWE = {
			add_to_faction = PREV 

			add_to_array = {
				array = SWE_nordic_defense_council_members
				value = PREV #optional, if not defined adds scope
			}
		}
		clear_variable = ROOT.temp_opinion
		FROM = { country_event = { id = AAT_Sweden_nordic_defense_council.2 hours = 3 } }

	}

	#yes, as a puppet
	option = {
		trigger = {
			SWE = {
				has_completed_focus = SWE_central_nordic_army_command
			}
		}
		name = AAT_Sweden_nordic_defense_council.1.c
		ai_chance = {
			base = 1
			modifier = {
				SWE = {
					is_ai = no
				}
				factor = 1
			}

			modifier = {
				is_in_faction = yes
				factor = 0
			}

			modifier = {
				is_subject = yes
				factor = 0
			}

			modifier = {
				OR = {
					has_government = SWE
					AND = {
						original_tag = FIN
						has_government = neutrality 
					}
				}
				factor = 2
			}
			
			modifier = {
                always = yes 
                add = ROOT.temp_opinion
            }
			
			modifier = {
				strength_ratio = {
					tag = SWE
					ratio < 0.65
				}
				add = 6
			}

			modifier = {
				strength_ratio = {
					tag = SWE
					ratio < 0.25
				}
				add = 20
			}
		}

		trigger = {
			#Lone Wolf Finland can't join any factions
			FIN_is_lone_wolf_finland = no
		}

		#cant use FROM here due to ICE being a puppet, and DEN is the one sending  that event via Sweden
		hidden_effect = {
			if = {
				limit = {
					ICE = { is_subject_of = PREV }
				}

				set_country_flag = SWE_ice_was_a_subject_of_den
			}
		}

		SWE = { 
			add_to_array = {
				array = SWE_nordic_defense_council_members
				value = PREV #optional, if not defined adds scope
			}
			country_event = { id = AAT_Sweden_nordic_defense_council.2 hours = 6 }
			puppet = PREV
			set_autonomy = {
			 	target = PREV
			 	autonomy_state = autonomy_aat_defense_council_member
			 	freedom_level = 0 # 0-1 
			 } 


			hidden_effect = {
				#added for each member
				add_to_variable = { SWE_nordic_defense_council_military_overhead_pp = -0.08 }
				add_to_variable = { SWE_nordic_defense_council_military_overhead_cp_gain = -0.08 } 
				add_to_variable = { SWE_nordic_defense_council_military_overhead_cp_ability_cost = 0.08 }
				add_to_variable = { SWE_nordic_defense_council_military_overhead_planning_speed = -0.14 }
				
				
				if = {
					limit = { NOT = { has_dynamic_modifier = { modifier = SWE_nordic_defense_council_military_overhead }}}
					add_dynamic_modifier = { modifier = SWE_nordic_defense_council_military_overhead }
				}
			}
		}

		every_unit_leader = {
			set_variable = { SWE_original_country_member = THIS } 
			set_nationality = SWE
		}
		if = {
			limit = {
				is_ai = yes
			}

			load_focus_tree = { 
				tree = generic_focus
				keep_completed = no
			}
		}

		if = {
			limit = {
				has_country_flag = SWE_ice_was_a_subject_of_den
			}
			#scope to SWE to not break loc
			SWE = {
				ICE = {
					country_event = { id = AAT_Sweden_nordic_defense_council.1 hours = 3 }
				}
			}
			clr_country_flag = SWE_ice_was_a_subject_of_den
		}
		# Transfer Army 
        add_ideas = SWE_nordic_centralized_army
        transfer_units_fraction = {
            target = SWE         # the recipient
            size = 1             # [0,1] Default value for the ratio below if they are not specified
            stockpile_ratio = 1  # [0,1] Overrides size modifier for the stockpiled equipment and fuel
            army_ratio = 1       # [0,1] Overrides size modifier for army
            navy_ratio = 0      # [0,1] Overrides size modifier for navy
            air_ratio = 0        # [0,1] Overrides size modifier for air
        }
        clear_variable = ROOT.temp_opinion
		#Remove Maluses that do not fit inside the scope of the tree from different nordic countries if they accept
		hidden_effect = {
			if = {
				limit = {
					original_tag = NOR
				}

				if = {
					limit = { has_idea = NOR_complacent_cabinet_ns }
					remove_ideas = NOR_complacent_cabinet_ns
				}

				if = {
					limit = { has_idea = NOR_the_hard_thirties_ns }
					remove_ideas = NOR_the_hard_thirties_ns
				}

				else_if = {
					limit = { has_idea = NOR_the_hard_thirties_ns_2 }
					remove_ideas = NOR_the_hard_thirties_ns_2
				}

				else_if = {
					limit = { has_idea = NOR_the_hard_thirties_ns_3 }
					remove_ideas = NOR_the_hard_thirties_ns_3
				}

				if = {
					limit = { has_idea = NOR_obsolete_armed_forces_ns_1 }
					remove_ideas = NOR_obsolete_armed_forces_ns_1
				}
			}

			if = {
				limit = { 
					original_tag = DEN
				}

				if = {
					limit = { has_dynamic_modifier = { modifier = DEN_neglected_military_dynamic_modifier }}
					remove_dynamic_modifier = { modifier = DEN_neglected_military_dynamic_modifier }
				}

				if = {
					limit = { has_dynamic_modifier = { modifier = DEN_economic_crisis_dynamic_modifier }}
					remove_dynamic_modifier = { modifier = DEN_economic_crisis_dynamic_modifier }
				}

				if = {
					limit = { has_dynamic_modifier = { modifier = DEN_industrial_capability_dynamic_modifier }}
					remove_dynamic_modifier = { modifier = DEN_industrial_capability_dynamic_modifier }
				}
			}

			if = {
				limit = { 
					original_tag = ICE
				}

				if = {
					limit = { has_dynamic_modifier = { modifier = ICE_the_icelandic_economy_modifier }}
					remove_dynamic_modifier = { modifier = ICE_the_icelandic_economy_modifier }
				}
			}
		}
	}
}

#Nordic country accepts
country_event = {
	id = AAT_Sweden_nordic_defense_council.2	
	title = AAT_Sweden_nordic_defense_council.2.t
	desc = AAT_Sweden_nordic_defense_council.2.desc
	is_triggered_only = yes

	option = {
		name = AAT_Sweden_nordic_defense_council.2.a
	}

}

#Nordic country rejects
country_event = {
	id = AAT_Sweden_nordic_defense_council.3	
	title = AAT_Sweden_nordic_defense_council.3.t
	desc = AAT_Sweden_nordic_defense_council.3.desc
	is_triggered_only = yes

	option = {
		name = AAT_Sweden_nordic_defense_council.3.a
	}

}

#Murmurs of revolution (fascist no likey communists)
country_event = {
	id = AAT_Sweden_communism.1
	title = AAT_Sweden_communism.1.t
	desc = AAT_Sweden_communism.1.desc
	is_triggered_only = yes
	picture = GFX_report_event_communist_leader
	option = {
		name = AAT_Sweden_nordic_defense_council.1.a
		add_ideas = SWE_fascist_counter_revolution_0
	}
}

#Facsists align with Generals (unaligned)
country_event = {
	id = AAT_Sweden_communism.2
	title = AAT_Sweden_communism.2.t
	desc = AAT_Sweden_communism.2.desc
	picture = GFX_report_event_hitler_parade
	fire_only_once = yes
	trigger = {
		fascism > 0.2
		has_idea = SWE_fascist_counter_revolution_0
	}
	mean_time_to_happen = { days = 15 }

	option = {
		name = AAT_Sweden_communism.2.a
		swap_ideas = {
			remove_idea = SWE_fascist_counter_revolution_0
			add_idea = SWE_fascist_counter_revolution_1
		}
	}
}

#Almost at revolution please fix
country_event = {
	id = AAT_Sweden_communism.3
	title = AAT_Sweden_communism.3.t
	desc = AAT_Sweden_communism.3.desc
	picture = GFX_report_event_canadian_soldiers
	is_triggered_only = yes

	option = {
		name = AAT_Sweden_communism.3.a

		swap_ideas = {
			remove_idea = SWE_fascist_counter_revolution_1
			add_idea = SWE_fascist_counter_revolution_2
		}

	}
}

country_event = { # u fucked up - Civil war
	id = AAT_Sweden_communism.4
	title = AAT_Sweden_communism.4.t
	desc = AAT_Sweden_communism.4.desc
	is_triggered_only = yes
	picture = GFX_report_event_generic_rally2
	option = {
		name = AAT_Sweden_communism.4.a
		SWE = {
			start_civil_war = {
				ideology = fascism
				ruling_party = communism
				size = 0.69 
				capital = 141 # Optional. Capital of Revolt country
				states = { 141 919  915 140 138 139 124 } # States that go to the revolter. Use "all" to include all states.
				keep_all_characters = no #Optional. Keep all characters on target country side - will ignore all following keep_ parameters - default value = no
				keep_political_leader = no # optional, default is no; If yes, the party leader of the revolting ideology will not join the revolter as its leader.
				keep_political_party_members = no # Optional, default is no; If yes, it will keep the non main leaders of the party leaders in original country
			}
			random_other_country = {
				limit = {
					original_tag = SWE
					has_government = fascism
					has_civil_war = yes
				}
				SWE = {
					every_unit_leader = {
						set_nationality = PREV.PREV
					}
				}
			}

		}
	}
}


country_event = { # prosecute or "promote" ringleaders out of power
	id = AAT_Sweden_communism.5
	title = AAT_Sweden_communism.5.t
	desc = AAT_Sweden_communism.5.desc
	is_triggered_only = yes
	picture = GFX_report_event_generic_read_write
	option = { #prosecute
		name = AAT_Sweden_communism.5.a
		ai_chance = {
			base = 2
		}
		ROOT = {
			every_unit_leader = {
				limit = {
					has_unit_leader_flag = SWE_anti_communist_ringleader
				}
				retire = yes
				#retire_character = THIS
			}
		}

		add_stability = 0.075
		add_war_support = -0.035
		add_popularity = {
			ideology = fascism
			popularity = -0.5
		}

		add_popularity = {
			ideology = neutrality
			popularity = -0.5
		}

	}

	option = {
		name = AAT_Sweden_communism.5.b
		ai_chance = {
			base = 1
		}
		ROOT = {
			every_unit_leader = {
				limit = {
					has_unit_leader_flag = SWE_anti_communist_ringleader
				}
				add_trait = {
					trait = SWE_promoted_away_from_power
				}
			}
		}

		add_popularity = {
			ideology = fascism
			popularity = -0.5
		}

		add_popularity = {
			ideology = neutrality
			popularity = -0.5
		}
		
	}
}


# The Fate of the Royal Family event
country_event = {
	id = AAT_Sweden_communism.6
	title = AAT_Sweden_communism.6.t
	desc = AAT_Sweden_communism.6.desc
	picture = GFX_report_event_eng_royal_family

	is_triggered_only = yes
	
	# Banish them to Canada
	option = {
		name = AAT_Sweden_communism.6.a
		ai_chance = {
			factor = 75
		}
		add_timed_idea = { idea = SWE_confiscated_royal_wealth days = 365 }
		remove_ideas = SWE_gustaf_v_idea
	}
}


country_event = { # Kilbom ousts Flyg
	id = AAT_Sweden_communism.7
	title = AAT_Sweden_communism.7.t
	desc = AAT_Sweden_communism.7.desc
	is_triggered_only = yes
	picture = GFX_report_event_german_politician_speech
	option = { #Pick Kilbom
		name = AAT_Sweden_communism.7.a
		custom_effect_tooltip = AAT_Sweden_communism__7_tt_1
		retire_country_leader = yes
		SWE_karl_kilbom = {
			add_country_leader_role = {
				promote_leader = yes
				country_leader = {
					ideology = marxism
					traits = { anti_soviet_socialist likes_allies dislikes_soviet dislikes_germany }
				}
			}
		}
		
	}

	option = { #Pick Sven
		name = AAT_Sweden_communism.7.b
		custom_effect_tooltip = AAT_Sweden_communism__7_tt_2
	}

	option = { # Actually Align us with the USSR
		name = AAT_Sweden_communism.7.c
		retire_country_leader = yes
		SWE_sven_linderot = {
			add_country_leader_role = {
				promote_leader = yes
				country_leader = {
					ideology = stalinism
					traits = { born_agitator }
				}
			}
		}
		
		add_stability = -0.1
        custom_effect_tooltip = available_political_advisor 
        show_ideas_tooltip = SWE_hugo_silen
		
	}
}