add_namespace = opinion.o
country_event = {
	id = opinion.o.1
	
	hidden = yes
	
	is_triggered_only = yes
	fire_only_once = no
	immediate = {
		every_country = {
			limit = {
			NOT = {tag = ROOT}
			has_opinion = {target = ROOT value > 20}
			}
			every_country = {
				limit = {has_opinion = {target = PREV value < -20}}
				add_opinion_modifier = { target = ROOT modifier = opinion_friendly_enemy_penalty}
			}
			every_country = {
				limit = {has_opinion = {target = PREV value > 20}}
				add_opinion_modifier = { target = ROOT modifier = opinion_friendly_friend_bonus}
			}
		}
		every_country = {
			limit = {
			NOT = {tag = ROOT}
			has_opinion = {target = ROOT value < -20}
			}
			every_country = {
				limit = {has_opinion = {target = PREV value > 20}}
				add_opinion_modifier = { target = ROOT modifier = opinion_friendly_enemy_penalty}
			}
			every_country = {
				limit = {has_opinion = {target = PREV value < -20}}
				add_opinion_modifier = { target = ROOT modifier = opinion_friendly_friend_bonus}
			}
		}
	}
}
country_event = {
	id = opinion.o.2
	
	hidden = yes
	trigger = { NOT = {is_major = yes}}
	is_triggered_only = yes
	fire_only_once = no
	immediate = {

		every_other_country = {
		limit = {
		is_major = yes
		has_government = democratic
		ROOT = {has_opinion = {target = PREV value > 50} }
		}
		ROOT = {add_timed_idea = { idea = democracy_influence_from_opinion days = 30} add_popularity = {ideology = democratic popularity = 0.008}}
		}
		
		every_other_country = {
		limit = {
		is_major = yes
		has_government = fascism
		ROOT = {has_opinion = {target = PREV value > 50} }
		}
		ROOT = {add_timed_idea = {idea = fascist_influence_from_opinion days = 30} add_popularity = {ideology = fascism popularity = 0.015} add_stability = -0.02}
		}
		
		every_other_country = {
		limit = {
		is_major = yes
		has_government = communism
		ROOT = {has_opinion = {target = PREV value > 50} }
		}
		ROOT = {add_timed_idea = {idea = communism_influence_from_opinion days = 30} add_popularity = {ideology = communism popularity = 0.01} add_stability = -0.02}
		}
		
		every_other_country = {
		limit = {
		is_major = yes
		has_government = neutrality
		ROOT = {has_opinion = {target = PREV value > 50} }
		}
		ROOT = {add_timed_idea = {idea = neutrality_influence_from_opinion days = 30} add_popularity = {ideology = neutrality popularity = 0.008} }
		}
	}
}
country_event = {
	id = opinion.o.3
	
	hidden = yes
	is_triggered_only = yes
	fire_only_once = no
	immediate = {

		every_other_country = {
		limit = {
		has_opinion = {target = ROOT value > 50}
		}
			add_ai_strategy = {
			type = alliance
			id = ROOT
			value = 35
			}
			add_ai_strategy = {
			type = befriend
			id = ROOT
			value = 50
			}
			add_ai_strategy = {
			type = conquer
			id = ROOT
			value = -30
			}
			add_ai_strategy = {
			type = protect
			id = ROOT
			value = 50
			}
			add_ai_strategy = {
			type = support
			id = ROOT
			value = 80
			}
			add_opinion_modifier = { target = ROOT modifier = opinion_trade_factor_good}
			add_ai_strategy = {
			type = diplo_action_desire
			id = ROOT
			value = 40
			target = send_volunteers
			}
			country_event = {id = opinion.o.5 originator = ROOT days = 30}
		
		}
		every_other_country = {
		limit = {
		has_opinion = {target = ROOT value > 90}
		}
			add_ai_strategy = {
			type = alliance
			id = ROOT
			value = 70
			}
			add_ai_strategy = {
			type = befriend
			id = ROOT
			value = 100
			}
			add_ai_strategy = {
			type = conquer
			id = ROOT
			value = -80
			}
			add_ai_strategy = {
			type = protect
			id = ROOT
			value = 110
			}
			add_ai_strategy = {
			type = support
			id = ROOT
			value = 150
			}
			add_opinion_modifier = { target = ROOT modifier = opinion_trade_factor_good}
			add_ai_strategy = {
			type = diplo_action_desire
			id = ROOT
			value = 80
			target = send_volunteers
			}
			add_ai_strategy = {
			type = dont_join_wars_with
			target_country = ROOT
			value = 40
			}
		}
			
		country_event = {id = opinion.o.6 originator = ROOT days = 30}
		
		every_other_country = {
		limit = {
		has_opinion = {target = ROOT value < -40}
		}
			add_ai_strategy = {
			type = support
			id = ROOT
			value = -30
			}
			add_ai_strategy = {
			type = contain
			id = ROOT
			value = 70
			}
			add_ai_strategy = {
			type = conquer
			id = ROOT
			value = 90
			}
			add_opinion_modifier = { target = ROOT modifier = opinion_trade_factor_bad}
			add_ai_strategy = {
			type = prepare_for_war
			id = ROOT
			value = 15
			}
		
		country_event = {id = opinion.o.7 originator = ROOT days = 30}
		}
		every_other_country = {
		limit = {
		has_opinion = {target = ROOT value < -70}
		}
			add_ai_strategy = {
			type = support
			id = ROOT
			value = -120
			}
			add_ai_strategy = {
			type = contain
			id = ROOT
			value = 150
			}
			add_ai_strategy = {
			type = conquer
			id = ROOT
			value = 130
			}
			add_ai_strategy = {
			type = prepare_for_war
			id = ROOT
			value = 30
			}
			IF = {
			limit = {strength_ratio = {tag = ROOT ratio > 0.9} threat > 25 }
			add_ai_strategy = {
			type = diplo_action_desire
			id = ROOT
			value = 8
			target = generate_wargoal
			}
			add_ai_strategy = {
			type = diplo_action_desire
			id = ROOT
			value = 8
			target = declare_war
			}
			}
		country_event = {id = opinion.o.8 originator = ROOT days = 30}
		}
	}
}



country_event = {
	id = opinion.o.4
	trigger = {is_major = yes}
	hidden = yes
	is_triggered_only = yes
	fire_only_once = no
	immediate = {
		add_ideas = is_a_major_bonus_power
		
		
		}
	}
	
	country_event = {
	id = opinion.o.5
	
	hidden = yes
	is_triggered_only = yes
	fire_only_once = no
	immediate = {


			add_ai_strategy = {
			type = alliance
			id = FROM
			value = -35
			}
			add_ai_strategy = {
			type = befriend
			id = FROM
			value = -50
			}
			add_ai_strategy = {
			type = conquer
			id = FROM
			value = 30
			}
			add_ai_strategy = {
			type = protect
			id = FROM
			value = -50
			}
			add_ai_strategy = {
			type = support
			id = FROM
			value = -80
			}
			add_ai_strategy = {
			type = diplo_action_desire
			id = FROM
			value = -40
			target = send_volunteers
			}
		
		
	}
}
	country_event = {
	id = opinion.o.6
	
	hidden = yes
	is_triggered_only = yes
	fire_only_once = no
	immediate = {
			add_ai_strategy = {
			type = alliance
			id = FROM
			value = -70
			}
			add_ai_strategy = {
			type = befriend
			id = FROM
			value = -100
			}
			add_ai_strategy = {
			type = conquer
			id = FROM
			value = 80
			}
			add_ai_strategy = {
			type = protect
			id = FROM
			value = -110
			}
			add_ai_strategy = {
			type = support
			id = FROM
			value = -150
			}
			add_ai_strategy = {
			type = diplo_action_desire
			id = FROM
			value = -80
			target = send_volunteers
			}
			add_ai_strategy = {
			type = dont_join_wars_with
			target_country = FROM
			value = -40
			}
		
		
	}
}
	country_event = {
	id = opinion.o.7
	
	hidden = yes
	is_triggered_only = yes
	fire_only_once = no
	immediate = {


			add_ai_strategy = {
			type = support
			id = FROM
			value = 30
			}
			add_ai_strategy = {
			type = contain
			id = FROM
			value = -70
			}
			add_ai_strategy = {
			type = conquer
			id = FROM
			value = -90
			}
			add_ai_strategy = {
			type = prepare_for_war
			id = FROM
			value = -15
			}
		
		
	}
}
	country_event = {
	id = opinion.o.8
	
	hidden = yes
	is_triggered_only = yes
	fire_only_once = no
	immediate = {


			add_ai_strategy = {
			type = support
			id = FROM
			value = 120
			}
			add_ai_strategy = {
			type = contain
			id = FROM
			value = -150
			}
			add_ai_strategy = {
			type = conquer
			id = FROM
			value = -130
			}
			add_ai_strategy = {
			type = prepare_for_war
			id = FROM
			value = -30
			}
			add_ai_strategy = {
			type = diplo_action_desire
			id = FROM
			value = -2
			target = declare_war
			}
			add_ai_strategy = {
			type = diplo_action_desire
			id = ROOT
			value = -2
			target = generate_wargoal
			}
		
		
	}
}

country_event = {
	id = opinion.o.9
	trigger = {is_major = yes}
	hidden = yes
	is_triggered_only = yes
	fire_only_once = no
	immediate = {
		random_other_country = {
		limit = {has_opinion = {target = ROOT value < 60}}
		ROOT = {add_ai_strategy = {
			type = diplo_action_desire
			id = PREV
			value = 100
			target = improve_relation
			}
			}
			country_event = {id = opinion.o.10 originator = ROOT days = 30}
		
		}
		random_other_country = {
		limit = {has_opinion = {target = ROOT value < 60}}
		ROOT = {add_ai_strategy = {
			type = diplo_action_desire
			id = PREV
			value = 100
			target = improve_relation
			}
			}
			country_event = {id = opinion.o.10 originator = ROOT days = 30}
		}
		random_other_country = {
		limit = {AND = {has_opinion = {target = ROOT value < 60} has_government = ROOT}}
		ROOT = {add_ai_strategy = {
			type = diplo_action_desire
			id = PREV
			value = 100
			target = improve_relation
			}
			}
			country_event = {id = opinion.o.10 originator = ROOT days = 30}
		}
		
		
	}
}

country_event = {
	id = opinion.o.10
	hidden = yes
	is_triggered_only = yes
	fire_only_once = no
	immediate = {
		FROM = {add_ai_strategy = {
			type = diplo_action_desire
			id = ROOT
			value = -100
			target = improve_relation
			}
			}
		

		
		
	}
}
country_event = {
	id = opinion.o.11
	hidden = yes
	is_triggered_only = yes
	fire_only_once = no
	immediate = {
		random_other_country = {
		limit = {has_opinion = {target = ROOT value < -60}}
		ROOT = {add_ai_strategy = {
			type = diplo_action_desire
			id = PREV
			value = 100
			target = improve_relation
			}
			}
			country_event = {id = opinion.o.10 originator = ROOT days = 30}
		
		}
		
		
	}
}


