add_namespace = generic

country_event = {
	id = generic.1
	title = generic.1.t
	desc = { 
		text = generic.1.d_neutral_good
		trigger = {
			has_government = FROM
		}
	}
	desc = {
		text = generic.1.d_bad
		trigger = {
			NOT = { has_government = FROM }
		}
	}
	picture = GFX_report_event_generic_read_write

	is_triggered_only = yes

	option = {
		name = generic.1.a
		trigger = {
			has_government = FROM
		}
	}

	option = {
		name = generic.1.b
		trigger = {
			NOT = { has_government = FROM }
		}
	}
}

country_event = {
	id = generic.2
	title = generic.2.t
	desc = {
		text = generic.2.d.a
		trigger = {
			AND = {
				FROM = {
					has_government = democratic
				}
				has_government = democratic
			}
		}
	}
	desc = {
		text = generic.2.d.b
		trigger = {
			AND = {
				FROM = {
					has_government = fascism
				}
				has_government = fascism
			}
		}
	}
	desc = {
		text = generic.2.d.c
		trigger = {
			AND = {
				FROM = {
					has_government = communism
				}
				has_government = communism
			}
		}
	}
	desc = {
		text = generic.2.d.f
		trigger = {
			AND = {
				FROM = {
					has_government = radical
				}
				has_government = radical
			}
		}
	}
	desc = {
		text = generic.2.d.g
		trigger = {
			AND = {
				FROM = {
					has_government = absolutist
				}
				has_government = absolutist
			}
		}
	}
	desc = {
		text = generic.2.d.e
		trigger = {
			NOT = {
				AND = {
					FROM = {
						has_government = absolutist
					}
					has_government = absolutist
				}
				AND = {
					FROM = {
						has_government = communism
					}
					has_government = communism
				}
				AND = {
					FROM = {
						has_government = democratic
					}
					has_government = democratic
				}
				AND = {
					FROM = {
						has_government = fascism
					}
					has_government = fascism
				}
				AND = {
					FROM = {
						has_government = radical
					}
					has_government = radical
				}
			}
		}
	}
	picture = GFX_report_event_generic_read_write

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			save_event_target_as = alliance_inviter
			FROM = {
				save_event_target_as = alliance_applicant
			}
		}
	}

	option = {
		name = generic.2.a
		trigger = {
			AND = {
				FROM = {
					has_government = democratic
				}
				has_government = democratic
			}
		}
		ai_chance = {
			base = 100
		}
		add_to_faction = FROM
		FROM = { country_event = { id = generic.3 hours = 6 } }
		hidden_effect = {
			set_country_flag = alliance_inviter@ROOT
			FROM = { set_country_flag = alliance_applicant@ROOT }
			news_event = { id = news.289 hours = 12 }
		}
	}

	option = {
		name = generic.2.b
		trigger = {
			AND = {
				FROM = {
					has_government = fascism
				}
				has_government = fascism
			}
		}
		ai_chance = {
			base = 100
		}
		add_to_faction = FROM
		FROM = { country_event = { id = generic.3 hours = 6 } }
		hidden_effect = {
			set_country_flag = alliance_inviter@ROOT
			FROM = { set_country_flag = alliance_applicant@ROOT }
			news_event = { id = news.289 hours = 12 }
		}
	}

	option = {
		name = generic.2.c
		trigger = {
			AND = {
				FROM = {
					has_government = communism
				}
				has_government = communism
			}
		}
		ai_chance = {
			base = 100
		}
		add_to_faction = FROM
		FROM = { country_event = { id = generic.3 hours = 6 } }
		hidden_effect = {
			set_country_flag = alliance_inviter@ROOT
			FROM = { set_country_flag = alliance_applicant@ROOT }
			news_event = { id = news.289 hours = 12 }
		}
	}

	option = {
		name = generic.2.g
		trigger = {
			AND = {
				FROM = {
					has_government = radical
				}
				has_government = radical
			}
		}
		ai_chance = {
			base = 100
		}
		add_to_faction = FROM
		FROM = { country_event = { id = generic.3 hours = 6 } }
		hidden_effect = {
			set_country_flag = alliance_inviter@ROOT
			FROM = { set_country_flag = alliance_applicant@ROOT }
			news_event = { id = news.289 hours = 12 }
		}
	}

	option = {
		name = generic.2.h
		trigger = {
			AND = {
				FROM = {
					has_government = absolutist
				}
				has_government = absolutist
			}
		}
		ai_chance = {
			base = 100
		}
		add_to_faction = FROM
		FROM = { country_event = { id = generic.3 hours = 6 } }
		hidden_effect = {
			set_country_flag = alliance_inviter@ROOT
			FROM = { set_country_flag = alliance_applicant@ROOT }
			news_event = { id = news.289 hours = 12 }
		}
	}

	option = {
		name = generic.2.e
		trigger = {
			NOT = {
				AND = {
					FROM = {
						has_government = absolutist
					}
					has_government = absolutist
				}
				AND = {
					FROM = {
						has_government = communism
					}
					has_government = communism
				}
				AND = {
					FROM = {
						has_government = democratic
					}
					has_government = democratic
				}
				AND = {
					FROM = {
						has_government = fascism
					}
					has_government = fascism
				}
				AND = {
					FROM = {
						has_government = radical
					}
					has_government = radical
				}
			}
		}
		ai_chance = {
			base = 100
			modifier = {
				factor = 0.5
				has_war = no
				FROM = {
					has_war = yes
				}
			}
			modifier = {
				factor = 0.5
				NOT = {
					has_government = neutrality
				}
			}
			modifier = {
				factor = 0.75
				FROM = {
					is_major = no
				}
			}
		}
		add_to_faction = FROM
		FROM = { country_event = { id = generic.3 hours = 6 } }
		FROM = {
			add_ai_strategy = {
				type = alliance
				id = ROOT
				value = 200
			}
		}
		hidden_effect = {
			set_country_flag = alliance_inviter@ROOT
			FROM = { set_country_flag = alliance_applicant@ROOT }
			news_event = { id = news.289 hours = 12 }
		}
	}

	option = {
		name = generic.2.f
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0.5
				has_opinion = {
					target = FROM
					value > 65
				}
			}
			modifier = {
				factor = 0.5
				has_opinion = {
					target = FROM
					value > 35
				}
			}
			modifier = {
				factor = 0.5
				has_opinion = {
					target = FROM
					value > 5
				}
			}
			modifier = {
				factor = 2.0
				has_opinion = {
					target = FROM
					value < 35
				}
			}
			modifier = {
				factor = 2.0
				has_opinion = {
					target = FROM
					value < 65
				}
			}
			modifier = {
				factor = 0.1
				has_war = yes
				FROM = {
					has_war = no
				}
			}
			modifier = {
				factor = 0.1
				FROM = {
					is_major = yes
				}
			}
		}
		FROM = {
			country_event = { id = generic.4 hours = 6 }
		}
	}
}

country_event = {
	id = generic.3
	title = generic.3.t
	desc = generic.3.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes

	option = {
		name = generic.3.a
		trigger = {
			AND = {
				FROM = {
					has_government = democratic
				}
				has_government = democratic
			}
		}
	}

	option = {
		name = generic.3.b
		trigger = {
			AND = {
				FROM = {
					has_government = fascism
				}
				has_government = fascism
			}
		}
	}

	option = {
		name = generic.3.c
		trigger = {
			AND = {
				FROM = {
					has_government = communism
				}
				has_government = communism
			}
		}
	}

	option = {
		name = generic.3.f
		trigger = {
			AND = {
				FROM = {
					has_government = radical
				}
				has_government = radical
			}
		}
	}

	option = {
		name = generic.3.g
		trigger = {
			AND = {
				FROM = {
					has_government = absolutist
				}
				has_government = absolutist
			}
		}
	}

	option = {
		name = generic.3.e
		trigger = {
			NOT = {
				AND = {
					FROM = {
						has_government = absolutist
					}
					has_government = absolutist
				}
				AND = {
					FROM = {
						has_government = communism
					}
					has_government = communism
				}
				AND = {
					FROM = {
						has_government = democratic
					}
					has_government = democratic
				}
				AND = {
					FROM = {
						has_government = fascism
					}
					has_government = fascism
				}
				AND = {
					FROM = {
						has_government = radical
					}
					has_government = radical
				}
			}
		}
	}
}

country_event = {
	id = generic.4
	title = generic.4.t
	desc = generic.4.d
	picture = GFX_report_event_generic_read_write

	is_triggered_only = yes

	option = {
		name = generic.4.a
		trigger = {
			AND = {
				FROM = {
					has_government = democratic
				}
				has_government = democratic
			}
		}
	}

	option = {
		name = generic.4.b
		trigger = {
			AND = {
				FROM = {
					has_government = fascism
				}
				has_government = fascism
			}
		}
	}

	option = {
		name = generic.4.c
		trigger = {
			AND = {
				FROM = {
					has_government = communism
				}
				has_government = communism
			}
		}
	}

	option = {
		name = generic.4.f
		trigger = {
			AND = {
				FROM = {
					has_government = radical
				}
				has_government = radical
			}
		}
	}

	option = {
		name = generic.4.g
		trigger = {
			AND = {
				FROM = {
					has_government = absolutist
				}
				has_government = absolutist
			}
		}
	}

	option = {
		name = generic.4.e
		trigger = {
			NOT = {
				AND = {
					FROM = {
						has_government = absolutist
					}
					has_government = absolutist
				}
				AND = {
					FROM = {
						has_government = communism
					}
					has_government = communism
				}
				AND = {
					FROM = {
						has_government = democratic
					}
					has_government = democratic
				}
				AND = {
					FROM = {
						has_government = fascism
					}
					has_government = fascism
				}
				AND = {
					FROM = {
						has_government = radical
					}
					has_government = radical
				}
			}
		}
	}
}

country_event = {
	id = generic.5
	title = generic.5.t
	desc = {
		text = generic.5.d.a
		trigger = {
			AND = {
				FROM = {
					has_government = democratic
				}
				has_government = democratic
			}
		}
	}
	desc = {
		text = generic.5.d.b
		trigger = {
			AND = {
				FROM = {
					has_government = fascism
				}
				has_government = fascism
			}
		}
	}
	desc = {
		text = generic.5.d.c
		trigger = {
			AND = {
				FROM = {
					has_government = communism
				}
				has_government = communism
			}
		}
	}
	desc = {
		text = generic.5.d.f
		trigger = {
			AND = {
				FROM = {
					has_government = radical
				}
				has_government = radical
			}
		}
	}
	desc = {
		text = generic.5.d.g
		trigger = {
			AND = {
				FROM = {
					has_government = absolutist
				}
				has_government = absolutist
			}
		}
	}
	desc = {
		text = generic.5.d.e
		trigger = {
			NOT = {
				AND = {
					FROM = {
						has_government = absolutist
					}
					has_government = absolutist
				}
				AND = {
					FROM = {
						has_government = communism
					}
					has_government = communism
				}
				AND = {
					FROM = {
						has_government = democratic
					}
					has_government = democratic
				}
				AND = {
					FROM = {
						has_government = fascism
					}
					has_government = fascism
				}
				AND = {
					FROM = {
						has_government = radical
					}
					has_government = radical
				}
			}
		}
	}
	picture = GFX_report_event_generic_read_write

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			save_event_target_as = alliance_applicant
			FROM = {
				save_event_target_as = alliance_inviter
			}
		}
	}

	option = {
		name = generic.5.a
		trigger = {
			is_in_faction = no
			AND = {
				FROM = {
					has_government = democratic
				}
				has_government = democratic
			}
		}
		ai_chance = {
			base = 100
		}
		FROM = {
			add_to_faction = ROOT
			country_event = { id = generic.6 hours = 6 }
		}
		add_ai_strategy = {
			type = alliance
			id = FROM
			value = 200
		}

		hidden_effect = {
			set_country_flag = alliance_applicant@ROOT
			FROM = { set_country_flag = alliance_inviter@ROOT }
			news_event = { id = news.289 hours = 12 }
		}
	}

	option = {
		name = generic.5.b
		trigger = {
			is_in_faction = no
			AND = {
				FROM = {
					has_government = fascism
				}
				has_government = fascism
			}
		}
		ai_chance = {
			base = 100
		}
		FROM = {
			add_to_faction = ROOT
			country_event = { id = generic.6 hours = 6 }
		}
		add_ai_strategy = {
			type = alliance
			id = FROM
			value = 200
		}

		hidden_effect = {
			set_country_flag = alliance_applicant@ROOT
			FROM = { set_country_flag = alliance_inviter@ROOT }
			news_event = { id = news.289 hours = 12 }
		}
	}

	option = {
		name = generic.5.c
		trigger = {
			is_in_faction = no
			AND = {
				FROM = {
					has_government = communism
				}
				has_government = communism
			}
		}
		ai_chance = {
			base = 100
		}
		FROM = {
			add_to_faction = ROOT
			country_event = { id = generic.6 hours = 6 }
		}
		add_ai_strategy = {
			type = alliance
			id = FROM
			value = 200
			}

		hidden_effect = {
			set_country_flag = alliance_applicant@ROOT
			FROM = { set_country_flag = alliance_inviter@ROOT }
			news_event = { id = news.289 hours = 12 }
		}
	}

	option = {
		name = generic.5.h
		trigger = {
			is_in_faction = no
			AND = {
				FROM = {
					has_government = radical
				}
				has_government = radical
			}
		}
		ai_chance = {
			base = 100
		}
		FROM = {
			add_to_faction = ROOT
			country_event = { id = generic.6 hours = 6 }
		}
		add_ai_strategy = {
			type = alliance
			id = FROM
			value = 200
		}

		hidden_effect = {
			set_country_flag = alliance_applicant@ROOT
			FROM = { set_country_flag = alliance_inviter@ROOT }
			news_event = { id = news.289 hours = 12 }
		}
	}

	option = {
		name = generic.5.i
		trigger = {
			is_in_faction = no
			AND = {
				FROM = {
					has_government = absolutist
				}
				has_government = absolutist
			}
		}
		ai_chance = {
			base = 100
		}
		FROM = {
			add_to_faction = ROOT
			country_event = { id = generic.6 hours = 6 }
		}
		add_ai_strategy = {
			type = alliance
			id = FROM
			value = 200
		}

		hidden_effect = {
			set_country_flag = alliance_applicant@ROOT
			FROM = { set_country_flag = alliance_inviter@ROOT }
			news_event = { id = news.289 hours = 12 }
		}
	}

	option = {
		name = generic.5.e
		trigger = {
			is_in_faction = no
			NOT = {
				AND = {
					FROM = {
						has_government = absolutist
					}
					has_government = absolutist
				}
				AND = {
					FROM = {
						has_government = communism
					}
					has_government = communism
				}
				AND = {
					FROM = {
						has_government = democratic
					}
					has_government = democratic
				}
				AND = {
					FROM = {
						has_government = fascism
					}
					has_government = fascism
				}
				AND = {
					FROM = {
						has_government = radical
					}
					has_government = radical
				}
			}
		}
		ai_chance = {
			base = 100
			modifier = {
				factor = 0.5
				has_war = no
				FROM = {
					has_war = yes
				}
			}
			modifier = {
				factor = 0.5
				NOT = {
					has_government = neutrality
				}
			}
			modifier = {
				factor = 0.75
				FROM = {
					is_major = no
				}
			}
		}
		FROM = {
			add_to_faction = ROOT
			country_event = { id = generic.6 hours = 6 }
		}
		add_ai_strategy = {
			type = alliance
			id = FROM
			value = 200
		}
		hidden_effect = {
			set_country_flag = alliance_applicant@ROOT
			FROM = { set_country_flag = alliance_inviter@ROOT }
			news_event = { id = news.289 hours = 12 }
		}
	}

	option = {
		name = generic.2.f
		trigger = {
			is_in_faction = no
		}
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0.5
				has_opinion = {
					target = FROM
					value > 65
				}
			}
			modifier = {
				factor = 0.5
				has_opinion = {
					target = FROM
					value > 35
				}
			}
			modifier = {
				factor = 0.5
				has_opinion = {
					target = FROM
					value > 5
				}
			}
			modifier = {
				factor = 2.0
				has_opinion = {
					target = FROM
					value < 35
				}
			}
			modifier = {
				factor = 2.0
				has_opinion = {
					target = FROM
					value < 65
				}
			}
			modifier = {
				factor = 0.1
				has_war = yes
				FROM = {
					has_war = no
				}
			}
			modifier = {
				factor = 0.1
				FROM = {
					is_major = yes
				}
			}
		}
		FROM = {
			country_event = { id = generic.7 hours = 6 }
		}
	}

	option = {
		name = generic.2.g
		trigger = {
			is_in_faction = yes
		}
		FROM = {
			country_event = { id = generic.7 hours = 6 }
		}
	}
}

country_event = {
	id = generic.6
	title = generic.6.t
	desc = generic.6.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes

	option = {
		name = generic.3.a
		trigger = {
			AND = {
				FROM = {
					has_government = democratic
				}
				has_government = democratic
			}
		}
	}

	option = {
		name = generic.3.b
		trigger = {
			AND = {
				FROM = {
					has_government = fascism
				}
				has_government = fascism
			}
		}
	}

	option = {
		name = generic.3.c
		trigger = {
			AND = {
				FROM = {
					has_government = communism
				}
				has_government = communism
			}
		}
	}

	option = {
		name = generic.3.f
		trigger = {
			AND = {
				FROM = {
					has_government = radical
				}
				has_government = radical
			}
		}
	}

	option = {
		name = generic.3.g
		trigger = {
			AND = {
				FROM = {
					has_government = absolutist
				}
				has_government = absolutist
			}
		}
	}

	option = {
		name = generic.3.e
		trigger = {
			NOT = {
				AND = {
					FROM = {
						has_government = absolutist
					}
					has_government = absolutist
				}
				AND = {
					FROM = {
						has_government = communism
					}
					has_government = communism
				}
				AND = {
					FROM = {
						has_government = democratic
					}
					has_government = democratic
				}
				AND = {
					FROM = {
						has_government = fascism
					}
					has_government = fascism
				}
				AND = {
					FROM = {
						has_government = radical
					}
					has_government = radical
				}
			}
		}
	}
}

country_event = {
	id = generic.7
	title = generic.7.t
	desc = generic.7.d
	picture = GFX_report_event_generic_read_write

	is_triggered_only = yes

	option = {
		name = generic.7.a
		trigger = {
			AND = {
				FROM = {
					has_government = democratic
				}
				has_government = democratic
			}
		}
	}

	option = {
		name = generic.4.b
		trigger = {
			AND = {
				FROM = {
					has_government = fascism
				}
				has_government = fascism
			}
		}
	}

	option = {
		name = generic.4.c
		trigger = {
			AND = {
				FROM = {
					has_government = communism
				}
				has_government = communism
			}
		}
	}

	option = {
		name = generic.4.f
		trigger = {
			AND = {
				FROM = {
					has_government = radical
				}
				has_government = radical
			}
		}
	}

	option = {
		name = generic.4.g
		trigger = {
			AND = {
				FROM = {
					has_government = absolutist
				}
				has_government = absolutist
			}
		}
	}

	option = {
		name = generic.4.e
		trigger = {
			NOT = {
				AND = {
					FROM = {
						has_government = absolutist
					}
					has_government = absolutist
				}
				AND = {
					FROM = {
						has_government = communism
					}
					has_government = communism
				}
				AND = {
					FROM = {
						has_government = democratic
					}
					has_government = democratic
				}
				AND = {
					FROM = {
						has_government = fascism
					}
					has_government = fascism
				}
				AND = {
					FROM = {
						has_government = radical
					}
					has_government = radical
				}
			}
		}
	}
}

country_event = {
	id = generic.8
	title = generic.8.t
	desc = generic.8.d
	picture = GFX_report_event_physics_lab_01

	is_triggered_only = yes

	option = {
		name = generic.8.a
		clr_country_flag = racing_for_the_bomb

		remove_ideas = race_for_the_bomb

		add_war_support = 0.1

		every_other_country = {
			limit = {
				has_country_flag = racing_for_the_bomb
				NOT = { is_in_faction_with = ROOT }
			}
			country_event = { id = generic.9 }
		}

		every_other_country = {
			limit = {
				has_country_flag = racing_for_the_bomb
				is_in_faction_with = ROOT
			}
			country_event = { id = generic.10 }
		}

	}
}

country_event = {
	id = generic.9
	title = generic.9.t
	desc = generic.9.d
	picture = GFX_report_event_physics_lab_01

	is_triggered_only = yes

	option = {
		name = generic.9.a
		clr_country_flag = racing_for_the_bomb

		remove_ideas = race_for_the_bomb

		add_timed_idea = { idea = race_for_the_bomb_outclassed days = 360 }

		add_stability = -0.1

	}
}

country_event = {
	id = generic.10
	title = generic.10.t
	desc = generic.10.d
	picture = GFX_report_event_physics_lab_01

	is_triggered_only = yes

	option = {
		name = generic.10.a
		clr_country_flag = racing_for_the_bomb

		remove_ideas = race_for_the_bomb

		add_war_support = 0.05

	}
}

country_event = {
	id = generic.11
	title = generic.11.t
	desc = generic.11.d
	picture = GFX_report_event_generic_ruins

	is_triggered_only = yes

	option = {
		name = generic.11.a
		clr_country_flag = ideology_civil_war

	}
}

country_event = {
	id = generic.12
	title = generic.12.t
	desc = generic.12.d
	picture = GFX_report_event_merchant_ship_01

	is_triggered_only = yes

	option = {
		name = generic.12.a
		custom_effect_tooltip = canals_tt

	}
}

country_event = {
	id = generic.13
	title = generic.13.t
	desc = generic.13.d
	picture = GFX_report_event_merchant_ship_01

	is_triggered_only = yes

	option = {
		name = generic.12.a
		custom_effect_tooltip = canals_tt

	}
}

country_event = {
	id = generic.14
	title = generic.14.t
	desc = generic.14.d
	picture = GFX_report_event_generic_read_write

	is_triggered_only = yes

	option = {
		name = generic.14.a
		ai_chance = {
			base = 80
			modifier = {
				factor = 1.5
				has_opinion = { target = FROM value > 50 }
			}
			modifier = {
				factor = 1.5
				has_opinion = { target = FROM value > 75 }
			}
		}
		random_other_country = {
			limit = {
				has_war_with = FROM
				has_attache_from = ROOT
			}
			ROOT = { recall_attache = PREV }
		}
		FROM = {
			country_event = { id = generic.15 days = 1 }
		}

		clr_country_flag = object_attache_going_on
	}

	option = {
		name = generic.14.b
		ai_chance = {
			base = 20
			modifier = {
				factor = 2
				has_opinion = { target = FROM value < 0 }
			}
			modifier = {
				factor = 3
				has_opinion = { target = FROM value < -20 }
			}
			modifier = {
				factor = 3
				has_opinion = { target = FROM value < -50 }
			}
		}
		custom_effect_tooltip = attache_political_power_tt
		if = {
			limit = {
				NOT = { strength_ratio = { tag = FROM ratio < 3 } }
			}
			if = {
				limit = {
					has_opinion = { target = FROM value > -25 }
					NOT = { has_opinion = { target = FROM value > 0 } }
				}
				add_political_power = -5
			}
			if = {
				limit = {
					has_opinion = { target = FROM value > 0 }
					NOT = { has_opinion = { target = FROM value > 50 } }
				}
				add_political_power = -10
			}
			if = {
				limit = { has_opinion = { target = FROM value > 50 } }
				add_political_power = -15
			}
		}
		if = {
			limit = {
				strength_ratio = { tag = FROM ratio < 3 }
				NOT = { strength_ratio = { tag = FROM ratio < 2.5 } }
			}
			if = {
				limit = {
					has_opinion = { target = FROM value > -25 }
					NOT = { has_opinion = { target = FROM value > 0 } }
				}
				add_political_power = -10
			}
			if = {
				limit = {
					has_opinion = { target = FROM value > 0 }
					NOT = { has_opinion = { target = FROM value > 50 } }
				}
				add_political_power = -20
			}
			if = {
				limit = { has_opinion = { target = FROM value > 50 } }
				add_political_power = -30
			}
		}
		if = {
			limit = {
				strength_ratio = { tag = FROM ratio < 2.5 }
				NOT = { strength_ratio = { tag = FROM ratio < 2 } }
			}
			if = {
				limit = {
					has_opinion = { target = FROM value > -25 }
					NOT = { has_opinion = { target = FROM value > 0 } }
				}
				add_political_power = -15
			}
			if = {
				limit = {
					has_opinion = { target = FROM value > 0 }
					NOT = { has_opinion = { target = FROM value > 50 } }
				}
				add_political_power = -30
			}
			if = {
				limit = { has_opinion = { target = FROM value > 50 } }
				add_political_power = -45
			}
		}
		if = {
			limit = {
				strength_ratio = { tag = FROM ratio < 2 }
				NOT = { strength_ratio = { tag = FROM ratio < 1.5 } }
			}
			if = {
				limit = {
					has_opinion = { target = FROM value > -25 }
					NOT = { has_opinion = { target = FROM value > 0 } }
				}
				add_political_power = -20
			}
			if = {
				limit = {
					has_opinion = { target = FROM value > 0 }
					NOT = { has_opinion = { target = FROM value > 50 } }
				}
				add_political_power = -40
			}
			if = {
				limit = { has_opinion = { target = FROM value > 50 } }
				add_political_power = -60
			}
		}
		if = {
			limit = {
				strength_ratio = { tag = FROM ratio < 1.5 }
			}
			if = {
				limit = {
					has_opinion = { target = FROM value > -25 }
					NOT = { has_opinion = { target = FROM value > 0 } }
				}
				add_political_power = -25
			}
			if = {
				limit = {
					has_opinion = { target = FROM value > 0 }
					NOT = { has_opinion = { target = FROM value > 50 } }
				}
				add_political_power = -50
			}
			if = {
				limit = { has_opinion = { target = FROM value > 50 } }
				add_political_power = -75
			}
		}
		FROM = {
			add_opinion_modifier = { target = ROOT modifier = rejected_demands }
			country_event = { id = generic.16 days = 1 }
		}
		if = {
			limit = {
				FROM = { has_government = absolutist }
				NOT = { has_government = absolutist }
				absolutist > 0.1
				NOT = { absolutist > 0.2 }
				strength_ratio = { tag = FROM ratio < 1.2 }
			}
			custom_effect_tooltip = attache_absolutist_tt
			add_stability = -0.025
		}
		if = {
			limit = {
				FROM = { has_government = absolutist }
				NOT = { has_government = absolutist }
				absolutist > 0.2
				NOT = { absolutist > 0.3 }
				strength_ratio = { tag = FROM ratio < 1.2 }
			}
			custom_effect_tooltip = attache_absolutist_tt
			add_stability = -0.05
		}
		if = {
			limit = {
				FROM = { has_government = absolutist }
				NOT = { has_government = absolutist }
				absolutist > 0.3
				NOT = { absolutist > 0.4 }
				strength_ratio = { tag = FROM ratio < 1.2 }
			}
			custom_effect_tooltip = attache_absolutist_tt
			add_stability = -0.075
		}
		if = {
			limit = {
				FROM = { has_government = absolutist }
				NOT = { has_government = absolutist }
				absolutist > 0.4
				strength_ratio = { tag = FROM ratio < 1.2 }
			}
			custom_effect_tooltip = attache_absolutist_tt
			add_stability = -0.1
		}
		if = {
			limit = {
				FROM = { has_government = communism }
				NOT = { has_government = communism }
				communism > 0.1
				NOT = { communism > 0.2 }
				strength_ratio = { tag = FROM ratio < 1.2 }
			}
			custom_effect_tooltip = attache_communism_tt
			add_stability = -0.025
		}
		if = {
			limit = {
				FROM = { has_government = communism }
				NOT = { has_government = communism }
				communism > 0.2
				NOT = { communism > 0.3 }
				strength_ratio = { tag = FROM ratio < 1.2 }
			}
			custom_effect_tooltip = attache_communism_tt
			add_stability = -0.05
		}
		if = {
			limit = {
				FROM = { has_government = communism }
				NOT = { has_government = communism }
				communism > 0.3
				NOT = { communism > 0.4 }
				strength_ratio = { tag = FROM ratio < 1.2 }
			}
			custom_effect_tooltip = attache_communism_tt
			add_stability = -0.075
		}
		if = {
			limit = {
				FROM = { has_government = communism }
				NOT = { has_government = communism }
				communism > 0.4
				strength_ratio = { tag = FROM ratio < 1.2 }
			}
			custom_effect_tooltip = attache_communism_tt
			add_stability = -0.1
		}
		if = {
			limit = {
				FROM = { has_government = democratic }
				NOT = { has_government = democratic }
				democratic > 0.1
				NOT = { democratic > 0.2 }
				strength_ratio = { tag = FROM ratio < 1.2 }
			}
			custom_effect_tooltip = attache_democratic_tt
			add_stability = -0.025
		}
		if = {
			limit = {
				FROM = { has_government = democratic }
				NOT = { has_government = democratic }
				democratic > 0.2
				NOT = { democratic > 0.3 }
				strength_ratio = { tag = FROM ratio < 1.2 }
			}
			custom_effect_tooltip = attache_democratic_tt
			add_stability = -0.05
		}
		if = {
			limit = {
				FROM = { has_government = democratic }
				NOT = { has_government = democratic }
				democratic > 0.3
				NOT = { democratic > 0.4 }
				strength_ratio = { tag = FROM ratio < 1.2 }
			}
			custom_effect_tooltip = attache_democratic_tt
			add_stability = -0.075
		}
		if = {
			limit = {
				FROM = { has_government = democratic }
				NOT = { has_government = democratic }
				democratic > 0.4
				strength_ratio = { tag = FROM ratio < 1.2 }
			}
			custom_effect_tooltip = attache_democratic_tt
			add_stability = -0.1
		}
		if = {
			limit = {
				FROM = { has_government = fascism }
				NOT = { has_government = fascism }
				fascism > 0.1
				NOT = { fascism > 0.2 }
				strength_ratio = { tag = FROM ratio < 1.2 }
			}
			custom_effect_tooltip = attache_fascism_tt
			add_stability = -0.025
		}
		if = {
			limit = {
				FROM = { has_government = fascism }
				NOT = { has_government = fascism }
				fascism > 0.2
				NOT = { fascism > 0.3 }
				strength_ratio = { tag = FROM ratio < 1.2 }
			}
			custom_effect_tooltip = attache_fascism_tt
			add_stability = -0.05
		}
		if = {
			limit = {
				FROM = { has_government = fascism }
				NOT = { has_government = fascism }
				fascism > 0.3
				NOT = { fascism > 0.4 }
				strength_ratio = { tag = FROM ratio < 1.2 }
			}
			custom_effect_tooltip = attache_fascism_tt
			add_stability = -0.075
		}
		if = {
			limit = {
				FROM = { has_government = fascism }
				NOT = { has_government = fascism }
				fascism > 0.4
				strength_ratio = { tag = FROM ratio < 1.2 }
			}
			custom_effect_tooltip = attache_fascism_tt
			add_stability = -0.1
		}
		if = {
			limit = {
				FROM = { has_government = radical }
				NOT = { has_government = radical }
				radical > 0.1
				NOT = { radical > 0.2 }
				strength_ratio = { tag = FROM ratio < 1.2 }
			}
			custom_effect_tooltip = attache_radical_tt
			add_stability = -0.025
		}
		if = {
			limit = {
				FROM = { has_government = radical }
				NOT = { has_government = radical }
				radical > 0.2
				NOT = { radical > 0.3 }
				strength_ratio = { tag = FROM ratio < 1.2 }
			}
			custom_effect_tooltip = attache_radical_tt
			add_stability = -0.05
		}
		if = {
			limit = {
				FROM = { has_government = radical }
				NOT = { has_government = radical }
				radical > 0.3
				NOT = { radical > 0.4 }
				strength_ratio = { tag = FROM ratio < 1.2 }
			}
			custom_effect_tooltip = attache_radical_tt
			add_stability = -0.075
		}
		if = {
			limit = {
				FROM = { has_government = radical }
				NOT = { has_government = radical }
				radical > 0.4
				strength_ratio = { tag = FROM ratio < 1.2 }
			}
			custom_effect_tooltip = attache_radical_tt
			add_stability = -0.1
		}
		hidden_effect = {
			set_country_flag = { flag = rejected_withdrawing_attache value = 1 days = 90 }
			set_country_flag = { flag = rejected_withdrawing_attache@FROM value = 1 days = 365 }
			clr_country_flag = object_attache_going_on
		}
	}
}

country_event = {
	id = generic.15
	title = generic.15.t
	desc = generic.15.d
	picture = GFX_report_event_generic_read_write

	is_triggered_only = yes

	option = {
		name = excellent
	}
}

country_event = {
	id = generic.16
	title = generic.16.t
	desc = generic.16.d
	picture = GFX_report_event_generic_read_write

	is_triggered_only = yes

	option = {
		name = generic.16.a
		effect_tooltip = {
			add_opinion_modifier = { target = FROM modifier = rejected_demands }
		}

	}
}

unit_leader_event = {
	id = generic.17
	title = generic.17.t
	desc = generic.17.d
	picture = GFX_report_event_military_planning

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			FROM = {
				set_unit_leader_flag = {
					flag = recently_sick
					value = 1
					days = 180
				}
			}
		}
	}

	option = {
		name = unfortunate
		effect_tooltip = {
			FROM = {
				add_timed_unit_leader_trait = {
					trait = sick
					days = 30
				}
			}
		}

	}
}

country_event = {
	id = generic.18
	title = generic.18.t
	desc = generic.18.d
	picture = GFX_report_event_military_planning

	is_triggered_only = yes

	option = {
		name = unfortunate
		effect_tooltip = {
			FROM = {
				add_timed_unit_leader_trait = {
					trait = wounded
					days = 90
				}
			}
		}

	}
}

country_event = {
	id = generic.19
	title = generic.19.t
	desc = generic.19.d
	picture = GFX_report_event_generic_factory

	is_triggered_only = yes

	option = {
		name = excellent
		effect_tooltip = {
			add_offsite_building = { type = arms_factory level = 2 }
		}

	}
}

country_event = {
	id = generic.20
	title = generic.20.t
	desc = {
		text = generic.20.d_friends
		trigger = {
			has_opinion = {
				target = FROM
				value = 150
			}
		}
	}
	desc = {
		text = generic.20.d_enemies
		trigger = {
			NOT = { 
				has_opinion = {
					target = FROM
					value = 150
				}
			}
		}
	}
	picture = GFX_report_event_generic_read_write

	is_triggered_only = yes

	option = {
		name = generic.20.a
		ai_chance = {
			factor = 20
			modifier = {
				threat > 20
				factor = 2
			}
			modifier = {
				is_in_faction = no
				factor = 2
			}
			modifier = {
				is_in_faction_with = FROM
				factor = 2
			}
			modifier = {
				is_in_faction = yes
				NOT = { is_in_faction_with = FROM }
				factor = 0.5
			}
		}
		trigger = {
			NOT = { 
				has_opinion = {
					target = FROM
					value = 150
				}
			}
		}

		effect_tooltip = { 
			FROM = { puppet = ROOT }
			if = {
				limit = {
					FROM = { is_in_faction = yes }
				}
				random_country = {
					limit = { 
						is_in_faction_with = FROM 
						is_faction_leader = yes
					}
					add_to_faction = ROOT
				}
			}
		}

		hidden_effect = {
			FROM = { country_event = { id = generic.21 hours = 6 } }
		}
	}

	option = {
		name = generic.20.b
		ai_chance = {
			factor = 25
			modifier = {
				threat > 20
				factor = 2
			}
			modifier = {
				is_in_faction = no
				factor = 2
			}
			modifier = {
				is_in_faction_with = FROM
				factor = 2
			}
			modifier = {
				is_in_faction = yes
				NOT = { is_in_faction_with = FROM }
				factor = 0.5
			}
		}
		trigger = {
			has_opinion = {
				target = FROM
				value = 150
			}
		}

		effect_tooltip = { 
			FROM = { puppet = ROOT }
			if = {
				limit = {
					FROM = { is_in_faction = yes }
				}
				random_country = {
					limit = { 
						is_in_faction_with = FROM 
						is_faction_leader = yes
					}
					add_to_faction = ROOT
				}
			}
		}

		hidden_effect = {
			FROM = { country_event = { id = generic.21 hours = 6 } }
		}
	}

	option = {
		name = generic.20.c
		ai_chance = {
			factor = 30
			modifier = {
				is_in_faction = yes
				NOT = { is_in_faction_with = FROM }
				factor = 2
			}
			modifier = {
				threat < 20
				factor = 2
			}
		}
		effect_tooltip = { 
			FROM = { 
				create_wargoal = {
					type = puppet_wargoal_focus
					target = ROOT
				}
			}
		}

		hidden_effect = {
			FROM = { country_event = { id = generic.22 hours = 6 } }
		}
	}
}

country_event = {
	id = generic.21
	title = generic.21.t
	desc = generic.21.d
	picture = GFX_report_event_generic_read_write

	is_triggered_only = yes

	option = {
		name = generic.21.a
		ai_chance = {
			factor = 1
		}
		ROOT = { puppet = FROM }

		if = {
			limit = {
				ROOT = { is_in_faction = yes }
			}
			random_country = {
				limit = { 
					is_in_faction_with = ROOT 
					is_faction_leader = yes
				}
				add_to_faction = FROM
			}
		}

	}
}

country_event = {
	id = generic.22
	title = generic.22.t
	desc = generic.22.d
	picture = GFX_report_event_generic_read_write

	is_triggered_only = yes

	option = {
		name = generic.22.a
		ai_chance = {
			factor = 1
		}
		ROOT = { 
			create_wargoal = {
				type = puppet_wargoal_focus
				target = FROM
			}
		}

	}
}

country_event = {
	id = generic.23
	title = generic.23.t
	desc = generic.23.d
	picture = GFX_report_event_czech_soldiers_01

	is_triggered_only = yes

	option = {
		name = generic.23.a
		ai_chance = {
			factor = 90
			modifier = { # If they stand a chance they will fight
				factor = 0
				strength_ratio = {
					tag = FROM
					ratio > 0.75
				}
				NOT = {
					any_neighbor_country = {
						NOT = { tag = FROM }
						is_in_faction_with = FROM
					}
				}
			}
			modifier = {
				factor = 0 #if you lead a faction, fight
				is_faction_leader = yes
			}
			modifier = {
				factor = 0.5 #if you are in a faction, maybe fight
				is_faction_leader = no
				is_in_faction = yes
			}
			modifier = { # Increase it again if other bordering nations are in the enemy faction
				any_neighbor_country = {
					NOT = { tag = FROM }
					is_in_faction_with = FROM
				}
				factor = 2.0
			}
		}
		effect_tooltip = {
			FROM = { transfer_state = event_target:demanded_prov_target }
			if = {
				limit = {
					event_target:demanded_prov_target = { has_state_flag = give_core_to_state_flag }
				}
			event_target:demanded_prov_target = { add_core_of = FROM }
			}
		}

		hidden_effect = {
			FROM = { country_event = generic.24 }
		}
	}

	option = {
		name = generic.23.b
		ai_chance = { 
			factor = 10 
			modifier = {
				factor = 0.5
				strength_ratio = {
					tag = FROM
					ratio < 0.5
				}
			}
		}
		custom_effect_tooltip = maybe_war_tt

		hidden_effect = {
			FROM = { country_event = generic.25 }
		}
	}
}

country_event = {
	id = generic.24
	title = generic.24.t
	desc = generic.24.d
	picture = GFX_report_event_czech_soldiers_01

	is_triggered_only = yes

	option = {
		name = excellent
		THIS = { transfer_state = event_target:demanded_prov_target }

		if = {
			limit = {
				event_target:demanded_prov_target = { has_state_flag = give_core_to_state_flag }
			}
			event_target:demanded_prov_target = { 
				add_core_of = THIS
				clr_state_flag = give_core_to_state_flag
			}
		}

		hidden_effect = { clear_global_event_target = demanded_prov_target }
	}
}

country_event = {
	id = generic.25
	title = generic.25.t
	desc = generic.25.d
	picture = GFX_report_event_czech_soldiers_01

	is_triggered_only = yes

	option = {
		name = generic.25.a
		ai_chance = {
			factor = 90
		}
		create_wargoal = {
			type = annex_everything 
			target = FROM
		}

		hidden_effect = { clear_global_event_target = demanded_prov_target }
	}
}
