#############################
#############################
#### AAT DENMARK EVENTS ####
#############################
#############################

add_namespace = denmark_political_events
add_namespace = denmark_occupation_event
add_namespace = denmark_resistance_event
add_namespace = denmark_overlord_events
add_namespace = denmark_trade_deal
add_namespace = denmark_protection_event
add_namespace = denmark_expansion_event
add_namespace = denmark_fascist_event
add_namespace = denmark_events


country_event = { #Motion of No Confidence
	id = denmark_political_events.1
	title = denmark_political_events.1.t
	desc = denmark_political_events.1.desc
	picture = GFX_report_event_DEN_danish_politics

	is_triggered_only = yes

	option = { #Vote of No Confidence
		name = denmark_political_events.1.a
		ai_chance = {
			base = 5
			modifier = {
				factor = 5
				OR = {
					DEN_historical_ai = yes
					DEN_rearming_ai = yes
				}
			}
		}

		custom_effect_tooltip = DEN_available_candidates_tt
		DEN_available_candidates = yes
		country_event = { id = denmark_political_events.2 days = 1 }
	}

	option = { #Hold Snap Election
		name = denmark_political_events.1.b
		ai_chance = {
			base = 2
			modifier = {
				factor = 5
				OR = {
					fascism > 0.2
					communism > 0.2
					neutrality > 0.2
				}
			}
			modifier = {
				factor = 5
				OR = {
					fascism > 0.35
					communism > 0.35
					neutrality > 0.35
				}
			}
		}
		trigger = {
			OR = {
				has_stability < 0.5
				OR = {
					AND = {
						has_government = democratic
						OR = {
							democratic < 0.5
							communism > 0.19
							neutrality > 0.19
							fascism > 0.19
						}
					}
					AND = {
						has_government = communism
						OR = {
							democratic > 0.19 
							communism < 0.5 
							neutrality > 0.19 
							fascism > 0.19
						}
					}
					AND = {
						has_government = neutrality
						OR = {
							democratic > 0.19 
							communism  > 0.19 
							neutrality < 0.5 
							fascism > 0.19 
						}
					}
				}
			}
		}
		hidden_effect = {
			set_country_flag = DEN_snap_election_flag
		}
		country_event = { id = denmark_political_events.3 days = 1 }
	}
}

country_event = { #Vote of No Confidence
	id = denmark_political_events.2
	title = denmark_political_events.2.t
	desc = denmark_political_events.2.desc
	picture = GFX_report_event_DEN_danish_politics

	is_triggered_only = yes

	option = { #Socialdemokratiet
		name = denmark_political_events.2.a
		ai_chance = {
			base = 2
			modifier = {
				factor = 5
				democratic > 0.2
			}
			modifier = {
				factor = 5
				democratic > 0.35
			}
			modifier = {
				factor = 2
				democratic > 0.5
			}
			modifier = {
				factor = 10
				DEN_historical_ai = yes
			}
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
		}
		trigger = {
			DEN_thorvald_stauning = { is_country_leader = no }
			DEN_vilhelm_buhl = { is_country_leader = no }
			check_variable = { DEN_democratic_popularity > 29 }
			NOT = { has_country_flag = banned_democratic_flag }
		}

		custom_effect_tooltip = DEN_prime_minister_resigns_tt

		DEN_ruling_party_loses_popularity = yes

		DEN_warhawk_is_removed_from_power = yes

		DEN_socialdemokratiet_takes_over = yes

		if = {
			limit = {
				NOT = {
					has_government = democratic
				}
			}
			add_popularity = {
			    ideology = democratic
			    popularity = 0.05
			}
		}
	}

	option = { #Venstre
		name = denmark_political_events.2.b
		ai_chance = {
			base = 1
		}
		trigger = {
			DEN_knud_kristensen = { is_country_leader = no }
			check_variable = { DEN_democratic_popularity > 29 }
			NOT = { has_country_flag = banned_democratic_flag }
		}

		custom_effect_tooltip = DEN_prime_minister_resigns_tt

		DEN_ruling_party_loses_popularity = yes

		DEN_warhawk_is_removed_from_power = yes

		DEN_venstre_takes_over = yes

		if = {
			limit = {
				NOT = {
					has_government = democratic
				}
			}
			add_popularity = {
			    ideology = democratic
			    popularity = 0.05
			}
		}
	}

	option = { #DKP
		name = denmark_political_events.2.c
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				communism > 0.2
			}
			modifier = {
				factor = 5
				communism > 0.35
			}
			modifier = {
				factor = 2
				communism > 0.5
			}
			modifier = {
				factor = 2
				is_historical_focus_on = no
			}
		}
		trigger = {
			DEN_aksel_larsen = { is_country_leader = no }
			check_variable = { DEN_communism_popularity > 19 }
			NOT = { 
				has_country_flag = banned_communism_flag 
				has_country_flag = DEN_banned_communism_flag
			}
		}

		custom_effect_tooltip = DEN_prime_minister_resigns_tt

		DEN_ruling_party_loses_popularity = yes

		DEN_warhawk_is_removed_from_power = yes

		DEN_communists_takes_over = yes

		if = {
			limit = {
				NOT = {
					has_government = communism
				}
			}
			add_popularity = {
			    ideology = communism
			    popularity = 0.05
			}
		}
	}

	option = { #Conservative
		name = denmark_political_events.2.d
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				democratic > 0.2
			}
			modifier = {
				factor = 5
				democratic > 0.35
			}
			modifier = {
				factor = 2
				democratic > 0.5
			}
			modifier = {
				factor = 20
				OR = {
					DEN_rearming_ai = yes
					DEN_royal_ai = yes
					DEN_fascist_ai = yes
				}
			}
			modifier = {
				factor = 2
				is_historical_focus_on = no
			}
		}
		trigger = {
			DEN_christmas_moller = { is_country_leader = no }
			check_variable = { DEN_democratic_popularity > 29 }
			NOT = { has_country_flag = banned_democratic_flag }
		}

		custom_effect_tooltip = DEN_prime_minister_resigns_tt

		DEN_ruling_party_loses_popularity = yes

		DEN_dove_is_removed_from_power = yes

		DEN_konservative_takes_over = yes

		if = {
			limit = {
				NOT = {
					has_government = democratic
				}
			}
			add_popularity = {
			    ideology = democratic
			    popularity = 0.05
			}
		}
	}

	option = { #Bondepartiet
		name = denmark_political_events.2.e
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				neutrality > 0.2
			}
			modifier = {
				factor = 5
				neutrality > 0.35
			}
			modifier = {
				factor = 2
				neutrality > 0.5
			}
			modifier = {
				factor = 10
				OR = {
					DEN_rearming_ai = yes
					DEN_royal_ai = yes
					DEN_fascist_ai = yes
				}
			}
			modifier = {
				factor = 2
				is_historical_focus_on = no
			}
		}
		trigger = {
			DEN_knud_bach = { is_country_leader = no }
			check_variable = { DEN_neutrality_popularity > 19 }
		}

		custom_effect_tooltip = DEN_prime_minister_resigns_tt

		DEN_ruling_party_loses_popularity = yes

		DEN_dove_is_removed_from_power = yes

		DEN_bondepartiet_takes_over = yes

		if = {
			limit = {
				NOT = {
					has_government = neutrality
				}
			}
			add_popularity = {
			    ideology = neutrality
			    popularity = 0.05
			}
		}
	}
}

country_event = { #Election Campaigns
	id = denmark_political_events.3
	title = denmark_political_events.3.t
	desc = denmark_political_events.3.desc
	picture = GFX_report_event_generic_rally2

	is_triggered_only = yes

	trigger = {
		tag = DEN
		has_elections = yes
		NOT = { has_country_flag = DEN_at_war_flag }
	}

	immediate = {
		if = {
			limit = {
				has_war = yes
				NOT = { has_country_flag = DEN_at_war_flag }
			}
			set_country_flag = DEN_at_war_flag
		}
	}

	option = { #Support the Democratic Party
		name = denmark_political_events.3.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
			modifier = {
				factor = 5
				OR = {
					DEN_historical_ai = yes
					DEN_rearming_ai = yes
				}
			}
			modifier = {
				factor = 5
				democratic > 0.2
			}
			modifier = {
				factor = 5
				democratic > 0.35
			}
			modifier = {
				factor = 5
				democratic > 0.5
			}			
		}
		trigger = {
			democratic > 0.14
			NOT = { has_country_flag = banned_democratic_flag }
		}

		custom_effect_tooltip = DEN_election_consequences_democratic_tt
		country_event = { id = denmark_political_events.4 days = 7 }
		custom_effect_tooltip = DEN_democratic_campaign_effects_tt
		hidden_effect = {
			if = {
				limit = {
					has_country_flag = DEN_snap_election_flag
				}
				clr_country_flag = DEN_snap_election_flag
			}
		}
	}

	option = { #Support the Communist Party
		name = denmark_political_events.3.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				communism > 0.2
			}
			modifier = {
				factor = 5
				communism > 0.35
			}
			modifier = {
				factor = 5
				communism > 0.5
			}
		}
		trigger = {
			communism > 0.14
			NOT = { 
				has_country_flag = banned_communism_flag 
				has_country_flag = DEN_banned_communism_flag
			}
		}

		custom_effect_tooltip = DEN_election_consequences_tt
		country_event = { id = denmark_political_events.5 days = 7 }
		custom_effect_tooltip = DEN_communist_campaign_effects_tt
		hidden_effect = {
			if = {
				limit = {
					has_country_flag = DEN_snap_election_flag
				}
				clr_country_flag = DEN_snap_election_flag
			}
		}
	}

	option = { #Support the Neutral Party
		name = denmark_political_events.3.c
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				neutrality > 0.2
			}
			modifier = {
				factor = 5
				neutrality > 0.35
			}
			modifier = {
				factor = 5
				neutrality > 0.5
			}
		}
		trigger = {
			neutrality > 0.14
		}

		custom_effect_tooltip = DEN_election_consequences_tt
		country_event = { id = denmark_political_events.6 days = 7 }
		custom_effect_tooltip = DEN_neutral_campaign_effects_tt
		hidden_effect = {
			if = {
				limit = {
					has_country_flag = DEN_snap_election_flag
				}
				clr_country_flag = DEN_snap_election_flag
			}
		}
	}

	option = { #Support the Fascist Party
		name = denmark_political_events.3.d
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				fascism > 0.2
			}
			modifier = {
				factor = 5
				fascism > 0.35
			}
			modifier = {
				factor = 5
				fascism > 0.5
			}
		}
		trigger = {
			fascism > 0.14
			NOT = { 
				has_country_flag = banned_fascism_flag 
				has_country_flag = DEN_banned_fascism_flag
			}
		}

		custom_effect_tooltip = DEN_election_consequences_tt
		country_event = { id = denmark_political_events.7 days = 7 }
		custom_effect_tooltip = DEN_fascist_campaign_effects_tt
		hidden_effect = {
			if = {
				limit = {
					has_country_flag = DEN_snap_election_flag
				}
				clr_country_flag = DEN_snap_election_flag
			}
		}
	}
}

country_event = { #Democratic Campaign
	id = denmark_political_events.4
	title = denmark_political_events.4.t
	desc = denmark_political_events.4.desc
	picture = GFX_report_event_generic_rally_3

	is_triggered_only = yes

	option = { #Civil Campaign
		name = denmark_political_events.4.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 15
				democratic > 0.7
			}
		}
		if = {
			limit = {
				democratic < 0.9
			}
			add_popularity = {
			    ideology = democratic
			    popularity = 0.05
			}
		}
		else = { add_political_power = 25 }
		country_event = { id = denmark_political_events.8 days = 7 }
	}

	option = { #Aggressive Campaign
		name = denmark_political_events.4.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				democratic > 0.5
			}
		}
		trigger = {
			democratic < 0.8
		}
		add_popularity = {
		    ideology = democratic
		    popularity = 0.1
		}
		add_political_power = -50
		country_event = { id = denmark_political_events.8 days = 7 }
	}

	option = { #Antagonistic Campaign
		name = denmark_political_events.4.c
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				democratic < 0.5
			}
		}
		trigger = {
			democratic < 0.7
		}
		add_popularity = {
		    ideology = democratic
		    popularity = 0.15
		}
		add_political_power = -75
		add_stability = -0.05
		country_event = { id = denmark_political_events.8 days = 7 }
	}
}

country_event = { #Communist Campaign
	id = denmark_political_events.5
	title = denmark_political_events.5.t
	desc = denmark_political_events.5.desc
	picture = GFX_report_event_communists_in_riga

	is_triggered_only = yes

	option = { #Civil Campaign
		name = denmark_political_events.4.a #Intentional
		ai_chance = {
			base = 1
			modifier = {
				factor = 15
				communism > 0.7
			}
		}
		if = {
			limit = {
				communism < 0.9
			}
			add_popularity = {
			    ideology = communism
			    popularity = 0.05
			}
		}
		else = { add_political_power = 25 }

		country_event = { id = denmark_political_events.8 days = 7 }
	}

	option = { #Aggressive Campaign
		name = denmark_political_events.4.b #Intentional
		ai_chance = {
			base = 1
			modifier = {
				factor = 10
				communism > 0.5
			}
		}
		trigger = {
			communism < 0.8
		}
		add_popularity = {
		    ideology = communism
		    popularity = 0.1
		}
		add_political_power = -50
		country_event = { id = denmark_political_events.8 days = 7 }
	}

	option = { #Antagonistic Campaign
		name = denmark_political_events.4.c #Intentional
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				communism < 0.5
			}
		}
		trigger = {
			communism < 0.7
		}
		add_popularity = {
		    ideology = communism
		    popularity = 0.15
		}
		add_political_power = -75
		add_stability = -0.05
		country_event = { id = denmark_political_events.8 days = 7 }
	}
}

country_event = { #Neutral Campaign
	id = denmark_political_events.6
	title = denmark_political_events.6.t
	desc = denmark_political_events.6.desc
	picture = GFX_report_event_generic_rally

	is_triggered_only = yes

	option = { #Civil Campaign
		name = denmark_political_events.4.a #Intentional
		ai_chance = {
			base = 1
			modifier = {
				factor = 15
				neutrality > 0.7
			}
		}
		if = {
			limit = {
				neutrality < 0.9
			}
			add_popularity = {
			    ideology = neutrality
			    popularity = 0.05
			}
		}
		else = { add_political_power = 25 }

		country_event = { id = denmark_political_events.8 days = 7 }
	}

	option = { #Aggressive Campaign
		name = denmark_political_events.4.b #Intentional
		ai_chance = {
			base = 1
			modifier = {
				factor = 10
				neutrality > 0.5
			}
		}
		trigger = {
			neutrality < 0.8
		}
		add_popularity = {
		    ideology = neutrality
		    popularity = 0.1
		}
		add_political_power = -50
		country_event = { id = denmark_political_events.8 days = 7 }
	}

	option = { #Antagonistic Campaign
		name = denmark_political_events.4.c #Intentional
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				neutrality < 0.5
			}
		}
		trigger = {
			neutrality < 0.7
		}
		add_popularity = {
		    ideology = neutrality
		    popularity = 0.15
		}
		add_political_power = -75
		add_stability = -0.05
		country_event = { id = denmark_political_events.8 days = 7 }
	}
}

country_event = { #Fascist Campaign
	id = denmark_political_events.7
	title = denmark_political_events.7.t
	desc = denmark_political_events.7.desc
	picture = GFX_report_event_fascist_speech

	is_triggered_only = yes

	option = { #Civil Campaign
		name = denmark_political_events.4.a #Intentional
		ai_chance = {
			base = 1
			modifier = {
				factor = 15
				fascism > 0.7
			}
		}
		if = {
			limit = {
				fascism < 0.9
			}
			add_popularity = {
			    ideology = fascism
			    popularity = 0.05
			}
		}
		else = { add_political_power = 25 }

		country_event = { id = denmark_political_events.8 days = 7 }
	}

	option = { #Aggressive Campaign
		name = denmark_political_events.4.b #Intentional
		ai_chance = {
			base = 1
			modifier = {
				factor = 10
				fascism > 0.5
			}
		}
		trigger = {
			fascism < 0.8
		}
		add_popularity = {
		    ideology = fascism
		    popularity = 0.1
		}
		add_political_power = -50
		country_event = { id = denmark_political_events.8 days = 7 }
	}

	option = { #Antagonistic Campaign
		name = denmark_political_events.4.c #Intentional
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				fascism < 0.5
			}
		}
		trigger = {
			fascism < 0.7
		}
		add_popularity = {
		    ideology = fascism
		    popularity = 0.15
		}
		add_political_power = -75
		add_stability = -0.05
		country_event = { id = denmark_political_events.8 days = 7 }
	}
}

country_event = { #Election Results
	id = denmark_political_events.8
	title = denmark_political_events.8.t
	desc = denmark_political_events.8.desc
	picture = GFX_report_event_DEN_danish_politics

	is_triggered_only = yes

	immediate = {
		set_variable = { DEN_democratic_popularity = DEN.party_popularity_100@democratic }
		clamp_variable = {
			var = DEN_democratic_popularity
			min = 0
			max = 100
		}
		set_variable = { DEN_communism_popularity = DEN.party_popularity_100@communism }
		clamp_variable = {
			var = DEN_communism_popularity
			min = 0
			max = 100
		}
		set_variable = { DEN_neutrality_popularity = DEN.party_popularity_100@neutrality }
		clamp_variable = {
			var = DEN_neutrality_popularity
			min = 0
			max = 100
		}
		set_variable = { DEN_fascism_popularity = DEN.party_popularity_100@fascism }
		clamp_variable = {
			var = DEN_fascism_popularity
			min = 0
			max = 100
		}
	}

	option = { #Democratic
		name = denmark_political_events.8.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				OR = {
					DEN_historical_ai = yes
					DEN_rearming_ai = yes
				}
			}
			modifier = {
				factor = 5
				democratic > 0.3
			}
			modifier = {
				factor = 10
				democratic > 0.4
			}
			modifier = {
				factor = 15
				democratic > 0.5
			}
		}
		trigger = {
			check_variable = { DEN_democratic_popularity > 24 }
		}
		country_event = { id = denmark_political_events.9 hours = 6 }
	}

	option = { #Communism
		name = denmark_political_events.8.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				communism > 0.3
			}
			modifier = {
				factor = 10
				communism > 0.4
			}
			modifier = {
				factor = 15
				communism > 0.5
			}
		}
		trigger = {
			check_variable = { DEN_communism_popularity > 24 }
		}
		DEN_warhawk_is_removed_from_power = yes
		DEN_communists_takes_over = yes
	}

	option = { #Neutral
		name = denmark_political_events.8.c
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				neutrality > 0.3
			}
			modifier = {
				factor = 10
				neutrality > 0.4
			}
			modifier = {
				factor = 15
				neutrality > 0.5
			}
		}
		trigger = {
			check_variable = { DEN_neutrality_popularity > 24 }
		}
		DEN_dove_is_removed_from_power = yes
		DEN_bondepartiet_takes_over = yes
	}

	option = { #fascism
		name = denmark_political_events.8.d
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				fascism > 0.3
			}
			modifier = {
				factor = 10
				fascism > 0.4
			}
			modifier = {
				factor = 15
				fascism > 0.5
			}
		}
		trigger = {
			check_variable = { DEN_fascism_popularity > 24 }
		}
		DEN_dove_is_removed_from_power = yes
		DEN_fascists_takes_over = yes
	}
}

country_event = { #Democratic Leader
	id = denmark_political_events.9
	title = denmark_political_events.9.t
	desc = denmark_political_events.9.desc
	picture = GFX_report_event_DEN_danish_politics

	is_triggered_only = yes

	option = { #Social Democrat
		name = denmark_political_events.9.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 10
				DEN_historical_ai = yes
			}
		}
		DEN_warhawk_is_removed_from_power = yes
		DEN_socialdemokratiet_takes_over = yes
	}

	option = { #Venstre
		name = denmark_political_events.9.b
		ai_chance = {
			base = 1
		}	
		DEN_warhawk_is_removed_from_power = yes
		DEN_venstre_takes_over = yes
	}

	option = { #Conservative
		name = denmark_political_events.9.c
		ai_chance = {
			base = 1
			modifier = {
				factor = 10
				DEN_rearming_ai = yes
			}
		}	
		DEN_dove_is_removed_from_power = yes
		DEN_konservative_takes_over = yes
	}
}

country_event = { #Political Opposition
	id = denmark_political_events.10
	title = denmark_political_events.10.t
	desc = denmark_political_events.10.desc
	picture = GFX_report_event_DEN_danish_politics

	trigger = {
		tag = DEN
		has_elections = yes
		OR = {
			has_government = communism
			has_government = fascism
		}
		NOT = { has_country_flag = DEN_opposition_propaganda_flag }
	}

	mean_time_to_happen = {
		days = 180
	}

	option = { #fascist lies!
		name = denmark_political_events.10.a
		ai_chance = {
			base = 2
		}
		trigger = {
			has_government = communism
		}
		set_country_flag = DEN_opposition_propaganda_flag
		add_timed_idea = {
			idea = DEN_fascist_propaganda_ns
			days = 180
		}
	}

	option = { #commie lies!
		name = denmark_political_events.10.b
		ai_chance = {
			base = 2
		}	
		trigger = {
			has_government = fascism
		}
		set_country_flag = DEN_opposition_propaganda_flag
		add_timed_idea = {
			idea = DEN_communist_propaganda_ns
			days = 180
		}
	}
}

country_event = { #Political Opposition
	id = denmark_political_events.11
	title = denmark_political_events.11.t
	desc = denmark_political_events.11.desc
	picture = GFX_report_event_DEN_exiled_king

	trigger = {
		tag = DEN
		has_government = communism
		NOT = { has_country_flag = DEN_exiled_royal_family }
		NOT = { has_idea = DEN_monarchist_discontent_ns }
	}

	mean_time_to_happen = {
		days = 180
	}

	option = { #Damn Royalists!
		name = denmark_political_events.11.a
		add_timed_idea = {
			idea = DEN_monarchist_discontent_ns
			days = 365
		}
	}
}

###########################
###########################
#### OCCUPATION EVENTS ####
###########################
###########################

country_event = { #Someone attacked us :'(
	id = denmark_occupation_event.1
	title = denmark_occupation_event.1.t
	desc = denmark_occupation_event.1.desc
	picture = GFX_report_event_DEN_danish_troops

	trigger = {
		is_subject = no
	}

	is_triggered_only = yes

	fire_only_once = yes

	option = { #Surrender
		name = denmark_occupation_event.1.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 2
				DEN_historical_ai = yes
			}
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
			modifier = {
				factor = 5
				enemies_strength_ratio > 0.5
			}
			modifier = {
				factor = 5
				FROM = { is_major = yes }
			}
			modifier = { #This should never happen
				factor = 0.5
				any_allied_country = {
					is_major = yes
					capital_scope = { is_on_continent = europe}
				}
			}
		}
			
		if = {
			limit = {
				has_dlc = "By Blood Alone"
			}
			remove_ideas = {
				DEN_declaration_of_neutrality
			}
			else = {
				remove_ideas = {
					DEN_declaration_of_neutrality_no_BBA
				}
			}
		}

		add_popularity = { 
			ideology = ROOT 
			popularity = -0.025
		}

		FROM = { country_event = { id = denmark_occupation_event.2 hours = 6 } }	

		custom_effect_tooltip = if_they_accept_tt
		effect_tooltip = {
			FROM = { puppet = ROOT }
			custom_effect_tooltip = DEN_denmark_keeps_government_form_tt
			set_rule = { can_join_factions = no }
			set_rule = { can_decline_call_to_war = yes }
			DEN_limited_manpower = yes
		}

		hidden_effect = {
			clr_country_flag = DEN_neutrality_flag
			SWE_is_denmark_mostly_occupied = yes
		}
	}
	option = { #Fight On!
		name = denmark_occupation_event.1.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				FROM = { is_major = no }
			}
			modifier = {
				factor = 5
				enemies_strength_ratio < 0.5
			}
			modifier = {
				factor = 5
				OR = {
					DEN_rearming_ai = yes
					DEN_royal_ai = yes								
					DEN_fascist_ai = yes
				}
			}
		}
		add_stability = -0.15
		
		if = {
			limit = {
				has_dlc = "By Blood Alone"
			}
			remove_ideas = {
				DEN_declaration_of_neutrality
			}
			else = {
				remove_ideas = {
					DEN_declaration_of_neutrality_no_BBA
				}
			}
		}

		hidden_effect = { #TODO_DANNE; can I remove the neutrality_flag?
			clr_country_flag = DEN_neutrality_flag
		}
		hidden_effect = {
			play_song = "danish_song_of_liberation"
		}
	}
}

country_event = { #Denmark wants to become a puppet
	id = denmark_occupation_event.2
	title = denmark_occupation_event.2.t
	desc = denmark_occupation_event.2.desc
	picture = GFX_report_event_DEN_denmark_surrenders

	is_triggered_only = yes

	option = { #Accept puppet
		name = denmark_occupation_event.2.a
		ai_chance = {
			base = 5
		}
		add_political_power = 50

		effect_tooltip = {
			ROOT = { puppet = FROM }
			custom_effect_tooltip = DEN_denmark_keeps_government_form_tt
			FROM = {
				DEN_limited_manpower = yes
				set_rule = { can_join_factions = no }
				set_rule = { can_decline_call_to_war = yes }
				add_dynamic_modifier = { modifier = DEN_occupation_laws_dynamic_modifier }
				add_to_variable = {
					DEN_occupation_laws_cic_to_overlord = 0.15
					tooltip = cic_to_overlord_factor_tt
				}
				add_to_variable = {
					DEN_occupation_laws_mic_to_overlord = 0.15
					tooltip = mic_to_overlord_factor_tt
				}
			}

			every_state = {
				limit = {
					is_controlled_by = ROOT 
					is_core_of = FROM 
				}
				transfer_state_to = FROM
			}

			ROOT = {
				add_ideas = DEN_sahnefront_ns
			}
		}

		set_variable = { DEN.DEN_overlord_nation = ROOT }

		FROM = { country_event = { id = denmark_occupation_event.3 hours = 6 } }
	}

	option = { #Fight on
		name = denmark_occupation_event.2.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
		add_stability = -0.1
		add_war_support = 0.05

		FROM = { country_event = { id = denmark_occupation_event.5 hours = 6 } }
	}
}

country_event = { #Denmark becomes a puppet
	id = denmark_occupation_event.3
	title = denmark_occupation_event.3.t
	desc = denmark_occupation_event.3.desc
	picture = GFX_report_event_DEN_german_tanks

	immediate = { #Denmark keeps it government form, so save party popularities
		set_variable = { DEN_democratic_popularity = DEN.party_popularity_100@democratic }
		clamp_variable = {
			var = DEN_democratic_popularity
			min = 0
			max = 100
		}
		set_variable = { DEN_communism_popularity = DEN.party_popularity_100@communism }
		clamp_variable = {
			var = DEN_communism_popularity
			min = 0
			max = 100
		}
		set_variable = { DEN_neutrality_popularity = DEN.party_popularity_100@neutrality }
		clamp_variable = {
			var = DEN_neutrality_popularity
			min = 0
			max = 100
		}
		set_variable = { DEN_fascism_popularity = DEN.party_popularity_100@fascism }
		clamp_variable = {
			var = DEN_fascism_popularity
			min = 0
			max = 100
		}
		hidden_effect = {
			set_global_flag = achievement_den_has_never_been_puppeted
			set_country_flag = DEN_is_protectorate_flag
		}
		if = {
			limit = {
				has_government = democratic
			}
			set_country_flag = DEN_is_democratic_flag
		}
		if = {
			limit = {
				has_government = neutrality
			}
			set_country_flag = DEN_is_neutral_flag
		}
		if = {
			limit = {
				has_government = communism
			}
			set_country_flag = DEN_is_communistic_flag
		}
		if = {
			limit = {
				has_government = fascism
			}
			set_country_flag = DEN_is_fascist_flag
		}
	}

	is_triggered_only = yes

	option = { #Becomes puppet
		name = denmark_occupation_event.3.a
		hidden_effect = {
			set_global_flag = DEN_white_peacing_everyone_flag #Necessary to NOT trigger the Achievement "You Shall Not Pass"
		}
		add_stability = -0.15
		add_war_support = -0.05

		FROM = { puppet = ROOT }
		custom_effect_tooltip = DEN_denmark_keeps_government_form_tt
		ROOT = {
			set_rule = { can_join_factions = no	}
			set_rule = { can_decline_call_to_war = yes }
			set_country_flag = DEN_cannot_join_factions_flag
			set_rule = {
	    		desc = can_access_market #TODO From Nikko: This needs to be localized as to why denamrk cannot access market.
	    		can_access_market = no
			}

			if = {
				limit = {
					has_dlc = "La Resistance"
				}
				set_rule = { contributes_operatives = no	}
			}
			DEN_limited_manpower = yes

			add_dynamic_modifier = { modifier = DEN_occupation_laws_dynamic_modifier }
			add_to_variable = {
				DEN_occupation_laws_cic_to_overlord = 0.15
				tooltip = cic_to_overlord_factor_tt
			}
			add_to_variable = {
				DEN_occupation_laws_mic_to_overlord = 0.15
				tooltip = mic_to_overlord_factor_tt
			}

			set_cosmetic_tag = DEN_occupied_denmark
		}

		every_state = {
			limit = {
				is_controlled_by = FROM 
				is_core_of = ROOT
			}
			transfer_state_to = ROOT
		}
		if = {
			limit = {
				has_wargoal_against = FROM
			}
			remove_wargoal = {
			    type = all
			    target = FROM
			}
		}

		set_power_balance = { #New BoP for DEN
			id = DEN_occupation_balance
			left_side = DEN_annexation_side
			right_side = DEN_autonomy_side	
			set_value = 0.2
		}
			
		hidden_effect = {
			set_popularities = { #Denmark keeps it government form
				democratic = DEN_democratic_popularity
				fascism = DEN_fascism_popularity
				communism = DEN_communism_popularity
				neutrality = DEN_neutrality_popularity
			}
			if = {
				limit = {
					has_country_flag = DEN_is_democratic_flag
				}
				set_politics = { ruling_party = democratic }
			}
			if = {
				limit = {
					has_country_flag = DEN_is_neutral_flag
				}
				set_politics = { ruling_party = neutrality }
			}
			if = {
				limit = {
					has_country_flag = DEN_is_communistic_flag
				}
				set_politics = { ruling_party = communism }
			}
			if = {
				limit = {
					has_country_flag = DEN_is_fascist_flag
				}
				set_politics = { ruling_party = fascism }
			}

			set_country_flag = DEN_has_occupation_flag

			leave_faction = yes

			ROOT = {
				country_event = { id = denmark_occupation_event.4 }
			}
			
			mark_focus_tree_layout_dirty = yes

		}
		FROM = {
			add_ideas = DEN_sahnefront_ns
		}
		hidden_effect = {
			every_other_country = {
				limit = {
					has_war_with = FROM
					has_war_with = ROOT
				}
				white_peace = ROOT
			}

			play_song =  "rising_tension"
		}
	}
}

country_event = { #Denmark keeps elections
	id = denmark_occupation_event.4
	title = denmark_occupation_event.4.t
	desc = denmark_occupation_event.4.desc
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes

	hidden = yes

	option = { #Allow Elections if DEN had it before the invasion
		name = denmark_occupation_event.4.a
		
		if = {
			limit = {
				has_government = democratic
			}
			set_politics = { 
				ruling_party = democratic 
				elections_allowed = yes
			}
		}
		if = {
			limit = {
				has_government = neutrality
			}
			if = {
				limit = {
					NOT = { #Checks if DEN had elections before the invasion
						has_country_flag = DEN_banned_elections
					}
				}
				set_politics = { 
					ruling_party = neutrality
					elections_allowed = yes
				}
			}
			else = {
				set_politics = { 
					ruling_party = neutrality
				}
			}
		}
		if = {
			limit = {
				has_government = communism
			}
			if = {
				limit = {
					NOT = { #Checks if DEN had elections before the invasion
						has_country_flag = DEN_banned_elections
					}
				}
				set_politics = { 
					ruling_party = communism
					elections_allowed = yes
				}
			}
			else = {
				set_politics = { 
					ruling_party = communism
				}
			}
		}
		if = {
			limit = {
				has_government = fascism
			}
			if = {
				limit = {
					NOT = { #Checks if DEN had elections before the invasion
						has_country_flag = DEN_banned_elections
					}
				}
				set_politics = { 
					ruling_party = fascism
					elections_allowed = yes
				}
			}
			else = {
				set_politics = { 
					ruling_party = fascism
				}
			}
		}
		clr_global_flag = DEN_white_peacing_everyone_flag
	}
}

country_event = { #Denmark is refused to become a puppet
	id = denmark_occupation_event.5
	title = denmark_occupation_event.5.t
	desc = denmark_occupation_event.5.desc
	picture = GFX_report_event_DEN_resistance

	is_triggered_only = yes

	option = { #Fight on
		name = denmark_occupation_event.5.a
		if = {
			limit = {
				NOT = { 
					has_dynamic_modifier = { modifier = DEN_resistance_dynamic_modifier } 
				}
			}
			add_dynamic_modifier = { modifier = DEN_resistance_dynamic_modifier }
		}
		else = {
			custom_effect_tooltip = DEN_modify_danish_resistance_dynamic_modifier
		}
		add_to_variable = {
			DEN_resistance_target_on_our_occupied_states = 0.1
			tooltip = resistance_target_on_our_occupied_states_tt
		}
		add_to_variable = {
			DEN_resistance_compliance_growth_on_our_occupied_states = -0.1
			tooltip = compliance_growth_on_our_occupied_states_tt
		}
		add_to_variable = {
			DEN_resistance_damage_to_garrison_on_our_occupied_states = 0.1
			tooltip = resistance_damage_to_garrison_on_our_occupied_states_tt
		}
		hidden_effect = {
			play_song = "danish_song_of_liberation"
		}
	}
}

country_event = { #Denmark Declares Independence
	id = denmark_occupation_event.6
	title = denmark_occupation_event.6.t
	desc = denmark_occupation_event.6.desc
	picture = GFX_report_event_DEN_danish_troops

	is_triggered_only = yes

	option = { #War
		name = denmark_occupation_event.6.a
		ai_chance = {
			base = 2
			modifier = {
				factor = 5
				OR = {
					has_government = fascism
					has_government = communism
				}	
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value < 25
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value < 0
				} 
			}
			modifier = {
				factor = 5
				has_war_with_major = no
			}
			modifier = {
				factor = 5
				is_major = yes
			}
			modifier = {
				factor = 2
				FROM = {
					has_completed_focus = DEN_seek_independence
				}
			}
		}
		effect_tooltip = {
			ROOT = { end_puppet = FROM }
			FROM = {
				declare_war_on = {
					target = ROOT
					type = independence_wargoal 
				}
			}
		}	
		if = {
			limit = {
				has_idea = DEN_sahnefront_ns
			}
			remove_ideas = DEN_sahnefront_ns
		}
		FROM = { country_event = { id = denmark_occupation_event.7 hours = 1 }}
	}
	option = { #Let them leave
		name = denmark_occupation_event.6.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				FROM = {
					has_completed_focus = DEN_pledge_allegiance
				}
			}
			modifier = {
				factor = 10
				has_government = FROM
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				} 
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				} 
			}
			modifier = {
				factor = 10
				is_major = no
				has_war_with_major = yes
			}
			modifier = { #You're ain't goin' nowhere! Unless we really hurtin' :,(
				factor = 0.5
				surrender_progress < 0.5
			}
			modifier = { #Don't accept if installed the plenipotentiary
				factor = 0.5
				FROM = {
					has_country_leader_with_trait = DEN_plenipotentiary
				}
			}
		}
		effect_tooltip = {
			ROOT = { end_puppet = FROM }
		}	
		if = {
			limit = {
				has_idea = DEN_sahnefront_ns
			}
			remove_ideas = DEN_sahnefront_ns
		}
		FROM = { country_event = { id = denmark_occupation_event.8 hours = 1 }}
	}
}
country_event = { #Danish Liberation War
	id = denmark_occupation_event.7
	title = denmark_occupation_event.7.t
	desc = denmark_occupation_event.7.desc
	picture = GFX_report_event_DEN_danish_troops

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			if = {
				limit = {
					has_country_flag = DEN_is_protectorate_flag
				}
				clr_country_flag = DEN_is_protectorate_flag
			}
		}
	}

	option = { #Change Government form
		name = denmark_occupation_event.7.a
		ai_chance = {
			base = 5
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
			modifier = {
				factor = 5
				OR = {
					DEN_historical_ai = yes
					DEN_rearming_ai = yes
					DEN_royal_ai = yes
				}
			}
		}
		
		if = {
			limit = {
				has_completed_focus = DEN_form_the_danish_freedom_council
			}
			DEN_freedom_council_takes_over = yes
		}

		DEN_independence_war_effects = yes

		hidden_effect = {
			play_song = "danish_song_of_liberation"
		}

	}
	option = { #Keep current Government form
		name = denmark_occupation_event.7.b
		ai_chance = {
			base = 5 
			modifier = { #Don't keep ideology if it was forced upon Denmark
				factor = 0
				has_country_leader_with_trait = DEN_plenipotentiary
			}
			modifier = { 
				factor = 10
				has_government = fascism
				DEN_fascist_ai = yes
			}
		}
		trigger = {
			has_government = fascism
			has_government = communism
		}

		DEN_independence_war_effects = yes

		if = { #If the Overlord installed a country leader of their own, that dude needs to go for ever
			limit = {	
				has_country_leader_with_trait = DEN_plenipotentiary
			}
			retire_country_leader = yes
		}

		hidden_effect = {
			play_song = "danish_song_of_liberation"
		}
	}
}
country_event = { #Denmark becomes independent peacefully
	id = denmark_occupation_event.8
	title = denmark_occupation_event.8.t
	desc = denmark_occupation_event.8.desc
	picture = GFX_report_event_DEN_celebration

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			if = {
				limit = {
					has_country_flag = DEN_is_protectorate_flag
				}
				clr_country_flag = DEN_is_protectorate_flag
			}
		}
	}

	option = { 
		name = denmark_occupation_event.8.a
		
		var:DEN.DEN_overlord_nation = { end_puppet = ROOT }
		DEN_drop_occupation_tag = yes
		if = {
			limit = {
				NOT = {
					has_completed_focus = DEN_pledge_allegiance
				}
			}
			IF = {
				limit = {
					FROM = { is_in_faction_with = ROOT }
				}
				ROOT = { leave_faction = yes }
			}
			every_other_country = {
				limit = {
					has_war_with = FROM
					has_war_with = ROOT
				}
				white_peace = ROOT
			}
		}

		if = { #If the Overlord installed a country leader of their own, that dude needs to go for ever
			limit = {	
				has_country_leader_with_trait = DEN_plenipotentiary
			}
			retire_country_leader = yes
		}

		DEN_restore_manpower = yes

		if = {
			limit = {
				OR = {
					has_dynamic_modifier = { modifier = DEN_resistance_dynamic_modifier }
					has_dynamic_modifier = { modifier = DEN_resistance_dynamic_modifier_improved } 
				}
			}
			if = {
				limit = {
					has_dynamic_modifier = { modifier = DEN_resistance_dynamic_modifier }
				}
				remove_dynamic_modifier = { modifier = DEN_resistance_dynamic_modifier }
			}
			else_if = {
				limit = {
					has_dynamic_modifier = { modifier = DEN_resistance_dynamic_modifier_improved } 
				}
				remove_dynamic_modifier = { modifier = DEN_resistance_dynamic_modifier_improved }
			}
		}

		set_power_balance = {
			id = DEN_balance_of_power
			left_side = DEN_welfare_side
			right_side = DEN_warfare_side
			set_value = 0
		}

		if = {
			limit = {
				has_country_flag = DEN_create_danish_brigades_flag
			}
			set_division_template_lock = {
			    division_template = "Danske Brigade"
			    is_locked = no
			}
			37 = {
				create_unit = { 
					division = "name = \"1. Brigade\" division_template = \"Danske Brigade\" start_experience_factor = 0.6" 
					owner = ROOT
				}
				create_unit = { 
					division = "name = \"2. Brigade\" division_template = \"Danske Brigade\" start_experience_factor = 0.6" 
					owner = ROOT
				}
				create_unit = { 
					division = "name = \"3. Brigade\" division_template = \"Danske Brigade\" start_experience_factor = 0.6" 
					owner = ROOT
				}
				create_unit = { 
					division = "name = \"4. Brigade\" division_template = \"Danske Brigade\" start_experience_factor = 0.6" 
					owner = ROOT
				}
			}
		}

		DEN_activate_bought_ships = yes #Denmark receives the Destroyers it bought

		hidden_effect = {
			play_song = "danish_song_of_liberation"
		}
	}
}

country_event = { #Coordinate Strikes
	id = denmark_occupation_event.10
	title = denmark_occupation_event.10.t
	desc = denmark_occupation_event.10.desc
	picture = GFX_report_event_generic_strike

	is_triggered_only = yes

	option = { 
		name = denmark_occupation_event.10.a
		ai_chance = {
			base = 1
		}
		custom_effect_tooltip = DEN_modify_occupation_laws_dynamic_modifier
		add_to_variable = {
			DEN_occupation_laws_cic_to_overlord = -0.05
			tooltip = cic_to_overlord_factor_tt
		}
		add_to_variable = {
			DEN_occupation_laws_mic_to_overlord = -0.05
			tooltip = mic_to_overlord_factor_tt
		}
	}
}
country_event = { #Strikes Ends
	id = denmark_occupation_event.11
	title = denmark_occupation_event.11.t
	desc = denmark_occupation_event.11.desc
	picture = GFX_report_event_gathering_protest

	is_triggered_only = yes

	option = { 
		name = denmark_occupation_event.11.a

		custom_effect_tooltip = DEN_modify_occupation_laws_dynamic_modifier
		add_to_variable = {
			DEN_occupation_laws_cic_to_overlord = 0.05
			tooltip = cic_to_overlord_factor_tt
		}
		add_to_variable = {
			DEN_occupation_laws_mic_to_overlord = 0.05
			tooltip = mic_to_overlord_factor_tt
		}
	}
}

country_event = { #Raid Depots
	id = denmark_occupation_event.20
	title = denmark_occupation_event.20.t
	desc = denmark_occupation_event.20.desc
	picture = GFX_report_event_DEN_resistance

	is_triggered_only = yes

	option = { 
		name = denmark_occupation_event.20.a
		add_equipment_to_stockpile = {
			type = infantry_equipment
			amount = 500
			producer = DEN
		}
		DEN_modify_overlord_relations_small = yes
	}
}

country_event = { #Sabotage Civilian Industry
	id = denmark_occupation_event.30
	title = denmark_occupation_event.30.t
	desc = denmark_occupation_event.30.desc
	picture = GFX_report_event_DEN_sabotage

	is_triggered_only = yes

	option = { 
		name = denmark_occupation_event.30.a
		DEN_modify_overlord_relations_big = yes

		custom_effect_tooltip = DEN_modify_occupation_laws_dynamic_modifier
		add_to_variable = {
			DEN_occupation_laws_cic_to_overlord = -0.1
			tooltip = cic_to_overlord_factor_tt
		}
	}
}

country_event = { #Sabotage Military Industry
	id = denmark_occupation_event.40
	title = denmark_occupation_event.40.t
	desc = denmark_occupation_event.40.desc
	picture = GFX_report_event_DEN_sabotage

	is_triggered_only = yes

	option = { 
		name = denmark_occupation_event.40.a
		DEN_modify_overlord_relations_big = yes

		custom_effect_tooltip = DEN_modify_occupation_laws_dynamic_modifier
		add_to_variable = {
			DEN_occupation_laws_mic_to_overlord = -0.1
			tooltip = mic_to_overlord_factor_tt
		}
	}
}

country_event = { #Denmark asks overlord to join faction
	id = denmark_occupation_event.100
	title = denmark_occupation_event.100.t
	desc = denmark_occupation_event.100.desc
	picture = GFX_report_event_DEN_fascist_troops

	is_triggered_only = yes

	option = { #Let them join
		name = denmark_occupation_event.100.a
		ai_chance = {
			base = 10
			modifier = {
				factor = 1.5
				has_opinion = {
					target = FROM
					value > 0
				} 
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				} 
			}
			modifier = {
				factor = 1.5
				FROM = { 
					power_balance_value = {
						id = DEN_occupation_balance
						value < 0
					}
				}
			}
			modifier = {
				factor = 2
				FROM = { 
					power_balance_value = {
						id = DEN_occupation_balance
						value < -0.3
					}
				}
			}
		}

		effect_tooltip = {
			ROOT = {
				add_to_faction = FROM
			}
			
			FROM = {
				OVERLORD = {
					add_opinion_modifier = {
						modifier = DEN_cooperative_subject
						target = DEN
					}
				}
			}
		}
		FROM = { country_event = { id = denmark_occupation_event.101 days = 2 } }
	}
	option = { #Reject them
		name = denmark_occupation_event.100.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 20
				has_opinion = {
					target = FROM
					value < 1
				} 
			}
		}
		FROM = { country_event = { id = denmark_occupation_event.102 days = 2 } }
	}
}
country_event = { #Denmark joins overlord's faction
	id = denmark_occupation_event.101
	title = denmark_occupation_event.101.t
	desc = denmark_occupation_event.101.desc
	picture = GFX_report_event_DEN_fascist_troops

	is_triggered_only = yes

	option = { #Great
		name = denmark_occupation_event.101.a
		add_popularity = {
		    ideology = var:DEN.DEN_overlord_nation
		    popularity = 0.1
		}

		set_country_flag = DEN_unlock_military_branch_flag
		custom_effect_tooltip = DEN_unlock_military_branch_tt

		if = {
			limit = {	
				has_country_flag = DEN_cannot_join_factions_flag
			}
			set_rule = { can_join_factions = yes }
			set_rule = { can_decline_call_to_war = no }
			clr_country_flag = DEN_cannot_join_factions_flag
		}

		FROM = {
			add_to_faction = ROOT
		}

		hidden_effect = {
			if = {
				limit = {
					has_country_flag = DEN_is_protectorate_flag
				}
				clr_country_flag = DEN_is_protectorate_flag
			}
		}

		DEN_restore_manpower = yes

		OVERLORD = {
			add_opinion_modifier = {
				modifier = DEN_cooperative_subject
				target = DEN
			}
		}
		mark_focus_tree_layout_dirty = yes
	}
}
country_event = { #Denmark is rejected
	id = denmark_occupation_event.102
	title = denmark_occupation_event.102.t
	desc = denmark_occupation_event.102.desc
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = { #Damn
		name = denmark_occupation_event.102.a
		if = {
			limit = {
				has_completed_focus = DEN_pledge_allegiance
			}
			complete_national_focus = DEN_sanction_sabotages
		}

		DEN_bop_occupation_low_decrease_effect = yes
	}
}

country_event = { #Denmark pledges allegiance
	id = denmark_occupation_event.110
	title = denmark_occupation_event.110.t
	desc = denmark_occupation_event.110.desc
	picture = GFX_report_event_DEN_fascist_troops

	is_triggered_only = yes

	option = { #Accept Allegiance
		name = denmark_occupation_event.110.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 1.5
				has_opinion = {
					target = FROM
					value > 0
				} 
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				} 
			}
			modifier = {
				factor = 1.5
				FROM = { 
					power_balance_value = {
						id = DEN_occupation_balance
						value < 0
					}
				}
			}
			modifier = {
				factor = 2
				FROM = { 
					power_balance_value = {
						id = DEN_occupation_balance
						value < -0.3
					}
				}
			}
		}
		hidden_effect = {
			set_country_flag = DEN_accepted_danish_allegiance_flag
		}

		effect_tooltip = {
			FROM = {
				if = {
					limit = {	
						has_country_flag = DEN_cannot_join_factions_flag
					}
					set_rule = { can_join_factions = yes }
					set_rule = { can_decline_call_to_war = no }
				}
			}
		}

		FROM = {
			OVERLORD = {
				add_opinion_modifier = {
					modifier = DEN_cooperative_subject
					target = DEN
				}
			}
		}
		FROM = { country_event = { id = denmark_occupation_event.111 days = 2 } }
	}
	option = { #Reject Allegiance
		name = denmark_occupation_event.110.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 20
				has_opinion = {
					target = FROM
					value < 1
				} 
			}
		}
		FROM = { country_event = { id = denmark_occupation_event.112 days = 2 } }
	}
}
country_event = { #Overlord accepts allegiance
	id = denmark_occupation_event.111
	title = denmark_occupation_event.111.t
	desc = denmark_occupation_event.111.desc
	picture = GFX_report_event_DEN_fascist_troops

	is_triggered_only = yes

	option = { #Great
		name = denmark_occupation_event.111.a
		add_political_power = 50
		add_stability = 0.05
		add_war_support = 0.05
		add_popularity = {
		    ideology = var:DEN.DEN_overlord_nation
		    popularity = 0.05
		}

		if = {
			limit = {	
				has_country_flag = DEN_cannot_join_factions_flag
			}
			set_rule = { can_join_factions = yes }
			set_rule = { can_decline_call_to_war = no }
			clr_country_flag = DEN_cannot_join_factions_flag
		}

		hidden_effect = {
			if = {
				limit = {
					has_country_flag = DEN_is_protectorate_flag
				}
				clr_country_flag = DEN_is_protectorate_flag
			}
		}

		OVERLORD = {
			add_opinion_modifier = {
				modifier = DEN_cooperative_subject
				target = DEN
			}
		}
	}
}
country_event = { #Overlord rejects allegiance
	id = denmark_occupation_event.112
	title = denmark_occupation_event.112.t
	desc = denmark_occupation_event.112.desc
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = { #Damn
		name = denmark_occupation_event.112.a
		complete_national_focus = DEN_sanction_sabotages

		DEN_bop_occupation_low_decrease_effect = yes
	}
}

###########################
###########################
#### RESISTANCE EVENTS ####
###########################
###########################

country_event = { #Denmark asks for support
	id = denmark_resistance_event.1
	title = denmark_resistance_event.1.t
	desc = denmark_resistance_event.1.desc
	picture = GFX_report_event_DEN_danish_politics

	is_triggered_only = yes

	option = { #Sure
		name = denmark_resistance_event.1.a
		ai_chance = {
			base = 2
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 5
				has_war_with = var:DEN.DEN_overlord_nation
			}
			modifier = {
				factor = 5
				has_war = no
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				} 
			}
		}
		FROM = { 
			country_event = { id = denmark_resistance_event.2 days = 2 } 
		}
		set_country_flag = DEN_supports_denmark_flag #TODO_DANNE this flag needs to be removed if the tag capitulates or is puppeted
		custom_effect_tooltip = DEN_supports_denmark_TT
		set_variable = { DEN.supporting_nation = ROOT }
	}
	option = { #Nope
		name = denmark_resistance_event.1.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_government = var:DEN.DEN_overlord_nation
			}
			modifier = {
				factor = 5
				has_civil_war = yes
			}
			modifier = {
				factor = 5
				has_capitulated = yes
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
		}
		FROM = { country_event = { id = denmark_resistance_event.3 days = 2 } }
	}
}
country_event = { #Denmark gets support
	id = denmark_resistance_event.2
	title = denmark_resistance_event.2.t
	desc = denmark_resistance_event.2.desc
	picture = GFX_report_event_generic_handshake

	is_triggered_only = yes

	option = { #Sure
		name = denmark_resistance_event.2.a
		ai_chance = {
			base = 1
		}
		add_war_support = 0.05
	}
}
country_event = { #Denmark is denied support
	id = denmark_resistance_event.3
	title = denmark_resistance_event.3.t
	desc = denmark_resistance_event.3.desc
	picture = GFX_report_event_military_planning

	is_triggered_only = yes

	option = { #Sure
		name = denmark_resistance_event.3.a
		ai_chance = {
			base = 1
		}		
		clr_country_flag = DEN_has_foreign_support_flag
	}
}

country_event = { #Denmark asks for weapons
	id = denmark_resistance_event.4
	title = denmark_resistance_event.4.t
	desc = denmark_resistance_event.4.desc
	picture = GFX_report_event_generic_rifles

	is_triggered_only = yes

	option = { #Sure
		name = denmark_resistance_event.4.a
		ai_chance = {
			base = 2
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 5
				has_war_with = var:DEN.DEN_overlord_nation
			}
			modifier = {
				factor = 5
				has_war = no
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				} 
			}
		}
		effect_tooltip = {
			DEN = {
				add_equipment_to_stockpile = {
					type = infantry_equipment_1
					amount = 1000
					producer = DEN.supporting_nation
				}
			}
		}

		DEN_weapon_delivery_effect = yes #counts the number of times this is done

		FROM = { 
			country_event = { id = denmark_resistance_event.5 days = 10 }
		}
	}
	option = { #Nope
		name = denmark_resistance_event.4.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_government = var:DEN.DEN_overlord_nation
			}
			modifier = {
				factor = 5
				has_civil_war = yes
			}
			modifier = {
				factor = 5
				has_capitulated = yes
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
		}
		FROM = { country_event = { id = denmark_resistance_event.6 days = 2 } }
	}
}
country_event = { #Denmark gets weapons
	id = denmark_resistance_event.5
	title = denmark_resistance_event.5.t
	desc = denmark_resistance_event.5.desc
	picture = GFX_report_event_generic_rifles

	is_triggered_only = yes

	option = { #Sure
		name = denmark_resistance_event.2.a #Intentional
		ai_chance = {
			base = 1
		}
		add_war_support = 0.025
		DEN = {
			add_equipment_to_stockpile = {
				type = infantry_equipment_1
				amount = 1000
				producer = DEN.supporting_nation
			}
		}
	}
}
country_event = { #Denmark is denied waepons
	id = denmark_resistance_event.6
	title = denmark_resistance_event.6.t
	desc = denmark_resistance_event.6.desc
	picture = GFX_report_event_military_planning

	is_triggered_only = yes

	option = { #Sure
		name = denmark_resistance_event.3.a #Intentional
		ai_chance = {
			base = 1
		}		
	}
}

country_event = { #Denmark wants to join faction
	id = denmark_resistance_event.7
	title = denmark_resistance_event.7.t
	desc = denmark_resistance_event.7.desc
	picture = GFX_report_event_DEN_danish_politics

	is_triggered_only = yes

	option = { #Sure
		name = denmark_resistance_event.7.a
		trigger = {
			OR = {
				is_in_faction = no
				is_faction_leader = yes
			}
		}
		ai_chance = {
			base = 2
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 5
				has_war_with = var:DEN.DEN_overlord_nation
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				} 
			}
		}		
		add_political_power = 50
		add_war_support = 0.05
		add_to_faction = FROM
		FROM = { country_event = { id = denmark_resistance_event.8 hours = 12 } }
	}
	option = { #Nope
		name = denmark_resistance_event.7.b
		trigger = {
			OR = {
				is_in_faction = no
				is_faction_leader = yes
			}
		}
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_government = var:DEN.DEN_overlord_nation
			}
			modifier = {
				factor = 5
				has_civil_war = yes
			}
			modifier = {
				factor = 5
				has_capitulated = yes
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value < 0
				}
			}
		}	
		add_political_power = -50
		add_war_support = -0.1
		add_stability = -0.1
		FROM = { country_event = { id = denmark_resistance_event.9 hours = 12 } }
	}

	option = { #We'll pass it on
		name = denmark_resistance_event.7.c
		trigger = {
			is_in_faction = yes
			is_faction_leader = no
		}
		ai_chance = {
			base = 2
		}		
		every_other_country = {
			limit = {
				is_in_faction_with = ROOT
				is_faction_leader = yes
			}
			country_event = { id = denmark_resistance_event.10 hours = 12 } 
		}
	}
}
country_event = { #Denmark joins faction
	id = denmark_resistance_event.8
	title = denmark_resistance_event.8.t
	desc = denmark_resistance_event.8.desc
	picture = GFX_report_event_generic_handshake

	is_triggered_only = yes

	option = { #Great!
		name = denmark_resistance_event.2.a #Intentional	
		add_political_power = 100
		add_war_support = 0.05
		FROM = {
			add_to_faction = DEN
		}
	}
}
country_event = { #Denmark is denied faction membership
	id = denmark_resistance_event.9
	title = denmark_resistance_event.9.t
	desc = denmark_resistance_event.9.desc
	picture = GFX_report_event_journalists_speech

	is_triggered_only = yes

	option = { #Damnit!
		name = denmark_resistance_event.9.a
		add_war_support = 0.05	
	}
}
country_event = { #Faction leader decides Denmark's fate 
	id = denmark_resistance_event.10
	title = denmark_resistance_event.10.t
	desc = denmark_resistance_event.10.desc
	picture = GFX_report_event_generic_handshake

	is_triggered_only = yes

	option = { #Sure
		name = denmark_resistance_event.10.a 
		ai_chance = {
			base = 2
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 5
				has_war_with = var:DEN.DEN_overlord_nation
			}
			modifier = {
				factor = 5
				has_war = no
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				} 
			}
		}	
		add_political_power = 25
		add_war_support = 0.05
		effect_tooltip = {
			add_to_faction = DEN
		}
		DEN = { 
			country_event = { id = denmark_resistance_event.8 hours = 6 }
		}
	}
	option = { #Nope
		name = denmark_resistance_event.10.a 
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_government = var:DEN.DEN_overlord_nation
			}
			modifier = {
				factor = 5
				has_civil_war = yes
			}
			modifier = {
				factor = 5
				has_capitulated = yes
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value < 0
				}
			}
		}	
		DEN = { 
			country_event = { id = denmark_resistance_event.9 hours = 6 }
		}	
	}
}

country_event = { #Denmark provides intel
	id = denmark_resistance_event.11
	title = denmark_resistance_event.11.t
	desc = denmark_resistance_event.11.desc
	picture = GFX_report_event_generic_handshake

	is_triggered_only = yes

	option = { #Sure
		name = denmark_resistance_event.11.a 
		ai_chance = {
			base = 2
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 5
				has_war_with = var:DEN.DEN_overlord_nation
			}
			modifier = {
				factor = 5
				has_war = no
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				} 
			}
		}		

		if = {
			limit = {
				has_dlc = "La Resistance"
			}
			create_operative_leader = {
				name = "Flemming Muus"
				GFX = GFX_portrait_DEN_flemming_muus 
				traits = { operative_commando }
				bypass_recruitment = no
				available_to_spy_master = yes
				nationalities = { DEN }
			}
		}
		else = {
			add_tech_bonus = {
				name = DEN_danish_intel
				bonus = 0.25
				uses = 2
				category = encryption_tech
				category = decryption_tech
			}
			effect_tooltip = {
				DEN = {
					add_tech_bonus = {
						name = DEN_danish_intel
						bonus = 0.25
						uses = 2
						category = encryption_tech
						category = decryption_tech
					}
				}
			}
		}
		FROM = { 
			country_event = { id = denmark_resistance_event.12 days = 2 }
		}
	}
	option = { #Nope
		name = denmark_resistance_event.11.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_government = var:DEN.DEN_overlord_nation
			}
			modifier = {
				factor = 5
				has_civil_war = yes
			}
			modifier = {
				factor = 5
				has_capitulated = yes
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
		}
		FROM = { 
			country_event = { id = denmark_resistance_event.13 days = 2 }
		}	
	}
}
country_event = { #Denmark receives good news
	id = denmark_resistance_event.12
	title = denmark_resistance_event.12.t
	desc = denmark_resistance_event.12.desc
	picture = GFX_report_event_generic_handshake

	is_triggered_only = yes

	option = { #Great
		name = denmark_resistance_event.12.a
		if = {
			limit = {
				NOT = {
					has_dlc = "La Resistance"
				}
			}
			add_tech_bonus = {
				name = DEN_danish_intel
				bonus = 0.25
				uses = 2
				category = encryption_tech
				category = decryption_tech
			}
		}
	}
}
country_event = { #Denmark receives bad news
	id = denmark_resistance_event.13
	title = denmark_resistance_event.13.t
	desc = denmark_resistance_event.13.desc
	picture = GFX_report_event_journalists_speech

	is_triggered_only = yes

	option = { #Damnit!
		name = denmark_resistance_event.13.a	
	}
}

country_event = { #DEN ask Nation to host Danish Brigades
	id = denmark_resistance_event.20
	title = denmark_resistance_event.20.t
	desc = denmark_resistance_event.20.desc
	picture = GFX_report_event_DEN_danish_brigades

	is_triggered_only = yes

	option = { #Sure
		name = denmark_resistance_event.20.a
		ai_chance = {
			base = 2
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 5
				has_war_with = var:DEN.DEN_overlord_nation
			}
			modifier = {
				factor = 5
				has_war = no
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				} 
			}
		}
		add_war_support = 0.05
		army_experience = 25
		effect_tooltip = {
			give_military_access = DEN
		}
		FROM = { 
			country_event = { id = denmark_resistance_event.21 days = 2 } 
		}
		set_variable = { DEN.hosts_danish_brigades = ROOT }
	}
	option = { #Nope
		name = denmark_resistance_event.20.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_government = var:DEN.DEN_overlord_nation
			}
			modifier = {
				factor = 5
				has_civil_war = yes
			}
			modifier = {
				factor = 5
				has_capitulated = yes
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
		}
		FROM = { country_event = { id = denmark_resistance_event.22 days = 2 } }
	}
}
country_event = { #Denmark gets support
	id = denmark_resistance_event.21
	title = denmark_resistance_event.21.t
	desc = denmark_resistance_event.21.desc
	picture = GFX_report_event_DEN_danish_brigades

	is_triggered_only = yes

	option = { #Dejligt!
		name = denmark_resistance_event.2.a #Intentional
		
		army_experience = 10
		FROM = {
			give_military_access = DEN
		}
		custom_effect_tooltip = DEN_danish_brigade_template_tt
		division_template = {
			name = "Danske Brigade"
			is_locked = yes
			#force_allow_recruiting = yes
			priority = 1
			template_counter = 3
			regiments = {
				infantry = { x = 0 y = 0 }
				infantry = { x = 0 y = 1 }
				infantry = { x = 0 y = 2 }
				infantry = { x = 1 y = 0 }
				infantry = { x = 1 y = 1 }
				infantry = { x = 1 y = 2 }
			}
			support = {
			}
			override_model = DEN_infantry_alt_0_entity
		}
		hidden_effect = {
			set_country_flag = DEN_create_danish_brigades_flag
		}
	}
}
country_event = { #Denmark is denied support
	id = denmark_resistance_event.22
	title = denmark_resistance_event.22.t
	desc = denmark_resistance_event.22.desc
	picture = GFX_report_event_DEN_danish_brigades

	is_triggered_only = yes

	option = { #Sure
		name = denmark_resistance_event.3.a #Intentional
		
		clr_country_flag = DEN_ask_nation_to_host_the_brigades_flag
	}
}

country_event = { #Denmark asks to buy ships
	id = denmark_resistance_event.23
	title = denmark_resistance_event.23.t
	desc = denmark_resistance_event.23.desc
	picture = GFX_report_event_destroyers

	is_triggered_only = yes

	option = { #Sure
		name = denmark_resistance_event.23.a
		ai_chance = {
			base = 0
			modifier = {
				add = 25
				has_war_with = var:DEN.DEN_overlord_nation
			}
			modifier = {
				add = 10
				has_government = FROM
			}
			modifier = {
				add = 10
				has_opinion = {
					target = FROM
					value > 10
				}
			}
			modifier = {
				add = 10
				has_opinion = {
					target = FROM
					value > 40
				}
			}
			modifier = {
				add = 20
				has_opinion = {
					target = FROM
					value > 80
				}
			}
			modifier = {
				factor = 0
				OR = { 
					has_war_with = FROM
					has_civil_war = yes
					has_capitulated = yes
				}
			}
		}
		navy_experience = 5
		add_cic = 1500
		FROM = { 
			country_event = { id =denmark_resistance_event.24 days = 2 } 
		}
		set_country_flag = DEN_sold_ships_to_denmark_flag
	}
	option = { #Nope
		name = denmark_resistance_event.23.b
		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value < 0
				}
			}
		}
		FROM = { country_event = { id = denmark_resistance_event.25 days = 2 } }
	}
}
country_event = { #Denmark gets ships
	id = denmark_resistance_event.24
	title = denmark_resistance_event.24.t
	desc = denmark_resistance_event.24.desc
	picture = GFX_report_event_destroyers

	is_triggered_only = yes

	option = { #Noice
		name = denmark_resistance_event.2.a #Intentional
	}
}
country_event = { #Denmark is denied ships
	id = denmark_resistance_event.25
	title = denmark_resistance_event.25.t
	desc = denmark_resistance_event.25.desc
	picture = GFX_report_event_journalists_speech

	is_triggered_only = yes

	option = { #Who needs their crappy ships anyways
		name = denmark_resistance_event.3.a #Intentional	
	}
}

country_event = { #The King rides
	id = denmark_resistance_event.30
	title = denmark_resistance_event.30.t
	desc = denmark_resistance_event.30.desc
	picture = GFX_report_event_DEN_christian_x

	trigger = {
		original_tag = DEN
		is_subject = yes
		OR = {
			has_completed_focus = DEN_seek_independence
			has_completed_focus = DEN_sanction_sabotages
		}
		NOT = { has_country_flag = DEN_exiled_royal_family }
		has_character = DEN_christian_x
	}

	mean_time_to_happen = {
		days = 180
	}

	fire_only_once = yes

	option = { #Sure
		name = denmark_resistance_event.30.a 

		add_stability = 0.05
		add_war_support = 0.05

		if = {
			limit = {
				has_dynamic_modifier = { modifier = DEN_resistance_dynamic_modifier_improved } 
			}
			custom_effect_tooltip = DEN_modify_danish_resistance_dynamic_modifier
		}
		else_if = {
			limit = {
				NOT = { 
					has_dynamic_modifier = { modifier = DEN_resistance_dynamic_modifier } 
				}
			}
			add_dynamic_modifier = { modifier = DEN_resistance_dynamic_modifier }
		}
		else = {
			custom_effect_tooltip = DEN_modify_danish_resistance_dynamic_modifier
		}
		add_to_variable = {
			DEN_resistance_target_on_our_occupied_states = 0.05
			tooltip = resistance_target_on_our_occupied_states_tt
		}
		add_to_variable = {
			DEN_resistance_compliance_growth_on_our_occupied_states = -0.05
			tooltip = compliance_growth_on_our_occupied_states_tt
		}
	}
}

#########################
#########################
#### OVERLORD EVENTS ####
#########################
#########################

country_event = { #Denmark: Telegram Crisis Begins
	id = denmark_overlord_events.1
	title = denmark_overlord_events.1.t
	desc = denmark_overlord_events.1.desc
	picture = GFX_report_event_DEN_christian_x

	fire_only_once = yes

	immediate = {
		hidden_effect = { 
			set_country_flag = DEN_telegram_crisis_flag #For trackability's sake
		}
	}

	trigger = {
		tag = DEN
		is_subject = yes
		has_country_flag = DEN_has_occupation_flag
		NOT = { #Communists don't care about the King and democratic leader's don't get butthurt
			OR = {
				has_country_flag = DEN_exiled_royal_family 
				OVERLORD = {
					OR = {
						has_government = democratic
						has_government = communism
					}
				}
			}
		}
		OR = {
			power_balance_value = {
				id = DEN_occupation_balance
				value > 0.29
			}
			OVERLORD = {
				has_opinion = {
				    target = DEN
				    value < 0
				}
			}
		}
		OR = { #The Telegram Crisis was triggered after the Kings Birthday
			AND = {
				date > 1939.9.26 
				date < 1939.10.26
			}
			AND = {
				date > 1940.9.26 
				date < 1940.10.26
			}
			AND = {
				date > 1941.9.26 
				date < 1941.10.26
			}
			AND = {
				date > 1942.9.26
				date < 1942.10.26
			}
			AND = {
				date > 1943.9.26
				date < 1943.10.26
			}
			AND = {
				date > 1944.9.26
				date < 1944.10.26
			}
			AND = {
				date > 1945.9.26
				date < 1945.10.26
			}
		}
	} 

	#mean_time_to_happen = {
	#	days = 30
	#}

	option = { #Apologize
		name = denmark_overlord_events.1.a 
		ai_chance = {
			base = 10
			modifier = {
				factor = 5
				has_government = var:DEN.DEN_overlord_nation
			}
			modifier = {
				factor = 5
				DEN_historical_ai = yes
			}
			modifier = {
				factor = 2
				DEN_rearming_ai = yes
			}
		}		
		add_stability = -0.05
		add_war_support = -0.05
		if = {
			limit = {
				OR = {
					power_balance_value = {
						id = DEN_occupation_balance
						value > 0.3
					}
					OVERLORD = {
						has_opinion = {
						    target = DEN
						    value < -15
						}
					}
				}
			}
			DEN_modify_overlord_relations_big = yes
		}
		else = {
			DEN_modify_overlord_relations_small = yes
		}

		DEN_bop_occupation_low_decrease_effect = yes

		OVERLORD = { country_event = { id = denmark_overlord_events.2 days = 1 } } 
	}
	option = { #Let them be mad
		name = denmark_overlord_events.1.b
		ai_chance = {
			base = 5
			modifier = {
				factor = 5
				OVERLORD = {
					surrender_progress > 0.25
				}
			}
			modifier = {
				factor = 5
				OVERLORD = {
					surrender_progress > 0.5
				}
			}
			modifier = {
				factor = 10
				OVERLORD = {
					surrender_progress > 0.75
				}
			}
			modifier = {
				factor = 5
				OR = {
					DEN_royal_ai  = yes
					DEN_fascist_ai = yes
				}
			}
			modifier = {
				factor = 10
				ROOT = {
					power_balance_value = {
						id = DEN_occupation_balance
						value > 0.89
					}
				}
			}
		}		
		add_war_support = 0.05

		DEN_bop_occupation_very_low_increase_effect = yes
		
		DEN_modify_overlord_relations_big = yes

		OVERLORD = { country_event = { id = denmark_overlord_events.5 days = 1 } } 
	}
}
country_event = { #Overlord: Denmark tries to placate the Overlord
	id = denmark_overlord_events.2
	title = denmark_overlord_events.1.t #Intentional
	desc = denmark_overlord_events.2.desc
	picture = GFX_report_event_DEN_danish_politics

	is_triggered_only = yes

	option = { #Accept the Apology
		name = denmark_overlord_events.2.a 
		ai_chance = {
			base = 2
			modifier = {
				factor = 10
				has_government = FROM
			}
			modifier = {
				factor = 10
				is_in_faction_with = FROM
			}
		}
		add_political_power = 25
		FROM = { country_event = { id = denmark_overlord_events.3 days = 1 } } 
	}
	option = { #Refuse
		name = denmark_overlord_events.2.b
		ai_chance = {
			base = 5
			modifier = {
				factor = 5
				OR = {
					has_government = fascism
					has_government = communism
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value < -10
				} 
			}
			modifier = {
				factor = 2
				is_historical_focus_on = yes
				
			}
		}
		effect_tooltip = {
			FROM = {
				if = {
					limit = {
						has_dynamic_modifier = { modifier = DEN_occupation_laws_dynamic_modifier }
					}
					custom_effect_tooltip = DEN_modify_occupation_laws_dynamic_modifier
					add_to_variable = {
						DEN_occupation_laws_cic_to_overlord = 0.05
						tooltip = cic_to_overlord_factor_tt
					}
					add_to_variable = {
						DEN_occupation_laws_mic_to_overlord = 0.05
						tooltip = mic_to_overlord_factor_tt
					}
					add_to_variable = {
						DEN_occupation_laws_autonomy_gain = -0.1
						tooltip = autonomy_gain_tt
					}
				}
			}
		}
		unlock_decision_tooltip = DEN_demand_country_leader_resignation
		set_country_flag = DEN_overlord_can_demand_resignation_flag

		custom_effect_tooltip = DEN_deteriorating_subject_relations
		FROM = { country_event = { id = denmark_overlord_events.4 days = 1 } } 
	}
}
country_event = { #Denmark: Overlord accepts apology
	id = denmark_overlord_events.3
	title = denmark_overlord_events.3.t
	desc = denmark_overlord_events.3.desc
	picture = GFX_report_event_journalists_speech

	is_triggered_only = yes

	option = { #ok
		name = denmark_overlord_events.3.a 

		DEN_bop_occupation_very_low_decrease_effect = yes
	}
}
country_event = { #Denmark: Overlord refuses apology
	id = denmark_overlord_events.4
	title = denmark_overlord_events.4.t
	desc = denmark_overlord_events.4.desc
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = { #ok
		name = denmark_overlord_events.4.a 
		if = {
			limit = { #Just a precaution 
				has_dynamic_modifier = { modifier = DEN_occupation_laws_dynamic_modifier }
			}
			custom_effect_tooltip = DEN_modify_occupation_laws_dynamic_modifier
			add_to_variable = {
				DEN_occupation_laws_cic_to_overlord = 0.05
				tooltip = cic_to_overlord_factor_tt
			}
			add_to_variable = {
				DEN_occupation_laws_mic_to_overlord = 0.05
				tooltip = mic_to_overlord_factor_tt
			}
			add_to_variable = {
				DEN_occupation_laws_autonomy_gain = -0.1
				tooltip = autonomy_gain_tt
			}
		}
		DEN_bop_occupation_very_low_decrease_effect = yes

		DEN_modify_overlord_relations_small = yes
	}
}
country_event = { #Overlord: Denmark is being a shitty subject
	id = denmark_overlord_events.5
	title = denmark_overlord_events.1.t #Intentional
	desc = denmark_overlord_events.5.desc
	picture = GFX_report_event_DEN_danish_politics

	is_triggered_only = yes

	option = { #Let it slide
		name = denmark_overlord_events.5.a 
		ai_chance = {
			base = 2
			modifier = {
				factor = 10
				has_government = FROM
			}
		}
		add_political_power = -25
		FROM = { country_event = { id = denmark_overlord_events.6 days = 1 } } 
	}
	option = { #Crack down on Denmark
		name = denmark_overlord_events.5.b
		ai_chance = {
			base = 5
			modifier = {
				factor = 5
				OR = {
					has_government = fascism
					has_government = communism
				}
			}
			modifier = {
				factor = 2
				FROM = { 
					power_balance_value = {
						id = DEN_occupation_balance
						value > 0.6
					}
				}
			}
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
		}
		effect_tooltip = {
			FROM = {
				if = {
					limit = {
						has_dynamic_modifier = { modifier = DEN_occupation_laws_dynamic_modifier }
					}
					custom_effect_tooltip = DEN_modify_occupation_laws_dynamic_modifier
					add_to_variable = {
						DEN_occupation_laws_cic_to_overlord = 0.05
						tooltip = cic_to_overlord_factor_tt
					}
					add_to_variable = {
						DEN_occupation_laws_mic_to_overlord = 0.05
						tooltip = mic_to_overlord_factor_tt
					}
					add_to_variable = {
						DEN_occupation_laws_autonomy_gain = -0.1
						tooltip = autonomy_gain_tt
					}
				}
			}
		}
		unlock_decision_tooltip = DEN_demand_country_leader_resignation
		set_country_flag = DEN_overlord_can_demand_resignation_flag

		custom_effect_tooltip = DEN_deteriorating_subject_relations
		FROM = { country_event = { id = denmark_overlord_events.7 days = 1 } } 
	}
}
country_event = { #Denmark gets away with being freedom loving and shitty
	id = denmark_overlord_events.6
	title = denmark_overlord_events.6.t
	desc = denmark_overlord_events.6.desc
	picture = GFX_report_event_journalists_speech

	is_triggered_only = yes

	option = { #yay
		name = denmark_overlord_events.6.a 
		add_political_power = 50
		DEN_bop_occupation_very_low_increase_effect = yes
	}
}
country_event = { #Denmark: Overlord is angry
	id = denmark_overlord_events.7
	title = denmark_overlord_events.7.t
	desc = denmark_overlord_events.7.desc
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = { #ok
		name = denmark_overlord_events.7.a
		if = {
			limit = { #Just a precaution 
				has_dynamic_modifier = { modifier = DEN_occupation_laws_dynamic_modifier }
			}
			custom_effect_tooltip = DEN_modify_occupation_laws_dynamic_modifier
			add_to_variable = {
				DEN_occupation_laws_cic_to_overlord = 0.05
				tooltip = cic_to_overlord_factor_tt
			}
			add_to_variable = {
				DEN_occupation_laws_mic_to_overlord = 0.05
				tooltip = mic_to_overlord_factor_tt
			}
			add_to_variable = {
				DEN_occupation_laws_autonomy_gain = -0.1
				tooltip = autonomy_gain_tt
			}
		}
		DEN_bop_occupation_low_decrease_effect = yes

		DEN_modify_overlord_relations_big = yes
	}
}

country_event = { #Denmark: Overlord demands another country leader
	id = denmark_overlord_events.10
	title = denmark_overlord_events.10.t
	desc = denmark_overlord_events.10.desc
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = { #accept
		name = denmark_overlord_events.10.a 
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				DEN_historical_ai = yes
			}
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
			modifier = {
				factor = 2
				FROM = {
					is_major = yes
				}
			}
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				} 
			}
		}
		DEN_bop_occupation_low_decrease_effect = yes

		DEN_modify_overlord_relations_small = yes

		country_event = { id = denmark_overlord_events.11 days = 5 }
	}
	option = { #refuse
		name = denmark_overlord_events.10.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				OR = {
					DEN_rearming_ai = yes
					DEN_royal_ai = yes
					DEN_fascist_ai = yes
				}
			}
			modifier = {
				factor = 10
				ROOT = {
					power_balance_value = {
						id = DEN_occupation_balance
						value > 0.89
					}
				}
			}
		}
		DEN_bop_occupation_very_low_increase_effect = yes

		DEN_modify_overlord_relations_big = yes

		FROM = { country_event = { id = denmark_overlord_events.15 days = 1 } }
	}
}
country_event = { #Denmark: Choose new country leader
	id = denmark_overlord_events.11
	title = denmark_overlord_events.11.t
	desc = denmark_overlord_events.11.desc
	picture = GFX_report_event_DEN_danish_politics

	is_triggered_only = yes

	option = { #A Democratic Leader
		name = denmark_overlord_events.11.a 
		ai_chance = {
			base = 1
			modifier = {
				factor = 10
				OR = {
					DEN_historical_ai = yes
					DEN_rearming_ai = yes
				}
			}
			modifier = {
				factor = 5
				is_historical_focus_on = yes
			}
		}
		country_event = { id = denmark_overlord_events.12 days = 1 } 
	}
	option = { #Neutral Leader
		name = denmark_overlord_events.11.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 10
				DEN_royal_ai = yes
			}
		}
		trigger = {
			DEN_knud_bach = { is_country_leader = no }
		}
		if = {
			limit = {
				has_completed_focus = DEN_king_assumes_power
			}
			promote_character = DEN_knud_bach
			set_party_name = {
				ideology = neutrality
				name = DEN_neutrality_party
				long_name = DEN_neutrality_party_long
			}
		}
		else_if = {
			limit = {
				NOT = { has_government = neutrality }
			}
			set_politics = { 
				ruling_party = neutrality
			}	
		}
		FROM = { country_event = { id = denmark_overlord_events.14 days = 1 } }
	}
	option = { #Communist Leader
		name = denmark_overlord_events.11.c
		ai_chance = {
			base = 1
			modifier = {
				factor = 10
				communism > 0.35
			}
		}
		trigger= {
			DEN_aksel_larsen = { is_country_leader = no }
			OVERLORD = {
				NOT = { has_government = fascism }
				NOT = { has_government = democratic }
			}
			NOT = {
				has_government = communism
				has_country_flag = DEN_banned_communism_flag
				has_country_flag = banned_communism_flag
				DEN_aksel_larsen = {
					has_character_flag = DEN_political_agitator_flag
				}
			}
		}
		FROM = { country_event = { id = denmark_overlord_events.14 days = 1 } }
	}
	option = { #Fascist Leader
		name = denmark_overlord_events.11.d
		ai_chance = {
			base = 1
			modifier = {
				factor = 10
				DEN_fascist_ai = yes
			}
		}
		trigger= {
			OVERLORD = {
				NOT = { has_government = communism }
				NOT = { has_government = democratic }
			}
			NOT = {
				has_government = fascism
				has_country_flag = DEN_banned_fascism_flag
				has_country_flag = banned_fascism_flag
				AND = {
					DEN_cay_lembcke = {
						has_character_flag = DEN_political_agitator_flag
					}
					DEN_frits_clausen = {
						has_character_flag = DEN_political_agitator_flag
					}
				}
			}
		}
		if = {
			limit = {
				DEN_cay_lembcke = { is_country_leader = yes }
			} 
			promote_character = DEN_frits_clausen
		}
		else_if = {
			limit = {
				DEN_frits_clausen = { is_country_leader = yes }
			}
			promote_character = DEN_cay_lembcke
		}
		else = {
			country_event = { id = denmark_overlord_events.13 days = 1 } 
		}
	}
}
country_event = { #Denmark: Choose democratic country leader
	id = denmark_overlord_events.12
	title = denmark_overlord_events.11.t #Intentional
	desc = denmark_overlord_events.12.desc
	picture = GFX_report_event_DEN_danish_politics

	is_triggered_only = yes

	option = { #A Social Democrat
		name = denmark_overlord_events.12.a 
		ai_chance = {
			base = 1
		}
		trigger = {
			AND = {
				has_character = DEN_thorvald_stauning
				DEN_thorvald_stauning = { is_country_leader = no }
			}
			DEN_vilhelm_buhl = { is_country_leader = no }
		}
		DEN_socialdemokratiet_takes_over = yes
		OVERLORD = { country_event = { id = denmark_overlord_events.14 days = 1 } }
	}
	option = { #A Liberal Democrat
		name = denmark_overlord_events.12.b
		ai_chance = {
			base = 1
		}
		trigger= {
			DEN_knud_kristensen = { is_country_leader = no }
		}
		DEN_venstre_takes_over = yes
		OVERLORD = { country_event = { id = denmark_overlord_events.14 days = 1 } }
	}
	option = { #A Conservative Democrat
		name = denmark_overlord_events.12.c 
		ai_chance = {
			base = 1
			modifier = {
				factor = 10
				OR = {
					DEN_rearming_ai = yes
					DEN_royal_ai  = yes
					DEN_fascist_ai = yes
				}
			}
		}
		trigger= {
			DEN_christmas_moller = { is_country_leader = no }
			NOT = { 
				DEN_christmas_moller = {
					has_character_flag = DEN_political_agitator_flag
				}
			}
		}
		DEN_konservative_takes_over = yes
		OVERLORD = { country_event = { id = denmark_overlord_events.14 days = 1 } }
	}
	option = { #An Outsider
		name = denmark_overlord_events.12.d 
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				is_historical_focus_on = yes
			}
			modifier = {
				factor = 5
				OR = {
					DEN_historical_ai = yes
					DEN_rearming_ai = yes
				}
			}
		}
		trigger= {
			DEN_erik_scavenius = { is_country_leader = no }
		}
		DEN_erik_scavenius_takes_over = yes
		OVERLORD = { country_event = { id = denmark_overlord_events.14 days = 1 } }
	}
}
country_event = { #Denmark: Choose fascist country leader
	id = denmark_overlord_events.13
	title = denmark_overlord_events.11.t #Intentional
	desc = denmark_overlord_events.13.desc
	picture = GFX_report_event_DEN_fascist_troops

	is_triggered_only = yes

	option = {
		name = denmark_overlord_events.13.a 
		ai_chance = {
			base = 10
		}
		promote_character = DEN_frits_clausen
		DEN_fascists_takes_over = yes
		
	}
	option = { 
		name = denmark_overlord_events.13.b
		ai_chance = {
			base = 1
		}
		promote_character = DEN_cay_lembcke
		DEN_fascists_takes_over = yes
		
	}
}
country_event = { #Overlord: New Danish Leader
	id = denmark_overlord_events.14
	title = denmark_overlord_events.14.t
	desc = denmark_overlord_events.14.desc
	picture = GFX_report_event_DEN_danish_politics

	is_triggered_only = yes

	option = { #Good
		name = denmark_overlord_events.14.a 
		add_political_power = 25	
	}
}
country_event = { #Overlord: Denmark refuses to change leader
	id = denmark_overlord_events.15
	title = denmark_overlord_events.15.t
	desc = denmark_overlord_events.15.desc
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes

	option = { #Let it slide
		name = denmark_overlord_events.15.a 
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				}
			}
		}		
		add_political_power = -100
	}
	option = { #Crack down on Denmark
		name = denmark_overlord_events.15.b
		ai_chance = {
			base = 5
			modifier = {
				factor = 2
				FROM = { 
					power_balance_value = {
						id = DEN_occupation_balance
						value > 0.6
					}
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value < 25
				}
			}
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
		}	
		effect_tooltip = {
			FROM = {
				if = {
					limit = {
						NOT = {
							FROM = {
								has_government = ROOT
							}
						}
					}
					if = {
						limit = {
							has_dynamic_modifier = { modifier = DEN_occupation_laws_dynamic_modifier }
						}
						custom_effect_tooltip = DEN_modify_occupation_laws_dynamic_modifier
						add_to_variable = {
							DEN_occupation_laws_master_ideology_drift = 0.1
							tooltip = master_ideology_drift_tt
						}
					}
				}
				else_if = {
					limit = {
						has_dynamic_modifier = { modifier = DEN_occupation_laws_dynamic_modifier }
					}
					custom_effect_tooltip = DEN_modify_occupation_laws_dynamic_modifier
					add_to_variable = {
						DEN_occupation_laws_cic_to_overlord = 0.05
						tooltip = cic_to_overlord_factor_tt
					}
					add_to_variable = {
						DEN_occupation_laws_mic_to_overlord = 0.05
						tooltip = mic_to_overlord_factor_tt
					}
					add_to_variable = {
						DEN_occupation_laws_autonomy_gain = -0.1
						tooltip = autonomy_gain_tt
					}
				}
			}
		}
		custom_effect_tooltip = DEN_deteriorating_subject_relations
		FROM = { country_event = { id = denmark_overlord_events.16 days = 1 } } 
	}
	option = { #Install a leader of our own
		name = denmark_overlord_events.15.c
		ai_chance = {
			base = 2
			modifier = {
				factor = 5
				OR = {
					has_government = fascism
					has_government = communism
				}
			}
			modifier = {
				factor = 2
				FROM = { 
					power_balance_value = {
						id = DEN_occupation_balance
						value > 0.6
					}
				}
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
		}		
		trigger = {
			FROM = {
				power_balance_value = {
					id = DEN_occupation_balance
					value < -0.6
				}
			}
			ROOT = {
				has_opinion = {
				    target = DEN
				    value < 0
				}
			}
		}
		set_country_flag = DEN_overlord_installed_loyal_leader
		custom_effect_tooltip = DEN_deteriorating_subject_relations
		FROM = { country_event = { id = denmark_overlord_events.17 days = 1 } } 
	}
}
country_event = { #Denmark: Overlord cracks down
	id = denmark_overlord_events.16
	title = denmark_overlord_events.7.t #Intentional
	desc = denmark_overlord_events.16.desc
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = { #Damnit
		name = denmark_overlord_events.16.a 	
		if = {
			limit = {
				NOT = {
					FROM = {
						has_government = ROOT
					}
				}
			}
			if = {
				limit = {
					has_dynamic_modifier = { modifier = DEN_occupation_laws_dynamic_modifier }
				}
				custom_effect_tooltip = DEN_modify_occupation_laws_dynamic_modifier
				add_to_variable = {
					DEN_occupation_laws_master_ideology_drift = 0.1
					tooltip = master_ideology_drift_tt
				}
			}
		}
		else_if = {
			limit = {
				has_dynamic_modifier = { modifier = DEN_occupation_laws_dynamic_modifier }
			}
			custom_effect_tooltip = DEN_modify_occupation_laws_dynamic_modifier
			add_to_variable = {
				DEN_occupation_laws_cic_to_overlord = 0.05
				tooltip = cic_to_overlord_factor_tt
			}
			add_to_variable = {
				DEN_occupation_laws_mic_to_overlord = 0.05
				tooltip = mic_to_overlord_factor_tt
			}
			add_to_variable = {
				DEN_occupation_laws_autonomy_gain = -0.1
				tooltip = autonomy_gain_tt
			}
		}
		DEN_bop_occupation_very_low_decrease_effect = yes
		DEN_modify_overlord_relations_small = yes
	}
}
country_event = { #Denmark: Overlord installs new leader
	id = denmark_overlord_events.17
	title = denmark_overlord_events.17.t
	desc = denmark_overlord_events.17.desc
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			DEN_create_the_plenipotentiary = yes
		}
	}
	option = { #Comply...
		name = denmark_overlord_events.17.a 	
		ai_chance = {
			base = 5
			modifier = { 
				factor = 2
				is_historical_focus_on = yes
			}
			modifier = {
				factor = 2
				DEN_historical_ai = yes
			}
		}

		DEN_install_a_plenipotentiary = yes

		DEN_bop_occupation_medium_decrease_effect = yes

		effect_tooltip = {
			OVERLORD = {
				add_opinion_modifier = {
					modifier = DEN_cooperative_subject
					target = DEN
				}
			}
		}
		FROM = {
			country_event = { id = denmark_overlord_events.41 } 
		}
	}
	option = { #Refuse!
		name = denmark_overlord_events.17.b	
		ai_chance = {
			base = 2
			modifier = {
				factor = 5
				OR = {
					DEN_rearming_ai = yes
					DEN_royal_ai = yes				
					DEN_fascist_ai = yes
					has_government = communism
				}
			}
		}

		DEN_bop_occupation_low_increase_effect = yes

		DEN_modify_overlord_relations_big = yes

		FROM = {
			country_event = { id = denmark_overlord_events.42 } 
		}
	}
}

country_event = { #Denmark: Overlord wants a new government
	id = denmark_overlord_events.20
	title = denmark_overlord_events.20.t
	desc = denmark_overlord_events.20.desc
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = { #Comply
		name = denmark_overlord_events.20.a 
		ai_chance = {
			base = 2
			modifier = {
				factor = 5
				OVERLORD = {
					OR = {	
						has_government = democratic
						AND = {
							has_government = neutrality
							has_elections = yes
						}
					}
				}				
			}
			modifier = {
				factor = 5
				OR = {
					DEN_historical_ai = yes
					DEN_rearming_ai = yes
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				} 
			}
			modifier = {
				factor = 0
				OR = {	
					has_government = fascism
					has_government = communism
				}
			}
		}		
		DEN_bop_occupation_medium_decrease_effect = yes
		set_country_flag = DEN_forced_to_change_govenment_flag
		country_event = { id = denmark_overlord_events.21 days = 1 } 
	}
	option = { #Refuse
		name = denmark_overlord_events.20.b
		ai_chance = {
			base = 2
			modifier = {
				factor = 20
				OR = {	
					AND = {
						has_government = fascism
						DEN_fascist_ai = yes
					}
					AND = {
						has_government = communism
						communism > 0.5
					}
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value < 0
				} 
			}
		}		
		add_war_support = 0.05
		add_political_power = 25
		DEN_bop_occupation_low_increase_effect = yes
		DEN_modify_overlord_relations_big = yes
		set_country_flag = DEN_forced_to_change_govenment_flag
		FROM = { country_event = { id = denmark_overlord_events.24 days = 1 } } 
	}
}
country_event = { #Denmark: Chooses new Government form
	id = denmark_overlord_events.21
	title = denmark_overlord_events.21.t
	desc = denmark_overlord_events.21.desc
	picture = GFX_report_event_DEN_danish_politics

	is_triggered_only = yes

	option = { #A Democratic Government
		name = denmark_overlord_events.21.a 
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				OR = {
					DEN_historical_ai = yes
					DEN_rearming_ai = yes
				}
			}
			modifier = {
				factor = 5
				is_historical_focus_on = yes
			}
		}
		trigger = {
			OVERLORD = {
				OR = {	
					has_government = democratic
					AND = {
						has_government = neutrality
						has_elections = yes
					}
				}
			}
		}
		country_event = { id = denmark_overlord_events.22 days = 1 } 
	}
	option = { #Neutral Government
		name = denmark_overlord_events.21.b 
		ai_chance = {
			base = 1
			modifier = {
				factor = 10
				DEN_royal_ai = yes
			}
		}
		trigger = {
			OVERLORD = {
				OR = {	
					has_government = democratic
					AND = {
						has_government = neutrality
						has_elections = no
					}
				}
			}
		}
		set_politics = { 
			ruling_party = neutrality
		}	
		OVERLORD = { country_event = { id = denmark_overlord_events.23 days = 1 } }
	}
	option = { #Communist Government
		name = denmark_overlord_events.21.c
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				communism > 0.35
			}
		}
		trigger= {
			OVERLORD = {
				has_government = communism
			}
		}
		set_politics = { 
			ruling_party = communism
		}
		OVERLORD = { country_event = { id = denmark_overlord_events.23 days = 1 } }
	}
	option = { #Fascist Government
		name = denmark_overlord_events.21.d
		ai_chance = {
			base = 1
			modifier = {
				factor = 10
				DEN_fascist_ai = yes
			}
		}
		trigger= {
			OVERLORD = {
				has_government = fascism
			}
		}
		set_politics = { 
			ruling_party = fascism
		}
		OVERLORD = { country_event = { id = denmark_overlord_events.23 days = 1 }}
	}
}
country_event = { #Denmark: Choose democratic country leader
	id = denmark_overlord_events.22
	title = denmark_overlord_events.22.t
	desc = denmark_overlord_events.22.desc
	picture = GFX_report_event_DEN_danish_politics

	is_triggered_only = yes

	option = { #A Social Democrat
		name = denmark_overlord_events.12.a #Intentional
		ai_chance = {
			base = 1
			modifier = {
				factor = 10
				DEN_historical_ai = yes
				
			}
			modifier = {
				factor = 5
				is_historical_focus_on = yes
				
			}
		}
		DEN_socialdemokratiet_takes_over = yes
		OVERLORD = { country_event = { id = denmark_overlord_events.23 days = 1 } }
	}
	option = { #A Liberal Democrat
		name = denmark_overlord_events.12.b #Intentional
		ai_chance = {
			base = 1
		}
		DEN_venstre_takes_over = yes
		OVERLORD = { country_event = { id = denmark_overlord_events.23 days = 1 } }
	}
	option = { #A Conservative Democrat
		name = denmark_overlord_events.12.c #Intentional
		ai_chance = {
			base = 1
			modifier = {
				factor = 10
				DEN_rearming_ai = yes
			}
		}
		DEN_konservative_takes_over = yes
		OVERLORD = { country_event = { id = denmark_overlord_events.23 days = 1 } }
	}
}
country_event = { #Overlord: Denmark changed government form
	id = denmark_overlord_events.23
	title = denmark_overlord_events.23.t
	desc = denmark_overlord_events.23.desc
	picture = GFX_report_event_DEN_danish_politics

	is_triggered_only = yes

	option = { #Good
		name = denmark_overlord_events.23.a 
		add_political_power = 25
		hidden_effect = {
			set_country_flag = DEN_overlord_installed_loyalist_flag
		}
	}
}
country_event = { #Overlord: Denmark refuses to change government form
	id = denmark_overlord_events.24
	title = denmark_overlord_events.24.t
	desc = denmark_overlord_events.24.desc
	picture = GFX_report_event_DEN_danish_politics

	is_triggered_only = yes

	option = { #let it slide
		name = denmark_overlord_events.24.a 
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value > 49
				}
			}
		}
		add_political_power = -50
	}
	option = { #Install a new government form
		name = denmark_overlord_events.24.a 
		ai_chance = {
			base = 5
			modifier = {
				factor = 2
				FROM = { 
					power_balance_value = {
						id = DEN_occupation_balance
						value > 0.6
					}
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value < 25
				}
			}
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
		}
		effect_tooltip = {
			if = {
				limit = {
					ROOT = {
						has_government = fascism
					}
				}
				set_politics = { 
					ruling_party = fascism
				}
			}
			else_if = {
				limit = {
					ROOT = {
						has_government = communism
					}
				}
				set_politics = { 
					ruling_party = communism
				}
			}
			else_if = {
				limit = {
					ROOT = {
						has_government = neutrality
						has_elections = no
					}
				}
				DEN_the_king_takes_over = yes
			}
			else_if = {
				limit = {
					ROOT = {
						has_government = neutrality
						has_elections = yes
					}
				}
				if = {
					limit = {
						has_completed_focus = DEN_king_assumes_power
					}
					promote_character = DEN_knud_bach
					set_party_name = {
						ideology = neutrality
						name = DEN_neutrality_party
						long_name = DEN_neutrality_party_long
					}
				}
				else = {
					set_politics = { 
						ruling_party = neutrality
						elections_allowed = yes
					}	
				}
			}
			else_if = {
				limit = {
					ROOT = {
						has_government = democratic
					}
				}
				DEN_erik_scavenius_takes_over = yes
			}
		}
		FROM = { country_event = { id = denmark_overlord_events.25 days = 1 }}
	}
}

country_event = { #Denmark: Overlord tries to install its own government form
	id = denmark_overlord_events.25
	title = denmark_overlord_events.25.t
	desc = denmark_overlord_events.25.desc
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = { #Comply
		name = denmark_overlord_events.25.a 
		ai_chance = {
			base = 1
			modifier = {
				factor = 10
				DEN_historical_ai = yes
			}
			modifier = {
				factor = 5
				DEN_rearming_ai = yes
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value > 49
				}
			}
		}
		if = {
			limit = {
				FROM = {
					has_government = fascism
				}
			}
			set_politics = { 
				ruling_party = fascism
			}
		}
		else_if = {
			limit = {
				FROM = {
					has_government = communism
				}
			}
			set_politics = { 
				ruling_party = communism
			}
		}
		else_if = {
			limit = {
				FROM = {
					has_government = neutrality
					has_elections = no
				}
			}
			DEN_the_king_takes_over = yes
		}
		else_if = {
			limit = {
				FROM = {
					has_government = neutrality
					has_elections = yes
				}
			}
			if = {
				limit = {
					has_completed_focus = DEN_king_assumes_power
				}
				promote_character = DEN_knud_bach
				set_party_name = {
					ideology = neutrality
					name = DEN_neutrality_party
					long_name = DEN_neutrality_party_long
				}
			}
			else = {
				set_politics = { 
					ruling_party = neutrality
					elections_allowed = yes
				}	
			}
		}
		else_if = {
			limit = {
				FROM = {
					has_government = democratic
				}
			}
			DEN_erik_scavenius_takes_over = yes
		}
		FROM = { country_event = { id = denmark_overlord_events.23 days = 1 }}
	}
	option = { #Refuse and declare war
		name = denmark_overlord_events.17.b #Intentional
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
			modifier = {
				factor = 10
				OR = {
					AND =  {
						has_government = neutrality
						DEN_royal_ai = yes
					}
					AND = {
						has_government = fascism
						DEN_fascist_ai  = yes
					}
					AND = {
						has_government = communism
						communism > 0.5
					}
				}
			}
		}
		if = {
			limit = {
				is_subject = yes
			}
			OVERLORD = { country_event = { id = denmark_occupation_event.6 hours = 1 } }

			DEN_independence_war_effects = yes
		}

		DEN_activate_bought_ships = yes #Denmark receives the Destroyers it bought

		set_power_balance = {
			id = DEN_balance_of_power
			left_side = DEN_welfare_side
			right_side = DEN_warfare_side
			set_value = 0.3
		}
	}
}

country_event = { #Denmark: Overlord wants communism banned
	id = denmark_overlord_events.26
	title = denmark_overlord_events.26.t
	desc = denmark_overlord_events.26.desc
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = { #comply
		name = denmark_overlord_events.26.a 
		ai_chance = {
			base = 10
		}
		DEN_bop_occupation_low_decrease_effect = yes

		hidden_effect = {
			set_temp_variable = {
				var = ban_ideology_var
				value = party_popularity@communism
			}
			multiply_temp_variable = {
				var = ban_ideology_var
				value = -0.25
			}
			set_country_flag = DEN_banned_communism_flag
		}
		add_popularity = {
			ideology = communism
			popularity = ban_ideology_var
		}
		if = {
			limit = {
				has_government = democratic
			}
			multiply_temp_variable = {
				var = ban_ideology_var
				value = 2.5
			}
			add_stability = ban_ideology_var
		}
		else_if = {
			limit = {
				has_elections = yes
			}
			multiply_temp_variable = {
				var = ban_ideology_var
				value = 2
			}
			add_stability = ban_ideology_var
		}
		else_if = {
			limit = {
				has_elections = no
				has_government = neutrality
			}
			multiply_temp_variable = {
				var = ban_ideology_var
				value = 1.25
			}
			add_stability = ban_ideology_var
		}
		else_if = {
			limit = {
				has_government = fascism
			}
			add_stability = ban_ideology_var
		}
		else = {
			multiply_temp_variable = {
				var = ban_ideology_var
				value = 1.5
			}
			add_stability = ban_ideology_var
		}

		DEN_bop_occupation_low_decrease_effect = yes

		OVERLORD = {
			add_opinion_modifier = {
				modifier = DEN_cooperative_subject
				target = DEN
			}
		}
		FROM = { country_event = { id = denmark_overlord_events.27 days = 1 } }
	}
	option = { #refuse
		name = denmark_overlord_events.26.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 10
				communism > 0.3
			}
		}
		DEN_bop_occupation_low_increase_effect = yes
		DEN_modify_overlord_relations_big = yes
		FROM = { country_event = { id = denmark_overlord_events.27 days = 1 } }
	}
}
country_event = { #Overlord: Denmark banned communism
	id = denmark_overlord_events.27
	title = denmark_overlord_events.27.t
	desc = denmark_overlord_events.27.desc
	picture = GFX_report_event_DEN_danish_politics

	is_triggered_only = yes

	option = { #Good
		name = denmark_overlord_events.27.a 
		add_political_power = 25	
	}
}
country_event = { #Overlord: Denmark refuses to ban communism
	id = denmark_overlord_events.28
	title = denmark_overlord_events.28.t
	desc = denmark_overlord_events.28.desc
	picture = GFX_report_event_DEN_danish_politics

	is_triggered_only = yes

	option = { #Damn them
		name = denmark_overlord_events.28.a 		
		add_political_power = -50
		custom_effect_tooltip = DEN_deteriorating_subject_relations
	}
}

country_event = { #Denmark: Overlord wants fascism banned
	id = denmark_overlord_events.29
	title = denmark_overlord_events.29.t
	desc = denmark_overlord_events.29.desc
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = { #comply
		name = denmark_overlord_events.29.a 
		ai_chance = {
			base = 10
		}
		DEN_bop_occupation_low_decrease_effect = yes

		hidden_effect = {
			set_temp_variable = {
				var = ban_ideology_var
				value = party_popularity@fascism
			}
			multiply_temp_variable = {
				var = ban_ideology_var
				value = -0.25
			}
			set_country_flag = DEN_banned_fascism_flag
		}
		add_popularity = {
			ideology = fascism
			popularity = ban_ideology_var
		}
		if = {
			limit = {
				has_government = democratic
			}
			multiply_temp_variable = {
				var = ban_ideology_var
				value = 2.5
			}
			add_stability = ban_ideology_var
		}
		else_if = {
			limit = {
				has_elections = yes
			}
			multiply_temp_variable = {
				var = ban_ideology_var
				value = 2
			}
			add_stability = ban_ideology_var
		}
		else_if = {
			limit = {
				has_elections = no
				has_government = neutrality
			}
			multiply_temp_variable = {
				var = ban_ideology_var
				value = 1.25
			}
			add_stability = ban_ideology_var
		}
		else_if = {
			limit = {
				has_government = communism
			}
			add_stability = ban_ideology_var
		}
		else = {
			multiply_temp_variable = {
				var = ban_ideology_var
				value = 1.5
			}
			add_stability = ban_ideology_var
		}

		OVERLORD = {
			add_opinion_modifier = {
				modifier = DEN_cooperative_subject
				target = DEN
			}
		}
		FROM = { country_event = { id = denmark_overlord_events.30 days = 1 } }
	}
	option = { #refuse
		name = denmark_overlord_events.26.b #Intentional
		ai_chance = {
			base = 1
			modifier = {
				factor = 10
				fascism > 0.3
			}
			modifier = {
				factor = 10
				DEN_fascist_ai = yes
			}
		}
		DEN_bop_occupation_low_increase_effect = yes
		DEN_modify_overlord_relations_big = yes
		FROM = { country_event = { id = denmark_overlord_events.31 days = 1 } }
	}
}
country_event = { #Overlord: Denmark banned fascism
	id = denmark_overlord_events.30
	title = denmark_overlord_events.30.t
	desc = denmark_overlord_events.30.desc
	picture = GFX_report_event_DEN_danish_politics

	is_triggered_only = yes

	option = { #Good
		name = denmark_overlord_events.27.a #Intentional 
		ai_chance = {
			base = 10
		}	
		add_political_power = 25	
	}
}
country_event = { #Overlord: Denmark refuses to ban fascism
	id = denmark_overlord_events.31
	title = denmark_overlord_events.31.t
	desc = denmark_overlord_events.31.desc
	picture = GFX_report_event_DEN_danish_politics

	is_triggered_only = yes

	option = { #Damn them
		name = denmark_overlord_events.28.a #Intentional 	
		add_political_power = -100
		custom_effect_tooltip = DEN_deteriorating_subject_relations
	}
}

country_event = { #Denmark: Overlord wants weapons
	id = denmark_overlord_events.32
	title = denmark_overlord_events.32.t
	desc = denmark_overlord_events.32.desc
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = { #comply
		name = denmark_overlord_events.32.a 
		ai_chance = {
			base = 2
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				}
			}
			modifier = {
				factor = 5
				OR = {
					DEN_historical_ai = yes
					DEN_rearming_ai = yes
				}
			}
			modifier = {
				factor = 5
				is_historical_focus_on = yes
			}
		}	
		add_equipment_to_stockpile = {
			type = infantry_equipment
			amount = -2500
		}
		effect_tooltip = {
			OVERLORD = {
				add_opinion_modifier = {
					modifier = DEN_cooperative_subject
					target = DEN
				}
			}		
		}
		DEN_bop_occupation_very_low_decrease_effect = yes
		FROM = {
			country_event = { id = denmark_overlord_events.33 days = 1 } 
		}
	}
	option = { #make up an excuse
		name = denmark_overlord_events.32.b 
		ai_chance = {
			base = 1
			modifier = {
				factor = 10
				OR = {
					AND = {
						FROM = {
							has_government = communism
						}
						OR = {
							has_government = fascism
							has_government = neutrality
							DEN_royal_ai = yes
							DEN_fascist_ai = yes
						}
					}
					AND = {
						FROM = {
							has_government = fascism
						}
						OR = {
							has_government = communism
							DEN_royal_ai = yes
						}
					}
				}
			}
		}		
		DEN_modify_overlord_relations_small = yes
		DEN_bop_occupation_very_low_increase_effect = yes
		FROM = {
			country_event = { id = denmark_overlord_events.34 days = 1} 
		}
	}
}
country_event = { #Overlord: Denmark sends weapons
	id = denmark_overlord_events.33
	title = denmark_overlord_events.33.t
	desc = denmark_overlord_events.33.desc
	picture = GFX_report_event_generic_rifles

	is_triggered_only = yes

	option = { #Good boi
		name = denmark_overlord_events.23.a #Intentional 
		add_equipment_to_stockpile = {
			type = infantry_equipment
			amount = 2500
			producer = DEN
		}
		add_opinion_modifier = {
			modifier = DEN_cooperative_subject
			target = DEN
		}
	}
}
country_event = { #Overlord: Denmark won't send weapons
	id = denmark_overlord_events.34
	title = denmark_overlord_events.34.t
	desc = denmark_overlord_events.34.desc
	picture = GFX_report_event_journalists_speech

	is_triggered_only = yes

	option = { #We'll let it slide this time....
		name = denmark_overlord_events.34.a 
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				}
			}
		}		
		add_political_power = -25
	}
	option = { #Bad subjects!
		name = denmark_overlord_events.34.a 
		ai_chance = {
			base = 5
			modifier = {
				factor = 5
				OR = {
					has_government = fascism
					has_government = communism
				}
			}
			modifier = {
				factor = 2
				FROM = { 
					power_balance_value = {
						id = DEN_occupation_balance
						value > 0.6
					}
				}
			}
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
		}
		effect_tooltip = {
			FROM = {
				if = {
					limit = {
						has_dynamic_modifier = { modifier = DEN_occupation_laws_dynamic_modifier }
					}
					add_to_variable = {
						DEN_occupation_laws_mic_to_overlord = 0.05
						tooltip = mic_to_overlord_factor_tt
					}
				}
			}
		}
		custom_effect_tooltip = DEN_deteriorating_subject_relations
		FROM = {
			country_event = { id = denmark_overlord_events.35 days = 1 } 
		}
	}
}
country_event = { #Denmark: Overlord is punishing us for being a bad boi
	id = denmark_overlord_events.35
	title = denmark_overlord_events.7.t #Intentional
	desc = denmark_overlord_events.35.desc
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = { #Damn them!
		name = denmark_overlord_events.35.a 	
		custom_effect_tooltip = DEN_modify_occupation_laws_dynamic_modifier
		add_to_variable = {
			DEN_occupation_laws_mic_to_overlord = 0.05
			tooltip = mic_to_overlord_factor_tt
		}
		DEN_modify_overlord_relations_big = yes
	}
}

country_event = { #Denmark: Overlord wants troops
	id = denmark_overlord_events.36
	title = denmark_overlord_events.36.t
	desc = denmark_overlord_events.36.desc
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = { #comply
		name = denmark_overlord_events.36.a 
		ai_chance = {
			base = 2
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				}
			}
			modifier = {
				factor = 5
				OR = {
					DEN_historical_ai = yes
					DEN_rearming_ai = yes
				}
			}
		}	
		add_manpower = -2500
		effect_tooltip = {
			OVERLORD = {
				add_opinion_modifier = {
					modifier = DEN_cooperative_subject
					target = DEN
				}
			}		
		}
		DEN_bop_occupation_low_decrease_effect = yes
		FROM = {
			country_event = { id = denmark_overlord_events.37 days = 1 } 
		}
	}
	option = { #refuse
		name = denmark_overlord_events.36.b 
		ai_chance = {
			base = 1
			modifier = {
				factor = 10
				OR = {
					AND = {
						FROM = {
							has_government = communism
						}
						OR = {
							has_government = fascism
							has_government = neutrality
							DEN_royal_ai = yes
							DEN_fascist_ai = yes
						}
					}
					AND = {
						FROM = {
							has_government = fascism
						}
						OR = {
							has_government = communism
							DEN_royal_ai = yes
						}
					}
				}
			}
		}		
		DEN_modify_overlord_relations_small = yes
		DEN_bop_occupation_low_increase_effect = yes
		FROM = {
			country_event = { id = denmark_overlord_events.38 days = 1 } 
		}
	}
}
country_event = { #Overlord: Denmark sends troops
	id = denmark_overlord_events.37
	title = denmark_overlord_events.37.t
	desc = denmark_overlord_events.37.desc
	picture = GFX_report_event_DEN_fascist_troops

	is_triggered_only = yes

	option = { #Good boi
		name = denmark_overlord_events.23.a #Intentional 		
		add_manpower = 2500
		add_opinion_modifier = {
			modifier = DEN_cooperative_subject
			target = DEN
		}
	}
}
country_event = { #Overlord: Denmark refuses to send troops
	id = denmark_overlord_events.38
	title = denmark_overlord_events.38.t
	desc = denmark_overlord_events.38.desc
	picture = GFX_report_event_journalists_speech

	is_triggered_only = yes

	option = { #We'll let it slide this time....
		name = denmark_overlord_events.34.a #Intentional 
		ai_chance = {
			base = 1
			modifier = {
				factor = 10
				has_government = FROM
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value > 49
				}
			}
		}		
		add_political_power = -25
	}
	option = { #Bad subjects!
		name = denmark_overlord_events.38.b 
		ai_chance = {
			base = 5
			modifier = {
				factor = 5
				OR = {
					has_government = fascism
					has_government = communism
				}
				NOT = { has_government = FROM }
			}
			modifier = {
				factor = 2
				FROM = { 
					power_balance_value = {
						id = DEN_occupation_balance
						value > 0.6
					}
				}
			}
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
		}
		effect_tooltip = {
			FROM = {
				if = {
					limit = {
						has_dynamic_modifier = { modifier = DEN_occupation_laws_dynamic_modifier }
					}
					add_to_variable = {
						DEN_occupation_laws_autonomy_manpower_share = 0.1
						tooltip = autonomy_manpower_share_tt
					}
				}
			}
		}
		set_country_flag = DEN_overlord_enacted_forced_conscription
		custom_effect_tooltip = DEN_deteriorating_subject_relations
		FROM = {
			country_event = { id = denmark_overlord_events.39 days = 1 } 
		}
	}
}
country_event = { #Denmark: Overlord is punishing us for being a bad boi
	id = denmark_overlord_events.39
	title = denmark_overlord_events.7.t #Intentional
	desc = denmark_overlord_events.39.desc
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = { #Cursed Overlords!
		name = denmark_overlord_events.39.a 	
		custom_effect_tooltip = DEN_modify_occupation_laws_dynamic_modifier
		add_to_variable = {
			DEN_occupation_laws_autonomy_manpower_share = 0.1
			tooltip = autonomy_manpower_share_tt
		}
		DEN_bop_occupation_very_low_decrease_effect = yes
		DEN_modify_overlord_relations_big = yes
	}
}

country_event = { #Denmark: Overlord wants to install a Plenipotentiary
	id = denmark_overlord_events.40
	title = denmark_overlord_events.40.t
	desc = denmark_overlord_events.40.desc
	picture = GFX_report_event_journalists_speech

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			DEN_create_the_plenipotentiary = yes
		}
	}
	option = { #Comply...
		name = denmark_overlord_events.40.a 	
		ai_chance = {
			base = 5
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
			modifier = { 
				factor = 2
				DEN_historical_ai = yes
			}
			modifier = { 
				factor = 1.5
				DEN_rearming_ai = yes
			}
		}

		DEN_install_a_plenipotentiary = yes

		DEN_bop_occupation_medium_decrease_effect = yes

		effect_tooltip = {
			OVERLORD = {
				add_opinion_modifier = {
					modifier = DEN_cooperative_subject
					target = DEN
				}
			}
		}
		FROM = {
			country_event = { id = denmark_overlord_events.41 days = 1 } 
		}
	}
	option = { #Refuse!
		name = denmark_overlord_events.40.b	
		ai_chance = {
			base = 1
			modifier = { 
				factor = 5
				OR = {
					DEN_royal_ai = yes
					DEN_fascist_ai = yes
					has_government = communism
				}
			}
		}

		DEN_bop_occupation_low_increase_effect = yes

		DEN_modify_overlord_relations_big = yes

		FROM = {
			country_event = { id = denmark_overlord_events.42 days = 1 } 
		}
	}
}
country_event = { #Overlord: Denmark accepted our country leader
	id = denmark_overlord_events.41
	title = denmark_overlord_events.41.t
	desc = denmark_overlord_events.41.desc
	picture = GFX_report_event_generic_read_write

	is_triggered_only = yes

	option = { #Who's a good boi? Denmark is!
		name = denmark_overlord_events.41.a 	
		
		add_political_power = 50

		unlock_decision_tooltip = DEN_seize_jylland

		if = { #Don't give good relations if Denmark tried to resist the first time aound
			limit = {
				FROM = {
					NOT = { has_country_flag = DEN_forced_to_install_plenipotentiary_flag }
				}
			}
			add_opinion_modifier = {
				modifier = DEN_cooperative_subject
				target = DEN
			}
		}

		hidden_effect = { set_country_flag = DEN_overlord_installed_loyalist_flag }
	}
}
country_event = { #Overlord: Denmark refused to appoint our country leader
	id = denmark_overlord_events.42
	title = denmark_overlord_events.42.t
	desc = denmark_overlord_events.42.desc
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes

	option = { #Let it slide
		name = denmark_overlord_events.42.a 	
		ai_chance = {
			base = 1
			modifier = {
				factor = 10
				has_government = FROM
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value > 49
				}
			}
		}	
		add_political_power = -50
	}
	option = { #Install our guy anyway!
		name = denmark_overlord_events.42.b 	
		ai_chance = {
			base = 5
			modifier = {
				factor = 5
				OR = {
					has_government = fascism
					has_government = communism
				}
				NOT = { has_government = FROM }
			}
			modifier = {
				factor = 2
				FROM = { 
					power_balance_value = {
						id = DEN_occupation_balance
						value > 0.6
					}
				}
			}
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
		}
		custom_effect_tooltip = if_they_refuse_tt
		effect_tooltip = {
			FROM = {
				declare_war_on = {
					target = ROOT
					type = independence_wargoal 
				}
			}
		}
		custom_effect_tooltip = DEN_deteriorating_subject_relations
		FROM = {
			country_event = { id = denmark_overlord_events.43 days = 1 } 
		}
	}
}
country_event = { #Denmark: overlord tries to install a loyal governor anyways!
	id = denmark_overlord_events.43
	title = denmark_overlord_events.43.t
	desc = denmark_overlord_events.43.desc
	picture = GFX_report_event_gathering_protest

	is_triggered_only = yes

	option = { #Yield
		name = denmark_overlord_events.43.a 	
		ai_chance = {
			base = 5
		}
		
		DEN_install_a_plenipotentiary= yes

		DEN_bop_occupation_medium_decrease_effect = yes

		DEN_modify_overlord_relations_big = yes

		set_country_flag = DEN_forced_to_install_plenipotentiary_flag

		FROM = {
			country_event = { id = denmark_overlord_events.41 } 
		}
	}
	option = { #War!
		name = denmark_overlord_events.43.b 	
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				OR = {
					NOT = { has_government = communism }
					NOT = { has_government = fascism }
				}
			}
			event_option_tooltip = denmark_occupation_event.7.a
		}
		else = {
			event_option_tooltip = denmark_occupation_event.7.b	
		}
		FROM = {
			country_event = { id = denmark_occupation_event.7 hours = 6 } 
		}
	}
}

country_event = { #Denmark: Overlord tries to take Jutland
	id = denmark_overlord_events.44
	title = denmark_overlord_events.44.t
	desc = denmark_overlord_events.44.desc
	picture = GFX_report_event_military_planning

	is_triggered_only = yes

	option = { #Comply...
		name = denmark_overlord_events.36.a #intentional 	
		ai_chance = {
			base = 5
			modifier = { 
				factor = 2
				is_historical_focus_on = yes
			}
		}

		DEN_bop_occupation_high_decrease_effect = yes

		effect_tooltip = {
			FROM = {
				ROOT = {
					transfer_state = 99
					transfer_state = 912
				}
				add_opinion_modifier = {
					modifier = DEN_cooperative_subject
					target = DEN
				}
			}
		}
		hidden_effect = {
			FROM = {
				country_event = { id = denmark_overlord_events.45 days = 1 } 
			}
		}
	}
	option = { #Refuse!
		name = denmark_overlord_events.43.b #intentional	
		ai_chance = {
			base = 1
		}

		DEN_bop_occupation_medium_increase_effect = yes

		DEN_modify_overlord_relations_big = yes

		FROM = {
			country_event = { id = denmark_overlord_events.46 days = 1 } 
		}

		custom_effect_tooltip = if_they_refuse_tt
		effect_tooltip = {
			FROM = {
				declare_war_on = {
					target = ROOT
					type = annex_everything 
				}
			}
		}
	}
}
country_event = { #Overlord: Denmark gives away Jutland
	id = denmark_overlord_events.45
	title = denmark_overlord_events.45.t
	desc = denmark_overlord_events.45.desc
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes

	option = { #Who's a good boi? Denmark is!
		name = denmark_overlord_events.23.a #intentional 

		ROOT = {
			transfer_state = 99
			transfer_state = 912
		}

		unlock_decision_tooltip = DEN_annex_denmark

		add_opinion_modifier = {
			modifier = DEN_cooperative_subject
			target = DEN
		}

		hidden_effect = { set_country_flag = DEN_seized_jylland_flag }
	}
}
country_event = { #Overlord: Denmark refuses to part from Jutland
	id = denmark_overlord_events.46
	title = denmark_overlord_events.46.t
	desc = denmark_overlord_events.46.desc
	picture = GFX_report_event_military_planning

	is_triggered_only = yes

	option = { #Let it slide
		name = denmark_overlord_events.34.a #intentional 	
		ai_chance = {
			base = 5
		}
		add_political_power = -50
	}
	option = { #Take it anyway!
		name = denmark_overlord_events.46.b 	
		ai_chance = {
			base = 5
			modifier = {
				factor = 2
				OR = {
					has_government = fascism
					has_government = communism
				}
			}
		}
		ROOT = { end_puppet = FROM }
		ROOT = {
			declare_war_on = {
				target = FROM
				type = annex_everything 
			}
		}
		hidden_effect = {
			FROM = { country_event = { id = denmark_occupation_event.7 hours = 1 }}
		}
	}
}

country_event = { #Denmark: Overlord tries to annex the rest of Denmark
	id = denmark_overlord_events.47
	title = denmark_overlord_events.47.t
	desc = denmark_overlord_events.47.desc
	picture = GFX_report_event_military_planning

	is_triggered_only = yes

	option = { #Comply...
		name = denmark_overlord_events.36.a #intentional	
		ai_chance = {
			base = 5
			modifier = {
				factor = 2
				is_historical_focus_on = yes
			}
			modifier = {
				factor = 2
				power_balance_value = {
					id = DEN_occupation_balance
					value < -0.3
				}
			}
			modifier = {
				factor = 2
				power_balance_value = {
					id = DEN_occupation_balance
					value < -0.6
				}
			}
			modifier = {
				factor = 2
				DEN_historical_ai = yes
			}
		}

		FROM = {
			annex_country = { target = ROOT transfer_troops = yes }
		}

		custom_effect_tooltip = GAME_OVER_TT
		hidden_effect = {
			FROM = {
				country_event = { id = denmark_overlord_events.49 } 
			}
		}
	}
	option = { #Refuse!
		name = denmark_overlord_events.20.b #intentional	
		ai_chance = {
			base = 10
			modifier = {
				factor = 3
				DEN_rearming_ai = yes
			}
			modifier = {
				factor = 4
				OR = {
					DEN_royal_ai = yes
					DEN_fascist_ai = yes
				}
			}
			modifier = {
				factor = 1.5
				power_balance_value = {
					id = DEN_occupation_balance
					value > 0.3
				}
			}
			modifier = {
				factor = 1.5
				power_balance_value = {
					id = DEN_occupation_balance
					value > 0.6
				}
			}
		}

		DEN_bop_occupation_medium_increase_effect = yes

		DEN_modify_overlord_relations_big = yes

		FROM = {
			country_event = { id = denmark_overlord_events.48 days = 1 } 
		}

		custom_effect_tooltip = if_they_refuse_tt
		effect_tooltip = {
			FROM = {
				declare_war_on = {
					target = ROOT
					type = annex_everything 
				}
			}
		}
	}
}
country_event = { #Overlord: Denmark refuses to be annexed
	id = denmark_overlord_events.48
	title = denmark_overlord_events.48.t
	desc = denmark_overlord_events.48.desc
	picture = GFX_report_event_military_planning

	is_triggered_only = yes

	option = { #Let it slide
		name = denmark_overlord_events.24.a #intentional 	
		ai_chance = {
			base = 5
		}
		add_political_power = -50
	}
	option = { #Take it anyway!
		name = denmark_overlord_events.48.b  	
		ai_chance = {
			base = 5
			modifier = {
				factor = 2
				OR = {
					has_government = fascism
					has_government = communism
				}
			}
		}
		ROOT = { end_puppet = FROM }
		ROOT = {
			declare_war_on = {
				target = FROM
				type = annex_everything 
			}
		}
		hidden_effect = {
			FROM = {
				country_event = { id = denmark_overlord_events.49 } 
			}
		}
	}
}
country_event = { #Add compliance to Danish core states
	id = denmark_overlord_events.49
	title = denmark_overlord_events.49.t
	desc = denmark_overlord_events.49.desc
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes
	hidden = yes

	option = { 
		name = denmark_overlord_events.49.a

		hidden_effect = {
			FROM = {
				every_core_state = {
					add_compliance = 25
				}
			}
		}
	}
}

#####################
#####################
#### TRADE DEALS ####
#####################
#####################
country_event = { #ENG or GER gets an offer from DEN for a trade deal
	id = denmark_trade_deal.1
	title = denmark_trade_deal.1.t
	desc = denmark_trade_deal.1.desc
	picture = GFX_report_event_generic_stock_traders

	is_triggered_only = yes

	option = { #Accept
		name = denmark_trade_deal.1.a
		ai_chance = {
			base = 5
			modifier = { factor = 0 } #EAI
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 0
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				} 
			}
		}	
		effect_tooltip = {
			ROOT = {
				add_ideas = DEN_danish_produce_export_ns
			}
			FROM = {
				add_offsite_building = { type = industrial_complex level = 1 }
			}
		}

		unlock_decision_tooltip = DEN_increase_trade_with_denmark
		unlock_decision_tooltip = DEN_cancel_trade_with_denmark

		FROM = { country_event = { id = denmark_trade_deal.2 days = 1 } }
	}

	option = { #Decline
		name = denmark_trade_deal.1.b
		ai_chance = {
			base = 1
		}
		FROM = { country_event = { id = denmark_trade_deal.3 days = 1 } }
	}
}
country_event = { #ENG/GER has accepted our trade proposal!
	id = denmark_trade_deal.2
	title = denmark_trade_deal.2.t
	desc = denmark_trade_deal.2.desc
	picture = GFX_report_event_generic_stock_traders

	is_triggered_only = yes

	option = { #Yaaaas
		name = denmark_trade_deal.2.a
		ROOT = {
			add_offsite_building = { type = industrial_complex level = 1 }
			DEN_trade_deal_effects = yes
		}
		FROM = {
			add_ideas = DEN_danish_produce_export_ns
			set_country_flag = has_danish_produce_basic_flag
		}
		custom_effect_tooltip = war_will_cancel_deal_tt
		unlock_decision_tooltip = DEN_cancel_trade_with_country
		hidden_effect = {
			FROM = {
				set_country_flag = DEN_danish_trading_partner_flag
			}
		}
	}
}
country_event = { #ENG/GER declined our trade proposal
	id = denmark_trade_deal.3
	title = denmark_trade_deal.3.t
	desc = denmark_trade_deal.3.desc
	picture = GFX_report_event_journalists_speech

	is_triggered_only = yes

	option = { #Damnit!
		name = denmark_trade_deal.3.a
	}
}

country_event = { #ENG/GER wants to increase trade
	id = denmark_trade_deal.4
	title = denmark_trade_deal.4.t
	desc = denmark_trade_deal.4.desc
	picture = GFX_report_event_generic_read_write

	is_triggered_only = yes

	option = { #Yaaaas
		name = denmark_trade_deal.4.a
		ai_chance = {
			base = 5
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				} 
			}
		}	
		effect_tooltip = {
			ROOT = { add_offsite_building = { type = industrial_complex level = 1 }}
			FROM = {
				swap_ideas = {
					remove_idea = DEN_danish_produce_export_ns
					add_idea = DEN_danish_produce_export_ns_improved
				}
			}
		}
		custom_effect_tooltip = war_will_cancel_deal_tt
		FROM = { country_event = { id = denmark_trade_deal.5 hours = 6 } }
	}

	option = { #Naaaw we good
		name = denmark_trade_deal.4.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
		}
		FROM = { country_event = { id = denmark_trade_deal.6 hours = 6 } }
	}
}

country_event = { #DEN accepted to increase trade
	id = denmark_trade_deal.5
	title = denmark_trade_deal.2.t #deliberate
	desc = denmark_trade_deal.5.desc
	picture = GFX_report_event_generic_read_write

	is_triggered_only = yes

	option = { #Yaaaas
		name = denmark_trade_deal.2.a #deliberate
		ROOT = {
			swap_ideas = {
				remove_idea = DEN_danish_produce_export_ns
				add_idea = DEN_danish_produce_export_ns_improved
			}
			set_country_flag = has_danish_produce_improved_flag
		}
		FROM = { add_offsite_building = { type = industrial_complex level = 1 }}
		custom_effect_tooltip = war_will_cancel_deal_tt
	}
}

country_event = { #DEN declined to increase trade
	id = denmark_trade_deal.6
	title = denmark_trade_deal.3.t #deliberate
	desc = denmark_trade_deal.6.desc
	picture = GFX_report_event_journalists_speech

	is_triggered_only = yes

	option = { #Damnit!
		name = denmark_trade_deal.6.a
	}
}

country_event = { #ENG/GER/DEN canceled our trade deal
	id = denmark_trade_deal.7
	title = denmark_trade_deal.7.t
	desc = denmark_trade_deal.7.desc
	picture = GFX_report_event_journalists_speech

	is_triggered_only = yes

	option = { #DEN receives bad news
		name = denmark_trade_deal.7.a
		trigger = {
			FROM = {
				OR = {
					original_tag = ENG
					original_tag = GER
				}
			}
		}
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				FROM = {
					has_idea = DEN_danish_produce_export_ns
				}
			}
			custom_effect_tooltip = DEN_remove_one_offmap_civ_tt
			hidden_effect = {
				DEN = {	add_offsite_building = { type = industrial_complex level = -1 }}
			}
			FROM = { remove_ideas = DEN_danish_produce_export_ns }
		}
		else_if = {
			limit = {
				FROM = {
					has_idea = DEN_danish_produce_export_ns_improved
				}
			}
			custom_effect_tooltip = DEN_remove_two_offmap_civ_tt
			hidden_effect = {
				DEN = {	add_offsite_building = { type = industrial_complex level = -2 }}
			}
			FROM = { remove_ideas = DEN_danish_produce_export_ns_improved}
		}
		hidden_effect = {
			FROM = {
				clr_country_flag = DEN_danish_trading_partner_flag
			}
		}
	}
	option = { #ENG/GER receives bad news
		name = denmark_trade_deal.7.b
		trigger = {
			FROM = {
				original_tag = DEN
			}
		}
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				ROOT = {
					has_idea = DEN_danish_produce_export_ns
				}
			}
			ROOT = { remove_ideas = DEN_danish_produce_export_ns }
			custom_effect_tooltip = DEN_loses_one_offmap_civ_tt
			hidden_effect = {
				DEN = {	add_offsite_building = { type = industrial_complex level = -1 }}
			}
		}
		else_if = {
			limit = {
				ROOT = {
					has_idea = DEN_danish_produce_export_ns_improved
				}
			}
			ROOT = { remove_ideas = DEN_danish_produce_export_ns_improved}
			custom_effect_tooltip = DEN_loses_two_offmap_civ_tt
			hidden_effect = {
				DEN = {	add_offsite_building = { type = industrial_complex level = -2 }}
			}
		}
		hidden_effect = {
			ROOT = {
				clr_country_flag = DEN_danish_trading_partner_flag
			}
		}
	}
}

country_event = { #Cancel Danish Produce Trade
	id = denmark_trade_deal.8
	title = denmark_trade_deal.8.t 
	desc = denmark_trade_deal.8.desc
	picture = GFX_report_event_DEN_danish_troops

	is_triggered_only = yes

	option = { #Denmark has become a subject
		name = denmark_trade_deal.8.a
		trigger = {
			DEN = {
				is_subject = yes
			}
		}
		ai_chance = {
			base = 1
		}
		effect_tooltip = {
			if = {
				limit = {
					FROM = {
						has_country_flag = has_danish_produce_basic_flag
					}
				}
				if = {
					limit = {
						ROOT = { original_tag = DEN}
					}
				}
				DEN = {	add_offsite_building = { type = industrial_complex level = -1 }}
				FROM = { remove_ideas = DEN_danish_produce_export_ns } #The Idea is removed seperately
			}
			else_if = {
				limit = {
					FROM = {
						has_country_flag = has_danish_produce_improved_flag
					}
				}
				DEN = {	add_offsite_building = { type = industrial_complex level = -2 }}
				FROM = { remove_ideas = DEN_danish_produce_export_ns_improved } #The Idea is removed seperately
			}
		}
		hidden_effect = { #Remove offsite factories if tag is DEN
			if = {
				limit = {
					FROM = {
						has_country_flag = has_danish_produce_basic_flag
					}
					ROOT = { original_tag = DEN	}
				}
				ROOT = {	add_offsite_building = { type = industrial_complex level = -1 }}
			}
			else_if = {
				limit = {
					FROM = {
						has_country_flag = has_danish_produce_improved_flag
					}
					ROOT = { original_tag = DEN }
				}
				ROOT = {	add_offsite_building = { type = industrial_complex level = -2 }}
			}
		}
	}
	option = { #Trading Partner's answer in case of war
		name = denmark_trade_deal.8.b
		trigger = {
			NOT = { original_tag = DEN }
			DEN = {
				is_subject = no
			}
		}
		ai_chance = {
			base = 1
		}
		effect_tooltip = {
			if = {
				limit = {
					FROM = {
						has_country_flag = has_danish_produce_basic_flag
					}
				}
				FROM = { remove_ideas = DEN_danish_produce_export_ns } #The Idea is removed seperately
			}
			else_if = {
				limit = {
					FROM = {
						has_country_flag = has_danish_produce_improved_flag
					}
				}
				FROM = { remove_ideas = DEN_danish_produce_export_ns_improved } #The Idea is removed seperately
			}
		}
	}
	option = { #Danish answer in case of war
		name = denmark_trade_deal.8.c
		trigger = {
			original_tag = DEN
			DEN = {
				is_subject = no
			}
		}
		ai_chance = {
			base = 1
		}
		effect_tooltip = { 
			if = {
				limit = {
					FROM = {
						has_country_flag = has_danish_produce_basic_flag
					}
				}
				ROOT = {	add_offsite_building = { type = industrial_complex level = -1 }}
				FROM = { remove_ideas = DEN_danish_produce_export_ns } #The Idea is removed seperately
			}
			else_if = {
				limit = {
					FROM = {
						has_country_flag = has_danish_produce_improved_flag
					}
				}
				ROOT = {	add_offsite_building = { type = industrial_complex level = -2 }}
				FROM = { remove_ideas = DEN_danish_produce_export_ns_improved } #The Idea is removed seperately
			}
		}
		hidden_effect = { #Remove offsite factories if tag is DEN
			if = {
				limit = {
					FROM = {
						has_country_flag = has_danish_produce_basic_flag
					}
					ROOT = {
						original_tag = DEN
					}
				}
				DEN = {	add_offsite_building = { type = industrial_complex level = -1 }}
			}
			else_if = {
				limit = {
					FROM = {
						has_country_flag = has_danish_produce_improved_flag
					}
					ROOT = {
						original_tag = DEN
					}
				}
				DEN = {	add_offsite_building = { type = industrial_complex level = -2 }}
			}
		}
	}
}

##########################
##########################
#### GUARANTEE EVENTS ####
##########################
##########################

country_event = { #Denmark wants a non-aggression pact
	id =  denmark_protection_event.1
	title =  denmark_protection_event.1.t
	desc =  denmark_protection_event.1.desc
	picture = GFX_report_event_generic_read_write

	fire_only_once = yes

	is_triggered_only = yes

	option = { #Yes siree Bob
		name =  denmark_protection_event.1.a
		ai_chance = {
			base = 1 
			modifier = {
				factor = 2
				has_country_flag = DEN_danish_trading_partner_flag
			}
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 5
				has_war = no
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				} 
			}
		}
		DEN_non_aggression_pact_effect = yes
		effect_tooltip = {
			ROOT = {
				add_opinion_modifier = {
					modifier = DEN_deepening_partnership
					target = FROM
				}
			}
			FROM = {
				add_opinion_modifier = {
					modifier = DEN_deepening_partnership
					target = ROOT
				}
			}
		}

		set_variable = { DEN.DEN_guaranteeing_nation = ROOT }
		hidden_effect = {
			set_country_flag = DEN_is_guaranteeing_denmark	
			FROM = {
				set_country_flag = DEN_has_non_aggression_flag
			}
		}
		FROM = { country_event = { id =  denmark_protection_event.2 days = 2 }}	
	}

	option = { #No can do
		name =  denmark_protection_event.1.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_civil_war = yes
			}
			modifier = {
				factor = 5
				has_capitulated = yes
			}
			modifier = {
				factor = 5
				has_war_with_major = yes
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
		}
		FROM = { country_event = { id =  denmark_protection_event.3 days = 2 }}
		hidden_effect = {
			set_country_flag = DEN_refused_non_aggression_pact_flag
		}
	}
}
country_event = { #Denmark gets their non-aggression pact
	id =  denmark_protection_event.2
	title =  denmark_protection_event.2.t
	desc =  denmark_protection_event.2.desc
	picture = GFX_report_event_generic_read_write

	fire_only_once = yes

	is_triggered_only = yes

	option = { #Great
		name =  denmark_protection_event.2.a
		ai_chance = {
			base = 1
		}
		DEN_non_aggression_pact_effect = yes	
		ROOT = {
			add_opinion_modifier = {
				modifier = DEN_deepening_partnership
				target = FROM
			}
		}
		FROM = {
			add_opinion_modifier = {
				modifier = DEN_deepening_partnership
				target = ROOT
			}
		}
	}
}
country_event = { #Denmark is refused their non-aggression pact
	id =  denmark_protection_event.3
	title =  denmark_protection_event.3.t
	desc =  denmark_protection_event.3.desc
	picture = GFX_report_event_journalists_speech

	fire_only_once = yes

	is_triggered_only = yes

	option = { #Damnit
		name =  denmark_protection_event.3.a
		ai_chance = {
			base = 1
		}
		hidden_effect = {
			clr_country_flag = DEN_has_non_aggression_flag
		}
	}
}

country_event = { #Denmark wants to increase trade
	id =  denmark_protection_event.4
	title =  denmark_protection_event.4.t
	desc =  denmark_protection_event.4.desc
	picture = GFX_report_event_generic_sign_treaty2

	fire_only_once = yes

	is_triggered_only = yes

	option = { #ok
		name =  denmark_protection_event.4.a
		ai_chance = {
			base = 2
			modifier = {
				factor = 2
				has_country_flag = DEN_danish_trading_partner_flag
			}
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 5
				has_war = no
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				} 
			}
		}
		if = {
			limit = {
				has_dlc = "Death or Dishonor"
			}
			effect_tooltip = {
				FROM = {
					add_ideas = DEN_danish_licensing_ns
				}
			}
		}
		else = {
			effect_tooltip = {
				FROM = {
					add_ideas = DEN_danish_licensing_ns_no_DOD
				}
			}
		}
		effect_tooltip = {
			ROOT = {
				add_opinion_modifier = {
					modifier = DEN_deepening_partnership
					target = FROM
				}
			}
			FROM = {
				add_opinion_modifier = {
					modifier = DEN_deepening_partnership
					target = ROOT
				}
			}
		}
		FROM = { country_event = { id =  denmark_protection_event.5 days = 2 }}
	}
	option = { #nope
		name =  denmark_protection_event.4.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_civil_war = yes
			}
			modifier = {
				factor = 5
				has_capitulated = yes
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
		}
		FROM = { country_event = { id =  denmark_protection_event.6 days = 2 }}
	}
}
country_event = { #Denmark gets increased trade
	id =  denmark_protection_event.5
	title =  denmark_protection_event.5.t
	desc =  denmark_protection_event.5.desc
	picture = GFX_report_event_generic_sign_treaty2

	fire_only_once = yes

	is_triggered_only = yes

	option = { #Great
		name =  denmark_protection_event.5.a
		if = {
			limit = {
				has_dlc = "Death or Dishonor"
			}
			ROOT = {
				add_ideas = DEN_danish_licensing_ns
			}
		}
		else = {
			ROOT = {
				add_ideas = DEN_danish_licensing_ns_no_DOD
			}
		}
		ROOT = {
			add_opinion_modifier = {
				modifier = DEN_deepening_partnership
				target = FROM
			}
		}
		FROM = {
			add_opinion_modifier = {
				modifier = DEN_deepening_partnership
				target = ROOT
			}
		}
	}
}
country_event = { #Denmark is refused increased trade
	id =  denmark_protection_event.6
	title =  denmark_protection_event.6.t
	desc =  denmark_protection_event.6.desc
	picture = GFX_report_event_journalists_speech

	fire_only_once = yes

	is_triggered_only = yes

	option = { #damnit
		name =  denmark_protection_event.6.a
	}
}

country_event = { #Denmark wants tech sharing
	id =  denmark_protection_event.7
	title =  denmark_protection_event.7.t
	desc =  denmark_protection_event.7.desc
	picture = GFX_report_event_generic_sign_treaty1

	fire_only_once = yes

	is_triggered_only = yes

	option = { #ok
		name =  denmark_protection_event.7.a
		ai_chance = {
			base = 2
			modifier = {
				factor = 2
				has_country_flag = DEN_danish_trading_partner_flag
			}
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 5
				has_war = no
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 75
				} 
			}
		}
		effect_tooltip = {
			DEN_guarantee_tech_sharing = yes
			ROOT = {
				add_opinion_modifier = {
					modifier = DEN_deepening_partnership
					target = FROM
				}
			}
			FROM = {
				add_opinion_modifier = {
					modifier = DEN_deepening_partnership
					target = ROOT
				}
			}
		}
		
		FROM = { country_event = { id =  denmark_protection_event.8 days = 2 }}
	}
	option = { #nope
		name =  denmark_protection_event.7.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_civil_war = yes
			}
			modifier = {
				factor = 5
				has_capitulated = yes
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
		}
		FROM = { country_event = { id =  denmark_protection_event.9 days = 2 }}
	}
}
country_event = { #Denmark gets their tech sharing
	id =  denmark_protection_event.8
	title =  denmark_protection_event.8.t
	desc =  denmark_protection_event.8.desc
	picture = GFX_report_event_generic_sign_treaty1

	fire_only_once = yes

	is_triggered_only = yes

	option = { #Great
		name =  denmark_protection_event.8.a
		DEN_guarantee_tech_sharing = yes
		ROOT = {
			add_opinion_modifier = {
				modifier = DEN_deepening_partnership
				target = FROM
			}
		}
		FROM = {
			add_opinion_modifier = {
				modifier = DEN_deepening_partnership
				target = ROOT
			}
		}
	}
}
country_event = { #Denmark is refused their tech sharing
	id =  denmark_protection_event.9
	title =  denmark_protection_event.9.t
	desc =  denmark_protection_event.9.desc
	picture = GFX_report_event_journalists_speech

	fire_only_once = yes

	is_triggered_only = yes

	option = { #damnit
		name =  denmark_protection_event.9.a
			
	}
}

country_event = { #Denmark wants to sell territory
	id =  denmark_protection_event.10
	title =  denmark_protection_event.10.t
	desc =  denmark_protection_event.10.desc
	picture = GFX_report_event_generic_read_write

	fire_only_once = yes

	is_triggered_only = yes

	option = { #ok
		name =  denmark_protection_event.10.a
		ai_chance = {
			base = 2
			modifier = {
				factor = 2
				has_country_flag = DEN_danish_trading_partner_flag
			}
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 5
				has_war = no
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 75
				} 
			}
		}
		effect_tooltip = {
			DEN_sell_territory_for_guarantees = yes
			give_guarantee = DEN
			DEN = {
				add_offsite_building = { type = industrial_complex level = 2 }
				add_offsite_building = { type = arms_factory level = 2 }
			}
			ROOT = {
				add_opinion_modifier = {
					modifier = DEN_deepening_partnership
					target = FROM
				}
			}
			FROM = {
				add_opinion_modifier = {
					modifier = DEN_deepening_partnership
					target = ROOT
				}
			}
		}
		
		FROM = { country_event = { id =  denmark_protection_event.11 days = 2 }}
	}
	option = { #nope
		name =  denmark_protection_event.10.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_civil_war = yes
			}
			modifier = {
				factor = 5
				has_capitulated = yes
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
			modifier = {
				factor = 2
				has_war_with_major = yes
			}
		}
		FROM = { country_event = { id =  denmark_protection_event.12 days = 2 }}
	}
}
country_event = { #Denmark sells territory
	id =  denmark_protection_event.11
	title =  denmark_protection_event.11.t
	desc =  denmark_protection_event.11.desc
	picture = GFX_report_event_generic_read_write

	fire_only_once = yes

	is_triggered_only = yes

	option = { #Great
		name =  denmark_protection_event.11.a
		add_stability = -0.1
		DEN_sell_territory_for_guarantees = yes
		FROM = { give_guarantee = DEN }
		DEN = {
			add_offsite_building = { type = industrial_complex level = 2 }
			add_offsite_building = { type = arms_factory level = 2 }
		}
		add_cic = 5000
		ROOT = {
			add_opinion_modifier = {
				modifier = DEN_deepening_partnership
				target = FROM
			}
		}
		FROM = {
			add_opinion_modifier = {
				modifier = DEN_deepening_partnership
				target = ROOT
			}
		}
	}
}
country_event = { #Denmark is refused
	id =  denmark_protection_event.12
	title =  denmark_protection_event.12.t
	desc =  denmark_protection_event.12.desc
	picture = GFX_report_event_journalists_speech

	fire_only_once = yes

	is_triggered_only = yes

	option = { #damnit
		name =  denmark_protection_event.102.a		
	}
}


country_event = { #Denmark wants to join/create alliance
	id =  denmark_protection_event.100
	title =  denmark_protection_event.100.t
	desc =  denmark_protection_event.100.desc
	picture = GFX_report_event_military_planning

	fire_only_once = yes

	is_triggered_only = yes

	option = { #ok
		name =  denmark_protection_event.100.a
		trigger = {
			OR = {
				is_in_faction = no
				is_faction_leader = yes
			}
		}
		ai_chance = {
			base = 2
			modifier = {
				factor = 2
				has_country_flag = DEN_danish_trading_partner_flag
			}
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 2
				strength_ratio = {
				    tag = FROM
				    ratio < 0.5
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 75
				} 
			}
			modifier = {
				factor = 2
				has_war = yes
			}
		}
		add_political_power = 50
		add_war_support = 0.1
		effect_tooltip = {
			if = {
				limit = {
					is_faction_leader = yes
				}
				add_to_faction = FROM
			}
			else = {
				FROM = {
					set_rule = {
						can_create_factions = yes
					}
					create_faction = DEN_nordic_cooperation_alliance
					add_to_faction = ROOT
				}
			}
		}

		set_variable = { DEN.DEN_allied_nation = ROOT }
		set_country_flag = DEN_allied_with_denmark
		FROM = { country_event = { id =  denmark_protection_event.101 days = 2 }}
	}
	option = { #nope
		name =  denmark_protection_event.100.b
		trigger = {
			OR = {
				is_in_faction = no
				is_faction_leader = yes
			}
		}
		ai_chance = {
			base = 2
			modifier = {
				factor = 5
				has_civil_war = yes
			}
			modifier = {
				factor = 5
				has_capitulated = yes
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
			modifier = {
				factor = 2
				NORDIC_is_nordic = yes
			}
			modifier = {
				factor = 0.5
				has_war_with_major = yes
			}
		}
		FROM = { country_event = { id =  denmark_protection_event.102 days = 2 }}
		hidden_effect = {
			set_country_flag = DEN_refused_alliance_flag
		}
	}
}
country_event = { #Denmark joins the alliance
	id =  denmark_protection_event.101
	title =  denmark_protection_event.101.t
	desc =  denmark_protection_event.101.desc
	picture = GFX_report_event_generic_sign_treaty2

	fire_only_once = yes

	is_triggered_only = yes

	option = { #Great
		name =  denmark_protection_event.101.a
		add_stability = 0.05
		add_war_support = 0.1
		if = {
			limit = {
				FROM = {	
					is_faction_leader = yes
				}
			}
			FROM = { add_to_faction = ROOT }
		}
		else = {
			IF = {
				limit = {
					has_dlc = "No Compromise, No Surrender"
				}
				set_rule = { can_create_factions = yes }
				create_faction_from_template = faction_template_DEN_nordic_cooperation_alliance
				add_faction_initiative = 1
				add_to_faction = FROM
			}
			ELSE = {
				set_rule = { can_create_factions = yes }
				create_faction = DEN_nordic_cooperation_alliance
				add_to_faction = FROM
			}
		}
	}
}
country_event = { #Denmark is refused alliance membership
	id =  denmark_protection_event.102
	title =  denmark_protection_event.102.t
	desc =  denmark_protection_event.102.desc
	picture = GFX_report_event_military_planning

	fire_only_once = yes

	is_triggered_only = yes

	option = { #damnit
		name =  denmark_protection_event.102.a		
		clr_country_flag = DEN_seeks_alliance_flag
	}
}

country_event = { #Denmark wants to hold military drills
	id =  denmark_protection_event.110
	title =  denmark_protection_event.110.t
	desc =  denmark_protection_event.110.desc
	picture = GFX_report_event_military_planning

	fire_only_once = yes

	is_triggered_only = yes

	option = { #ok
		name =  denmark_protection_event.110.a
		ai_chance = {
			base = 2
			modifier = {
				factor = 2
				has_country_flag = DEN_danish_trading_partner_flag
			}
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 5
				has_war = no
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				} 
			}
		}
		ROOT = {
			add_command_power = 25
			army_experience = 25
			navy_experience = 25
			air_experience = 25

			every_unit_leader = {
				limit = {
					is_army_leader = yes
				}
				random_select_amount = 3
				gain_xp = 100
			}
			every_unit_leader = {
				limit = {
					is_navy_leader = yes
				}
				random_select_amount = 3
					gain_xp = 100
			}
		}
		effect_tooltip = {
			FROM = {
				add_command_power = 25
				army_experience = 25
				navy_experience = 25
				air_experience = 25

				every_unit_leader = {
					limit = {
						is_army_leader = yes
					}
					random_select_amount = 3
					gain_xp = 100
				}
				every_unit_leader = {
					limit = {
						is_navy_leader = yes
					}
					random_select_amount = 3
						gain_xp = 100
				}
			}
		}
		
		FROM = { country_event = { id =  denmark_protection_event.111 days = 20 }}
	}
	option = { #nope
		name =  denmark_protection_event.110.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_civil_war = yes
			}
			modifier = {
				factor = 5
				has_capitulated = yes
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
		}
		FROM = { country_event = { id =  denmark_protection_event.112 days = 2 }}
	}
}
country_event = { #Denmark gets their military drill
	id =  denmark_protection_event.111
	title =  denmark_protection_event.111.t
	desc =  denmark_protection_event.111.desc
	picture = GFX_report_event_generic_defensive_preparations

	fire_only_once = yes

	is_triggered_only = yes

	option = { #Great
		name =  denmark_protection_event.111.a
		add_command_power = 25
		army_experience = 25
		navy_experience = 25
		air_experience = 25

		every_unit_leader = {
			limit = {
				is_army_leader = yes
			}
			random_select_amount = 3
			gain_xp = 100
		}
		every_unit_leader = {
			limit = {
				is_navy_leader = yes
			}
			random_select_amount = 3
				gain_xp = 100
		}
	}
}
country_event = { #Denmark is refused military drills
	id =  denmark_protection_event.112
	title =  denmark_protection_event.112.t
	desc =  denmark_protection_event.112.desc
	picture = GFX_report_event_journalists_speech

	fire_only_once = yes

	is_triggered_only = yes

	option = { #damnit
		name =  denmark_protection_event.112.a
	}
}

country_event = { #Denmark wants tech sharing
	id =  denmark_protection_event.120
	title =  denmark_protection_event.120.t
	desc =  denmark_protection_event.120.desc
	picture = GFX_report_event_generic_sign_treaty1

	fire_only_once = yes

	is_triggered_only = yes

	option = { #ok
		name =  denmark_protection_event.120.a
		ai_chance = {
			base = 2
			modifier = {
				factor = 2
				has_country_flag = DEN_danish_trading_partner_flag
			}
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 5
				has_war = no
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 75
				} 
			}
		}
		effect_tooltip = {
			DEN_alliance_tech_sharing = yes
			ROOT = {
				add_opinion_modifier = {
					modifier = DEN_deepening_partnership
					target = FROM
				}
			}
			FROM = {
				add_opinion_modifier = {
					modifier = DEN_deepening_partnership
					target = ROOT
				}
			}
		}
		
		FROM = { country_event = { id =  denmark_protection_event.121 days = 2 }}
	}
	option = { #nope
		name =  denmark_protection_event.120.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_civil_war = yes
			}
			modifier = {
				factor = 5
				has_capitulated = yes
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
		}
		FROM = { country_event = { id =  denmark_protection_event.122 days = 2 }}
	}
}
country_event = { #Denmark gets their tech sharing
	id =  denmark_protection_event.121
	title =  denmark_protection_event.121.t
	desc =  denmark_protection_event.121.desc
	picture = GFX_report_event_generic_sign_treaty1

	fire_only_once = yes

	is_triggered_only = yes

	option = { #Great
		name =  denmark_protection_event.121.a
		DEN_alliance_tech_sharing = yes
		ROOT = {
			add_opinion_modifier = {
				modifier = DEN_deepening_partnership
				target = FROM
			}
		}
		FROM = {
			add_opinion_modifier = {
				modifier = DEN_deepening_partnership
				target = ROOT
			}
		}
	}
}
country_event = { #Denmark is refused their tech sharing
	id =  denmark_protection_event.122
	title =  denmark_protection_event.122.t
	desc =  denmark_protection_event.122.desc
	picture = GFX_report_event_journalists_speech

	fire_only_once = yes

	is_triggered_only = yes

	option = { #damnit
		name =  denmark_protection_event.122.a
			
	}
}

country_event = { #Nordic country gets invited to Denmark's faction
	id = denmark_protection_event.130
	title = denmark_protection_event.130.t
	desc = denmark_protection_event.130.desc
	picture = GFX_report_event_military_planning

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			if = {
				limit = {
					ROOT = {
						is_faction_leader = yes
					}
				}
				every_other_country = {
					limit = {
						is_in_faction_with = ROOT
					}
					set_country_flag = DEN_join_danish_faction
				}
			}
		}
	}
	option = { #Sure
		name = denmark_protection_event.130.a 
		ai_chance = {
			base = 2
			modifier = {
				factor = 5
				has_war_with_major = yes
			}
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 75
				} 
			}
			modifier = {
				factor = 0.5
				is_in_faction = yes
			}
		}

		if = {
			limit = {
				is_faction_leader = yes
			}
			add_political_power = -50
		}
		else_if = {
			limit = {
				is_in_faction = yes
				is_faction_leader = no
			}
			add_political_power = -25
		}
		else = {
			add_political_power = 25
			add_war_support = 0.05
		}
		
		FROM = { 
			 faction_leader = {
			 	add_to_faction = ROOT
			 	every_other_country = {
			 		limit = {
			 			has_country_flag = DEN_join_danish_faction
			 		}
			 		PREV = {
			 			add_to_faction = PREV #Add already existing faction members to the new faction
			 		}
			 		clr_country_flag = DEN_join_danish_faction
			 	}
			 	country_event = { id = denmark_protection_event.131 days = 1 }
			 }
			country_event = { id = denmark_protection_event.131 days = 1 }
		}
	}
	option = { #Nope
		name = denmark_protection_event.130.b
		ai_chance = {
			base = 2
			modifier = {
				factor = 5
				is_faction_leader = yes
			}
			modifier = {
				factor = 5
				any_allied_country = {
					is_major = yes
				}
			}
			modifier = {
				factor = 5
				has_civil_war = yes
			}
			modifier = {
				factor = 5
				has_capitulated = yes
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
		}	
		set_country_flag = DEN_refused_danish_invitation_flag
		hidden_effect = {
			if = { 
				limit = {
					ROOT = {
						is_faction_leader = yes
					}
				}
				every_other_country = {
					limit = {
						is_in_faction_with = ROOT
					}
					clr_country_flag = DEN_join_danish_faction
				}
			}
		}
		FROM = { 
			country_event = { id = denmark_protection_event.132 days = 2 }
		}	
	}
}
country_event = { #Nordic country accepts Denmark's invitation
	id =  denmark_protection_event.131
	title =  denmark_protection_event.131.t
	desc =  denmark_protection_event.131.desc
	picture = GFX_report_event_generic_sign_treaty2

	fire_only_once = no

	is_triggered_only = yes

	option = { #Great
		name =  denmark_protection_event.131.a
		add_political_power = 25		
		faction_leader = {
			add_to_faction = FROM
		}
	}
}
country_event = { #Nordic country dismisses Denmark's invitation
	id =  denmark_protection_event.132
	title =  denmark_protection_event.132.t
	desc =  denmark_protection_event.132.desc
	picture = GFX_report_event_military_planning

	fire_only_once = no

	is_triggered_only = yes

	option = { #damnit
		name =  denmark_protection_event.132.a		
		if = {
			limit = {
				NOT = {
					has_country_flag = DEN_invade_the_nordics_flag
				}
			}
			set_country_flag = DEN_invade_the_nordics_flag
		}
		unlock_decision_tooltip = DEN_invade_nordic_countries
	}
}

country_event = { #Army Drills
	id = denmark_protection_event.200
	title = denmark_protection_event.200.t
	desc = denmark_protection_event.200.desc
	picture = GFX_report_event_generic_defensive_preparations

	fire_only_once = no

	is_triggered_only = yes

	option = { #DEN receives good news
		name = denmark_protection_event.200.a
		army_experience = 25
	}
}

country_event = { #Navy Drills
	id = denmark_protection_event.201
	title = denmark_protection_event.201.t
	desc = denmark_protection_event.201.desc
	picture = GFX_report_event_ast_navy

	fire_only_once = no

	is_triggered_only = yes

	option = { #DEN receives good news
		name = denmark_protection_event.201.a
		navy_experience = 25
	}
}

country_event = { #Air Drills
	id = denmark_protection_event.202
	title = denmark_protection_event.202.t
	desc = denmark_protection_event.202.desc
	picture = GFX_report_event_SOV_purge_aircraft_2

	fire_only_once = no

	is_triggered_only = yes

	option = { #DEN receives good news
		name = denmark_protection_event.202.a
		air_experience = 25
	}
}


#########################
#########################
#### CONQUEST EVENTS ####
#########################
#########################

country_event = { #Denmark Demands Iceland's Annexation
	id = denmark_expansion_event.1
	title = denmark_expansion_event.1.t
	desc = denmark_expansion_event.1.desc
	picture = GFX_report_event_generic_read_write

	fire_only_once = yes

	is_triggered_only = yes

	option = { #Accept
		name = denmark_expansion_event.1.a
		ai_chance = {
			base = 5
			modifier = {
				factor = 0
				is_subject = no
				any_allied_country = {
					is_major = yes
				}
			}
			modifier = {
				factor = 2
				has_civil_war = yes
			}
			modifier = {
				factor = 2
				has_capitulated = yes
			}
			modifier = {
				factor = 2
				has_government = FROM
			}
			modifier = {
				factor = 1.5
				has_opinion = {
					target = FROM
					value > 50
				}
			}
			modifier = {
				factor = 1.5
				has_opinion = {
					target = FROM
					value > 75
				}
			}
			modifier = {
				factor = 2
				strength_ratio = {
				    tag = FROM
				    ratio < 0.75
				}
			}
			modifier = {
				factor = 2
				strength_ratio = {
				    tag = FROM
				    ratio < 0.5
				}
			}
			modifier = {
				factor = 5
				is_subject_of = FROM
			}
			modifier = {
				factor = 5
				FROM = {
					has_government = neutrality
				}
				has_completed_focus = ICE_the_kingdom_of_iceland
			}
			modifier = {
				factor = 5
				FROM = {
					has_government = neutrality
				}
				has_completed_focus = ICE_united_we_stand
			}
			modifier = {
				factor = 0.5
				NOT = { is_subject_of = FROM }
			}
		}
		FROM = {
			annex_country = {
				target = ICE
				transfer_troops = yes
			}
		}

		custom_effect_tooltip = GAME_OVER_TT

		hidden_effect = {
			FROM = { 
				country_event = { id = denmark_expansion_event.2 hours = 1 }
			}
		}
	}
	option = { #Refuse
		name = denmark_expansion_event.1.b
		ai_chance = {
			base = 5
			modifier = {
				factor = 5
				is_faction_leader = yes
			}
			modifier = {
				factor = 3
				strength_ratio = {
				    tag = FROM
				    ratio > 1.25
				}
			}
			modifier = {
				factor = 3
				strength_ratio = {
				    tag = FROM
				    ratio > 1.5
				}
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < -24
				}
			}
			modifier = {
				factor = 10
				has_completed_focus = ICE_not_our_king
			}
		}
		ROOT = { end_puppet = FROM }
		FROM = { 
			country_event = { id = denmark_expansion_event.3 hours = 1 }
		}
	}
}
country_event = { #Denmark annexes Iceland
	id = denmark_expansion_event.2
	title = denmark_expansion_event.2.t
	desc = denmark_expansion_event.2.desc
	picture = GFX_report_event_generic_read_write

	fire_only_once = yes

	is_triggered_only = yes

	option = { #Great
		name = denmark_expansion_event.2.a
		add_political_power = 50
		effect_tooltip = {
			annex_country = {
				target = ICE
				transfer_troops = yes
			}
		}
	}
}
country_event = { #Denmark is refused Icelandic Annexation
	id = denmark_expansion_event.3
	title = denmark_expansion_event.3.t
	desc = denmark_expansion_event.3.desc
	picture = GFX_report_event_military_planning

	fire_only_once = yes

	is_triggered_only = yes

	option = { #War it is
		name = denmark_expansion_event.3.a
		create_wargoal = {
		    type = annex_everything
		    target = ICE
		}
	}
}
country_event = { #Denmark Demands Iceland from Overlord
	id = denmark_expansion_event.4
	title = denmark_expansion_event.4.t
	desc = denmark_expansion_event.4.desc
	picture = GFX_report_event_military_planning

	fire_only_once = yes

	is_triggered_only = yes

	option = { #Accept
		name = denmark_expansion_event.4.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 2
				strength_ratio = {
				    tag = FROM
				    ratio < 0.5
				}
			}			
			modifier = {
				factor = 0.5
				any_allied_country = {
					is_major = yes
				}
			}
			modifier = {
				factor = 0.5
				is_major = yes
			}
		}
		effect_tooltip = {
			FROM = { puppet = ICE }
		}

		hidden_effect = {
			FROM = { 
				country_event = { id = denmark_expansion_event.5 hours = 6 }
			}
		}
	}
	option = { #Refuse
		name = denmark_expansion_event.4.b
		ai_chance = {
			base = 2
			modifier = {
				factor = 2
				is_faction_leader = yes
			}
			modifier = {
				factor = 2
				strength_ratio = {
				    tag = FROM
				    ratio > 1.5
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value < 0
				}
			}
		}
		FROM = { 
			country_event = { id = denmark_expansion_event.6 hours = 6 }
		}
	}
}
country_event = { #Denmark puppets Iceland
	id = denmark_expansion_event.5
	title = denmark_expansion_event.5.t
	desc = denmark_expansion_event.5.desc
	picture = GFX_report_event_generic_read_write

	fire_only_once = yes

	is_triggered_only = yes

	option = { #Great
		name = denmark_expansion_event.5.a
		add_political_power = 50
		ROOT = { puppet = ICE }
		unlock_decision_tooltip = DEN_integrate_iceland
		set_country_flag = DEN_can_integrate_iceland_flag
	}
}
country_event = { #Denmark is refused Icelandic puppet
	id = denmark_expansion_event.6
	title = denmark_expansion_event.6.t
	desc = denmark_expansion_event.6.desc
	picture = GFX_report_event_military_planning

	fire_only_once = yes

	is_triggered_only = yes

	option = { #War it is
		name = denmark_expansion_event.6.a
		create_wargoal = {
		    type = annex_everything
		    target = ICE
		}
	}
}

country_event = { #Denmark Demands Sweden's Subjugation
	id = denmark_expansion_event.10
	title = denmark_expansion_event.10.t
	desc = denmark_expansion_event.10.desc
	picture = GFX_report_event_DEN_danish_politics

	fire_only_once = yes

	is_triggered_only = yes

	option = { #Accept
		name = denmark_expansion_event.10.a
		ai_chance = {
			base = 2
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				}
			}
			modifier = {
				factor = 2
				strength_ratio = {
				    tag = FROM
				    ratio < 0.5
				}
			}
		}
		add_stability = -0.1
		add_war_support = -0.05

		effect_tooltip = {
			FROM = { puppet = ROOT }
		}

		hidden_effect = {
			FROM = { 
				country_event = { id = denmark_expansion_event.11 hours = 6 }
			}
		}
	}
	option = { #Refuse
		name = denmark_expansion_event.10.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
			modifier = {
				factor = 5
				strength_ratio = {
				    tag = FROM
				    ratio > 1
				}
			}
			modifier = {
				factor = 5
				strength_ratio = {
				    tag = FROM
				    ratio > 1.5
				}
			}
		}
		add_political_power = 25
		FROM = { 
			country_event = { id = denmark_expansion_event.12 hours = 6 }
		}
	}
}
country_event = { #Denmark Puppets Sweden
	id = denmark_expansion_event.11
	title = denmark_expansion_event.11.t
	desc = denmark_expansion_event.11.desc
	picture = GFX_report_event_generic_read_write

	fire_only_once = yes

	is_triggered_only = yes

	option = { #Great
		name = denmark_expansion_event.11.a
		ROOT = { puppet = FROM }
	}
}
country_event = { #Denmark is refused Swedish Puppet
	id = denmark_expansion_event.12
	title = denmark_expansion_event.12.t
	desc = denmark_expansion_event.12.desc
	picture = GFX_report_event_military_planning

	fire_only_once = yes

	is_triggered_only = yes

	option = { #War it is
		name = denmark_expansion_event.12.a
		create_wargoal = {
		    type = annex_everything
		    target = SWE
		}
		add_timed_idea = {
		    idea = DEN_securing_sweden_ns
		    days = 365
		}
	}
}
country_event = { #Denmark Demands Sweden from Norway
	id = denmark_expansion_event.13
	title = denmark_expansion_event.13.t
	desc = denmark_expansion_event.13.desc
	picture = GFX_report_event_military_planning

	fire_only_once = yes

	is_triggered_only = yes

	option = { #Accept
		name = denmark_expansion_event.13.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				}
			}
			modifier = {
				factor = 2
				strength_ratio = {
				    tag = FROM
				    ratio < 0.5
				}
			}
		}
		add_stability = -0.05
		add_war_support = -0.05

		effect_tooltip = {
			FROM = { puppet = SWE }
		}

		hidden_effect = {
			FROM = { 
				country_event = { id = denmark_expansion_event.14 hours = 6 }
			}
		}
	}
	option = { #Refuse
		name = denmark_expansion_event.13.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
			modifier = {
				factor = 10
				strength_ratio = {
				    tag = FROM
				    ratio > 1
				}
			}
		}
		add_political_power = 25
		FROM = { 
			country_event = { id = denmark_expansion_event.15 hours = 6 }
		}
	}
}
country_event = { #Denmark Puppets Sweden
	id = denmark_expansion_event.14
	title = denmark_expansion_event.14.t
	desc = denmark_expansion_event.14.desc
	picture = GFX_report_event_generic_sign_treaty2

	fire_only_once = yes

	is_triggered_only = yes

	option = { #Great
		name = denmark_expansion_event.14.a
		add_political_power = 50
		ROOT = { puppet = SWE }
	}
}
country_event = { #Denmark is refused Swedish Puppet
	id = denmark_expansion_event.15
	title = denmark_expansion_event.15.t
	desc = denmark_expansion_event.15.desc
	picture = GFX_report_event_military_planning

	fire_only_once = yes

	is_triggered_only = yes

	option = { #War it is
		name = denmark_expansion_event.15.a
		create_wargoal = {
		    type = annex_everything
		    target = SWE
		}
		add_timed_idea = {
		    idea = DEN_securing_sweden_ns
		    days = 365
		}
	}
}

country_event = { #Denmark Demands Norway's Subjugation
	id = denmark_expansion_event.20
	title = denmark_expansion_event.10.t
	desc = denmark_expansion_event.20.desc
	picture = GFX_report_event_DEN_danish_politics

	fire_only_once = yes

	is_triggered_only = yes

	option = { #Accept
		name = denmark_expansion_event.20.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				}
			}
			modifier = {
				factor = 2
				strength_ratio = {
				    tag = FROM
				    ratio < 0.5
				}
			}
		}
		add_stability = -0.1
		add_war_support = -0.05

		effect_tooltip = {
			FROM = { puppet = ROOT }
		}

		hidden_effect = {
			FROM = { 
				country_event = { id = denmark_expansion_event.21 hours = 2 }
			}
		}
	}
	option = { #Refuse
		name = denmark_expansion_event.20.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
			modifier = {
				factor = 5
				strength_ratio = {
				    tag = FROM
				    ratio > 1
				}
			}
			modifier = {
				factor = 5
				strength_ratio = {
				    tag = FROM
				    ratio > 1.5
				}
			}
		}
		FROM = { 
			country_event = { id = denmark_expansion_event.22 hours = 2 }
		}
	}
}
country_event = { #Denmark Puppets Norway
	id = denmark_expansion_event.21
	title = denmark_expansion_event.11.t
	desc = denmark_expansion_event.11.desc
	picture = GFX_report_event_generic_read_write

	fire_only_once = yes

	is_triggered_only = yes

	option = { #Great
		name = denmark_expansion_event.21.a
		ROOT = { puppet = FROM }
	}
}
country_event = { #Denmark is refused Norwegian puppet
	id = denmark_expansion_event.22
	title = denmark_expansion_event.12.t
	desc = denmark_expansion_event.12.desc
	picture = GFX_report_event_military_planning

	fire_only_once = yes

	is_triggered_only = yes

	option = { #War it is
		name = denmark_expansion_event.22.a
		create_wargoal = {
		    type = annex_everything
		    target = NOR
		}
		add_timed_idea = {
		    idea = DEN_securing_norway_ns
		    days = 365
		}
	}
}
country_event = { #Denmark Demands Norway from Sweden
	id = denmark_expansion_event.23
	title = denmark_expansion_event.23.t
	desc = denmark_expansion_event.23.desc
	picture = GFX_report_event_military_planning

	fire_only_once = yes

	is_triggered_only = yes

	option = { #Accept
		name = denmark_expansion_event.23.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				}
			}
			modifier = {
				factor = 2
				strength_ratio = {
				    tag = FROM
				    ratio < 0.5
				}
			}
		}
		add_stability = -0.05
		add_war_support = -0.05

		effect_tooltip = {
			FROM = { puppet = NOR }
		}

		hidden_effect = {
			FROM = { 
				country_event = { id = denmark_expansion_event.24 hours = 6 }
			}
		}
	}
	option = { #Refuse
		name = denmark_expansion_event.23.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
			modifier = {
				factor = 10
				strength_ratio = {
				    tag = FROM
				    ratio > 1
				}
			}
		}
		add_political_power = 25
		FROM = { 
			country_event = { id = denmark_expansion_event.25 hours = 6 }
		}
	}
}
country_event = { #Denmark Puppets Norway
	id = denmark_expansion_event.24
	title = denmark_expansion_event.24.t
	desc = denmark_expansion_event.24.desc
	picture = GFX_report_event_generic_read_write

	fire_only_once = yes

	is_triggered_only = yes

	option = { #Great
		name = denmark_expansion_event.24.a
		add_political_power = 50
		ROOT = { puppet = NOR }
	}
}
country_event = { #Denmark is refused Norwegian Puppet
	id = denmark_expansion_event.25
	title = denmark_expansion_event.25.t
	desc = denmark_expansion_event.25.desc
	picture = GFX_report_event_military_planning

	fire_only_once = yes

	is_triggered_only = yes

	option = { #War it is
		name = denmark_expansion_event.25.a
		create_wargoal = {
		    type = annex_everything
		    target = NOR
		}
		add_timed_idea = {
		    idea = DEN_securing_norway_ns
		    days = 365
		}
	}
}

country_event = { #Denmark is annexing country
	id = denmark_expansion_event.100
	title = denmark_expansion_event.100.t
	desc = denmark_expansion_event.100.desc
	picture = GFX_report_event_military_planning

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Not Great
		name = denmark_expansion_event.100.a
		effect_tooltip = {
			FROM = {
				annex_country = {
					target = ROOT
					transfer_troops = yes
				}
			}
		}
	}
}

country_event = { #Denmark Demands Icelandic Territory
	id = denmark_expansion_event.200
	title = denmark_expansion_event.200.t
	desc = denmark_expansion_event.200.desc
	picture = GFX_report_event_military_planning

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Accept
		name = denmark_expansion_event.200.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				}
			}
			modifier = {
				factor = 2
				strength_ratio = {
				    tag = FROM
				    ratio < 0.75
				}
			}
			modifier = {
				factor = 2
				strength_ratio = {
				    tag = FROM
				    ratio < 0.5
				}
			}
			modifier = {
				factor = 2
				FROM = {
					is_major = yes
				}
			}
		}
		add_stability = -0.1
		add_war_support = -0.05

		effect_tooltip = {
			every_state = {
				limit = {
					is_controlled_by = ROOT 
					is_core_of = ICE
				}
				transfer_state_to = FROM
			}
		}

		hidden_effect = {
			FROM = { 
				country_event = { id = denmark_expansion_event.201 hours = 2 }
			}
		}
	}
	option = { #Refuse
		name = denmark_expansion_event.200.b
		ai_chance = {
			base = 5
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
			modifier = {
				factor = 5
				strength_ratio = {
				    tag = FROM
				    ratio > 1
				}
			}
		}
		FROM = { 
			country_event = { id = denmark_expansion_event.202 hours = 2 }
		}
	}
}
country_event = { #Denmark gets Icelandic Territory
	id = denmark_expansion_event.201
	title = denmark_expansion_event.201.t
	desc = denmark_expansion_event.201.desc
	picture = GFX_report_event_generic_read_write

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Great
		name = denmark_expansion_event.201.a
		add_political_power = 25
		every_state = {
			limit = {
				is_controlled_by = FROM 
				is_core_of = ICE
			}
			transfer_state_to = ROOT
		}
	}
}
country_event = { #Denmark is refused Icelandic Territory
	id = denmark_expansion_event.202
	title = denmark_expansion_event.12.t
	desc = denmark_expansion_event.12.desc
	picture = GFX_report_event_journalists_speech

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #War it is
		name = denmark_expansion_event.202.a
		DEN_icelandic_territory_wargoals = yes
	}
}

country_event = { #Denmark Demands Swedish Territory
	id = denmark_expansion_event.210
	title = denmark_expansion_event.210.t
	desc = denmark_expansion_event.210.desc
	picture = GFX_report_event_military_planning

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Accept
		name = denmark_expansion_event.210.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				}
			}
			modifier = {
				factor = 2
				strength_ratio = {
				    tag = FROM
				    ratio < 0.5
				}
			}
			modifier = {
				factor = 2
				FROM = {
					is_major = yes
				}
			}
		}
		add_stability = -0.1
		add_war_support = -0.05

		effect_tooltip = {
			every_state = {
				limit = {
					is_controlled_by = ROOT 
					is_core_of = SWE
				}
				transfer_state_to = FROM
			}
		}

		hidden_effect = {
			FROM = { 
				country_event = { id = denmark_expansion_event.211 hours = 2 }
			}
		}
	}
	option = { #Refuse
		name = denmark_expansion_event.210.b
		ai_chance = {
			base = 5
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
			modifier = {
				factor = 5
				strength_ratio = {
				    tag = FROM
				    ratio > 1
				}
			}
		}
		FROM = { 
			country_event = { id = denmark_expansion_event.212 hours = 2 }
		}
	}
}
country_event = { #Denmark gets Swedish Territory
	id = denmark_expansion_event.211
	title = denmark_expansion_event.211.t
	desc = denmark_expansion_event.211.desc
	picture = GFX_report_event_generic_sign_treaty2

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Great
		name = denmark_expansion_event.211.a
		add_political_power = 25
		every_state = {
			limit = {
				is_controlled_by = FROM 
				is_core_of = SWE
			}
			transfer_state_to = ROOT
		}
	}
}
country_event = { #Denmark is refused Swedish Territory
	id = denmark_expansion_event.212
	title = denmark_expansion_event.212.t
	desc = denmark_expansion_event.212.desc
	picture = GFX_report_event_journalists_speech

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #War it is
		name = denmark_expansion_event.212.a
		DEN_swedish_territory_wargoals = yes
	}
}

country_event = { #Denmark Demands Finnish Territory
	id = denmark_expansion_event.220
	title = denmark_expansion_event.220.t
	desc = denmark_expansion_event.220.desc
	picture = GFX_report_event_military_planning

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Accept
		name = denmark_expansion_event.220.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				}
			}
			modifier = {
				factor = 2
				strength_ratio = {
				    tag = FROM
				    ratio < 0.5
				}
			}
			modifier = {
				factor = 2
				FROM = {
					is_major = yes
				}
			}
		}
		add_stability = -0.1
		add_war_support = -0.05

		effect_tooltip = {
			every_state = {
				limit = {
					is_controlled_by = ROOT 
					is_core_of = FIN
				}
				transfer_state_to = FROM
			}
		}

		hidden_effect = {
			FROM = { 
				country_event = { id = denmark_expansion_event.221 hours = 2 }
			}
		}
	}
	option = { #Refuse
		name = denmark_expansion_event.220.b
		ai_chance = {
			base = 5
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
			modifier = {
				factor = 5
				strength_ratio = {
				    tag = FROM
				    ratio > 1
				}
			}
		}
		FROM = { 
			country_event = { id = denmark_expansion_event.222 hours = 2 }
		}
	}
}
country_event = { #Denmark gets Finnish Territory
	id = denmark_expansion_event.221
	title = denmark_expansion_event.221.t
	desc = denmark_expansion_event.221.desc
	picture = GFX_report_event_generic_sign_treaty2

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Great
		name = denmark_expansion_event.221.a
		add_political_power = 25
		every_state = {
			limit = {
				is_controlled_by = FROM 
				is_core_of = FIN
			}
			transfer_state_to = ROOT
		}
	}
}
country_event = { #Denmark is refused Finnish Territory
	id = denmark_expansion_event.222
	title = denmark_expansion_event.222.t
	desc = denmark_expansion_event.222.desc
	picture = GFX_report_event_journalists_speech

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #War it is
		name = denmark_expansion_event.222.a
		DEN_finnish_territory_wargoals = yes
	}
}

country_event = { #Denmark Demands Norwegian Territory
	id = denmark_expansion_event.230
	title = denmark_expansion_event.230.t
	desc = denmark_expansion_event.230.desc
	picture = GFX_report_event_military_planning

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Accept
		name = denmark_expansion_event.230.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_government = FROM
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				}
			}
			modifier = {
				factor = 2
				strength_ratio = {
				    tag = FROM
				    ratio < 0.5
				}
			}
			modifier = {
				factor = 2
				FROM = {
					is_major = yes
				}
			}
		}
		add_stability = -0.1
		add_war_support = -0.05

		effect_tooltip = {
			every_state = {
				limit = {
					is_controlled_by = ROOT 
					is_core_of = FIN
				}
				transfer_state_to = FROM
			}
		}

		hidden_effect = {
			FROM = { 
				country_event = { id = denmark_expansion_event.231 hours = 2 }
			}
		}
	}
	option = { #Refuse
		name = denmark_expansion_event.230.b
		ai_chance = {
			base = 5
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
			modifier = {
				factor = 5
				strength_ratio = {
				    tag = FROM
				    ratio > 1
				}
			}
		}
		FROM = { 
			country_event = { id = denmark_expansion_event.232 hours = 2 }
		}
	}
}
country_event = { #Denmark gets Norwegian Territory
	id = denmark_expansion_event.231
	title = denmark_expansion_event.231.t
	desc = denmark_expansion_event.231.desc
	picture = GFX_report_event_generic_sign_treaty2

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Great
		name = denmark_expansion_event.231.a
		add_political_power = 25
		every_state = {
			limit = {
				is_controlled_by = FROM 
				is_core_of = FIN
			}
			transfer_state_to = ROOT
		}
	}
}
country_event = { #Denmark is refused Norwegian Territory
	id = denmark_expansion_event.232
	title = denmark_expansion_event.232.t
	desc = denmark_expansion_event.232.desc
	picture = GFX_report_event_journalists_speech

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #War it is
		name = denmark_expansion_event.232.a
		DEN_norwegian_territory_wargoals = yes
	}
}

country_event = { #Denmark offers Swedish steel for guarantees
	id = denmark_expansion_event.300
	title = denmark_expansion_event.300.t
	desc = denmark_expansion_event.300.desc
	picture = GFX_report_event_generic_read_write

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Accept
		name = denmark_expansion_event.300.a
		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				has_government = FROM
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				}
			}
			modifier = {
				factor = 2
				FROM = {
					is_major = yes
				}
			}
		}
		effect_tooltip = {
			ROOT = { give_guarantee = FROM }
			FROM = {
				give_resource_rights = {
					receiver = ROOT
					state = 666
				}
				add_offsite_building = { type = industrial_complex  level = 2 }
			}
		}
		
		hidden_effect = {
			FROM = { 
				country_event = { id = denmark_expansion_event.301 hours = 2 }
			}
		}
	}
	option = { #Refuse
		name = denmark_expansion_event.300.b
		ai_chance = {
			base = 2
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
			modifier = {
				factor = 5
				strength_ratio = {
				    tag = FROM
				    ratio > 1.5
				}
			}
		}
		set_country_flag = DEN_refused_swedish_steel
		FROM = { 
			country_event = { id = denmark_expansion_event.302 hours = 2 }
		}
	}
}
country_event = { #Denmark gives away resource rights
	id = denmark_expansion_event.301
	title = denmark_expansion_event.301.t
	desc = denmark_expansion_event.301.desc
	picture = GFX_report_event_generic_sign_treaty2

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Great
		name = denmark_expansion_event.301.a
		FROM = { give_guarantee = ROOT }
		ROOT = {
			give_resource_rights = {
				receiver = FROM
				state = 666
			}
		}
		add_offsite_building = { type = industrial_complex  level = 2 }
	}
}
country_event = { #FROM doesn't want our Swedish steel
	id = denmark_expansion_event.302
	title = denmark_expansion_event.302.t
	desc = denmark_expansion_event.302.desc
	picture = GFX_report_event_journalists_speech

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #War it is
		name = denmark_expansion_event.302.a
		clr_country_flag = DEN_offers_swedish_steel_flag
	}
}

country_event = { #The Question of Neutrality
	id = denmark_expansion_event.400
	title = denmark_expansion_event.400.t
	desc = denmark_expansion_event.400.desc
	picture = GFX_report_event_DEN_danish_politics

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Join Germany
		name = denmark_expansion_event.400.a
		ai_chance = {
			base = 5
		}
		trigger= {
			Not = { is_in_faction_with = GER }
			GER = {
				OR = {
					has_government = democratic
					has_government = neutrality
				}
				is_faction_leader = yes
				has_civil_war = no
			}
		}
		GER = {
			country_event = { id =  denmark_expansion_event.401 days = 2 } 
		}

		custom_effect_tooltip = if_they_accept_tt
		effect_tooltip = {
			GER = {
				add_to_faction = ROOT
			}
		}
		custom_effect_tooltip = DEN_remove_declaration_of_neutrality_tt
	}
	option = { #Create Faction
		name = denmark_expansion_event.400.b
		ai_chance = {
			base = 10
		}

		if = {
			limit = {
				NOT = { has_rule = can_create_factions }
			}
			set_rule = { can_create_factions = yes }
		}
		create_faction_from_template = {
			template = faction_template_DEN_nordic_cooperation_alliance
			name = DEN_northern_security_pact
			icon = GFX_faction_logo_generic_8
		}

		unlock_decision_tooltip = DEN_northern_security_pact_invitation
		if = {
			limit = {
				has_tech_sharing_feature = yes
			}
			custom_effect_tooltip = DEN_invite_allies_to_tech_sharing_decision_tt
		}

		custom_effect_tooltip = DEN_remove_declaration_of_neutrality_tt
		set_country_flag = DEN_can_create_faction_flag
	}
	option = { #Stay Neutral... for now hehehe >:D
		name = denmark_expansion_event.400.c
		ai_chance = {
			base = 1
		}
		add_stability = 0.05
	}
}
country_event = { #Denmark offers an Alliance to Germany
	id = denmark_expansion_event.401
	title = denmark_expansion_event.401.t
	desc = denmark_expansion_event.401.desc
	picture = GFX_report_event_military_planning

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Accept
		name = denmark_occupation_event.100.a #Intentional
		ai_chance = {
			base = 5
			modifier = {
				factor = 2
				has_government = FROM
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 0
				FROM = {
					is_justifying_wargoal_against = ROOT
				}
			}
			modifier = {
				factor = 0
				FROM = {
					has_wargoal_against = ROOT
				}
			}
		}
		add_political_power = 25
		add_war_support = 0.05
		effect_tooltip = {
			ROOT = {
				add_to_faction = FROM
			}
		}
		FROM = {
			country_event = { id =  denmark_expansion_event.402 days = 2 } 
		}
	}
	option = { #Refuse
		name = denmark_occupation_event.100.b #Intentional
		ai_chance = {
			base = 1
			modifier = {
				factor = 15
				has_opinion = {
					target = FROM
					value < 0
				}
			}
		}
		FROM = {
			country_event = { id =  denmark_expansion_event.403 days = 2 } 
		}
	}
}
country_event = { #Denmark gains an Ally
	id = denmark_expansion_event.402
	title = denmark_expansion_event.501.t #Intentional
	desc = denmark_expansion_event.501.desc #Intentional
	picture = GFX_report_event_generic_sign_treaty1

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Great
		name = denmark_resistance_event.2.a #Intentional
		add_political_power = 25
		add_war_support = 0.05
		FROM = {
			add_to_faction = ROOT
		}
		if = {
			limit = {
				has_idea = DEN_declaration_of_neutrality
			}
			remove_ideas = DEN_declaration_of_neutrality
		}
	}
}
country_event = { #Germany doesn't want to become Allies
	id = denmark_expansion_event.403
	title = denmark_expansion_event.502.t #Intentional
	desc = denmark_expansion_event.502.desc #Intentional
	picture = GFX_report_event_journalists_speech

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Create Faction
		name = denmark_expansion_event.400.b
		ai_chance = {
			base = 5
		}

		if = {
			limit = {
				NOT = { has_rule = can_create_factions }
			}
			set_rule = { can_create_factions = yes }
		}
		create_faction_from_template = {
			template = faction_template_DEN_nordic_cooperation_alliance
			name = DEN_northern_security_pact
			icon = GFX_faction_logo_generic_8
		}

		unlock_decision_tooltip = DEN_northern_security_pact_invitation
		if = {
			limit = {
				has_tech_sharing_feature = yes
			}
			custom_effect_tooltip = DEN_invite_allies_to_tech_sharing_decision_tt
		}

		custom_effect_tooltip = DEN_remove_declaration_of_neutrality_tt
		set_country_flag = DEN_can_create_faction_flag
	}
	option = { #Stay Neutral... for now hehehe >:D
		name = denmark_expansion_event.400.c
		ai_chance = {
			base = 1
		}
		add_stability = 0.05
	}
}

country_event = { #Denmark offers an Alliance
	id = denmark_expansion_event.500
	title = denmark_expansion_event.500.t
	desc = denmark_expansion_event.500.desc
	picture = GFX_report_event_DEN_danish_politics

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Accept
		name = denmark_expansion_event.500.a
		ai_chance = {
			base = 5
			modifier = {
				factor = 2
				has_civil_war = yes
			}
			modifier = {
				factor = 2
				has_government = FROM
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				}
			}
			modifier = {
				factor = 2
				strength_ratio = {
				    tag = FROM
				    ratio < 0.75
				}
			}
			modifier = {
				factor = 2
				strength_ratio = {
				    tag = FROM
				    ratio < 0.5
				}
			}
			modifier = {
				factor = 2
				any_neighbor_country = {
					is_major = yes
				}
			}
			modifier = {
				factor = 0
				FROM = {
					is_justifying_wargoal_against = ROOT
				}
			}
			modifier = {
				factor = 0
				FROM = {
					has_wargoal_against = ROOT
				}
			}
		}
		FROM = {
			add_to_faction = ROOT
		}
		FROM = {
			country_event = { id =  denmark_expansion_event.501 days = 2 } 
		}
	}
	option = { #Refuse
		name = denmark_expansion_event.500.b
		ai_chance = {
			base = 2
			modifier = {
				factor = 5
				strength_ratio = {
				    tag = FROM
				    ratio > 1.25
				}
			}
			modifier = {
				factor = 5
				strength_ratio = {
				    tag = FROM
				    ratio > 1.5
				}
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
		}
		FROM = {
			country_event = { id =  denmark_expansion_event.502 days = 2 } 
		}
	}
}
country_event = { #Denmark gains an Ally
	id = denmark_expansion_event.501
	title = denmark_expansion_event.501.t
	desc = denmark_expansion_event.501.desc
	picture = GFX_report_event_generic_sign_treaty1

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Great
		name = denmark_expansion_event.501.a
		effect_tooltip = {
			ROOT = {
				add_to_faction = FROM
			}
		}
	}
}
country_event = { #FROM doesn't want to become Allies
	id = denmark_expansion_event.502
	title = denmark_expansion_event.502.t
	desc = denmark_expansion_event.502.desc
	picture = GFX_report_event_journalists_speech

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Damn
		name = denmark_expansion_event.502.a
		
	}
}

country_event = { #Denmark offers tech sharing
	id = denmark_expansion_event.600
	title = denmark_expansion_event.600.t
	desc = denmark_expansion_event.600.desc
	picture = GFX_report_event_generic_read_write

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Accept
		name = denmark_expansion_event.600.a
		ai_chance = {
			base = 5
			modifier = {
				factor = 2
				has_civil_war = yes
			}
			modifier = {
				factor = 2
				has_government = FROM
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				}
			}
			modifier = {
				factor = 2
				strength_ratio = {
				    tag = FROM
				    ratio < 0.75
				}
			}
			modifier = {
				factor = 2
				strength_ratio = {
				    tag = FROM
				    ratio < 0.5
				}
			}
			modifier = {
				factor = 2
				any_neighbor_country = {
					is_major = yes
				}
			}
			modifier = {
				factor = 0
				FROM = {
					is_justifying_wargoal_against = ROOT
				}
			}
			modifier = {
				factor = 0
				FROM = {
					has_wargoal_against = ROOT
				}
			}
		}
		effect_tooltip = {
			FROM = {
				add_to_tech_sharing_group = DEN_northern_technological_advancements_group
			}
		}
		FROM = {
			country_event = { id =  denmark_expansion_event.601 days = 2 } 
		}
	}
	option = { #Refuse
		name = denmark_expansion_event.600.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 15
				strength_ratio = {
				    tag = FROM
				    ratio > 1.25
				}
			}
		}
		FROM = {
			country_event = { id =  denmark_expansion_event.602 days = 2 } 
		}
	}
}
country_event = { #FROM joins tech sharing group
	id = denmark_expansion_event.601
	title = denmark_expansion_event.601.t
	desc = denmark_expansion_event.601.desc
	picture = GFX_report_event_generic_sign_treaty2

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Great
		name = denmark_expansion_event.601.a
		if = {
			limit = {
				NOT = {
					is_in_tech_sharing_group = DEN_northern_technological_advancements_group
				}
			}
			add_to_tech_sharing_group = DEN_northern_technological_advancements_group
		}
		FROM = {
			add_to_tech_sharing_group = DEN_northern_technological_advancements_group
		}
	}
}
country_event = { #FROM rejects tech sharing group
	id = denmark_expansion_event.602
	title = denmark_expansion_event.602.t
	desc = denmark_expansion_event.602.desc
	picture = GFX_report_event_journalists_speech

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Damn
		name = denmark_expansion_event.602.a
		
	}
}

country_event = { #Denmark interferce in our politics; they try to change our ideology!
	id = denmark_expansion_event.700
	title = denmark_expansion_event.700.t
	desc = denmark_expansion_event.700.desc
	picture = GFX_report_event_military_planning

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Accept
		name = denmark_expansion_event.13.a #Intentional
		ai_chance = {
			base = 5
			modifier = {
				factor = 2
				has_civil_war = yes
			}
			modifier = {
				factor = 2
				any_neighbor_country = {
					is_major = yes
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				}
			}
			modifier = {
				factor = 2
				is_in_faction_with = FROM
			}
			modifier = {
				factor = 2
				strength_ratio = {
				    tag = FROM
				    ratio < 0.75
				}
			}
			modifier = {
				factor = 2
				strength_ratio = {
				    tag = FROM
				    ratio < 0.5
				}
			}
			modifier = {
				factor = 0.5
				FROM = {
					is_justifying_wargoal_against = ROOT
				}
				FROM = {
					has_wargoal_against = ROOT
				}
				ROOT = {
					is_justifying_wargoal_against = FROM
				}
				ROOT = {
					has_wargoal_against = FROM
				}
			}
		}
		if = {
			limit = {
				FROM = { has_government = neutrality }
			}
			add_timed_idea = {
				idea = DEN_foreign_influence_neutrality_ns
				days = 365
			}
		}
		else_if = {
			limit = {
				FROM = { has_government = fascism }
			}
			add_timed_idea = {
				idea = DEN_foreign_influence_fascism_ns
				days = 365
			}
		}
	}
	option = { #Reject
		name = denmark_expansion_event.4.b #Intentional
		ai_chance = {
			base = 0 #Otherwise we pay for nothing
			modifier = {
				add = 10
				strength_ratio = {
				    tag = FROM
				    ratio > 1
				}
			}
			modifier = {
				add = 10
				strength_ratio = {
				    tag = FROM
				    ratio > 1.25
				}
			}
			modifier = {
				add = 10
				has_opinion = {
					target = FROM
					value < 0
				}
			}
			modifier = {
				add = 10
				has_opinion = {
					target = FROM
					value < -24
				}
			}
		}
		hidden_effect = {
			FROM = {
				country_event = { id =  denmark_expansion_event.701 days = 3 } 
			}
		}
	}
}
country_event = { #FROM stopped Danish subterfuge acts
	id = denmark_expansion_event.701
	title = denmark_expansion_event.701.t
	desc = denmark_expansion_event.701.desc
	picture = GFX_report_event_journalists_speech

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Damn
		name = denmark_expansion_event.602.a #Intentional
		if = {
			limit = {
				has_government = neutrality
			}
			effect_tooltip = {
				FROM = {
					remove_ideas = DEN_foreign_influence_neutrality_ns
				}
			}
		}
		else_if = {
			limit = {
				has_government = fascism
			}
			effect_tooltip = {
				FROM = {
					remove_ideas = DEN_foreign_influence_fascism_ns
				}
			}
		}
	}
}

country_event = { #Denmark offers subjugation
	id = denmark_expansion_event.800
	title = denmark_expansion_event.800.t
	desc = denmark_expansion_event.800.desc
	picture = GFX_report_event_military_planning

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Accept
		name = denmark_expansion_event.600.a #Intentional
		ai_chance = {
			base = 5
			modifier = {
				factor = 2
				has_civil_war = yes
			}
			modifier = {
				factor = 2
				has_government = FROM
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 49
				}
			}
			modifier = {
				factor = 2
				strength_ratio = {
				    tag = FROM
				    ratio < 0.75
				}
			}
			modifier = {
				factor = 2
				strength_ratio = {
				    tag = FROM
				    ratio < 0.5
				}
			}
			modifier = {
				factor = 2
				any_neighbor_country = {
					is_major = yes
				}
			}
			modifier = {
				factor = 0
				FROM = {
					is_justifying_wargoal_against = ROOT
				}
			}
			modifier = {
				factor = 0
				FROM = {
					has_wargoal_against = ROOT
				}
			}
		}
		
		effect_tooltip = {
			
			FROM = { puppet = ROOT }

		}

		FROM = {
			country_event = { id =  denmark_expansion_event.801 days = 2 } 
		}

	}
	option = { #Refuse
		name = denmark_protection_event.100.b #Intentional
		ai_chance = {
			base = 2
			modifier = {
				factor = 10
				strength_ratio = {
				    tag = FROM
				    ratio > 1
				}
			}
			modifier = {
				factor = 10
				strength_ratio = {
				    tag = FROM
				    ratio > 1.25
				}
			}
			modifier = {
				factor = 10
				has_opinion = {
					target = FROM
					value < 0
				}
			}
			modifier = {
				factor = 10
				has_opinion = {
					target = FROM
					value < -24
				}
			}
		}

		FROM = {
			country_event = { id =  denmark_expansion_event.802 days = 2 } 
		}

	}
}
country_event = { # ROOT gains a Puppet
	id = denmark_expansion_event.801
	title = denmark_expansion_event.801.t
	desc = denmark_expansion_event.801.desc
	picture = GFX_report_event_generic_sign_treaty1

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Great
		name = denmark_expansion_event.301.a #Intentional

		puppet = FROM 

	}
}
country_event = { # FROM doesn't want to become a Puppet
	id = denmark_expansion_event.802
	title = denmark_expansion_event.802.t
	desc = denmark_expansion_event.802.desc
	picture = GFX_report_event_journalists_speech

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Damn
		name = denmark_protection_event.102.a #Intentional
		
	}
}


########################
########################
#### FASCIST EVENTS ####
########################
########################

country_event = { #Denmark seeks German Support
	id = denmark_fascist_event.1
	title = denmark_fascist_event.1.t
	desc = denmark_fascist_event.1.desc
	picture = GFX_report_event_generic_read_write

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Accept
		name = denmark_fascist_event.1.a
		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 0
				FROM = {
					is_justifying_wargoal_against = ROOT
				}
			}
			modifier = {
				factor = 0
				FROM = {
					has_wargoal_against = ROOT
				}
			}
		}
		effect_tooltip = {
			ROOT = {
				add_to_faction = FROM
			}
		}
		FROM = {
			country_event = { id =  denmark_fascist_event.2 days = 1 } 
		}
	}
	option = { #Refuse
		name = denmark_fascist_event.1.b
		ai_chance = {
			base = 2
		}
		FROM = {
			country_event = { id =  denmark_fascist_event.3 days = 1 } 
		}
	}
}
country_event = { #Denmark joins the Axis
	id = denmark_fascist_event.2
	title = denmark_fascist_event.2.t
	desc = denmark_fascist_event.2.desc
	picture = GFX_report_event_DEN_fascist_troops

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Great
		name = denmark_fascist_event.2.a
		add_political_power = 100
		add_stability = 0.05

		set_politics = {
			ruling_party = fascism
		}
		
		DEN_frits_clausen = {
			promote_character = yes
		}

		FROM = {
			add_to_faction = ROOT
		}

		if = {  #Having bypassed "Ask for Support" and not able to complete "Joint Military Program", send event
			limit = {
				NOT = { has_completed_focus = DEN_ask_for_support }
			}
			GER = {
				country_event = { id =  denmark_fascist_event.20 days = 7 } 
			}

			custom_effect_tooltip = if_they_accept_tt
			effect_tooltip = {
				if = {
					limit = { 
						has_tech_sharing_feature = yes
					}
					add_to_tech_sharing_group = DEN_german_danish_joint_military_program
				}
				add_tech_bonus = {
					name = DEN_german_danish_joint_military_program
					bonus = 0.5
					uses = 1
					category = armor
				}
			}
		}
	}
}
country_event = { #Germany Rejects Denmark
	id = denmark_fascist_event.3
	title = denmark_fascist_event.3.t
	desc = denmark_fascist_event.3.desc
	picture = GFX_report_event_journalists_speech

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Damn
		name = denmark_fascist_event.3.a
		trigger = {
			NOT = {
				has_government = fascism
			}
		}
		ai_chance = {
			base = 1
		}
		set_politics = {
			ruling_party = fascism
		}
		
		DEN_frits_clausen = {
			promote_character = yes
		}
		
		start_civil_war = {
			ideology = neutrality #SPLITTING TAG
			size = party_popularity@neutrality
		}
	}
	option = { #Damn
		name = denmark_fascist_event.3.b
		trigger = {
			has_government = fascism
		}
		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				NOT = { has_rule = can_create_factions }
			}
			set_rule = { can_create_factions = yes }
		}
		create_faction = DEN_northern_national_front
		custom_effect_tooltip = DEN_remove_declaration_of_neutrality_tt
		unlock_decision_tooltip = DEN_northern_national_front_invitation

		set_country_flag = DEN_create_northern_national_front_flag
	}
}

country_event = { #German event Denmark wants tech sharing
	id = denmark_fascist_event.20
	title = denmark_fascist_event.20.t
	desc = denmark_fascist_event.20.desc
	picture = GFX_report_event_generic_sign_treaty1

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Accept
		name = denmark_fascist_event.20.a
		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 0
				FROM = {
					is_justifying_wargoal_against = ROOT
				}
			}
			modifier = {
				factor = 0
				FROM = {
					has_wargoal_against = ROOT
				}
			}
		}

		effect_tooltip = {
			if = {
				limit = { 
					has_tech_sharing_feature = yes
				}
				add_to_tech_sharing_group = DEN_german_danish_joint_military_program
				FROM = {
					add_to_tech_sharing_group = DEN_german_danish_joint_military_program
				}
			}
		}

		add_tech_bonus = {
			name = DEN_german_danish_joint_military_program
			bonus = 0.5
			uses = 1
			category = armor
		}
		
		FROM = {
			country_event = { id =  denmark_fascist_event.21 days = 1 } 
		}
	}
	option = { #Refuse
		name = denmark_fascist_event.1.b
		ai_chance = {
			base = 2
		}
		FROM = {
			country_event = { id =  denmark_fascist_event.22 days = 1 } 
		}
	}
}
country_event = { #Denmark gets tech sharing
	id = denmark_fascist_event.21
	title = denmark_fascist_event.21.t
	desc = denmark_fascist_event.21.desc
	picture = GFX_report_event_generic_handshake

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Great
		name = denmark_fascist_event.21.a

		if = {
			limit = { 
				has_tech_sharing_feature = yes
			}
			add_to_tech_sharing_group = DEN_german_danish_joint_military_program
			FROM = {
				add_to_tech_sharing_group = DEN_german_danish_joint_military_program
			}
		}

		add_tech_bonus = {
			name = DEN_german_danish_joint_military_program
			bonus = 0.5
			uses = 1
			category = armor
		}
	}
}
country_event = { #Germany Rejects tech sharing
	id = denmark_fascist_event.22
	title = denmark_fascist_event.22.t
	desc = denmark_fascist_event.22.desc
	picture = GFX_report_event_journalists_speech

	#fire_only_once = yes

	is_triggered_only = yes

	option = { #Damn
		name = denmark_fascist_event.22.a
		
	}
}



##############################
##############################
#### MISCELLANEOUS EVENTS ####
##############################
##############################

country_event = { #End of the Economic Crisis
	id = denmark_events.1
	title = denmark_events.1.t
	desc = denmark_events.1.desc
	picture = GFX_report_event_DEN_celebration

	fire_only_once = yes

	trigger = {
		original_tag = DEN
		NOT = { has_dynamic_modifier = { modifier = DEN_economic_crisis_dynamic_modifier }}
		has_war = no
		has_civil_war = no
		is_subject = no
		has_dlc = "Arms Against Tyranny"
	}

	mean_time_to_happen = {
		days = 180
	}

	option = { #DEN receives good news
		name = denmark_events.1.a

		add_stability = 0.05
		
		add_to_variable = { DEN_industrial_improvement_tracker_var = 1 }
		DEN_improve_industrial_capabilities_NS = yes
		add_to_variable = {
			DEN_industrial_capabilities_consumer_goods = -0.1
			tooltip = consumer_goods_factor_tt
		}
	}
}

country_event = { #Forts makes the people feels safe
	id = denmark_events.2
	title = denmark_events.2.t
	desc = denmark_events.2.desc
	picture = GFX_report_event_bunker_01

	fire_only_once = yes

	trigger = {
		original_tag = DEN
		has_completed_focus = DEN_build_a_modern_dannevirke
		has_completed_focus = DEN_refortify_tunestillingen
		has_completed_focus = DEN_fortify_the_islands
		has_war = no
		has_civil_war = no
	}

	mean_time_to_happen = {
		days = 180
	}

	option = { #DEN receives good news
		name = denmark_events.2.a
		add_stability = 0.05
		add_war_support = 0.05
	}
}

#MM: Never used. Unlocalized
country_event = { #removing Neutrality spirit
	id = denmark_events.3
	title = denmark_events.3.t
	desc = denmark_events.3.desc
	picture = GFX_report_event_DEN_danish_troops

	is_triggered_only = yes

	fire_only_once = yes

	option = { #Surrender
		name = denmark_events.3.a
		effect_tooltip = {
			remove_ideas = DEN_declaration_of_neutrality
		}		
	}
}

country_event = { #The Danish King seeks refuge
	id = denmark_events.100
	title = denmark_events.100.t
	desc = denmark_events.100.desc
	picture = GFX_report_event_DEN_exiled_king

	immediate = {
		set_country_flag = DEN_received_danish_king_flag
	}

	fire_only_once = no

	is_triggered_only = yes

	option = { #Welcome him
		name = denmark_events.100.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				OR = {
					has_government = neutrality
					has_government = fascism
				}
			}
			modifier = {
				factor = 2
				has_opinion = { #We don't like Denmark anyways
					target = FROM
					value < 0
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value < -24
				}
			}
			modifier = {
				factor = 2
				strength_ratio = {
				    tag = FROM
				    ratio > 1
				}
			}
		}
		add_political_power = 0.1
		add_war_support = 0.05

		create_wargoal = {
			type = topple_government
			target = DEN
		}
		
	}
	option = { #Send him away
		name = denmark_events.100.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_opinion = { #We like Denmark just the way it is
					target = FROM
					value > 24
				}
			}
			modifier = {
				factor = 5
				strength_ratio = { #Denmark is too strong
				    tag = FROM
				    ratio < 0.5
				}
			}
		}
		
		hidden_effect = { #NOR is the first country in this chain and is thusly not mentioned below
			if = {
				limit = {
					SWE = {
						NOT = { has_country_flag = DEN_received_danish_king_flag }
						is_subject = no
						has_civil_war = no
						OR = {
							NOT = { has_government = communism }
							NOT = { has_government = fascism }
						}
					}
				}
				SWE = { country_event = { id =  denmark_fascist_event.1 days = 5 }}
			}
			else_if = {
				limit = {
					ENG = {
						NOT = { has_country_flag = DEN_received_danish_king_flag }
						is_subject = no
						has_civil_war = no
						OR = {
							NOT = { has_government = communism }
							NOT = { has_government = fascism }
						}
					}
				}
				ENG = { country_event = { id =  denmark_fascist_event.1 days = 5 }}
			}
			else_if = {
				limit = {
					ICE = {
						NOT = { has_country_flag = DEN_received_danish_king_flag }
						is_subject = no
						has_civil_war = no
						OR = {
							NOT = { has_government = communism }
							NOT = { has_government = fascism }
						}
					}
				}
				ICE = { country_event = { id =  denmark_fascist_event.1 days = 5 }}
			}
		}
	}
}

country_event = { #Stauning Dies
	id = denmark_events.200
	title = denmark_events.200.t
	desc = denmark_events.200.desc
	picture = GFX_report_event_generic_funeral

	trigger = {
		original_tag = DEN
		has_character = DEN_thorvald_stauning
		date > 1942.05.03
	}

	mean_time_to_happen = {
		days = 20
		modifier = {
			factor = 0.1
			date > 1942.06.01
			has_country_flag = DEN_has_occupation_flag
		} 
	}

	fire_only_once = yes

	option = { #
		name = denmark_events.200.a
		custom_effect_tooltip = DEN_vilhelm_buhl_takes_over_tt

		if = { # Tooltip about retiring the character if he is already a country leader (even if not ruling)
			limit = {
				has_country_leader = {
					character = DEN_thorvald_stauning
					ruling_only = no
				}
			}
			effect_tooltip = {
				retire_character = DEN_thorvald_stauning
			}
		}

		if = {
			limit = {
				has_country_leader = {
					character = DEN_thorvald_stauning
					ruling_only = yes
				}
			}
			DEN_vilhelm_buhl = {
				add_country_leader_role = {
					promote_leader = yes
					country_leader = {
						ideology = socialism
						expire = "1965.1.1.1"
						traits = { DEN_socialdemokrat }
					}
				}
			}
		}

		hidden_effect = {
			retire_character = DEN_thorvald_stauning
		}
	}
}

country_event = { #The King Dies
	id = denmark_events.201
	title = denmark_events.201.t
	desc = denmark_events.201.desc
	picture = GFX_report_event_generic_funeral

	trigger = {
		original_tag = DEN
		has_character = DEN_thorvald_stauning
		date > 1947.04.20
		NOT = { has_country_flag = DEN_exiled_royal_family }
	}

	mean_time_to_happen = {
		days = 20
		modifier = {
			factor = 0.1
			date > 1947.05.01
			has_country_flag = DEN_has_occupation_flag
		} 
	}

	fire_only_once = yes

	option = { 
		name = denmark_events.201.a
		custom_effect_tooltip = DEN_frederik_IX_takes_over_tt

		if = { # Tooltip about retiring the character if he is already a country leader (even if not ruling)
			limit = {
				has_country_leader = {
					character = DEN_christian_x
					ruling_only = no
				}
			}
			effect_tooltip = {
				retire_character = DEN_christian_x
			}
		}

		if = {
			limit = {
				has_country_leader = {
					character = DEN_christian_x
					ruling_only = yes
				}
			}
			DEN_frederik_ix = {
				add_country_leader_role = {
					promote_leader = yes
					country_leader = {
						ideology = despotism
						expire = "1965.1.1.1"
						traits = { DEN_the_king }
					}
				}
			}
		}

		hidden_effect = {
			retire_character = DEN_christian_x
		}
	}
}

country_event = { #Play Well
	id = denmark_events.300
	title = denmark_events.300.t
	desc = denmark_events.300.desc
	picture = GFX_report_event_generic_sign_treaty2

	trigger = {
		original_tag = DEN
		has_government = democratic
		NOT = { has_dynamic_modifier = { modifier = DEN_economic_crisis_dynamic_modifier }}
		is_subject = no
		has_war = no
		has_civil_war = no
		power_balance_value = {
			id = DEN_balance_of_power
			value < -0.9
		}
	}

	mean_time_to_happen = {
		days = 90		
	}

	fire_only_once = yes

	option = {
		name = denmark_events.300.a
		
		add_to_variable = { DEN_industrial_improvement_tracker_var = 1 }
		DEN_improve_industrial_capabilities_NS = yes
		add_to_variable = {
			DEN_industrial_capabilities_consumer_goods = -0.1
			tooltip = consumer_goods_factor_tt
		}

		add_tech_bonus = {
			name = DEN_lego
			bonus = 1
			uses = 1
			category = industry
		}
	}
}

country_event = { #Danish Empire Cores
	id = denmark_events.666
	title = denmark_events.666.t
	desc = denmark_events.666.desc
	picture = GFX_report_event_DEN_celebration

	trigger = {
		original_tag = DEN
		NOT = { has_idea = DEN_declaration_of_neutrality }
		ROOT = {
			has_army_manpower = { size > 99999 }
			is_subject = no
			has_civil_war = no
 			all_core_state = {
 				is_controlled_by = ROOT
 			}
 		}
		909 = { is_fully_controlled_by = ROOT }
		138 = { is_fully_controlled_by = ROOT }
	}

	mean_time_to_happen = {
		days = 365		
	}

	fire_only_once = yes

	option = {
		name = denmark_events.666.a
		ai_chance = {
			base = 2
		}
		set_cosmetic_tag = DEN_greater_denmark

		add_political_power = 50

		if = {
			limit = {
				OR = {
					138 = { is_claimed_by = ROOT }
					138 = { is_fully_controlled_by = ROOT }
				}
				NOT = { 138 = { is_core_of = ROOT }}
			}
			138 = {	add_core_of = ROOT }
		}
		else_if = {
			limit = {
				NOT = { 138 = { is_claimed_by = ROOT }}
				NOT = { 138 = { is_core_of = ROOT }}
			}
			138 = { add_claim_by = ROOT } 
		}
		if = {
			limit = {
				OR = {
					124 = { is_claimed_by = ROOT }
					124 = { is_fully_controlled_by = ROOT }
				}
				NOT = { 124 = { is_core_of = ROOT }}
			}
			124 = {	add_core_of = ROOT }
		}
		else_if = {
			limit = {
				NOT = { 124 = { is_claimed_by = ROOT }}
				NOT = { 124 = { is_core_of = ROOT }}
			}
			124 = { add_claim_by = ROOT } 
		}
		if = {
			limit = {
				OR = {
					909 = { is_claimed_by = ROOT }
					909 = { is_fully_controlled_by = ROOT }
				}
				NOT = { 909 = { is_core_of = ROOT }}
			}
			909 = {	add_core_of = ROOT }
		}
		else_if = {
			limit = {
				NOT = { 909 = { is_claimed_by = ROOT }}
				NOT = { 909 = { is_core_of = ROOT }}
			}
			909 = { add_claim_by = ROOT } 
		}
		if = {
			limit = {
				OR = {
					58 = { is_claimed_by = ROOT }
					58 = { is_fully_controlled_by = ROOT }
				}
				NOT = { 58 = { is_core_of = ROOT }}
			}
			58 = {	add_core_of = ROOT }
		}
		else_if = {
			limit = {
				NOT = { 58 = { is_claimed_by = ROOT }}
				NOT = { 58 = { is_core_of = ROOT }}
			}
			58 = { add_claim_by = ROOT } 
		}
		if = {
			limit = {
				OR = {
					61 = { is_claimed_by = ROOT }
					61 = { is_fully_controlled_by = ROOT }
				}
				NOT = { 61 = { is_core_of = ROOT }}
			}
			61 = {	add_core_of = ROOT }
		}
		else_if = {
			limit = {
				NOT = { 61 = { is_claimed_by = ROOT }}
				NOT = { 61 = { is_core_of = ROOT }}
			}
			61 = { add_claim_by = ROOT } 
		}
		if = {
			limit = {
				OR = {
					62 = { is_claimed_by = ROOT }
					62 = { is_fully_controlled_by = ROOT }
				}
				NOT = { 62 = { is_core_of = ROOT }}
			}
			62 = {	add_core_of = ROOT }
		}
		else_if = {
			limit = {
				NOT = { 62 = { is_claimed_by = ROOT }}
				NOT = { 62 = { is_core_of = ROOT }}
			}
			62 = { add_claim_by = ROOT } 
		}
		if = {
			limit = {
				OR = {
					63 = { is_claimed_by = ROOT }
					63 = { is_fully_controlled_by = ROOT }
				}
				NOT = { 63 = { is_core_of = ROOT }}
			}
			63 = {	add_core_of = ROOT }
		}
		else_if = {
			limit = {
				NOT = { 63 = { is_claimed_by = ROOT }}
				NOT = { 63 = { is_core_of = ROOT }}
			}
			63 = { add_claim_by = ROOT } 
		}
	}
	option = {
		name = denmark_events.666.b
		ai_chance = {
			base = 2
		}		
		add_stability = 0.1
	}
}
