namespace = ideagroups

#######################################
# Aristocracy Ideas
#######################################

# Loss of Stability
country_event = {
	id = ideagroups.100
	title = "EVTNAME803"
	desc = "EVTDESC803"
	picture = ANGRY_MOB_eventPicture

	is_triggered_only = yes

	trigger = {
		has_idea_group = aristocracy_ideas
		stability = 0
	}	

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTA803"
		add_stability = -1
		reduce_estate_burghers_loyalty_effect = yes
	}
}

# The Burghers Rise!
country_event = {
	id = ideagroups.101
	title = "EVTNAME804"
	desc = "EVTDESC804"
	picture = ANGRY_MOB_eventPicture
	goto = peasant_revolt_province
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = aristocracy_ideas	
		NOT = {
			OR = {
				government = tribal
				government = native
				has_government_attribute = is_peasants_republic
			}
		}
	}

	immediate = {
		hidden_effect = {
			random_owned_province = {
				save_event_target_as = peasant_revolt_province
			}
		}
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTB804A"
		event_target:peasant_revolt_province = {
			particularist_rebels = 1
		}
	}
}

# More Nobility in the Army
country_event = {
	id = ideagroups.102
	title = "EVTNAME805"
	desc = "EVTDESC805"
	picture = LAND_MILITARY_eventPicture
	
	is_triggered_only = yes

	trigger = {
		has_idea_group = aristocracy_ideas	
	}
	
	mean_time_to_happen = {
		days = 1
	}	
	
	option = {
		name = "EVTOPTB805A"
		add_army_tradition = 10
	}
}

# Peasant Revolt
country_event = {
	id = ideagroups.103
	title = "EVTNAME812"
	desc = "EVTDESC812"
	picture = ANGRY_MOB_eventPicture
	goto = peasant_revolt_province
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = aristocracy_ideas	
	}
	
	mean_time_to_happen = {
		days = 1
	}

	immediate = {
		hidden_effect = {
			random_owned_province = {
				save_event_target_as = peasant_revolt_province
			}
		}
	}

	option = {
		name = "EVTOPTB812A"
		event_target:peasant_revolt_province = {
			anti_tax_rebels = 1
		}		
	}
}

# Attracting the right people
country_event = {
	id = ideagroups.104
	title = "EVTNAME813"
	desc = "EVTDESC813"
	picture = DEBATE_REPUBLICAN_eventPicture
	
	is_triggered_only = yes

	trigger = {
		has_idea_group = aristocracy_ideas	
	}

	mean_time_to_happen = {
		days = 1
	}
	
	immediate = {
		hidden_effect = {
			random_list = {
				20 = { set_country_flag = natural_scientist_flag }
				20 = { set_country_flag = artist_flag }
				20 = { set_country_flag = diplomat_flag }
				20 = { set_country_flag = treasurer_flag }
				20 = { set_country_flag = trader_flag }
			}
		}
	}
	
	option = {
		name = "EVTOPTB813A"
		add_meritocracy_effect = yes
		add_estate_nobles_loyalty_effect = yes
		trigger_switch = {
			on_trigger = has_country_flag
			natural_scientist_flag = {
				clr_country_flag = natural_scientist_flag

				define_advisor = {
					type = natural_scientist
					skill = 2
					discount = yes
				}
			}
			artist_flag = {
				clr_country_flag = artist_flag
				define_advisor = {
					type = artist
					skill = 2
					discount = yes
				}
			}
			diplomat_flag = {
				clr_country_flag = diplomat_flag
				define_advisor = {
					type = diplomat
					skill = 2
					discount = yes
				}
			}
			treasurer_flag = {
				clr_country_flag = treasurer_flag
				define_advisor = {
					type = treasurer
					skill = 2
					discount = yes
				}
			}
			trader_flag = {
				clr_country_flag = trader_flag
				define_advisor = {
					type = trader
					skill = 2
					discount = yes
				}
			}
		}

	}
}

# Major Revolt
country_event = {
	id = ideagroups.105
	title = "EVTNAME814"
	desc = "EVTDESC814"
	picture = ANGRY_MOB_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = aristocracy_ideas	
	}		

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTB814A"
		random_owned_province = {
			anti_tax_rebels = 1
		}
		random_owned_province = {
			anti_tax_rebels = 1
		}				
	}
}

# Serfs Properly Exploited
country_event = {
	id = ideagroups.106
	title = "EVTNAME6300"
	desc = "EVTDESC6300"
	picture = ANGRY_MOB_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = aristocracy_ideas
		NOT = {	has_country_modifier =  "freesubjects_modifier" }
		NOT = {	has_country_modifier =  "serf_exploitation" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6300"
		add_country_modifier = {
			name = "serf_exploitation"
			duration = 3650
		}
	}
}

# Serfs Upset
country_event = {
	id = ideagroups.107
	title = "EVTNAME6301"
	desc = "EVTDESC6301" 
	picture = ANGRY_MOB_eventPicture
	goto = anti_tax_revolt_province
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = aristocracy_ideas	
		NOT = {	has_country_modifier =  "freesubjects_modifier" }
		NOT = {	has_country_modifier =  "serfdom_modifier" }
	}

	mean_time_to_happen = {
		days = 1
	}
	
	immediate = {
		hidden_effect = {
			random_owned_province = {
				save_event_target_as = anti_tax_revolt_province
			}
		}
	}

	option = {
		name = "EVTOPTA6301"
		ai_chance = {
			factor = 50
		}
		add_estate_nobles_loyalty_effect = yes
		event_target:anti_tax_revolt_province = {
			anti_tax_rebels = 1
		}
	}

	option = {
		name = "EVTOPTB6301"
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0
				has_estate = estate_nobles
				NOT = {
					estate_loyalty = {
						estate = estate_nobles
						loyalty = 40
					}
				}
			}
		}
		reduce_estate_nobles_loyalty_effect = yes
		add_country_modifier = {
			name = freesubjects_modifier
			duration = 3650
		}
	}
} 

# Aristocrats grateful for our favor
country_event = {
	id = ideagroups.108
	title = "EVTNAME6338"
	desc = "EVTDESC6338"
	picture = COURT_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = aristocracy_ideas	
	}

	mean_time_to_happen = {
		days = 1
	}

	
	option = {
		name = "EVTOPTA6338"
		add_estate_nobles_loyalty_effect = yes
		add_years_of_income = 1
	}
}

# Merchants complain
country_event = {
	id = ideagroups.109
	title = "EVTNAME6339"
	desc = "EVTDESC6339"
	picture = MERCHANTS_TALKING_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = aristocracy_ideas	
		NOT = {	has_country_modifier =  "unhappy_merchants" }
		NOT = {	has_country_modifier =  "plutocracy_modifier" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6339"
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0
				has_estate = estate_burghers
				NOT = {
					estate_loyalty = {
						estate = estate_burghers
						loyalty = 40
					}
				}
			}
		}
		reduce_estate_burghers_loyalty_effect = yes
		add_country_modifier = {
			name = "unhappy_merchants"
			duration = 3650
		}
		add_prestige = 10
	}

	option = {
		name = "EVTOPTB6339"
		ai_chance = {
			factor = 50
		}
		add_country_modifier = {
			name = "plutocracy_modifier"
			duration = 3650
		}
		add_estate_burghers_loyalty_effect = yes
	}
} 

# Nobles support the State
country_event = {
	id = ideagroups.110
	title = ideagroups.110.t
	desc = ideagroups.110.d
	picture = COURT_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = aristocracy_ideas	
		war_exhaustion = 5
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.110.a
		add_estate_nobles_loyalty_effect = yes
		add_war_exhaustion = -2
	}
}

# Military Treatise
country_event = {
	id = ideagroups.111
	title = ideagroups.111.t
	desc = ideagroups.111.d
	picture = LAND_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = aristocracy_ideas	
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.111.a
		add_estate_nobles_loyalty_effect = yes
		add_mil_power = 50
	}
	option = {
		name = ideagroups.111.b
		trigger = { has_dlc = "Cradle of Civilization" }
		add_army_professionalism = 1
	}
}

# Increased Recruitment
country_event = {
	id = ideagroups.112
	title = ideagroups.112.t
	desc = ideagroups.112.d
	picture = LAND_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = aristocracy_ideas
		NOT = { manpower_percentage = 0.9 }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.112.a
		add_yearly_manpower = 1
	}
}

#######################################
# Plutocracy Ideas
#######################################

# Noble Uprising
country_event = {
	id = ideagroups.200
	title = "EVTNAME800"
	desc = "EVTDESC800"
	picture = ANGRY_MOB_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = plutocracy_ideas
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTB800A"
		reduce_estate_nobles_loyalty_effect = yes
		random_owned_province = {
			noble_rebels = 1
		}
	}
}

# Loss of Prestige
country_event = {
	id = ideagroups.201
	title = "EVTNAME801"
	desc = "EVTDESC801"
	picture = COURT_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = plutocracy_ideas
	}	

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTB801A"
		add_prestige = -5
	}
}

# Merchants Benefit
country_event = {
	id = ideagroups.202
	title = "EVTNAME802"
	desc = "EVTDESC802"
	picture = ADVISOR_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = plutocracy_ideas
	}
	
	immediate = {
		check_if_non_state_advisor_effect = { #Hidden, must be followed by erase_advisor_flags_effect
			chance_of_primary = 75 #Not percentages!
			chance_of_tertiary = 5
			chance_of_secondary = 25
		}
		hidden_effect = {
			random_list = {
				33 = { set_country_flag = treasurer_flag }
				33 = { set_country_flag = master_of_mint_flag }
				33 = { set_country_flag = trader_flag }
			}
		}
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTB802A"
		add_meritocracy_effect = yes
		
		trigger_switch = {
			on_trigger = has_country_flag
			treasurer_flag = {
				generate_advisor_of_type_and_semi_random_religion_effect = {
					advisor_type=treasurer
					advisor_type_if_not_state=treasurer
					skill = 2
					discount=yes
				}
			}
			master_of_mint_flag = {
				generate_advisor_of_type_and_semi_random_religion_effect = {
					advisor_type=master_of_mint
					advisor_type_if_not_state=master_of_mint
					skill = 2
					discount=yes
				}
			}
			trader_flag = {
				generate_advisor_of_type_and_semi_random_religion_effect = {
					advisor_type=trader
					advisor_type_if_not_state=trader
					skill = 2
					discount=yes
				}
			}
		}
	}
	after = {
		erase_advisor_flags_effect = yes
		trigger_switch = {
			on_trigger = has_country_flag
			treasurer_flag = { clr_country_flag = treasurer_flag }
			master_of_mint_flag = { clr_country_flag = master_of_mint_flag }
			trader_flag = { clr_country_flag = trader_flag }
		}
	}
}

# Minority Prospers
country_event = {
	id = ideagroups.203
	title = "EVTNAME6156"
	desc = "EVTDESC6156"
	picture = REFORM_eventPicture
	goto = minority_religion_province
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = plutocracy_ideas
		any_owned_province = {
			NOT = { culture = ROOT }
			is_city = yes
			is_state_core = root
		}
	}

	immediate = {
		hidden_effect = {
			random_owned_province = {
				limit = {
					NOT = { culture = ROOT }
					is_city = yes
					is_state_core = root
				}
				save_event_target_as = minority_religion_province
			}
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6156"
		event_target:minority_religion_province = {
			add_province_modifier = {
				name = "minority_prospers"
				duration = 3650
			}
		}
	}
}

# Backlash
country_event = {
	id = ideagroups.204
	title = "EVTNAME6157"
	desc = "EVTDESC6157"
	picture = ANGRY_MOB_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = plutocracy_ideas
		any_owned_province = {
			culture = ROOT
			NOT = { religion = ROOT }
		}		
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6157"
		reduce_estate_nobles_loyalty_effect = yes
		random_owned_province = {
			limit = {
				culture = ROOT
				NOT = { religion = ROOT }
			}
			noble_rebels = 1
		}
	}
}

# People are disappearing
country_event = {
	id = ideagroups.205
	title = "EVTNAME815"
	desc = "EVTDESC815"
	picture = LAND_MILITARY_eventPicture
	
	is_triggered_only = yes

	trigger = {
		has_idea_group = plutocracy_ideas	
	}		

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTA815"
		add_yearly_manpower = -0.5
	}
}

# Losing control
country_event = {
	id = ideagroups.206
	title = "EVTNAME816"
	desc = "EVTDESC816"
	picture = CITY_DEVELOPMENT_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = plutocracy_ideas	
	}		

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTB816A"
		add_stability = -1
	}
}

# Better Administration
country_event = {
	id = ideagroups.207
	title = "EVTNAME817"
	desc = "EVTDESC817"
	picture = CITY_DEVELOPMENT_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = plutocracy_ideas	
	}		
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTB817A"
		if = {
			limit = {
				NOT = { has_completed_all_reforms_trigger = yes }
				primitives = no
			}
			add_reform_progress_small_effect = yes
		}
		else_if = {
			limit = {
				corruption = 0.01
			}
			add_corruption = -1
		}
		else_if = {
			limit = {
				NOT = {
					corruption = 0.01
				}
			}
			add_inflation = -2
		}
	}
}

# Our People Revel in Freedom
country_event = {
	id = ideagroups.208
	title = "EVTNAME6302"
	desc = "EVTDESC6302"
	picture = COLONIZATION_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = plutocracy_ideas	
		NOT = {	has_country_modifier =  "happy_people" }

	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTA6302"
			add_estate_burghers_loyalty_effect = yes
			add_country_modifier = {
			name = "happy_people"
			duration = 3650
			}
	}
}	
	
# Nobles Concerned
country_event = {
	id = ideagroups.209
	title = "EVTNAME6303"
	desc = "EVTDESC6303"
	picture = COURT_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = plutocracy_ideas
		NOT = {	has_country_modifier =  "serfdom_modifier" }
		NOT = {	has_country_modifier =  "freesubjects_modifier" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6303"
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0
				has_estate = estate_nobles
				NOT = {
					estate_loyalty = {
						estate = estate_nobles
						loyalty = 40
					}
				}
			}
		}
		add_stability = -1
		reduce_estate_nobles_loyalty_effect = yes
	}

	option = {
		name = "EVTOPTB6303"
		ai_chance = {
			factor = 50
		}
		add_adm_power = -25
		add_country_modifier = {
			name = serfdom_modifier
			duration = 3650
		}
		add_estate_nobles_loyalty_effect = yes
	}
}

# Merchants pleased
country_event = {
	id = ideagroups.210
	title = "EVTNAME6340"
	desc = "EVTDESC6340"
	picture = MERCHANTS_TALKING_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = plutocracy_ideas	
	}

	mean_time_to_happen = {
		days = 1
		modifier = {
			factor = 1.05
			plutocracy_ideas = 4
		}
		modifier = {
			factor = 1.05
			plutocracy_ideas = 5
		}
		modifier = {
			factor = 1.05
			plutocracy_ideas = 6
		}
		modifier = {
			factor = 1.05
			plutocracy_ideas = 7
		}
	}

	option = {
		name = "EVTOPTA6340"
		add_estate_burghers_loyalty_effect = yes
		add_years_of_income = 0.25
	}
}	

# Aristocrats concerned
country_event = {
	id = ideagroups.211
	title = "EVTNAME6341"
	desc = "EVTDESC6341"
	picture = COURT_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = plutocracy_ideas
		NOT = {	has_country_modifier =  "aristocracy_modifier" }
	}

	option = {
		name = "EVTOPTA6341"
		add_prestige = -25
	}

	option = {
		name = "EVTOPTB6341"
		reduce_estate_nobles_loyalty_effect = yes
		add_country_modifier = {
			name = "aristocracy_modifier"
			duration = 3650
		}
	}
}

# Mercenaries flock to the Standard
country_event = {
	id = ideagroups.212
	title = ideagroups.212.t
	desc = ideagroups.212.d
	picture = MILITARY_CAMP_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = plutocracy_ideas	
		NOT = {	has_country_modifier =  "mercenaries_to_the_standard" }
	}

	option = {
		name = ideagroups.212.a
		add_country_modifier = {
			name = "mercenaries_to_the_standard"
			duration = 3650
			hidden = yes
		}
		custom_tooltip = generic_more_mercs_available_tt
	}
}

# For Freedom!
country_event = {
	id = ideagroups.213
	title = ideagroups.213.t
	desc = ideagroups.213.d
	picture = ANGRY_MOB_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = plutocracy_ideas
		is_at_war = yes	
		NOT = {	has_country_modifier =  "for_freedom" }
	}

	option = {
		name = ideagroups.213.a
		add_estate_burghers_loyalty_effect = yes
		add_country_modifier = {
			name = "for_freedom"
			duration = 3650
		}
	}
}

# Our Rights
country_event = {
	id = ideagroups.214
	title = ideagroups.214.t
	desc = ideagroups.214.d
	picture = REFORM_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = plutocracy_ideas
		NOT = {	has_country_modifier =  "our_rights" }
	}

	option = {
		name = ideagroups.214.a
		add_estate_burghers_loyalty_effect = yes
		add_country_modifier = {
			name = "our_rights"
			duration = 3650
		}
	}
}

# In Defense of the Mercantile Interest
country_event = {
	id = ideagroups.215
	title = ideagroups.215.t
	desc = ideagroups.215.d
	picture = MERCHANTS_TALKING_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = plutocracy_ideas
		NOT = { mercantilism = 95 }

	}

	option = {
		name = ideagroups.215.a
		add_mercantilism = 2
		add_estate_burghers_loyalty_effect = yes
		add_corruption = 0.5
	}
}

# Agricultural Boom
country_event = {
	id = ideagroups.216
	title = ideagroups.216.t
	desc = ideagroups.216.d
	picture = FARMING_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = plutocracy_ideas
		NOT = {	has_country_modifier =  "agricultural_boom" }
	}

	option = {
		name = ideagroups.216.a
		add_country_modifier = {
			name = "agricultural_boom"
			duration = 3650
		}
	}
}

# Tolerance for all
country_event = {
	id = ideagroups.217
	title = ideagroups.217.t
	desc = ideagroups.217.d
	picture = MERCHANTS_TALKING_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = plutocracy_ideas
		NOT = { religious_unity = 1.0 }
		NOT = {	has_country_modifier =  "tolerance_for_all" }
	}

	option = {
		name = ideagroups.217.a
		add_estate_dhimmi_loyalty_effect = yes
		add_country_modifier = {
			name = "tolerance_for_all"
			duration = 3650
		}
	}
}

# To the Colors
country_event = {
	id = ideagroups.218
	title = ideagroups.218.t
	desc = ideagroups.218.d
	picture = MILITARY_CAMP_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = plutocracy_ideas
		is_at_war = yes
		NOT = {	has_country_modifier =  "to_the_colours" }
	}

	option = {
		name = ideagroups.218.a
		add_country_modifier = {
			name = "to_the_colours"
			duration = 3650
		}
	}
}

#######################################
# Innovativeness Ideas
#######################################
# We look weak
country_event = {
	id = ideagroups.301
	title = "EVTNAME819"
	desc = "EVTDESC819"
	picture = DEBATE_REPUBLICAN_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = innovativeness_ideas	
	}		
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTB819A"
		add_prestige = -5
	}
}

# New thinkers arise
country_event = {
	id = ideagroups.302
	title = "EVTNAME820"
	desc = "EVTDESC820"
	picture = INVENTION_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = innovativeness_ideas	
	}
	
	immediate = {
		check_if_non_state_advisor_effect = { #Hidden scripted effect, is used by scripted effect and must always be cleared in after = { } using erase_advisor_flags_effect.
			chance_of_primary = 85 #Not percentages!
			chance_of_tertiary = 15
			chance_of_secondary = 35
		}
		hidden_effect = {
			random_list = {
				20 = { set_country_flag = natural_scientist_flag }
				20 = { set_country_flag = statesman_flag }
				20 = { set_country_flag = treasurer_flag }
				20 = { set_country_flag = naval_reformer_flag }
				20 = { set_country_flag = army_reformer_flag }
			}
		}
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTB820A"
		add_meritocracy_effect = yes
		trigger_switch = {
			on_trigger = has_country_flag
			natural_scientist_flag = {
				generate_advisor_of_type_and_semi_random_religion_effect = {
					advisor_type=natural_scientist
					advisor_type_if_not_state=natural_scientist
					scaled_skill = yes
					discount=yes
				}
			}
			statesman_flag = {
				generate_advisor_of_type_and_semi_random_religion_effect = {
					advisor_type=statesman
					advisor_type_if_not_state=statesman
					scaled_skill = yes
					discount=yes
				}
			}
			treasurer_flag = {
				generate_advisor_of_type_and_semi_random_religion_effect = {
					advisor_type=treasurer
					advisor_type_if_not_state=treasurer
					scaled_skill = yes
					discount=yes
				}
			}
			naval_reformer_flag = {
				generate_advisor_of_type_and_semi_random_religion_effect = {
					advisor_type=naval_reformer
					advisor_type_if_not_state=naval_reformer
					scaled_skill = yes
					discount=yes
				}
			}
			army_reformer_flag = {
				generate_advisor_of_type_and_semi_random_religion_effect = {
					advisor_type=army_reformer
					advisor_type_if_not_state=army_reformer
					scaled_skill = yes
					discount=yes
				}
			}
		}
	}
	after = {
		erase_advisor_flags_effect = yes
		trigger_switch = {
			on_trigger = has_country_flag
			natural_scientist_flag = { clr_country_flag = natural_scientist_flag }
			statesman_flag = { clr_country_flag = statesman_flag }
			treasurer_flag = { clr_country_flag = treasurer_flag }
			naval_reformer_flag = { clr_country_flag = naval_reformer_flag }
			army_reformer_flag = { clr_country_flag = army_reformer_flag }
		}
	}
}

# Epic Art Produced
country_event = {
	id = ideagroups.303
	title = "EVTNAME6193"
	desc = "EVTDESC6193"
	picture = IMPORTANT_STATUE_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = innovativeness_ideas	
	}	

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6193"
		add_prestige = 10
	}
}

# No Art worth Patronizing
country_event = {
	id = ideagroups.304
	title = "EVTNAME6194"
	desc = "EVTDESC6194"
	picture = IMPORTANT_STATUE_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = innovativeness_ideas	
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6194"
		add_prestige = -10
	}
}

# The Scientific Revolution Continues
country_event = {
	id = ideagroups.305
	title = "EVTNAME6191"
	desc = "EVTDESC6191"
	picture = INVENTION_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea = scientific_revolution
		NOT = {	has_country_modifier =  "mil_boost" }
		NOT = {	has_country_modifier =  "adm_boost" }
		NOT = {	has_country_modifier =  "dip_boost" }

	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6191"
		add_country_modifier = {
			name = "mil_boost"
			duration = 3650
		}
	}

	option = {
		name = "EVTOPTD6191"
		add_country_modifier = {
			name = "adm_boost"
			duration = 3650
		}
	}
	
	option = {
		name = "EVTOPTE6191"
		add_country_modifier = {
			name = "dip_boost"
			duration = 3650
		}
	}
}

# Scientific Revolution Halts
country_event = {
	id = ideagroups.306
	title = "EVTNAME6192"
	desc = "EVTDESC6192"
	picture = INVENTION_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = innovativeness_ideas
		current_age = age_of_revolutions
		NOT = {	has_country_modifier =  "revolution_suffers" }
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTA6192"
		add_country_modifier = {
			name = "revolution_suffers"
			duration = 3650
		}
	}
}

# Innovation Wave
country_event = {
	id = ideagroups.307
	title = "EVTNAME6330"
	desc = "EVTDESC6330"
	picture = INVENTION_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = innovativeness_ideas
		NOT = {	has_country_modifier =  "innovation_wave" }
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTA6330"
		add_country_modifier = {
			name = "innovation_wave"
			duration = 3650
		}
	}
}

# Burst of Administrative Thought
country_event = {
	id = ideagroups.308
	title = ideagroups.308.t
	desc = ideagroups.308.d
	picture = DEBATE_REPUBLICAN_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = innovativeness_ideas
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.308.a
		if = {
			limit = {
				NOT = { has_completed_all_reforms_trigger = yes }
				primitives = no
			}
			add_reform_progress_small_effect = yes
		}
		else_if = {
			limit = {
				corruption = 0.01
			}
			add_corruption = -1
		}
		else = {
			add_adm_power = 50
		}
	}
}

# A Look Outward
country_event = {
	id = ideagroups.309
	title = ideagroups.309.t
	desc = ideagroups.309.d
	picture = DIPLOMACY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = innovativeness_ideas
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.309.a
		add_dip_power = 50
	}
}

# Military Theory
country_event = {
	id = ideagroups.310
	title = ideagroups.310.t
	desc = ideagroups.310.d
	picture = LAND_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = innovativeness_ideas
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.310.a
		add_mil_power = 50
		add_army_professionalism = 1
	}
}

#######################################
# Religious Ideas
#######################################

# Heresy
country_event = {
	id = ideagroups.400
	title = "EVTNAME821"
	desc = "EVTDESC821"
	picture = RELIGION_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = religious_ideas
		NOT = { religion = jewish } #Has no heretic religions
		NOT = { has_reform = papacy_reform }
		NOT = { has_reform = leading_clergy_reform }
		OR = {
			NOT = { religion = catholic }
			AND = {
				religion = catholic
				OR = {
					is_religion_enabled = protestant
					is_religion_enabled = reformed
				}
			}
		}
		any_owned_province = {
			has_owner_religion = yes
			is_reformation_center = no
			NOT = { has_province_modifier = heresy }
		}
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	immediate = {
		hidden_effect = {
			if = {
				limit = {
					religion = catholic
					is_religion_enabled = protestant
					is_religion_enabled = reformed
				}
				random_list = {
					70 = { set_country_flag = protestant_heresy }
					30 = { set_country_flag = reformed_heresy }
				}
			}
			if = {
				limit = {
					religion = catholic
					is_religion_enabled = protestant
					NOT = { is_religion_enabled = reformed }
				}
				set_country_flag = protestant_heresy
			}
			if = {
				limit = {
					OR = {
						religion = protestant
						religion = reformed
					}
				}
				set_country_flag = catholic_heresy
			}
			# Orthodox
			if = {
				limit = {
					religion = orthodox
					is_religion_enabled = protestant
					is_religion_enabled = reformed
				}
				random_list = {
					70 = { set_country_flag = protestant_heresy }
					30 = { set_country_flag = reformed_heresy }
				}
			}
			if = {
				limit = {
					religion = orthodox
					is_religion_enabled = protestant
					NOT = { is_religion_enabled = reformed }
				}
				set_country_flag = protestant_heresy
			}
			if = {
				limit = {
					religion = orthodox
					NOT = {
						OR = {
							is_religion_enabled = protestant
							is_religion_enabled = reformed						
						}
					}
				}
				set_country_flag = catholic_heresy
			}
			# Coptic
			if = {
				limit = {
					religion = coptic
					is_religion_enabled = protestant
					is_religion_enabled = reformed
				}
				random_list = {
					70 = { set_country_flag = protestant_heresy }
					30 = { set_country_flag = reformed_heresy }
				}
			}
			if = {
				limit = {
					religion = coptic
					is_religion_enabled = protestant
					NOT = { is_religion_enabled = reformed }
				}
				set_country_flag = protestant_heresy
			}
			if = {
				limit = {
					religion = coptic
					NOT = {
						OR = {
							is_religion_enabled = protestant
							is_religion_enabled = reformed						
						}
					}
				}
				set_country_flag = catholic_heresy
			}
		}
	}
	
	option = {
		name = "EVTOPTB821A"
		# Christian
		if = {
			limit = {
				has_country_flag = protestant_heresy
			}
			random_owned_province = {
				limit = {
					has_owner_religion = yes
					is_reformation_center = no
					NOT = { has_province_modifier = heresy }
				}
				change_religion = protestant
			}
			clr_country_flag = protestant_heresy
		}
		if = {
			limit = {
				has_country_flag = reformed_heresy
			}
			random_owned_province = {
				limit = {
					has_owner_religion = yes
					is_reformation_center = no
					NOT = { has_province_modifier = heresy }
				}
				change_religion = reformed
			}
			clr_country_flag = reformed_heresy
		}
		if = {
			limit = {
				has_country_flag = catholic_heresy
			}
			random_owned_province = {
				limit = {
					has_owner_religion = yes
					is_reformation_center = no
					NOT = { has_province_modifier = heresy }
				}
				change_religion = catholic
			}
			clr_country_flag = catholic_heresy
		}
		# Muslim
		if = {
			limit = {
				religion_group = muslim
			}
			add_piety = -0.15
			random_owned_province = {
				limit = {
					has_owner_religion = yes
					NOT = { has_province_modifier = heresy }
				}
				change_religion = heretic
			}
		}
		# Others
		if = {
			limit = {
				NOT = { religion_group = christian }
				NOT = { religion_group = muslim }
			}
			random_owned_province = {
				limit = {
					has_owner_religion = yes
					NOT = { has_province_modifier = heresy }
				}
				add_province_modifier = {
					name = "heresy"
					duration = 730
				}
			}
		}
	}
}

# Disorder
country_event = {
	id = ideagroups.401
	title = "EVTNAME822"
	desc = "EVTDESC822"
	picture = DEBATE_REPUBLICAN_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = religious_ideas	
	}		
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTB822A"
		add_stability = -1
	}
}

# A holy person has arrived
country_event = {
	id = ideagroups.402
	title = "EVTNAME823"
	desc = "EVTDESC823"
	picture = POPE_PREACHING_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = religious_ideas	
	}		
	
	mean_time_to_happen = {
		days = 1
	}
	
	immediate = {
		check_if_non_state_advisor_effect = { #Hidden, must be followed by erase_advisor_flags_effect
			chance_of_primary = 100 #Not percentages!
			chance_of_tertiary = 0
			chance_of_secondary = 5
		}
	}
	
	option = {
		name = "EVTOPTB823A"
		add_piety = 0.05
		add_meritocracy_effect = yes
		generate_advisor_of_type_and_semi_random_religion_effect = {
			advisor_type=theologian
			advisor_type_if_not_state=theologian
			skill = 2
			discount=yes
		}
	}
	after = {
		erase_advisor_flags_effect = yes
	}
}

# Support for the war
country_event = {
	id = ideagroups.403
	title = "EVTNAME6195"
	desc = "EVTDESC6195"
	picture = MILITARY_CAMP_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = religious_ideas
		at_war_with_religious_enemy = yes
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6195"
		add_piety = 0.05
		add_war_exhaustion = -2
		add_estate_church_loyalty_effect = yes
	}
}

# People Angered by our failure to wage war
country_event = {
	id = ideagroups.404
	title = "EVTNAME6196"
	desc = "EVTDESC6196"
	picture = ANGRY_MOB_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = religious_ideas
		is_at_war = no
		has_border_with_religious_enemy = yes
		any_neighbor_country = {
			NOT = { religion = ROOT }
			NOT = { truce_with = ROOT }
			NOT = { ROOT = { truce_with = prev } }
		}
		NOT = { had_recent_war = 5 }
	}	

	mean_time_to_happen = {
		days = 1
	}

	immediate = {
		hidden_effect = {
			random_neighbor_country = {
				limit = {
					NOT = { religion = ROOT }
					NOT = { truce_with = ROOT }
					NOT = { ROOT = { truce_with = prev } }
				}
				save_event_target_as = infidel_neighbor
			}
		}
	}

	option = {
		name = "EVTOPTA6196"
		add_piety = -0.15
		add_stability = -1
	}
	option = {
		name = "EVTOPTB6196"
		add_piety = -0.15
		random_owned_province = {
			limit = {
				religion = ROOT 
			}
			spawn_rebels = {
				type = religious_rebels
				size = 1
			}
		 } 
	}
}

# Church Mobilizes Population
country_event = {
	id = ideagroups.405
	title = "EVTNAME6158"
	desc = "EVTDESC6158"
	picture = RELIGION_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = religious_ideas
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6158"
		add_piety = 0.05
		add_stability_or_adm_power = yes

		add_estate_church_loyalty_effect = yes
	}
}

# Religious Divergences
country_event = {
	id = ideagroups.406
	title = "EVTNAME6159"
	desc = "EVTDESC6159"
	picture = DEBATE_REPUBLICAN_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = religious_ideas
		NOT = { has_country_modifier = religious_deviants }
		OR = {
			religion_group = christian
			religion_group = muslim
		}
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6159"
		ai_chance = {
			factor = 75
			modifier = {
				factor = 0
				has_estate = estate_church
				NOT = {
					estate_loyalty = {
						estate = estate_church
						loyalty = 40
					}
				}
			}
		}
		add_piety = -0.15
		add_corruption = 0.5
		add_country_modifier = {
			name = "religious_deviants"
			duration = 3650
		}
		reduce_estate_church_loyalty_effect = yes
	}

	option = {
		name = "EVTOPTB6159"
		ai_chance = {
			factor = 25
		}
		add_piety = 0.15
		add_stability = -1
		add_estate_church_loyalty_effect = yes
		
	}
}

# Religious Zeal
country_event = {
	id = ideagroups.407
	title = "EVTNAME6160"
	desc = "EVTDESC6160"
	picture = RELIGION_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = religious_ideas
		NOT = {	has_country_modifier =  "missionary_zeal" }
		
	}	
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6160"
		add_piety = 0.15
		add_estate_church_loyalty_effect = yes
		add_country_modifier = {
			name = "missionary_zeal"
			duration = 3650
		}
	}
}

# Conservative Backlash
country_event = {
	id = ideagroups.408
	title = "EVTNAME6161"
	desc = "EVTDESC6161"
	picture = DEBATE_REPUBLICAN_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea = divine_supremacy
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTA6161"
		add_stability = -1
	}

	option = {
		name = "EVTOPTB6161"
		add_piety = 0.2
		random_owned_province = {
			limit = {
				religion = ROOT
			}
			spawn_rebels = {
				type = religious_rebels
				size = 1
			}
		}
	} 
}

# People feel safe
country_event = {
	id = ideagroups.409
	title = "EVTNAME6332"
	desc = "EVTDESC6332"
	picture = RELIGION_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = religious_ideas
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6332"
		add_piety = 0.05
		add_stability_or_adm_power = yes
	}
}	

# Liberals Angry
country_event = {
	id = ideagroups.410
	title = "EVTNAME6333"
	desc = "EVTDESC6333"
	picture = DEBATE_REPUBLICAN_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = religious_ideas
		current_age = age_of_revolutions
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTA6333"
		random_owned_province = {
			revolutionary_rebels = 1
		} 
	}

	option = {
		name = "EVTOPTB6333"
		add_piety = -0.2
		add_stability = -1
	}
}

# Evangelists
country_event = {
	id = ideagroups.411
	title = ideagroups.411.t
	desc = ideagroups.411.d
	picture = RELIGION_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = religious_ideas
		NOT = { religious_unity = 1.0 }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.411.a
		add_piety = 0.15
		add_stability_or_adm_power = yes
		add_estate_church_loyalty_effect = yes
	}
}

# Holy War
country_event = {
	id = ideagroups.412
	title = ideagroups.412.t
	desc = ideagroups.412.d
	picture = POPE_PREACHING_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = religious_ideas
		at_war_with_religious_enemy = yes
		war_exhaustion = 5
 	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.412.a
		add_piety = 0.05
		add_war_exhaustion = -2
		add_estate_church_loyalty_effect = yes
	}
}

# Welcome Home
country_event = {
	id = ideagroups.413
	title = ideagroups.413.t
	desc = ideagroups.413.d
	picture = RELIGION_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = religious_ideas
		any_owned_province = {
			has_owner_religion = no
			is_reformation_center = no
			religion_group = root
			has_missionary = no
		}
 	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.413.a
		add_piety = 0.05
		random_owned_province = {
			limit = {
				has_owner_religion = no
				is_reformation_center = no
				religion_group = root
				has_missionary = no
			}
			change_religion = root
		}		
	}
}

# They See the Light
country_event = {
	id = ideagroups.414
	title = ideagroups.414.t
	desc = ideagroups.414.d
	picture = RELIGION_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = religious_ideas
		any_owned_province = {
			is_reformation_center = no
			has_owner_religion = no
			NOT = { religion_group = root }
			has_missionary = no
		}
 	}

	mean_time_to_happen = {
		days = 1
	}


	option = {
		name = ideagroups.414.a
		add_piety = 0.1
		random_owned_province = {
			limit = {
				has_owner_religion = no
				is_reformation_center = no
				NOT = { religion_group = root }
				has_missionary = no
			}
			change_religion = root
		}		
	}
}

# Religious Leaders Show the Way
country_event = {
	id = ideagroups.415
	title = ideagroups.415.t
	desc = ideagroups.415.d
	picture = POPE_PREACHING_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = religious_ideas
		NOT = { stability = 1 }
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.415.a
		add_piety = 0.05
		add_stability_or_adm_power = yes
		if = {
			limit = {
				corruption = 0.01
			}
			add_corruption = -0.5
		}
		add_estate_church_loyalty_effect = yes
	}
}

# The Strength of Faith
country_event = {
	id = ideagroups.416
	title = ideagroups.416.t
	desc = ideagroups.416.d
	picture = RELIGION_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = religious_ideas
		NOT = { prestige = 90 }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.416.a
		add_piety = 0.05
		add_prestige = 10
		add_estate_church_loyalty_effect = yes
	}
}
 
# The Love of the Devoted
country_event = {
	id = ideagroups.417
	title = ideagroups.417.t
	desc = ideagroups.417.d
	picture = RELIGION_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = religious_ideas
		NOT = {	has_country_modifier =  "love_of_devoted" }

	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.417.a
		add_piety = 0.05
		add_country_modifier = {
			name = "love_of_devoted"
			duration = 3650
		}
		add_estate_church_loyalty_effect = yes
	}
}

#######################################
# Spy Ideas
#######################################

# New Spy techniques
country_event = {
	id = ideagroups.500
	title = "EVTNAME6152"
	desc = "EVTDESC6152"
	picture = SPY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = spy_ideas
		NOT = { has_country_modifier = enhanced_spies }
		NOT = { has_country_modifier = spy_defections }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6152"
		add_country_modifier = {
			name = "enhanced_spies"
			duration = 3650
		}
	}
}

# Spy Defections
country_event = {
	id = ideagroups.501
	title = "EVTNAME6153"
	desc = "EVTDESC6153"
	picture = SPY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = spy_ideas
		NOT = { has_country_modifier = enhanced_spies }
		NOT = { has_country_modifier = spy_defections }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6153"
		add_country_modifier = {
			name = "spy_defections"
			duration = 3650
		}
	}

	option = {
		name = "EVTOPTB6153"
		add_corruption = 0.5
		add_years_of_income = -0.1
	}
}

# A well-placed man
country_event = {
	id = ideagroups.502
	title = ideagroups.502.t
	desc = ideagroups.502.d
	picture = SPY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = spy_ideas
		is_at_war = yes
		any_rival_country = {
			war_with = root
		}
		ai = no #no use for it anyway.
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.502.a
		random_rival_country = {
			limit = {
				war_with = root
			}
			remove_fow = 3
		}
	}

}

# Hidden Activities
country_event = {
	id = ideagroups.503
	title = ideagroups.503.t
	desc = ideagroups.503.d
	picture = SPY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = spy_ideas
		NOT = {	has_country_modifier =  "hidden_agents" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.503.a
		add_country_modifier = {
			name = "hidden_agents"
			duration = 3650
		}
	}
}

# Rebel Supporting
country_event = {
	id = ideagroups.504
	title = ideagroups.504.t
	desc = ideagroups.504.d
	picture = ANGRY_MOB_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = spy_ideas
		NOT = {	has_country_modifier =  "better_rebel_support" }
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.504.a
		add_country_modifier = {
			name = "better_rebel_support"
			duration = 3650
		}
	}
}

# Diplomats Exposed
country_event = {
	id = ideagroups.505
	title = ideagroups.505.t
	desc = ideagroups.505.d
	picture = DIPLOMACY_eventPicture
	
	trigger = {
		has_idea_group = spy_ideas
	}

	is_triggered_only = yes
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.505.a
		add_prestige = -25

		hidden_effect = {
			if = {
				limit = {
					any_ally = {
						root = {
							has_spy_network_in = {
								who = prev
								value = 30
							}
						}
					}
				}
				random = {
					chance = 25
					random_ally = {
						limit = {
							root = {
								has_spy_network_in = {
									who = prev
									value = 30
								}
							}
						}
						country_event = { id = espionage_events.9 days = 30 random = 120 }
					}
				}
			}
		}
	}
}

# Spies get you better heirs....
country_event = {
	id = ideagroups.506
	title = ideagroups.506.t
	desc = ideagroups.506.d
	picture = SPY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = spy_ideas
		government = monarchy
		is_lesser_in_union = no
		has_heir = no
		has_regency = no
		is_female = no
		religion_group = christian
		has_government_attribute = heir
		NOT = {	has_ruler_modifier =  "extra_heir" }
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.506.a
		add_ruler_modifier = {
			name = "extra_heir"
			duration = -1
		}
	}
	option = {
		name = ideagroups.506.b
		define_heir = {
			dynasty = ROOT
			claim = 10
			change_adm = 3
			change_dip = 3
			change_mil = 3
		}
	}
}

# Reduced Upkeep
country_event = {
	id = ideagroups.507
	title = ideagroups.507.t
	desc = ideagroups.507.d
	picture = SPY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = spy_ideas
		NOT = {	has_country_modifier =  "focus_on_covert_actions" }
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.507.a
		add_country_modifier = {
			name = "focus_on_covert_actions"
			duration = 3650
		}
	}
}

# Spy Ideas give you power
country_event = {
	id = ideagroups.508
	title = ideagroups.508.t
	desc = ideagroups.508.d
	picture = SPY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = spy_ideas
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.508.a
		add_adm_power = 25
	}
	option = {
		name = ideagroups.508.b
		add_dip_power = 25
	}
	option = {
		name = ideagroups.508.c
		add_mil_power = 25
	}
}

#######################################
# Diplomatic Ideas
#####################################

# Cabinet Dynamism
country_event = {
	id = ideagroups.600
	title = "EVTNAME6154"
	desc = "EVTDESC6154"
	picture = ECONOMY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = diplomatic_ideas
		NOT = {	has_country_modifier =  "cabinet_dynamism" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6154"
		add_country_modifier = {
			name = "cabinet_dynamism"
			duration = 3650
		}
	}
}

# Government Corruption
country_event = {
	id = ideagroups.601
	title = "EVTNAME6155"
	desc = "EVTDESC6155"
	picture = DEBATE_REPUBLICAN_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = diplomatic_ideas
		NOT = {	has_country_modifier =  "government_corruption" }
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTA6155"
		add_country_modifier = {
			name = "government_corruption"
			duration = 3650
		}
	}
	option = {
		name = "EVTOPTB6155"
		add_inflation = 2
	}		
}

# Succesful Embassy
country_event = {
	id = ideagroups.602
	title = ideagroups.602.t
	desc = ideagroups.602.d
	picture = DIPLOMACY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = diplomatic_ideas
		is_at_war = no
		any_neighbor_country = {
			is_at_war = no
		}
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.602.a
		add_prestige = 5
		random_neighbor_country = {
			limit = {
				is_at_war = no
			}
			add_opinion = { who = ROOT modifier = succesful_embassy }
		}		
	}
}

# Incompetent Diplomats
country_event = {
	id = ideagroups.603
	title = ideagroups.603.t
	desc = ideagroups.603.d
	picture = DIPLOMACY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = diplomatic_ideas
		NOT = {	has_country_modifier =  "incompetent_fabrication" }
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.603.a
		add_prestige = -10
		add_country_modifier = {
			name = "incompetent_fabrication"
			duration = 3650
		}
	}
	option = {
		name = ideagroups.603.b
		add_dip_power = -50
	}
}

# Brilliant Diplomat
country_event = {
	id = ideagroups.604
	title = ideagroups.604.t
	desc = ideagroups.604.d
	picture = DIPLOMACY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = diplomatic_ideas
		NOT = {	has_country_modifier =  "brilliant_diplomat" }
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.604.a
		add_country_modifier = {
			name = "brilliant_diplomat"
			duration = 3650
		}
	}
	option = {
		name = ideagroups.604.b
		trigger = {
			religion = catholic
			NOT = { tag = PAP }
		}
		add_papal_influence = 20
	}
	option = {
		name = ideagroups.604.b
		trigger = {
			religion = orthodox
		}
		add_patriarch_authority = 0.05
	}
	option = {
		name = ideagroups.604.b
		trigger = {
			religion_group = muslim
		}
		add_piety = 0.5
	}
	option = {
		name = ideagroups.604.c
		trigger = {
			is_emperor = yes
		}
		add_imperial_influence = 5
	}
}

# Government Differences
country_event = {
	id = ideagroups.605
	title = ideagroups.605.t
	desc = ideagroups.605.d
	picture = DIPLOMACY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = diplomatic_ideas
		any_neighbor_country = {
			religion = root
			NOT = {
				same_govt_as_root_trigger = yes
			}
		}
	}
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.605.a
		random_neighbor_country = {
			limit = {
				religion = root
				NOT = {
					same_govt_as_root_trigger = yes
				}
			}
			add_opinion = { who = ROOT modifier = reconciling_differences }
		}
	}
}

# Improved Reputation
country_event = {
	id = ideagroups.606
	title = ideagroups.606.t
	desc = ideagroups.606.d
	picture = DIPLOMACY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = diplomatic_ideas
		NOT = {	has_country_modifier =  "improved_dip_reputation" }
		NOT = {	has_country_modifier =  "reduced_dip_reputation" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.606.a
		add_country_modifier = {
			name = "improved_dip_reputation"
			duration = 3650
		}
	}
}

# Bad Reputation
country_event = {
	id = ideagroups.607
	title = ideagroups.607.t
	desc = ideagroups.607.d
	picture = DIPLOMACY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = diplomatic_ideas
		NOT = {	has_country_modifier =  "improved_dip_reputation" }
		NOT = {	has_country_modifier =  "reduced_dip_reputation" }
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.607.a
		add_country_modifier = {
			name = "reduced_dip_reputation"
			duration = 3650
		}
	}
}

# Justify my demands
country_event = {
	id = ideagroups.608
	title = ideagroups.608.t
	desc = ideagroups.608.d
	picture = DIPLOMACY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = diplomatic_ideas
		NOT = {	has_country_modifier =  "dip_jusitified_demands" }
	}
	
	mean_time_to_happen = {
		days = 1
		modifier = {
			factor = 3
			is_at_war = yes
		}
	}

	option = {
		name = ideagroups.608.a
		add_country_modifier = {
			name = "dip_jusitified_demands"
			duration = 3650
		}
	}
}

#######################################
# Offensive Ideas
#######################################
# Nobles are worried
country_event = {
	id = ideagroups.700
	title = "EVTNAME830"
	desc = "EVTDESC830"
	picture = COURT_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = offensive_ideas	
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTB830A"
		add_stability = -1
	}
}

# Too many cowards
country_event = {
	id = ideagroups.701
	title = "EVTNAME831"
	desc = "EVTDESC831"
	picture = MILITARY_CAMP_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = offensive_ideas	
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTB831A"
		add_yearly_manpower = -1
		add_army_professionalism = -1
	}
}

# Glory to us
country_event = {
	id = ideagroups.702
	title = "EVTNAME832"
	desc = "EVTDESC832"
	picture = LAND_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = offensive_ideas	
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTB832A"
		add_prestige = 5
		add_army_professionalism = 1
	}
}

# Recruits flock to the standards
country_event = {
	id = ideagroups.703
	title = "EVTNAME6112"
	desc = "EVTDESC6112"
	picture = LAND_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = offensive_ideas
		NOT = {	has_country_modifier =  "recruits_flock" }
		NOT = {	has_country_modifier =  "resist_conscription" }
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6112"
		add_country_modifier = {
			name = "recruits_flock"
			duration = 3650
		}
	}
}

# Nations don't want to be conscripted
country_event = {
	id = ideagroups.704
	title = "EVTNAME6113"
	desc = "EVTDESC6113"
	picture = MILITARY_CAMP_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = offensive_ideas
		NOT = {	has_country_modifier =  "recruits_flock" }
		NOT = {	has_country_modifier =  "resist_conscription" }		
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6113"
		add_country_modifier = {
			name = "resist_conscription"
			duration = 3650
		}
	}
	option = {
		name = "EVTOPTB6113"
		add_stability = -1 
	}
}

# Isn't our Army Grand?
country_event = {
	id = ideagroups.705
	title = "EVTNAME6114"
	desc = "EVTDESC6114"
	picture = MILITARY_CAMP_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = offensive_ideas
		NOT = {	has_country_modifier =  "grander_army" }
		NOT = {	has_country_modifier =  "less_grand_army" }
		
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6114"
		add_country_modifier = {
			name = "grander_army"
			duration = 3650
		}
	}
}

# "Our Army isn't so grand
country_event = {
	id = ideagroups.706
	title = "EVTNAME6115"
	desc = "EVTDESC6115"
	picture = LAND_MILITARY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = offensive_ideas
		NOT = {	has_country_modifier =  "grander_army" }
		NOT = {	has_country_modifier =  "less_grand_army" }
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6115"
		add_country_modifier = {
			name = "less_grand_army"
			duration = 1826
		}
	}
	option = {
		name = "EVTOPTB6115"
		add_stability = -1
	}
}

# Our Army's �lan strikes fear into the enemy
country_event = {
	id = ideagroups.707
	title = "EVTNAME6312"
	desc = "EVTDESC6312"
	picture = MILITARY_CAMP_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = offensive_ideas	
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6312"
		add_prestige = 25
	}
}

# Fortification neglected
country_event = {
	id = ideagroups.708
	title = "EVTNAME6313"
	desc = "EVTDESC6313"
	picture = FORT_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = offensive_ideas	
		any_owned_province = {
			fort_level = 1

			NOT = { has_province_modifier = local_fortress }
			NOT = { has_province_modifier = fort_in_disrepair }
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6313"
		random_owned_province = {
			limit = {
				fort_level = 1


				NOT = { has_province_modifier = local_fortress }
				NOT = { has_province_modifier = fort_in_disrepair }
			}
			add_province_modifier = {
				name = "fort_in_disrepair"
				duration = 3650
			}
		}
	}
	option = {
		name = "EVTOPTB6313"
		add_army_tradition = -10
	}	
}

# Army is the way to Glory
country_event = {
	id = ideagroups.709
	title = "EVTNAME6308"
	desc = "EVTDESC6308"
	picture = MILITARY_CAMP_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = offensive_ideas	
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6308"
		add_prestige = 5
	}
}

# Admirals Concerned
country_event = {
	id = ideagroups.710
	title = "EVTNAME6309"
	desc = "EVTDESC6309" 
	picture = NAVAL_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = offensive_ideas	
		num_of_ports = 1
		primitives = no
		NOT = {	has_country_modifier =  "land_focus" }
		NOT = {	has_country_modifier =  "naval_modifier" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6309"
		add_country_modifier = {
			name = "land_focus"
			duration = 3650
		}
	}
	option = {
		name = "EVTOPTB6309"
		add_country_modifier = {
			name = naval_modifier
			duration = 3650
		}
	}
} 

# Show Elan
country_event = {
	id = ideagroups.711
	title = ideagroups.711.t
	desc = ideagroups.711.d
	picture = BATTLE_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = offensive_ideas
		NOT = {	has_country_modifier =  "full_elan" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.711.a
		add_country_modifier = {
			name = "full_elan"
			duration = 3650
		}
	}
} 

# Send in the Infantry
country_event = {
	id = ideagroups.712
	title = ideagroups.712.t
	desc = ideagroups.712.d
	picture = BATTLE_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = offensive_ideas
		NOT = {	has_country_modifier =  "finest_infantry" }		
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.712.a
		add_country_modifier = {
			name = "finest_infantry"
			duration = 3650
		}
	}
} 

# Send in the Cavalry
country_event = {
	id = ideagroups.713
	title = ideagroups.713.t
	desc = ideagroups.713.d
	picture = HORDE_ON_HORSEBACK_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = offensive_ideas
		NOT = {	has_country_modifier =  "cavalry_companions" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.713.a
		add_country_modifier = {
			name = "cavalry_companions"
			duration = 3650
		}
	}
} 

#######################################
# Defensive Ideas
#######################################

# Aristocrats don�t want to serve
country_event = {
	id = ideagroups.800   
	title = "EVTNAME833"
	desc = "EVTDESC833"
	picture = DEBATE_REPUBLICAN_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = defensive_ideas	
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTB833A"
		add_army_tradition = -10
		reduce_estate_nobles_loyalty_effect = yes
	}
	
	option = {
		name = "EVTOPTB833B"
		add_corruption = 0.5
	}
}

# Peasants upset
country_event = {
	id = ideagroups.801
	title = "EVTNAME834"
	desc = "EVTDESC834"
	picture = ANGRY_MOB_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = defensive_ideas	
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTB834A"
		random_owned_province = {
			anti_tax_rebels = 1
		}
	}
}

# Fortification Expert
country_event = {
	id = ideagroups.802
	title = "EVTNAME835"
	desc = "EVTDESC835"
	picture = FORT_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = defensive_ideas
	}
	
	immediate = {
		check_if_non_state_advisor_effect = { #Hidden, must be followed by erase_advisor_flags_effect
			chance_of_primary = 65 #Not percentages!
			chance_of_tertiary = 5
			chance_of_secondary = 15
		}
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTB835A"
		add_meritocracy_effect = yes
		generate_advisor_of_type_and_semi_random_religion_effect = {
			advisor_type=fortification_expert
			advisor_type_if_not_state=fortification_expert
			skill = 2
			discount=yes
		}
	}
	option = {
		name = "ideagroups.802.b"
		trigger = {
			any_owned_province = {
				fort_level = 1
				NOT = { has_province_modifier = improved_fortifications }
			}
		}
		random_owned_province = {
			limit = {
				fort_level = 1
				NOT = { has_province_modifier = improved_fortifications }
			}
			add_province_modifier = {
				name = "improved_fortifications"
				duration = 10950
			}
		}
	}
	after = { erase_advisor_flags_effect = yes }
}

# Promising General
country_event = {
	id = ideagroups.803
	title = "EVTNAME6130"
	desc = "EVTDESC6130"
	picture = BATTLE_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = defensive_ideas	
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTA6130"
		create_general = { tradition = 50 }
	}
}

# Nobility concerned at loss of privileges
country_event = {
	id = ideagroups.804
	title = "EVTNAME6131"
	desc = "EVTDESC6131"
	picture = COURT_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = defensive_ideas	
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTA6131"
		ai_chance = {
			factor = 45
			modifier = {
				factor = 0.25
				NOT = {
					stability = 0
				}
			}
		}
		add_stability = -1
	}
	option = {
		name = "EVTOPTB6131"
		ai_chance = {
			factor = 55
			modifier = {
				factor = 0
				has_estate = estate_nobles
				NOT = {
					estate_loyalty = {
						estate = estate_nobles
						loyalty = 40
					}
				}
			}
		}
		add_army_tradition = -20
		add_estate_nobles_loyalty_effect = yes
	}
}

# Military Improvements
country_event = {
	id = ideagroups.805
	title = "EVTNAME6116"
	desc = "EVTDESC6116"
	picture = MILITARY_CAMP_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = defensive_ideas
		NOT = {	has_country_modifier =  "military_improvements" }
		NOT = {	has_country_modifier =  "military_complacency" }		
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6116"
		add_army_professionalism = 1
		add_country_modifier = {
			name = "military_improvements"
			duration = 3650
		}
	}
}

# Military Complacency
country_event = {
	id = ideagroups.806
	title = "EVTNAME6117"
	desc = "EVTDESC6117"
	picture = LAND_MILITARY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = defensive_ideas
		NOT = {	has_country_modifier =  "military_improvements" }
		NOT = {	has_country_modifier =  "military_complacency" }			
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6117"
		add_army_professionalism = -1
		add_country_modifier = {
			name = "military_complacency"
			duration = 3650
		}
	}
	option = {
		name = "EVTOPTB6117"
		add_stability = -1 
	}
}

# Glory of the Army
country_event = {
	id = ideagroups.807
	title = "EVTNAME6132"
	desc = "EVTDESC6132"
	picture = MILITARY_CAMP_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = defensive_ideas	
	}
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6132"
		add_prestige = 5
	}
}

# Our Army has seen better days
country_event = {
	id = ideagroups.808
	title = "EVTNAME6133"
	desc = "EVTDESC6133"
	picture = LAND_MILITARY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = defensive_ideas	
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6133"
		add_stability = -1 
	}
	option = {
		name = "EVTOPTB6133"
		add_prestige = -25
	}
}

# Fortification Effort
country_event = {
	id = ideagroups.809
	title = "EVTNAME6319"
	desc = "EVTDESC6319"
	picture = FORT_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = defensive_ideas	
		mil_tech = 2
		any_owned_province = {
			fort_level = 1
			NOT = { has_province_modifier = local_fortress }
			NOT = { has_province_modifier = fort_in_disrepair }
			is_colony = no
			is_core = ROOT
			controlled_by = ROOT
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6319"
		random_owned_province = {
			limit = {
				fort_level = 1
				NOT = { has_province_modifier = local_fortress }
				NOT = { has_province_modifier = fort_in_disrepair }
				is_colony = no
				is_core = ROOT
				controlled_by = ROOT				
			}
			add_province_modifier = {
				name = "local_fortress"
				duration = 3650
			}
		}
	}
}

# Generals Concerned by our unmanly tactics
country_event = {
	id = ideagroups.810
	title = "EVTNAME6325"
	desc = "EVTDESC6325"
	picture = MILITARY_CAMP_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = defensive_ideas	
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6325"
		add_prestige = -25
	}

	option = {
		name = "EVTOPTB6325"
		add_army_tradition = -10
	}
}

# Relentless Drill
country_event = {
	id = ideagroups.811
	title = ideagroups.811.t
	desc = ideagroups.811.d
	picture = LAND_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = defensive_ideas
		NOT = {	has_country_modifier =  "relentless_drill" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.811.a
		add_army_professionalism = 1
		add_country_modifier = {
			name = "relentless_drill"
			duration = 3650
		}
	}
}

# Regimental Pride
country_event = {
	id = ideagroups.812
	title = ideagroups.812.t
	desc = ideagroups.812.d
	picture = LAND_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = defensive_ideas
		NOT = {	has_country_modifier =  "regimental_pride" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.812.a
		add_country_modifier = {
			name = "regimental_pride"
			duration = 3650
		}
	}
}

# Prepared Defense
country_event = {
	id = ideagroups.813
	title = ideagroups.813.t
	desc = ideagroups.813.d
	picture = MILITARY_CAMP_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = defensive_ideas
		NOT = {	has_country_modifier =  "prepared_defence" }
		is_at_war = yes
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.813.a
		add_country_modifier = {
			name = "prepared_defence"
			duration = 3650
		}
	}
}

# To the Last Man
country_event = {
	id = ideagroups.814
	title = ideagroups.814.t
	desc = ideagroups.814.d
	picture = LAND_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = defensive_ideas
		NOT = {	has_country_modifier =  "to_the_last_man" }		
		is_at_war = yes
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.814.a
		add_country_modifier = {
			name = "to_the_last_man"
			duration = 3650
		}
	}
}

# Regimental Spirit
country_event = {
	id = ideagroups.815
	title = ideagroups.815.t
	desc = ideagroups.815.d
	picture = LAND_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = defensive_ideas
		NOT = {	has_country_modifier =  "regimental_spirit" }		
		is_at_war = yes
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.815.a
		add_country_modifier = {
			name = "regimental_spirit"
			duration = 3650
		}
	}
}

#######################################
# Trade Ideas
#######################################

# Business is Booming
country_event = {
	id = ideagroups.900
	title = "EVTNAME6140"
	desc = "EVTDESC6140"
	picture = MERCHANTS_TALKING_eventPicture

	is_triggered_only = yes

	trigger = {
		has_idea_group = trade_ideas
		NOT = { has_country_modifier = business_booming }
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTA6140"
		add_country_modifier = {
			name = "business_booming"
			duration = 3650
		}		
	}
}

# Trade Complacency
country_event = {
	id = ideagroups.901
	title = "EVTNAME6141"
	desc = "EVTDESC6141"
	picture = MERCHANTS_TALKING_eventPicture

	is_triggered_only = yes

	trigger = {
		has_idea_group = trade_ideas
		NOT = { has_country_modifier = "out_of_date_commerce" }
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTA6141"
		add_country_modifier = {
			name = "out_of_date_commerce"
			duration = 3650
		}
	}
	option = { 
		name = "EVTOPTB6141"
		add_inflation = 1
	}
}

# Our Merchants are adventuring
country_event = {
	id = ideagroups.902
	title = "EVTNAME6134"
	desc = "EVTDESC6134"
	picture = MERCHANTS_TALKING_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = trade_ideas
		NOT = { has_country_modifier = "adventuring_merchants" }
		NOT = { has_country_modifier = "poor_merchants" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6134"
		add_country_modifier = {
			name = "adventuring_merchants"
			duration = 3650
		}
	}
}

# Our Merchants are doing poorly
country_event = {
	id = ideagroups.903
	title = "EVTNAME6135"
	desc = "EVTDESC6135"
	picture = MERCHANTS_TALKING_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = trade_ideas
		NOT = { has_country_modifier = "adventuring_merchants" }
		NOT = { has_country_modifier = "poor_merchants" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6135"
		add_country_modifier = {
			name = "poor_merchants"
			duration = 3650
		}
	}

	option = {
		name = "EVTOPTB6135"
		add_stability = -1 
	}
}

# Trade Policy Success
country_event = {
	id = ideagroups.904
	title = "EVTNAME6150"
	desc = "EVTDESC6150"
	picture = MERCHANTS_TALKING_eventPicture

	is_triggered_only = yes

	trigger = {
		has_idea_group = trade_ideas
		NOT = { has_country_modifier = "trade_policy_working" }
		NOT = { has_country_modifier = "trade_policy_failing" }
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6150"
		add_country_modifier = {
			name = "trade_policy_working"
			duration = 3650
		}
	}
}

# Trade Policy is failing
country_event = {
	id = ideagroups.905
	title = "EVTNAME6151"
	desc = "EVTDESC6151"
	picture = MERCHANTS_TALKING_eventPicture

	is_triggered_only = yes

	trigger = {
		has_idea_group = trade_ideas
		NOT = { has_country_modifier = "trade_policy_working" }
		NOT = { has_country_modifier = "trade_policy_failing" }
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6151"
		add_country_modifier = {
			name = "trade_policy_failing"
			duration = 3650
		}
	}
	option = { 
		name = "EVTOPTB6151"
		add_corruption = 0.5
	}
}

# Income Bonanza
country_event = {
	id = ideagroups.906
	title = ideagroups.906.t
	desc = ideagroups.906.d
	picture = MERCHANTS_TALKING_eventPicture

	is_triggered_only = yes

	trigger = {
		has_idea_group = trade_ideas
		any_active_trade_node = {
			NOT = {
				has_trade_modifier = {
					who = ROOT
					key = income_bonanza
				}
			}
		}
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.906.a
		random_active_trade_node = {
			limit = {
				NOT = {
					has_trade_modifier = {
						who = ROOT
						key = income_bonanza
					}
				}
			}
			add_trade_modifier = {
				who = root
				duration = 3650
				power = 25
				key = income_bonanza
			}
		}		
	}
}

# Competitive Advantage
country_event = {
	id = ideagroups.907
	title = ideagroups.907.t
	desc = ideagroups.907.d
	picture = MERCHANTS_TALKING_eventPicture

	is_triggered_only = yes

	trigger = {
		has_idea_group = trade_ideas
		NOT = { has_country_modifier = "competitive_advantage" }
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.907.a
		add_country_modifier = {
			name = competitive_advantage
			duration = 3650
		}		
	}
}

# Cooperation with the Merchant class
country_event = {
	id = ideagroups.908
	title = ideagroups.908.t
	desc = ideagroups.908.d
	picture = MERCHANTS_TALKING_eventPicture

	is_triggered_only = yes

	trigger = {
		has_idea_group = trade_ideas
		NOT = { has_country_modifier = "cooperation_with_merchant_class" }
		NOT = { has_country_modifier = "trade_collapse" }
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.908.a
		add_estate_burghers_loyalty_effect = yes
		add_country_modifier = {
			name = cooperation_with_merchant_class
			duration = 3650
		}		
	}
}

# Support for Mercantilist Policies
country_event = {
	id = ideagroups.909
	title = ideagroups.909.t
	desc = ideagroups.909.d
	picture = MERCHANTS_TALKING_eventPicture

	is_triggered_only = yes

	trigger = {
		has_idea_group = trade_ideas
		NOT = { mercantilism = 95 }
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.909.a
		add_mercantilism = 1
	}
}

# Trade Collapse
country_event = {
	id = ideagroups.910
	title = ideagroups.910.t
	desc = ideagroups.910.d
	picture = MERCHANTS_TALKING_eventPicture

	is_triggered_only = yes

	trigger = {
		has_idea_group = trade_ideas
		NOT = { has_country_modifier = "cooperation_with_merchant_class" }
		NOT = { has_country_modifier = "trade_collapse" }
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.910.a
		add_country_modifier = {
			name = trade_collapse
			duration = 3650
		}		
	}
	option = {
		name = ideagroups.910.b
		add_dip_power = -100
	}
}

#######################################
# Maritime Ideas
#####################################

# Popular Support for our Grand navy
country_event = {
	id = ideagroups.1000
	title = "EVTNAME6100"
	desc = "EVTDESC6100"
	picture = NAVAL_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = maritime_ideas
		primitives = no
		NOT = { has_country_modifier = "faster_ships" }
		NOT = { has_country_modifier = "slower_ships" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6100"
		add_country_modifier = {
			name = "faster_ships"
			duration = 3650
		}
	}
}

# Popular Enthusiasm for our Navy diminishes
country_event = {
	id = ideagroups.1001
	title = "EVTNAME6101"
	desc = "EVTDESC6101"
	picture = NAVAL_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = maritime_ideas
		NOT = { has_country_modifier = "faster_ships" }
		NOT = { has_country_modifier = "slower_ships" }
		primitives = no
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6101"
		add_country_modifier = {
			name = "slower_ships"
			duration = 3650
		}
	}
	option = {
		name = "EVTOPTB6101"
		add_years_of_income = -0.2
	}
}

# Promising Admiral Appears
country_event = {
	id = ideagroups.1002
	title = "EVTNAME6102"
	desc = "EVTDESC6102"
	picture = NAVAL_MILITARY_eventPicture

	is_triggered_only = yes

	trigger = {
		has_idea_group = maritime_ideas
		primitives = no
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6102"
		create_admiral = {
			tradition = 50
		}
	}
}

# Aristocrats concerned
country_event = {
	id = ideagroups.1003
	title = "EVTNAME6103"
	desc = "EVTDESC6103"
	picture = NAVAL_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = maritime_ideas
		primitives = no
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6103"
		ai_chance = {
			factor = 45
			modifier = {
				factor = 0.25
				NOT = { stability = 0 }
			}
			modifier = {
				factor = 0
				has_estate = estate_nobles
				NOT = {
					estate_loyalty = {
						estate = estate_nobles
						loyalty = 40
					}
				}
			}
		}
		add_stability = -1
		reduce_estate_nobles_loyalty_effect = yes
	}
	option = {
		name = "EVTOPTB6103"
		ai_chance = {
			factor = 55
		}
		add_estate_nobles_loyalty_effect = yes
		add_navy_tradition = -15
	}
}

# Naval Developments
country_event = {
	id = ideagroups.1004
	title = "EVTNAME6104"
	desc = "EVTDESC6104"
	picture = NAVAL_MILITARY_eventPicture

	is_triggered_only = yes

	trigger = {
		has_idea_group = maritime_ideas
		primitives = no
		NOT = { has_country_modifier = "naval_developments" }
		NOT = { has_country_modifier = "naval_hubris" }
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6104"
		add_country_modifier = {
			name = "naval_developments"
			duration = 3650
		}
	}
}

# Naval Hubris
country_event = {
	id = ideagroups.1005
	title = "EVTNAME6105"
	desc = "EVTDESC6105"
	picture = NAVAL_MILITARY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = maritime_ideas
		primitives = no
		NOT = { has_country_modifier = "naval_developments" }
		NOT = { has_country_modifier = "naval_hubris" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6105"
		add_country_modifier = {
			name = "naval_hubris"
			duration = 3650
		}
	}
	option = {
		name = "EVTOPTB6105"
		add_stability = -1 
	}
}

# Improved Blockade Tactics
country_event = {
	id = ideagroups.1006
	title = "EVTNAME6106"
	desc = "EVTDESC6106"
	picture = NAVAL_MILITARY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = maritime_ideas
		primitives = no
		NOT = { has_country_modifier = "blockade_tactics" }
		NOT = { has_country_modifier = "slipping_standards" }
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6106"
		add_country_modifier = {
			name = "blockade_tactics"
			duration = 3650
		}
	}
}

# Slipping Standards
country_event = {
	id = ideagroups.1007
	title = "EVTNAME6107"
	desc = "EVTDESC6107"
	picture = NAVAL_MILITARY_eventPicture

	is_triggered_only = yes

	trigger = {
		has_idea_group = maritime_ideas
		primitives = no
		NOT = { has_country_modifier = "blockade_tactics" }
		NOT = { has_country_modifier = "slipping_standards" }
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6107"
		add_country_modifier = {
			name = "slipping_standards"
			duration = 3650
		}
	}
	option = {
		name = "EVTOPTB6107"
		add_stability = -1 
	}
}

# Naval Technical Developments
country_event = {
	id = ideagroups.1008
	title = "EVTNAME6108"
	desc = "EVTDESC6108"
	picture = NAVAL_MILITARY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = maritime_ideas
		primitives = no
		NOT = { has_country_modifier = "naval_technical_developments" }
		NOT = { has_country_modifier = "concerned_shipwrights" }
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6108"
		add_country_modifier = {
			name = "naval_technical_developments"
			duration = 3650
		}
	}
}

# Concerned Shipwrights
country_event = {
	id = ideagroups.1009
	title = "EVTNAME6109"
	desc = "EVTDESC6109"
	picture = NAVAL_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = maritime_ideas
		primitives = no
		NOT = { has_country_modifier = "naval_technical_developments" }
		NOT = { has_country_modifier = "concerned_shipwrights" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6109"
		add_country_modifier = {
			name = "concerned_shipwrights"
			duration = 3650
		}
	}
	option = {
		name = "EVTOPTB6109"
		add_stability = -1 
	}
}

# We Rule the Waves
country_event = {
	id = ideagroups.1010
	title = "EVTNAME6110"
	desc = "EVTDESC6110"
	picture = NAVAL_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = maritime_ideas
		primitives = no
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6110"
		add_prestige = 10
	}
}

# The Fleet has declined
country_event = {
	id = ideagroups.1011
	title = "EVTNAME6111"
	desc = "EVTDESC6111"
	picture = NAVAL_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = maritime_ideas
		primitives = no
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6111"
		add_prestige = -10
	}
	option = {
		name = "EVTOPTB6111"
		add_years_of_income = -0.2
	}
}

# Arsenals are being deserted
country_event = {
	id = ideagroups.1012
	title = "EVTNAME839"
	desc = "EVTDESC839"
	picture = NAVAL_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = maritime_ideas
		primitives = no
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTB839A"
		add_mil_power = -30
	}
}

# General retires
country_event = {
	id = ideagroups.1013
	title = "EVTNAME840"
	desc = "EVTDESC840"
	picture = NAVAL_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = maritime_ideas
		primitives = no
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTB840A"
		add_army_tradition = -10
	}
}

# A naval reformer
country_event = {
	id = ideagroups.1014
	title = "EVTNAME841"
	desc = "EVTDESC841"
	picture = NAVAL_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = maritime_ideas
		primitives = no
	}
	
	immediate = {
		check_if_non_state_advisor_effect = { #Hidden scripted effect, is used by scripted effect and must always be cleared in after = { } using erase_advisor_flags_effect.
			chance_of_primary = 75 #Not percentages!
			chance_of_tertiary = 5
			chance_of_secondary = 15
		}
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTB841A"
		add_meritocracy_effect = yes
		generate_advisor_of_type_and_semi_random_religion_effect = {
			advisor_type=naval_reformer
			advisor_type_if_not_state=naval_reformer
			scaled_skill = yes
			discount=yes
		}
	}
	
	after = {
		erase_advisor_flags_effect = yes
	}
}

# Our Fleet is the pride of the Nation
country_event = {
	id = ideagroups.1015
	title = "EVTNAME6310"
	desc = "EVTDESC6310"
	picture = NAVAL_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = maritime_ideas
		num_of_heavy_ship = 1
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6310"
		add_navy_tradition = 10
	}
}	

# Generals Bothered
country_event = {
	id = ideagroups.1016
	title = "EVTNAME6311"
	desc = "EVTDESC6311"
	picture = NAVAL_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = maritime_ideas
		primitives = no
		NOT = { has_country_modifier = "naval_focus" }
		NOT = { has_country_modifier = "land_modifier" }
	}

	mean_time_to_happen = {
		days = 1

	}

	option = {
		name = "EVTOPTA6311"
		add_country_modifier = {
			name = "naval_focus"
			duration = 3650
		}
	}

	option = {
		name = "EVTOPTB6311"
		add_country_modifier = {
			name = land_modifier
			duration = 3650
		}
	}
}

# Naval Construction!
country_event = {
	id = ideagroups.1017
	title = ideagroups.1017.t
	desc = ideagroups.1017.d
	picture = NAVAL_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = maritime_ideas
		primitives = no
		num_of_ports = 1
		NOT = { navy_size_percentage = 1.1 }
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1017.a
		random_owned_province = {
			limit = {
				has_port = yes
			}
			add_unit_construction = {
				amount = 2
				type = heavy_ship
				speed = 0.5
				cost = 0
			}
		}
	}
	option = {
		name = ideagroups.1017.b
		random_owned_province = {
			limit = {
				has_port = yes
			}
			add_unit_construction = {
				type = light_ship
				amount = 3
				speed = 0.5
				cost = 0
			}
		}
	}
}

# Abundance of Sailors
country_event = {
	id = ideagroups.1018
	title = ideagroups.1018.t
	desc = ideagroups.1018.d
	picture = NAVAL_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = maritime_ideas
		num_of_ports = 1
		primitives = no
	}

	mean_time_to_happen = {
		days = 1

	}
	
	option = {
		name = ideagroups.1018.a
		add_yearly_sailors = 1
	}
}

# Naval Benefits
country_event = {
	id = ideagroups.1019
	title = ideagroups.1019.t
	desc = ideagroups.1019.d
	picture = NAVAL_MILITARY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = maritime_ideas
		primitives = no
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1019.a
		add_years_of_income = 0.5
	}
}

# Pride of the Fleet
country_event = {
	id = ideagroups.1020
	title = ideagroups.1020.t
	desc = ideagroups.1020.d
	picture = SHIP_SAILING_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = maritime_ideas
		num_of_heavy_ship = 1
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1020.a
		add_prestige = 15
	}
}

# Efficiency in the Navy
country_event = {
	id = ideagroups.1021
	title = ideagroups.1021.t
	desc = ideagroups.1021.d
	picture = NAVAL_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = maritime_ideas
		primitives = no
	}

	mean_time_to_happen = {
		days = 1

	}
	
	option = {
		name = ideagroups.1021.a
		add_dip_power = 50
		add_yearly_sailors = 0.75
	}
}

#######################################
# Economic Ideas
#######################################

# Production Improvements
country_event = {
	id = ideagroups.1100
	title = "EVTNAME6144"
	desc = "EVTDESC6144"
	picture = ECONOMY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea = smithian_economics
		NOT = { has_country_modifier = "production_improvements" }
		NOT = { has_country_modifier = "production_stifled" }
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6144"
		add_country_modifier = {
			name = "production_improvements"
			duration = 3650
		}
	}
}

# Production Stifled
country_event = {
	id = ideagroups.1101
	title = "EVTNAME6145"
	desc = "EVTDESC6145"
	picture = ECONOMY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = economic_ideas
		NOT = { has_country_modifier = "production_improvements" }
		NOT = { has_country_modifier = "production_stifled" }
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6145"
		add_country_modifier = {
			name = "production_stifled"
			duration = 3650
		}
	}
	option = {
		name = "EVTOPTB6145"
		add_inflation = 1
	}		
}

# Successful Bureaucracy
country_event = {
	id = ideagroups.1102
	title = "EVTNAME6146"
	desc = "EVTDESC6146"
	picture = ECONOMY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = economic_ideas
		NOT = { has_country_modifier = "successful_bureaucracy" }
		NOT = { has_country_modifier = "corrupt_bureaucracy" }
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6146"
		add_country_modifier = {
			name = "successful_bureaucracy"
			duration = 3650
		}
	}
}

# Corrupt Bureaucracy
country_event = {
	id = ideagroups.1103
	title = "EVTNAME6147"
	desc = "EVTDESC6147"
	picture = ECONOMY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = economic_ideas
		NOT = { has_country_modifier = "successful_bureaucracy" }
		NOT = { has_country_modifier = "corrupt_bureaucracy" }
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6147"
		add_country_modifier = {
			name = "corrupt_bureaucracy"
			duration = 3650
		}
	}
}

# Successful Bureaucracy
country_event = {
	id = ideagroups.1104
	title = "EVTNAME6146"
	desc = "EVTDESC6197"
	picture = ECONOMY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = economic_ideas
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6197"
		if = {
			limit = {
				corruption = 0.01
			}
			add_corruption = -1
		}
		if = {
			limit = {
				NOT = {
					corruption = 0.01
				}
			}
			add_adm_power = 100
		}
	}
}

# Successful Bureaucracy
country_event = {
	id = ideagroups.1105
	title = "EVTNAME6146"
	desc = "EVTDESC6198"
	picture = ECONOMY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = economic_ideas
		num_of_cities = 15
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6198"
		add_years_of_income = -0.5
		add_adm_power = 50
	}
	option = {
		name = "EVTOPTB6198"
		add_adm_power = -10
	}
}

# National Bank pays dividends
country_event = {
	id = ideagroups.1106
	title = "EVTNAME6148"
	desc = "EVTDESC6148"
	picture = ECONOMY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = economic_ideas
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6148"
		add_years_of_income = 0.25
	}
}

# National Bank in trouble
country_event = {
	id = ideagroups.1107
	title = "EVTNAME6149"
	desc = "EVTDESC6149"
	picture = ECONOMY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = economic_ideas
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTA6149"
		add_years_of_income = -1.0
	}
	option = { 
		name = "EVTOPTB6149" 
		add_inflation = 3
	}
}

# Local Tax Increase
country_event = {
	id = ideagroups.1108
	title = "EVTNAME809"
	desc = "EVTDESC809"
	picture = ECONOMY_eventPicture
	goto = event_province
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = economic_ideas	
	}	

	mean_time_to_happen = {
		days = 1
	}

	immediate = {
		hidden_effect = {
			random_owned_province = {
				limit = {
					is_overseas = no
				}
				save_event_target_as = event_province
			}
		}
	}
	
	option = {
		name = "EVTOPTB809A"
		event_target:event_province = {
			add_base_tax = 2
		}
	}
}

# More Local Recruiting
country_event = {
	id = ideagroups.1109
	title = "EVTNAME810"
	desc = "EVTDESC810"
	picture = LAND_MILITARY_eventPicture
	goto = event_province
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = economic_ideas	
	}	

	mean_time_to_happen = {
		days = 1
	}

	immediate = {
		hidden_effect = {
			random_owned_province = {
				limit = {
					is_overseas = no
				}
				save_event_target_as = event_province
			}
		}
	}
	
	option = {
		name = "EVTOPTB810A"
		event_target:event_province = {
			add_base_manpower = 2
		}
	}
}

# Stability Increase
country_event = {
	id = ideagroups.1110
	title = "EVTNAME811"
	desc = "EVTDESC811"
	picture = ELECTION_REPUBLICAN_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = economic_ideas	
	}	

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTB811A"
		add_stability_or_adm_power = yes
	}
}


#######################################
# Exploration Ideas
#######################################

# Colonist Rush
country_event = {
	id = ideagroups.1200
	title = "EVTNAME6136"
	desc = "EVTDESC6136"
	picture = COLONIZATION_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea = quest_for_the_new_world
		num_of_colonies = 1
		NOT = { has_country_modifier = colonial_enthusiasm }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6136"
		add_country_modifier = {
			name = "colonial_enthusiasm"
			duration = 3650
		}
	}
}

# People Flee to the Colonies
country_event = {
	id = ideagroups.1201
	title = "EVTNAME6137"
	desc = "EVTDESC6137"
	picture = COLONIZATION_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = exploration_ideas
		is_at_war = yes
		num_of_colonies = 1
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6137"
		random_owned_province = {
			limit = { 
				is_colony = yes 
			}
			add_colonysize = 300
		}	
		add_dip_power = -25
	}
	option = {
		name = "EVTOPTB6137"
		add_prestige = 5
	}
}

# Colonial Company goes bankrupt
country_event = {
	id = ideagroups.1202
	title = "EVTNAME6139"
	desc = "EVTDESC6139"
	picture = COLONIZATION_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = exploration_ideas
		num_of_colonies = 1
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6139"
		random_owned_province = {
			limit = { 
				is_colony = yes 
			}
			multiply_colonysize = 0.5
		}			
	}

	option = {
		name = "EVTOPTB6139"
		add_treasury = -50
	}
}

# Excellent Viceroys
country_event = {
	id = ideagroups.1203
	title = "EVTNAME6142"
	desc = "EVTDESC6142"
	picture = COLONIZATION_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = exploration_ideas
		NOT = { has_country_modifier = "excellent_administration" }
		NOT = { has_country_modifier = "corrupt_viceroys" }
		any_country = {
			is_colonial_nation_of = ROOT
		}
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6142"
		add_country_modifier = {
			name = "excellent_administration"
			duration = 3650
		}
	}
}

# Corrupt Viceroys
country_event = {
	id = ideagroups.1204
	title = "EVTNAME6143"
	desc = "EVTDESC6143"
	picture = COLONIZATION_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = exploration_ideas
		any_country = {
			is_colonial_nation_of = ROOT
		}
		NOT = { has_country_modifier = corrupt_viceroys }
		NOT = { has_country_modifier = "excellent_administration" }
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6143"
		ai_chance = {
			factor = 50
		}
		add_inflation = 2
	}
	option = {
		name = "EVTOPTB6143"
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0
				yearly_corruption_increase = 0.001
			}
		}
		add_country_modifier = {
			name = "corrupt_viceroys"
			duration = 1825
		}
	}		
}


# Friendshp with natives
country_event = {
	id = ideagroups.1205
	title = ideagroups.1205.t
	desc = ideagroups.1205.d
	picture = NATIVES_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = exploration_ideas
		num_of_colonies = 1
		has_country_flag = NF_peacenik
		any_owned_province = {
			is_colony = yes 
			native_size = 1
		}
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1205.a
		random_owned_province = {
			limit = { 
				is_colony = yes 
				native_size = 1
			}
			change_native_ferocity = -1
			change_native_hostileness = -1
		}	
	}
}

# Women needed
country_event = {
	id = ideagroups.1206
	title = ideagroups.1206.t
	desc = ideagroups.1206.d
	picture = COLONIZATION_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = exploration_ideas
		num_of_colonies = 1
		any_owned_province = {
			is_colony = yes 
			colonysize = 200
			has_colonist = yes
		}
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1206.a
		random_owned_province = {
			limit = {
				is_colony = yes 
				colonysize = 200
				has_colonist = yes			
			}
			add_colonysize = 200
			add_base_manpower = 1
		}
	}
}

# Encomienda System
country_event = {
	id = ideagroups.1207
	title = ideagroups.1207.t
	desc = ideagroups.1207.d
	picture = COLONIZATION_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = exploration_ideas
		num_of_colonies = 1
		any_owned_province = {
			is_colony = yes 
			native_size = 1
			NOT = { trade_goods = unknown }
			NOT = { has_province_modifier = encomienda_system }
		}
	}

	mean_time_to_happen = {
		days = 1
	}

		
	option = {
		name = ideagroups.1207.a
		random_owned_province = {
			limit = { 
				is_colony = yes 
				native_size = 1
				NOT = { trade_goods = unknown }
			}
			change_native_hostileness = -5
			add_province_modifier = {
				name = encomienda_system
				duration = 3650
			}
		}	
	}
}

# Evangelical Mission
country_event = {
	id = ideagroups.1208
	title = ideagroups.1208.t
	desc = ideagroups.1208.d
	picture = RELIGION_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = exploration_ideas
		overseas_provinces_percentage = 0.05
		religion_group = christian
		any_owned_province = {
			is_overseas = yes
			religion_group = pagan
			NOT = { has_province_modifier = evangelical_system }
			NOT = { is_owned_by_trade_company = yes }
		}
	}

	mean_time_to_happen = {
		days = 1
	}
		
	option = {
		name = ideagroups.1208.a
		random_owned_province = {
			limit = { 
				is_overseas = yes
				religion_group = pagan
			}
			add_province_modifier = {
				name = evangelical_system
				duration = 3650
			}
		}	
	}
}

# Colony in Trouble
country_event = {
	id = ideagroups.1209
	title = ideagroups.1209.t
	desc = ideagroups.1209.d
	picture = COLONIZATION_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = exploration_ideas
		num_of_colonies = 1
		any_owned_province = {
			is_colony = yes 
			has_colonist = no
		}		
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1209.a
		random_owned_province = {
			limit = { 
				is_colony = yes 
				has_colonist = no
			}
			add_colonysize = -1000
		}	
	}
	option = {
		name = ideagroups.1209.b
		add_dip_power = -50
	}
}

# Poor Harvest
country_event = {
	id = ideagroups.1210
	title = ideagroups.1210.t
	desc = ideagroups.1210.d
	picture = FARMING_eventPicture

	is_triggered_only = yes

	trigger = {
		has_idea_group = exploration_ideas
		num_of_colonies = 1
		any_owned_province = {
			is_colony = yes 
			has_colonist = no
		}		
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1210.a
		add_dip_power = -50
	}
}

#######################################
# Quality Ideas
#######################################

# Unsuitable recruits
country_event = {
	id = ideagroups.1300
	title = "EVTNAME842"
	desc = "EVTDESC842"
	picture = LAND_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = quality_ideas
		NOT = { has_idea_group = quantity_ideas }
	}	
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTB842A"
		add_yearly_manpower = -1
	}
}

# Nobles worried
country_event = {
	id = ideagroups.1301
	title = "EVTNAME843"
	desc = "EVTDESC843"
	picture = DEBATE_REPUBLICAN_eventPicture
	
	is_triggered_only = yes
	
	mean_time_to_happen = {
		days = 1
	}

	trigger = {
		has_idea_group = quality_ideas
		NOT = { has_idea_group = quantity_ideas }
	}	
	
	option = {
		name = "EVTOPTB843A"
		add_stability = -1
		reduce_estate_nobles_loyalty_effect = yes
	}
}

# New commandant
country_event = {
	id = ideagroups.1302
	title = "EVTNAME844"
	desc = "EVTDESC844"
	picture = DEBATE_REPUBLICAN_eventPicture
	
	is_triggered_only = yes
	
	mean_time_to_happen = {
		days = 1
	}
	
	immediate = {
		check_if_non_state_advisor_effect = { #Hidden, must be followed by erase_advisor_flags_effect
			chance_of_primary = 75 #Not percentages!
			chance_of_tertiary = 0
			chance_of_secondary = 15
		}
	}

	trigger = {
		has_idea_group = quality_ideas
		NOT = { has_idea_group = quantity_ideas }
	}	
	
	option = {
		name = "EVTOPTB844A"
		add_meritocracy_effect = yes
		add_army_professionalism = 1
		generate_advisor_of_type_and_semi_random_religion_effect = {
			advisor_type=commandant
			advisor_type_if_not_state=commandant
			skill = 2
			discount=yes
		}
	}
	after = {
		erase_advisor_flags_effect = yes
	}
}

# Decline in Army Quality
country_event = {
	id = ideagroups.1303
	title = "EVTNAME6305"
	desc = "EVTDESC6305"
	picture = MILITARY_CAMP_eventPicture
	
	is_triggered_only = yes

	trigger = {
		has_idea_group = quality_ideas
		has_idea_group = quantity_ideas
		NOT = { has_country_modifier = "quality_modifier" }
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6305"
		add_prestige = -25
		add_army_professionalism = -1
	}

	option = {
		name = "EVTOPTB6305"
		add_army_professionalism = 1
		add_country_modifier = {
			name = quality_modifier
			duration = 3650
		}
	}
} 

# The Quality of our troops is Impressive
country_event = {
	id = ideagroups.1304
	title = "EVTNAME6306"
	desc = "EVTDESC6306"
	picture = LAND_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = quality_ideas
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTA6306"
		add_prestige = 10
	}
}	

# Recruiting crisis
country_event = {
	id = ideagroups.1305
	title = "EVTNAME6307"
	desc = "EVTDESC6307"
	picture = MILITARY_CAMP_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = quality_ideas
		NOT = { manpower_percentage = 0.70 }
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTA6307"
		add_prestige = -10
		add_army_professionalism = -1
	}

	option = {
		name = "EVTOPTB6307"
		add_yearly_manpower = -2
	}
}

# Iron Ships
country_event = {
	id = ideagroups.1306
	title = ideagroups.1306.t
	desc = ideagroups.1306.d
	picture = NAVAL_MILITARY_eventPicture
	
	is_triggered_only = yes

	trigger = {
		has_idea_group = quality_ideas
		num_of_heavy_ship = 3
		is_at_war = yes
		NOT = { has_country_modifier = "iron_ships" }
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.1306.a
		add_country_modifier = {
			name = iron_ships
			duration = 3650
		}
	}
} 

# Protected Commerce
country_event = {
	id = ideagroups.1307
	title = ideagroups.1307.t
	desc = ideagroups.1307.d
	picture = NAVAL_MILITARY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = quality_ideas
		num_of_light_ship = 3
		is_at_war = yes
		NOT = { has_country_modifier = "protected_commerce" }
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1307.a
		add_country_modifier = {
			name = protected_commerce
			duration = 3650
		}
	}
}

# The Power of the Fleet
country_event = {
	id = ideagroups.1308
	title = ideagroups.1308.t
	desc = ideagroups.1308.d
	picture = NAVAL_MILITARY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = quality_ideas
		is_at_war = yes
		OR = {
			num_of_heavy_ship = 3
			num_of_light_ship = 5
			num_of_galley = 5
		}
		NOT = { has_country_modifier = "power_of_the_fleet" }
	}	
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.1308.a
		add_country_modifier = {
			name = power_of_the_fleet
			duration = 3650
		}
	}
}  

# Steady Boys!
country_event = {
	id = ideagroups.1309
	title = ideagroups.1309.t
	desc = ideagroups.1309.d
	picture = LAND_MILITARY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = quality_ideas
		is_at_war = yes
		NOT = { has_country_modifier = "good_discipline" }
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1309.a
		add_country_modifier = {
			name = good_discipline
			duration = 3650
		}
	}
}  

# Back to the Front
country_event = {
	id = ideagroups.1310
	title = ideagroups.1310.t
	desc = ideagroups.1310.d
	picture = LAND_MILITARY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = quality_ideas
		is_at_war = yes
		NOT = { has_country_modifier = "back_to_the_front" }
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1310.a
		add_country_modifier = {
			name = back_to_the_front
			duration = 3650
		}
	}
}     


#######################################
# Quantity Ideas
#######################################

# People laugh at our army
country_event = {
	id = ideagroups.1400
	title = "EVTNAME845"
	desc = "EVTDESC845"
	picture = LAND_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = quantity_ideas
		NOT = { has_idea_group = quality_ideas }
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTB845A"
		add_prestige = -10
	}
}

# Leaders harder to find
country_event = {
	id = ideagroups.1401
	title = "EVTNAME846"
	desc = "EVTDESC846"
	picture = MILITARY_CAMP_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = quantity_ideas
		NOT = { has_idea_group = quality_ideas }
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTB846A"
		add_army_tradition = -5
		add_army_professionalism = -1
	}
}

# New organization
country_event = {
	id = ideagroups.1402
	title = "EVTNAME847"
	desc = "EVTDESC847"
	picture = MILITARY_CAMP_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = quantity_ideas
		NOT = { has_idea_group = quality_ideas }
	}
	
	immediate = {
		check_if_non_state_advisor_effect = { #Hidden, must be followed by erase_advisor_flags_effect
			chance_of_primary = 100 #Not percentages!
			chance_of_tertiary = 0
			chance_of_secondary = 5
		}
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTB847A"
		add_meritocracy_effect = yes
		add_army_professionalism = 1
		generate_advisor_of_type_and_semi_random_religion_effect = {
			advisor_type=army_organiser
			advisor_type_if_not_state=army_organiser
			skill = 2
			discount=yes
		}
	}
	after = {
		erase_advisor_flags_effect = yes
	}
}

# More men for the Army
country_event = {
	id = ideagroups.1403
	title = "EVTNAME6304"
	desc = "EVTDESC6304"
	picture = MILITARY_CAMP_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = quantity_ideas
	}	

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6304"
		random_owned_province = {
			add_base_manpower = 1
		}
		add_manpower = 5
	}
}

# Horse Population Boom
country_event = {
	id = ideagroups.1404
	title = ideagroups.1404.t
	desc = ideagroups.1404.d
	picture = HORDE_ON_HORSEBACK_eventPicture

	is_triggered_only = yes

	trigger = {
		has_idea_group = quantity_ideas
		NOT = { has_country_modifier = "horse_population_boom" }
		livestock = 1
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1404.a
		add_country_modifier = {
			name = horse_population_boom
			duration = 3650
		}
	}
}

# Surplus Equipment
country_event = {
	id = ideagroups.1405
	title = ideagroups.1405.t
	desc = ideagroups.1405.d
	picture = MILITARY_CAMP_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = quantity_ideas
		NOT = { has_country_modifier = "surplus_equipment" }
	}
	
	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1405.a
		add_country_modifier = {
			name = surplus_equipment
			duration = 3650
		}
	}
}

# Cheap Iron
country_event = {
	id = ideagroups.1406
	title = ideagroups.1406.t
	desc = ideagroups.1406.d
	picture = MILITARY_CAMP_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = quantity_ideas
		mil_tech = 7
		NOT = { has_country_modifier = "cheap_iron" }
	}	

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1406.a
		add_country_modifier = {
			name = cheap_iron
			duration = 3650
		}
	}
}

# Timber Surplus
country_event = {
	id = ideagroups.1407
	title = ideagroups.1407.t
	desc = ideagroups.1407.d
	picture = SHIP_SAILING_eventPicture

	is_triggered_only = yes

	trigger = {
		has_idea_group = quantity_ideas
		dip_tech = 3
		NOT = { has_country_modifier = timber_shortage }
		NOT = { has_country_modifier = "timber_surplus" }
		num_of_ports = 1
		primitives = no
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.1407.a
		add_country_modifier = {
			name = timber_surplus
			duration = 3650
		}
	}
}

# Men flock to the colors
country_event = {
	id = ideagroups.1408
	title = ideagroups.1408.t
	desc = ideagroups.1408.d
	picture = LAND_MILITARY_eventPicture

	is_triggered_only = yes

	trigger = {
		has_idea_group = quantity_ideas
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.1408.a
		add_yearly_manpower = 1
	}
}

# Timber Shortage
country_event = {
	id = ideagroups.1409
	title = ideagroups.1409.t
	desc = ideagroups.1409.d
	picture = SHIP_SAILING_eventPicture

	is_triggered_only = yes

	trigger = {
		has_idea_group = quantity_ideas
		dip_tech = 3
		NOT = { has_country_modifier = timber_shortage }
		NOT = { has_country_modifier = "timber_surplus" }
		primitives = no		
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.1409.a
		add_country_modifier = {
			name = timber_shortage
			duration = 3650
		}
	}
}

# Administrative Problems
country_event = {
	id = ideagroups.1410
	title = ideagroups.1410.t
	desc = ideagroups.1410.d
	picture = MILITARY_CAMP_eventPicture

	is_triggered_only = yes

	trigger = {
		has_idea_group = quantity_ideas
		NOT = { has_country_modifier = admin_problems }
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.1410.a
		add_country_modifier = {
			name = admin_problems
			duration = 3650
		}
		if = {
			limit = {
				NOT = { has_completed_all_reforms_trigger = yes }
			}
			reduce_reform_progress_small_effect = yes
		}
		else = {
			add_corruption = 0.5
		}
	}
}
 
#######################################
# Expansion Ideas
#######################################

# Wave of Immigration
country_event = {
	id = ideagroups.1500
	title = ideagroups.1500.t
	desc = ideagroups.1500.d
	picture = COLONIZATION_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = expansion_ideas
		num_of_colonies = 1
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.1500.a
		random_owned_province = {
			limit = {
				is_colony = yes
			}
			add_colonysize = 200
		}
	}
}

# Successful Company
country_event = {
	id = ideagroups.1501
	title = ideagroups.1501.t
	desc = ideagroups.1501.d
	picture = MERCHANTS_TALKING_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = expansion_ideas
		capital_scope = {
			has_trader = root
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1501.a
		capital_scope = {
			add_trade_node_income = 3.0
		}
	}
}

# Colonial Enthusiasm
country_event = {
	id = ideagroups.1502
	title = ideagroups.1502.t
	desc = ideagroups.1502.d
	picture = COLONIZATION_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = expansion_ideas
		NOT = {
			has_country_modifier = "colonial_enthusiasm"
		}
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.1502.a
		add_country_modifier = {
			name = "colonial_enthusiasm"
			duration = 3650
		}
	}
}

# Diplomatic moves
country_event = {
	id = ideagroups.1503
	title = ideagroups.1503.t
	desc = ideagroups.1503.d
	picture = DIPLOMACY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = expansion_ideas
		NOT = { has_country_modifier = "diplomatic_moves" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1503.a
		add_country_modifier = {
			name = "diplomatic_moves"
			duration = 3650
		}
	}
}

# Ship Building Boom
country_event = {
	id = ideagroups.1504
	title = ideagroups.1504.t
	desc = ideagroups.1504.d
	picture = NAVAL_MILITARY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = expansion_ideas
		primitives = no
		NOT = { government = native }
		NOT = { has_country_modifier = "ship_building_problems" }
		NOT = { has_country_modifier = "ship_building_boom" }
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.1504.a
		add_country_modifier = {
			name = "ship_building_boom"
			duration = 3650
		}
	}
}

# Enhanced Reputation
country_event = {
	id = ideagroups.1505
	title = ideagroups.1505.t
	desc = ideagroups.1505.d
	picture = DIPLOMACY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = expansion_ideas
		NOT = { has_country_modifier = "enhanced_reputation" }
		NOT = { has_country_modifier = "diplo_fuax_pas" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1505.a
		add_country_modifier = {
			name = "enhanced_reputation"
			duration = 3650
		}
	}
} 

# Trade Success
country_event = {
	id = ideagroups.1506
	title = ideagroups.1506.t
	desc = ideagroups.1506.d
	picture = MERCHANTS_TALKING_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = expansion_ideas
		NOT = { has_country_modifier = "trade_success" }
		NOT = { has_country_modifier = "trade_failure" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1506.a
		add_country_modifier = {
			name = "trade_success"
			duration = 3650
		}
	}
} 

# Colonial Disaster
country_event = {
	id = ideagroups.1507
	title = ideagroups.1507.t
	desc = ideagroups.1507.d
	picture = COLONIZATION_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = expansion_ideas
		num_of_colonies = 1
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1507.a
		random_owned_province = {
			limit = {
				is_colony = yes
			}
			add_colonysize = -200
		}
	}
	option = {
		name = ideagroups.1507.b
		add_dip_power = -50
	}
}

# Trade Failure
country_event = {
	id = ideagroups.1508
	title = ideagroups.1508.t
	desc = ideagroups.1508.d
	picture = MERCHANTS_TALKING_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = expansion_ideas
		NOT = { has_country_modifier = "trade_success" }
		NOT = { has_country_modifier = "trade_failure" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1508.a
		ai_chance = {
			factor = 45
			modifier = {
				factor = 0
				has_estate = estate_burghers
				NOT = {
					estate_loyalty = {
						estate = estate_burghers
						loyalty = 40
					}
				}
			}
		}
		add_country_modifier = {
			name = "trade_failure"
			duration = 3650
		}
		reduce_estate_burghers_loyalty_effect = yes
	}
	option = {
		name = ideagroups.1508.b
		ai_chance = {
			factor = 55
		}
		add_dip_power = -50
		add_estate_burghers_loyalty_effect = yes
	}
} 

# Ship building problems
country_event = {
	id = ideagroups.1509
	title = ideagroups.1509.t
	desc = ideagroups.1509.d
	picture = SHIP_SAILING_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = expansion_ideas
		NOT = { has_country_modifier = "ship_building_problems" }
		NOT = { has_country_modifier = "ship_building_boom" }
		NOT = { government = native }
		primitives = no
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1509.a
		add_country_modifier = {
			name = "ship_building_problems"
			duration = 3650
		}
	}
} 

# Diplomatic Faux Pas
country_event = {
	id = ideagroups.1510
	title = ideagroups.1510.t
	desc = ideagroups.1510.d
	picture = DIPLOMACY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = expansion_ideas
		NOT = { has_country_modifier = "enhanced_reputation" }
		NOT = { has_country_modifier = "diplo_fuax_pas" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1510.a
		add_country_modifier = {
			name = "diplo_fuax_pas"
			duration = 3650
		}
	}
} 

#######################################
# Administrative Ideas
#######################################

# Centralization Yields Benefits
country_event = {
	id = ideagroups.1600
	title = "EVTNAME6334"
	desc = "EVTDESC6334"
	picture = COLONIZATION_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = administrative_ideas
		NOT = { has_country_modifier = "centralised_state" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6334"
		if = {
			limit = {
				NOT = { has_completed_all_reforms_trigger = yes }
				primitives = no
			}
			add_reform_progress_small_effect = yes
		}
		add_country_modifier = {
			name = "centralised_state"
			duration = 3650
		}
	}
}

# Provinces Frustrated by Lack of Autonomy
country_event = {
	id = ideagroups.1601
	title = "EVTNAME6335"
	desc = "EVTDESC6335" 
	picture = DEBATE_REPUBLICAN_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = administrative_ideas
		any_owned_province = {
			is_colony = no
			is_overseas = no
			NOT = { is_core = ROOT }
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6335"
		random_owned_province = {
			limit = { 
				is_capital = no
				is_in_capital_area = yes
			}
			add_unrest = 10
		}

	}
	option = {
		name = "EVTOPTB6335"
		if = {
			limit = {
				NOT = { has_completed_all_reforms_trigger = yes }
			}
			reduce_reform_progress_small_effect = yes
		}
		else = {
			add_prestige = -10
			add_adm_power = -25
		}
	}
} 

# Provinces want even more autonomy
country_event = {
	id = ideagroups.1602
	title = "EVTNAME6337"
	desc = "EVTDESC6337"
	picture = DEBATE_REPUBLICAN_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = administrative_ideas
		any_owned_province = {
			is_colony = no
			is_overseas = no
			NOT = { is_core = ROOT }
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = "EVTOPTA6337"
		random_owned_province = {
			limit = { 
				is_capital = no
				is_in_capital_area = yes
			}
			add_local_autonomy = 25
		}		
	}

	option = {
		name = "EVTOPTB6337"
		add_mil_power = -50
	}
}

# Generous Terms
country_event = {
	id = ideagroups.1605
	title = ideagroups.1605.t
	desc = ideagroups.1605.d
	picture = ECONOMY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = administrative_ideas
		NOT = { has_country_modifier = "generous_terms" }
		num_of_loans = 1
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1605.a
		add_country_modifier = {
			name = "generous_terms"
			duration = 3650
		}
	}
}

# Good Advice
country_event = {
	id = ideagroups.1606
	title = ideagroups.1606.t
	desc = ideagroups.1606.d
	picture = ADVISOR_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = administrative_ideas
		NOT = { has_country_modifier = "good_advise" }
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.1606.a
		if = {
			limit = {
				NOT = { has_completed_all_reforms_trigger = yes }
				primitives = no
			}
			add_reform_progress_small_effect = yes
		}
		add_country_modifier = {
			name = "good_advise"
			duration = 3650
		}
	}
}

# Show people our Resilience
country_event = {
	id = ideagroups.1607
	title = ideagroups.1607.t
	desc = ideagroups.1607.d
	picture = DEBATE_REPUBLICAN_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = administrative_ideas
		NOT = { stability = 3 }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1607.a
		add_stability_or_adm_power = yes
	}
}

# Support the War
country_event = {
	id = ideagroups.1608
	title = ideagroups.1608.t
	desc = ideagroups.1608.d
	picture = BATTLE_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = administrative_ideas
		war_exhaustion = 4
		is_at_war = yes	
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.1608.a
		add_war_exhaustion = -2
	}
}

# Failed Administration
country_event = {
	id = ideagroups.1609
	title = ideagroups.1609.t
	desc = ideagroups.1609.d
	picture = LIBERUM_VETO_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = administrative_ideas
		stability = -2
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1609.a
		add_stability = -1
	}
	
	option = {
		name = ideagroups.1609.b
		if = {
			limit = {
				NOT = { has_completed_all_reforms_trigger = yes }
			}
			reduce_reform_progress_big_effect = yes
		}	
		else = {
			add_corruption = 1
		}
	}
}

#######################################
# Naval Ideas
#######################################

# Hardened Oak On Our Ships
country_event = {
	id = ideagroups.1700
	title = ideagroups.1700.t
	desc = ideagroups.1700.d
	picture = SHIP_SAILING_eventPicture

	is_triggered_only = yes
	
	trigger = {
		navy_size_percentage = 0.45
		has_idea_group = naval_ideas
		NOT = { has_country_modifier = "hardened_oak" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1700.a
		add_country_modifier = {
			name = "hardened_oak"
			duration = 3650
		}
	}
}

# An Admiral Worth His Title
country_event = {
	id = ideagroups.1701
	title = ideagroups.1701.t
	desc = ideagroups.1701.d
	picture = SHIP_SAILING_eventPicture

	is_triggered_only = yes
	
	trigger = {
		navy_size_percentage = 0.45
		has_idea_group = naval_ideas
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1701.a
		create_admiral = {
			tradition = 50
		}
	}

	option = {
		name = ideagroups.1701.b
		add_mil_power = 25
	}
}

# Improved Training
country_event = {
	id = ideagroups.1702
	title = ideagroups.1702.t
	desc = ideagroups.1702.d
	picture = UNIVERSITY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		navy_size_percentage = 0.45
		has_idea_group = naval_ideas
		NOT = { has_country_modifier = "patriotic_curriculum" }
		NOT = { has_country_modifier = "maintenance_curriculum" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1702.a
		add_country_modifier = {
			name = "patriotic_curriculum"
			duration = 3650
		}
		add_yearly_sailors = 0.75
	}

	option = {
		name = ideagroups.1702.b
		add_country_modifier = {
			name = "maintenance_curriculum"
			duration = 3650
		}
		add_yearly_sailors = 0.75
	}
}

# Tactical Innovation
country_event = {
	id = ideagroups.1703
	title = ideagroups.1703.t
	desc = ideagroups.1703.d
	picture = NAVAL_MILITARY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		navy_size_percentage = 0.45
		has_idea_group = naval_ideas
		NOT = { has_country_modifier = "galley_veterans" }
		NOT = { has_country_modifier = "heavy_ship_veterans" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1703.a
		add_country_modifier = {
			name = "galley_veterans"
			duration = 3650
		}
	}

	option = {
		name = ideagroups.1703.b
		add_country_modifier = {
			name = "heavy_ship_veterans"
			duration = 3650
		}
	}
}

# Smugglers Caught
country_event = {
	id = ideagroups.1704
	title = ideagroups.1704.t
	desc = ideagroups.1704.d
	picture = HARBOUR_eventPicture

	is_triggered_only = yes
	
	trigger = {
		navy_size_percentage = 0.45
		has_idea_group = naval_ideas
		any_owned_province = { has_port = yes }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1704.a
		add_navy_tradition = 10
		if = {
			limit = {
				corruption = 0.01
			}
			add_corruption = -0.5
		}
	}

	option = {
		name = ideagroups.1704.b
		add_years_of_income = 0.25
	}
}

# A Royal Guest
country_event = {
	id = ideagroups.1705
	title = ideagroups.1705.t
	desc = ideagroups.1705.d
	picture = HARBOUR_eventPicture

	is_triggered_only = yes
	
	trigger = {
		navy_size_percentage = 0.45
		has_idea_group = naval_ideas
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1705.a
		add_prestige = 10
	}
}

# A Patriotic Donation
country_event = {
	id = ideagroups.1706
	title = ideagroups.1706.t
	desc = ideagroups.1706.d
	picture = MERCHANTS_TALKING_eventPicture

	is_triggered_only = yes
	
	trigger = {
		navy_size_percentage = 0.45
		has_idea_group = naval_ideas
		any_owned_province = {
			has_port = yes
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1706.a
		random_owned_province = {
			limit = { has_port = yes }
			heavy_ship = ROOT
			heavy_ship = ROOT
			heavy_ship = ROOT
		}
	}
}

# Disaster at Sea
country_event = {
	id = ideagroups.1707
	title = ideagroups.1707.t
	desc = ideagroups.1707.d
	picture = NAVAL_MILITARY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		navy_size_percentage = 0.45
		has_idea_group = naval_ideas
		NOT = { has_country_modifier = "grieving_sailors" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1707.a
		add_country_modifier = {
			name = grieving_sailors
			duration = 3650
		}
	}

	option = {
		name = ideagroups.1707.b
		add_mil_power = -25
	}
}

# Missed Recruiting Target
country_event = {
	id = ideagroups.1708
	title = ideagroups.1708.t
	desc = ideagroups.1708.d
	picture = SHIP_SAILING_eventPicture

	is_triggered_only = yes
	
	trigger = {
		navy_size_percentage = 0.45
		has_idea_group = naval_ideas
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1708.a
		add_yearly_manpower = -0.7
	}
}

# Rotting Wood
country_event = {
	id = ideagroups.1709
	title = ideagroups.1709.t
	desc = ideagroups.1709.d
	picture = HARBOUR_eventPicture

	is_triggered_only = yes
	
	trigger = {
		navy_size_percentage = 0.45
		has_idea_group = naval_ideas
		NOT = { has_country_modifier = "repairing_decayed_ships" }
		NOT = { has_country_modifier = "rotting_wood" }
		any_owned_province = {
			has_port = yes
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1709.a
		add_country_modifier = {
			name = "repairing_decayed_ships"
			duration = 3650
		}
	}

	option = {
		name = ideagroups.1709.b
		add_country_modifier = {
			name = "rotting_wood"
			duration = 3650
		}
	}
}

# Shipyard Fire
country_event = {
	id = ideagroups.1710
	title = ideagroups.1710.t
	desc = ideagroups.1710.d
	picture = HARBOUR_eventPicture

	is_triggered_only = yes
	
	trigger = {
		navy_size_percentage = 0.45
		has_idea_group = naval_ideas
		any_owned_province = {
			has_port = yes
			NOT = { has_province_modifier = shipyard_fire }
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1710.a
		random_owned_province = {
			limit = { has_port = yes }
			add_province_modifier = {
				name = "shipyard_fire"
				duration = 3650
			}
		}
	}
}

#######################################
# Influence Ideas
#######################################

# Skilled Diplomat
country_event = {
	id = ideagroups.1800
	title = ideagroups.1800.t
	desc = ideagroups.1800.d
	picture = DIPLOMACY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = influence_ideas
		NOT = { has_country_modifier = "skilled_diplomat" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1800.a
		add_country_modifier = {
			name = "skilled_diplomat"
			duration = 3650
		}
	}

	option = {
		name = ideagroups.1800.b
		add_dip_power = 50
	}
}

# Our Cause Is Just
country_event = {
	id = ideagroups.1801
	title = ideagroups.1801.t
	desc = ideagroups.1801.d
	picture = DIPLOMACY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = spy_ideas
		NOT = { has_country_modifier = "just_causes" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1801.a
		add_country_modifier = {
			name = "just_causes"
			duration = 3650
		}
	}
}

# Popular Noble
country_event = {
	id = ideagroups.1802
	title = ideagroups.1802.t
	desc = ideagroups.1802.d
	picture = ADVISOR_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = influence_ideas
		NOT = { has_country_modifier = "popular_noble" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1802.a
		add_country_modifier = {
			name = "popular_noble"
			duration = 3650
		}
	}
}

# Vassals Feel Safe
country_event = {
	id = ideagroups.1803
	title = ideagroups.1803.t
	desc = ideagroups.1803.d
	picture = CONQUEST_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = influence_ideas
		NOT = { has_country_modifier = "vassals_feel_safe" }
		vassal = 1
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1803.a
		add_country_modifier = {
			name = "vassals_feel_safe"
			duration = 3650
		}
	}
}

# Fair Dealing
country_event = {
	id = ideagroups.1804
	title = ideagroups.1804.t
	desc = ideagroups.1804.d
	picture = CONQUEST_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = influence_ideas
		any_subject_country = {
			exists = yes
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1804.a
		if = {
			limit = {
				corruption = 0.01
			}
			add_corruption = -1
		}
		every_subject_country = {
			add_opinion = {
				who = ROOT
				modifier = fair_dealing
			}
		}
	}
}

# A Firm Hand
country_event = {
	id = ideagroups.1805
	title = ideagroups.1805.t
	desc = ideagroups.1805.d
	picture = CONQUEST_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = influence_ideas
		vassal = 1
		NOT = { has_country_modifier = "firm_hand" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1805.a
		add_country_modifier = {
			name = "firm_hand"
			duration = 3650
		}
	}
}

# The Pen Is Backed By The Sword
country_event = {
	id = ideagroups.1806
	title = ideagroups.1806.t
	desc = ideagroups.1806.d
	picture = DIPLOMACY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = influence_ideas
		NOT = { has_country_modifier = "emissary_authority" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1806.a
		add_country_modifier = {
			name = "emissary_authority"
			duration = 3650
		}
	}
}

# Arrogant Administrators
country_event = {
	id = ideagroups.1807
	title = ideagroups.1807.t
	desc = ideagroups.1807.d
	picture = ANGRY_MOB_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = influence_ideas
		any_subject_country = {
			exists = yes
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1807.a
		every_subject_country = {
			add_opinion = {
				who = ROOT
				modifier = arrogant_administrators
			}
		}
	}
}

# Spy Ring Busted
country_event = {
	id = ideagroups.1808
	title = ideagroups.1808.t
	desc = ideagroups.1808.d
	picture = SPY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = influence_ideas
		NOT = { has_country_modifier = "suspected_diplomats" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1808.a
		add_country_modifier = {
			name = "suspected_diplomats"
			duration = 3650
		}
	}
}

# Impertinent Demands
country_event = {
	id = ideagroups.1809
	title = ideagroups.1809.t
	desc = ideagroups.1809.d
	picture = DIPLOMACY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = influence_ideas
		vassal = 1
		NOT = { has_country_modifier = "slow_negotiations" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1809.a
		add_country_modifier = {
			name = "slow_negotiations"
			duration = 3650
		}
	}
}

# Hostile Rhetoric
country_event = {
	id = ideagroups.1810
	title = ideagroups.1810.t
	desc = ideagroups.1810.d
	picture = ACCUSATION_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = influence_ideas
		NOT = { has_country_modifier = "hostile_rhetoric" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1810.a
		add_country_modifier = {
			name = "hostile_rhetoric"
			duration = 3650
		}
	}

	option = {
		name = ideagroups.1810.b
		add_dip_power = -25
	}
}

#######################################
# Humanist Ideas
#######################################

# Dangerous ideas are spreading!
country_event = {
	id = ideagroups.300
	title = "EVTNAME818"
	desc = "EVTDESC818"
	picture = DEBATE_REPUBLICAN_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = humanist_ideas	
	}		
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTB818A"
		add_stability = -1
	}
}

# Freethinkers Not Persecuted
country_event = {
	id = ideagroups.1900
	title = ideagroups.1900.t
	desc = ideagroups.1900.d
	picture = UNIVERSITY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = humanist_ideas
		NOT = { has_country_modifier = "free_freethinkers" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1900.a
		add_piety = -0.05
		if = {
			limit = {
				NOT = { has_completed_all_reforms_trigger = yes }
				primitives = no
			}
			add_reform_progress_small_effect = yes
		}
		add_country_modifier = {
			name = "free_freethinkers"
			duration = 3650
		}
	}
}

# Fair Laws Embraced By All
country_event = {
	id = ideagroups.1901
	title = ideagroups.1901.t
	desc = ideagroups.1901.d
	picture = LIBERUM_VETO_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = humanist_ideas
		NOT = { has_country_modifier = "fair_laws" }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1901.a
		add_piety = -0.05
		add_country_modifier = {
			name = "fair_laws"
			duration = 3650
		}
	}
}

# The Honest Broker
country_event = {
	id = ideagroups.1902
	title = ideagroups.1902.t
	desc = ideagroups.1902.d
	picture = DIPLOMACY_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = humanist_ideas
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1902.a
		if = {
			limit = {
				corruption = 0.01
			}
			add_corruption = -1
		}
		every_neighbor_country = {
			limit = {
				NOT = { truce_with = ROOT }
				NOT = { war_with = ROOT }
			}
			add_opinion = {
				who = ROOT
				modifier = honest_broker
			}
		}
	}
}

# Cabinet Co-operation
country_event = {
	id = ideagroups.1903
	title = ideagroups.1903.t
	desc = ideagroups.1903.d
	picture = ADVISOR_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = humanist_ideas
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1903.a
		if = {
			limit = {
				NOT = { has_completed_all_reforms_trigger = yes }
				primitives = no
			}
			add_reform_progress_small_effect = yes
		}
		add_adm_power = 25
		add_dip_power = 25
		add_mil_power = 25
	}
}

# Acceptance of all is the road to progress
country_event = {
	id = ideagroups.1904
	title = ideagroups.1904.t
	desc = ideagroups.1904.d
	picture = CITY_VIEW_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = humanist_ideas
		any_owned_province = {
			has_owner_accepted_culture = yes
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1904.a
		add_piety = -0.05
		add_stability_or_adm_power = yes
		random_owned_province = {
			limit = { has_owner_accepted_culture = yes }
			add_base_tax = 1
		}
	}
}

# A Soft Answer Turneth Away Wrath
country_event = {
	id = ideagroups.1905
	title = ideagroups.1905.t
	desc = ideagroups.1905.d
	picture = RELIGIOUS_CONVERSION_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = humanist_ideas
		any_owned_province = {
			has_owner_religion = no
			is_reformation_center = no
			religion_group = root
			has_missionary = no
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1905.a
		random_owned_province = {
			limit = {
				has_owner_religion = no
				is_reformation_center = no
				religion_group = root
				has_missionary = no
			}
			change_religion = ROOT
		}
	}
}

# A Light Unto the World
country_event = {
	id = ideagroups.1906
	title = ideagroups.1906.t
	desc = ideagroups.1906.d
	picture = RELIGIOUS_CONVERSION_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = humanist_ideas
		any_owned_province = {
			has_owner_religion = no
			is_reformation_center = no
			NOT = { religion_group = root }
			has_missionary = no
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1906.a
		add_piety = 0.05
		add_estate_dhimmi_loyalty_effect = yes
		random_owned_province = {
			limit = {
				has_owner_religion = no
				is_reformation_center = no
				NOT = { religion_group = root }
				has_missionary = no
			}
			change_religion = ROOT
		}
	}
}

# The Reins Are Too Loose
country_event = {
	id = ideagroups.1907
	title = ideagroups.1907.t
	desc = ideagroups.1907.d
	picture = ANGRY_MOB_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = humanist_ideas
		any_owned_province = {
			nationalism = 1
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1907.a
		random_owned_province = {
			limit = { nationalism = 1 }
			add_nationalism = 5
		}
	}

	option = {
		name = ideagroups.1907.b
		if = {
			limit = {
				NOT = { has_completed_all_reforms_trigger = yes }
			}
			reduce_reform_progress_small_effect = yes
		}
		else = {
			add_mil_power = -50
		}
	}
}

# Freethinking Leads Away From God
country_event = {
	id = ideagroups.1908
	title = ideagroups.1908.t
	desc = ideagroups.1908.d
	picture = RELIGIOUS_TURMOIL_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = humanist_ideas
		NOT = { religion = jewish } #Has no heretic religions
		NOT = { has_reform = papacy_reform }
		NOT = { has_reform = leading_clergy_reform }
		OR = {
			NOT = { religion = catholic }
			AND = {
				religion = catholic
				OR = {
					is_religion_enabled = protestant
					is_religion_enabled = reformed
				}
			}
		}
		any_owned_province = {
			has_owner_religion = yes
			is_reformation_center = no
			NOT = { has_province_modifier = heresy }
		}
	}

	mean_time_to_happen = {
		days = 1
	}
	
	immediate = {
		hidden_effect = {
			if = {
				limit = {
					religion = catholic
					is_religion_enabled = protestant
					is_religion_enabled = reformed
				}
				random_list = {
					70 = { set_country_flag = protestant_heresy }
					30 = { set_country_flag = reformed_heresy }
				}
			}
			if = {
				limit = {
					religion = catholic
					is_religion_enabled = protestant
					NOT = { is_religion_enabled = reformed }
				}
				set_country_flag = protestant_heresy
			}
			if = {
				limit = {
					OR = {
						religion = protestant
						religion = reformed
					}
				}
				set_country_flag = catholic_heresy
			}
			# Orthodox
			if = {
				limit = {
					religion = orthodox
					is_religion_enabled = protestant
					is_religion_enabled = reformed
				}
				random_list = {
					70 = { set_country_flag = protestant_heresy }
					30 = { set_country_flag = reformed_heresy }
				}
			}
			if = {
				limit = {
					religion = orthodox
					is_religion_enabled = protestant
					NOT = { is_religion_enabled = reformed }
				}
				set_country_flag = protestant_heresy
			}
			if = {
				limit = {
					religion = orthodox
					NOT = {
						OR = {
							is_religion_enabled = protestant
							is_religion_enabled = reformed						
						}
					}
				}
				set_country_flag = catholic_heresy
			}
			# Coptic
			if = {
				limit = {
					religion = coptic
					is_religion_enabled = protestant
					is_religion_enabled = reformed
				}
				random_list = {
					70 = { set_country_flag = protestant_heresy }
					30 = { set_country_flag = reformed_heresy }
				}
			}
			if = {
				limit = {
					religion = coptic
					is_religion_enabled = protestant
					NOT = { is_religion_enabled = reformed }
				}
				set_country_flag = protestant_heresy
			}
			if = {
				limit = {
					religion = coptic
					NOT = {
						OR = {
							is_religion_enabled = protestant
							is_religion_enabled = reformed						
						}
					}
				}
				set_country_flag = catholic_heresy
			}
		}
	}
	
	option = {
		name = "ideagroups.1908.a"
		# Christian
		add_estate_dhimmi_loyalty_effect = yes
		if = {
			limit = {
				has_country_flag = protestant_heresy
			}
			random_owned_province = {
				limit = {
					has_owner_religion = yes
					is_reformation_center = no
					NOT = { has_province_modifier = heresy }
				}
				change_religion = protestant
			}
			clr_country_flag = protestant_heresy
		}
		if = {
			limit = {
				has_country_flag = reformed_heresy
			}
			random_owned_province = {
				limit = {
					has_owner_religion = yes
					is_reformation_center = no
					NOT = { has_province_modifier = heresy }
				}
				change_religion = reformed
			}
			clr_country_flag = reformed_heresy
		}
		if = {
			limit = {
				has_country_flag = catholic_heresy
			}
			random_owned_province = {
				limit = {
					has_owner_religion = yes
					is_reformation_center = no
					NOT = { has_province_modifier = heresy }
				}
				change_religion = catholic
			}
			clr_country_flag = catholic_heresy
		}
		# Muslim
		if = {
			limit = {
				religion_group = muslim
			}
			random_owned_province = {
				limit = {
					has_owner_religion = yes
					NOT = { has_province_modifier = heresy }
				}
				change_religion = heretic
			}
		}
		# Others
		if = {
			limit = {
				NOT = { religion_group = christian }
				NOT = { religion_group = muslim }
			}
			random_owned_province = {
				limit = {
					has_owner_religion = yes
					NOT = { has_province_modifier = heresy }
				}
				add_province_modifier = {
					name = "heresy"
					duration = 730
				}
			}
		}
	}
}

# Ineffective Missionary Work
country_event = {
	id = ideagroups.1909
	title = ideagroups.1909.t
	desc = ideagroups.1909.d
	picture = RELIGIOUS_TURMOIL_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = humanist_ideas
		any_owned_province = {
			has_owner_religion = no
			has_missionary = yes
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1909.a
		add_piety = -0.05
		random_owned_province = {
			limit = {
				has_owner_religion = no
				has_missionary = yes
			}
			add_province_modifier = {
				name = "ineffective_missionary"
				duration = 3650
			}
		}
	}
}

# We Fight the Past, It Fights Back
country_event = {
	id = ideagroups.1910
	title = ideagroups.1910.t
	desc = ideagroups.1910.d
	picture = LIBERUM_VETO_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = humanist_ideas
		any_neighbor_country = {
			NOT = { has_idea_group = humanist_ideas }
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1910.a
		add_piety = -0.05
		every_neighbor_country = {
			limit = {
				NOT = { has_idea_group = humanist_ideas }
			}
			add_opinion = {
				who = ROOT
				modifier = rogue_nation
			}
		}
	}
}

#######################################
# Horde Ideas
#######################################

# A Moving City 
country_event = {
	id = ideagroups.1922
	title = ideagroups.1922.t
	desc = ideagroups.1922.d
	picture = MILITARY_CAMP_eventPicture
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = horde_gov_ideas
	}
	mean_time_to_happen = {
		days = 1
	}
	option = {
		name = ideagroups.1922.a
		add_country_modifier = {
			name = "a_moving_city"
			duration = 3650
		}
	}
}

# Ancestral Temple
country_event = {
	id = ideagroups.1923 
	title = ideagroups.1923.t
	desc = ideagroups.1923.d
	picture = PRAYING_eventPicture
	is_triggered_only = yes
	goto = ancestral_temple_province_target

	trigger = {
		has_idea_group = horde_gov_ideas
		any_owned_province = {
			religion_group = pagan
			NOT = { has_province_modifier = "ancestral_temple" }
		}
	}
	immediate = {
		hidden_effect = { 
			random_owned_province = {
				limit = {
					religion_group = pagan
					NOT = { has_province_modifier = "ancestral_temple" }
					is_capital = no
				}
				save_event_target_as = ancestral_temple_province_target
			}
		}
	}
	mean_time_to_happen = {
		days = 1
	}
	option = {
		name = ideagroups.1923.a
		event_target:ancestral_temple_province_target = { 
			add_province_modifier = {
				name = "ancestral_temple"
				duration = 3650
			}
		}
		add_prestige = 5
	}
}

# Blue Dragon
country_event = {
	id = ideagroups.1924
	title = ideagroups.1924.t
	desc = ideagroups.1924.d
	picture = HORDE_ON_HORSEBACK_eventPicture
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = horde_gov_ideas
		NOT = { has_country_modifier = "blue_dragon" }
		NOT = { has_country_modifier = "white_tiger" }
		is_at_war = yes
		any_owned_province = {
			religion_group = pagan
		}
	}
	mean_time_to_happen = {
		days = 1
	}
	option = {
		name = ideagroups.1924.a
		add_country_modifier = {
			name = "blue_dragon"
			duration = 3650
		}
	}
}

# White Tiger
country_event = {
	id = ideagroups.1925
	title = ideagroups.1925.t
	desc = ideagroups.1925.d
	picture = HORDE_ON_HORSEBACK_eventPicture
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = horde_gov_ideas
		NOT = { has_country_modifier = "blue_dragon" }
		NOT = { has_country_modifier = "white_tiger" }
		is_at_war = no
		any_owned_province = {
			religion_group = pagan
		}
	}
	mean_time_to_happen = {
		days = 1
	}
	option = {
		name = ideagroups.1925.a
		add_country_modifier = {
			name = "white_tiger"
			duration = 3650
		}
	}
}

# The Silence of the Lambs
country_event = {
	id = ideagroups.1926
	title = ideagroups.1926.t
	desc = ideagroups.1926.d
	picture = FARMING_eventPicture
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = horde_gov_ideas
		NOT = { has_country_modifier = "the_silence_of_the_lambs" }
	}
	mean_time_to_happen = {
		days = 1
	}
	option = {
		name = ideagroups.1926.a
		add_country_modifier = {
			name = "the_silence_of_the_lambs"
			duration = 3650
		}
	}
}

# Corrupted Mind
country_event = {
	id = ideagroups.1927
	title = ideagroups.1927.t
	desc = ideagroups.1927.d
	picture = KING_SICK_IN_BED_eventPicture
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = horde_gov_ideas
		NOT = { stability = 3 }
		has_consort = yes
	}
	mean_time_to_happen = {
		days = 1
	}
	option = {
		name = ideagroups.1927.a
		add_stability = -1
	}
}

# Seat of Power
country_event = {
	id = ideagroups.1928
	title = ideagroups.1928.t
	desc = ideagroups.1928.d
	picture = FORT_eventPicture
	is_triggered_only = yes
	goto = seat_of_power_prov
	trigger = {
		has_idea_group = horde_gov_ideas	
		any_owned_province = {
			fort_level = 1
			NOT = { has_province_modifier = seat_of_power }
		}
	}

	immediate = {
		hidden_effect = {
			random_owned_province = {
				limit = {
					fort_level = 1
					NOT = { has_province_modifier = seat_of_power }
				}
				save_event_target_as = seat_of_power_prov
			}
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1928.a
		event_target:seat_of_power_prov = {
			add_province_modifier = {
				name = "seat_of_power"
				duration = 3650
			}
		}
	}
}

# The Best Training
country_event = {
	id = ideagroups.1929
	title = ideagroups.1929.t
	desc = ideagroups.1929.d
	picture = BATTLE_eventPicture
	is_triggered_only = yes

	trigger = {
		has_idea_group = horde_gov_ideas	
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.1929.a
		create_general = { tradition = 50 }
	}
}

# White Moon
country_event = {
	id = ideagroups.1930
	title = ideagroups.1930.t
	desc = ideagroups.1930.d
	picture = FEAST_eventPicture
	is_triggered_only = yes

	trigger = {
		has_idea_group = horde_gov_ideas
		is_at_war = no
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.1930.a
		random_neighbor_country = {
			limit = {
				is_at_war = no
			}
			add_opinion = {
				who = ROOT
				modifier = lunar_new_year
			}
		}		
		add_prestige = 5
	}
}

# Taming Provinces 
country_event = {
	id = ideagroups.1931
	title = ideagroups.1931.t
	desc = ideagroups.1931.d
	picture = HORDE_ON_HORSEBACK_eventPicture
	is_triggered_only = yes

	trigger = {
		has_idea_group = horde_gov_ideas	
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.1931.a
		add_country_modifier = {
			name = "taming_provinces"
			duration = 3650
		}
	}
}

#######################################
# Theocracy Ideas
#######################################

# All That Glitters Is Not Gold
country_event = {
	id = ideagroups.1911
	title = ideagroups.1911.t
	desc = ideagroups.1911.d
	picture = CORRUPTION_eventPicture
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = theocracy_gov_ideas
		NOT = { has_country_modifier = "its_not_gold" }
	}
	mean_time_to_happen = {
		days = 1
	}
	option = {
		name = ideagroups.1911.a
		add_treasury = 80
	}
	option = {
		name = ideagroups.1911.b
		add_country_modifier = { 
			name = "its_not_gold"
			duration = 3650
		}
	}
}

# The Rule of God
country_event = {
	id = ideagroups.1912
	title = ideagroups.1912.t
	desc = ideagroups.1912.d
	picture = RELIGIOUS_WARS_eventPicture
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = theocracy_gov_ideas
		at_war_with_religious_enemy = yes
	}
	mean_time_to_happen = {
		days = 1
	}
	option = {
		name = ideagroups.1912.a
		add_country_modifier = { 
			name = "the_rule_of_god"
			duration = 3650
		}
	}
}

# Auctoritas
country_event = {
	id = ideagroups.1913
	title = ideagroups.1913.t
	desc = ideagroups.1913.d
	picture = LAND_MILITARY_eventPicture
	is_triggered_only = yes

	trigger = {
		has_idea_group = theocracy_gov_ideas
	}
	mean_time_to_happen = {
		days = 1
	}
	option = {
		name = ideagroups.1913.a
		add_prestige = 10
		trigger = { has_dlc = "Cradle of Civilization" }
		PA_random_army_exp_between_2_and_5_effect = yes    #PA: replaced flat gain with random dynamic gain. -- 200e200w
	}
	option = {
		name = ideagroups.1913.b
		trigger = {
			NOT = { has_dlc = "Cradle of Civilization" }
		}
		add_prestige = 10
		add_army_tradition = 10
	}
}

# Avert Thy Mortal Eyes
country_event = {
	id = ideagroups.1914
	title = ideagroups.1914.t
	desc = ideagroups.1914.d
	picture = MILITARY_CAMP_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = theocracy_gov_ideas
		NOT = {	has_country_modifier =  "avert_thy_mortal_eyes" }
		is_at_war = yes
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1914.a
		add_country_modifier = {
			name = "avert_thy_mortal_eyes"
			duration = 3650
		}
	}
}

# The Dying of the Light
country_event = {
	id = ideagroups.1915
	title = ideagroups.1915.t
	desc = ideagroups.1915.d
	picture = COMET_SIGHTED_eventPicture
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = theocracy_gov_ideas
		NOT = { has_country_modifier = "the_dying_of_the_light" }
		is_at_war = yes
	}
	mean_time_to_happen = {
		days = 1
	}
	option = {
		name = ideagroups.1915.a
		add_country_modifier = {
			name = "the_dying_of_the_light"
			duration = 3650
		}
	}
}

# Suspect Your Elders
country_event = {
	id = ideagroups.1916
	title = ideagroups.1916.t
	desc = ideagroups.1916.d
	picture = SPY_eventPicture
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = theocracy_gov_ideas
		OR = {
			estate_influence = {
				estate = estate_church
				influence = 75
			}
			estate_influence = {	
				estate = estate_brahmins
				influence = 75
			}
		}
	}
	mean_time_to_happen = {
		days = 1
	}
	option = {
		name = ideagroups.1916.a
		if = {
			limit = {
				has_estate = estate_church
			}
			add_estate_loyalty = {
				estate = estate_church
				loyalty = -10
			}
		}
		else_if = {
			limit = {
				has_estate = estate_brahmins
			}
			add_estate_loyalty = {
				estate = estate_brahmins
				loyalty = -10
			}
		}
		else = {
			add_adm_power = -50
		}
	}
}

# An Eye for an Eye
country_event = {
	id = ideagroups.1917
	title = ideagroups.1917.t
	desc = ideagroups.1917.d
	picture = BATTLE_eventPicture
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = theocracy_gov_ideas
		is_at_war = yes
		war_exhaustion = 4
		NOT = { has_country_modifier = "an_eye_for_an_eye" }
	}
	mean_time_to_happen = {
		days = 1
	}
	option = {
		name = ideagroups.1917.a
		add_country_modifier = {
			name = "an_eye_for_an_eye"
			duration = 3650
		}
	}
}

# Promised Land
country_event = {
	id = ideagroups.1918
	title = ideagroups.1918.t
	desc = ideagroups.1918.d
	picture = FORT_eventPicture
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = theocracy_gov_ideas
		any_owned_province = {
			NOT = { has_province_modifier = promised_land }
		}
	}
	mean_time_to_happen = {
		days = 1
	}
	option = {
		name = ideagroups.1918.a
		random_owned_province = {
			add_province_modifier = {
				name = "promised_land"
				duration = 3650
			}
		}
	}
}

# The Light of the World
country_event = {
	id = ideagroups.1919
	title = ideagroups.1919.t
	desc = ideagroups.1919.d
	picture = _eventPicture
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = theocracy_gov_ideas
		any_owned_province = {
			NOT = { religion = ROOT }
		}
	}
	mean_time_to_happen = {
		days = 1
	}
	option = {
		name = ideagroups.1919.a
		if = {
			limit = {
				religion = catholic
			}
			add_papal_influence = 10
		}
		else_if = {
			limit = {
				religion = orthodox
			}
			add_patriarch_authority = 0.05
		}
		else_if = {
			limit = {
				religion_group = muslim
			}
			add_piety = 0.05
		}
		else_if = {
			limit = {
				religion = buddhism
			}
			add_karma = 10
		}
		else = {
			add_adm_power = 25
		}
		random_owned_province = {
			limit = {
				NOT = { religion = ROOT }
			}
			change_religion = ROOT
		}
	}
}

# Lo and Behold
country_event = {
	id = ideagroups.1920
	title = ideagroups.1920.t
	desc = ideagroups.1920.d
	picture = LAND_MILITARY_eventPicture
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = theocracy_gov_ideas
		NOT = { has_country_modifier = "lo_and_behold" }
	}
	mean_time_to_happen = {
		days = 1
	}
	option = {
		name = ideagroups.1920.a
		add_country_modifier = {
			name = "lo_and_behold"
			duration = 3650
		}
	}
}

# T�uferreich von M�nster / extra event
country_event = {
	id = ideagroups.1921
	title = ideagroups.1921.t
	desc = ideagroups.1921.d
	picture = REFORM_eventPicture
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = theocracy_gov_ideas
		owns = 86 #M�nster
		is_year = 1533
		NOT = { is_year = 1536 }
		NOT = { has_country_modifier = "le_prophete" }	
		NOT = { has_country_modifier = "the_unfortunate_traveller" }
		religion = catholic
		OR = {
			is_religion_enabled = protestant
			is_religion_enabled = reformed
		}
	}
	mean_time_to_happen = {
		days = 1
	}
	option = {
		name = ideagroups.1921.a
		add_country_modifier = { 
			name = "le_prophete"
			duration = 3650
		}
		change_religion = reformed
	}
	option = {
		name = ideagroups.1921.b
		add_country_modifier = { 
			name = "the_unfortunate_traveller"
			duration = 3650
		}
		add_stability = -1
	}
}

#######################################
# Indigenous Ideas
#######################################

# Blessing of the Land
country_event = {
	id = ideagroups.1932
	title = ideagroups.1932.t
	desc = ideagroups.1932.d
	picture = NATIVES_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = indigenous_ideas
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1932.a
		random_owned_province = {
			limit = {
				NOT = {
					development = 10
					has_province_modifier = blessing_of_the_land
				}
			}
			add_province_modifier = {
				name = "blessing_of_the_land"
				duration = 3650
			}
		}
	}
}

# Unorthodox Tactics
country_event = {
	id = ideagroups.1933
	title = ideagroups.1933.t
	desc = ideagroups.1933.d
	picture = NATIVES_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = indigenous_ideas
		is_at_war = yes
		NOT = { 
			has_country_modifier = defensive_stance
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1933.a
		add_country_modifier = {
			name = "defensive_stance"
			duration = 3650
		}
	}
}

# Keeping the Peace
country_event = {
	id = ideagroups.1934
	title = ideagroups.1934.t
	desc = ideagroups.1934.d
	picture = NATIVES_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = indigenous_ideas
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1934.a
		add_stability = 1
		add_country_modifier = {
			name = "peace_kept"
			duration = 3650
		}
	}
}

# Disrespecting the Ancestors
country_event = {
	id = ideagroups.1935
	title = ideagroups.1935.t
	desc = ideagroups.1935.d
	picture = NATIVES_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = indigenous_ideas
		NOT = { 
			has_country_modifier = disrespecting_the_ancestors
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1935.a
		add_prestige = -10
		add_country_modifier = {
			name = "disrespecting_the_ancestors"
			duration = 3650
		}
	}
}

# A Great Warrior
country_event = {
	id = ideagroups.1936
	title = ideagroups.1936.t
	desc = ideagroups.1936.d
	picture = NATIVES_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = indigenous_ideas
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1936.a
		create_general = { tradition = 50 }
	}
}

# Overconfidence Among Our Ranks
country_event = {
	id = ideagroups.1937
	title = ideagroups.1937.t
	desc = ideagroups.1937.d
	picture = NATIVES_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = indigenous_ideas
		NOT = { 
			has_country_modifier = overconfidence
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1937.a
		add_country_modifier = {
			name = "overconfidence"
			duration = 730
		}
	}
}

# Uncontrolled Fire
country_event = {
	id = ideagroups.1938
	title = ideagroups.1938.t
	desc = ideagroups.1938.d
	picture = NATIVES_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = indigenous_ideas
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1938.a
		random_owned_province = {
			add_devastation = 25
		}
	}
}

# Dancing on the Knife
country_event = {
	id = ideagroups.1939
	title = ideagroups.1939.t
	desc = ideagroups.1939.d
	picture = NATIVES_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = indigenous_ideas
		is_at_war = no
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1939.a
		random_neighbor_country = {
			limit = {
				is_at_war = no
			}

			random_list = {
				50 = {
					add_opinion = {
						who = ROOT
						modifier = dancing_on_the_knife_good
					}
				}
				50 = {
					add_opinion = {
						who = ROOT
						modifier = dancing_on_the_knife_bad
					}
				}
			}
		}	
	}
}

# Other's Traditions
country_event = {
	id = ideagroups.1940
	title = ideagroups.1940.t
	desc = ideagroups.1940.d
	picture = NATIVES_eventPicture

		is_triggered_only = yes
	
	trigger = {
		has_idea_group = indigenous_ideas
		any_owned_province = { 
			has_owner_culture = no
			OR = {
				NOT = {
					has_province_modifier = traditions_respected
					has_province_modifier = traditions_disrespected
				}
			}	
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1940.a
		random_owned_province = {
			limit = {
				has_owner_culture = no
				OR = {
					NOT = {
						has_province_modifier = traditions_respected
						has_province_modifier = traditions_disrespected
					}
				}	
			}
			add_province_modifier = {
				name = "traditions_respected"
				duration = 3650
			}
		}
	}
	
	option = {
		name = ideagroups.1940.b
		random_owned_province = {
			limit = {
				has_owner_culture = no
				OR = {
					NOT = {
						has_province_modifier = traditions_respected
						has_province_modifier = traditions_disrespected
					}
				}
			}
			add_province_modifier = {
				name = "traditions_disrespected"
				duration = 3650
			}
		}
	}
}

# New Ideas Are not For Everyone
country_event = {
	id = ideagroups.1941
	title = ideagroups.1941.t
	desc = ideagroups.1941.d
	picture = NATIVES_eventPicture

		is_triggered_only = yes
	
	trigger = {
		has_idea_group = indigenous_ideas
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1941.a
		add_stability = -1
	}
}

# Idea Swap?
country_event = {
	id = ideagroups.1
	title = ideagroups.1.t
	desc = ideagroups.1.d
	picture = ADVISOR_eventPicture

	is_triggered_only = yes

	option = {
		name = ideagroups.1.a	#Yes Please!
		ai_chance = { factor = 1 }
		trigger = { has_custom_ideas = no }
		hidden_effect = {
			if = {
				limit = {
					has_idea_group = norse_ideas
				}
				set_country_flag = refused_norse_ideas
			}
		}
		swap_free_idea_group = yes		#keep progress
	}
	option = {
		name = ideagroups.1.b	#No, we cannot abandon our roots.
		#No Effect
		ai_chance = { factor = 0 }
	}
}

# Idea Swap for Norses?
country_event = {
	id = ideagroups.0
	title = ideagroups.1.t
	desc = ideagroups.1.d
	picture = ADVISOR_eventPicture

	is_triggered_only = yes

	option = {
		name = ideagroups.1.a#Yes Please!
		ai_chance = { factor = 1 }
		trigger = { has_custom_ideas = no }
		swap_free_idea_group = yes		#keep progress
	}
	option = {
		name = ideagroups.1.b#No, we cannot abandon our roots.
		#No Effect
		hidden_effect = {
			if = {
				limit = {
					primary_culture = norse
					religion = norse_pagan_reformed
				}
				set_country_flag = refused_norse_ideas
			}
		}
		ai_chance = { factor = 0 }
	}
}

###############################
##Infrastructure Ideas Events##
# by Big Boss
# by Ogulcan Yildirim
###############################

# Roads in Disrepair
country_event = {
	id = ideagroups.2000
	title = ideagroups.2000.t
	desc = ideagroups.2000.d
	picture = BORDER_TENSION_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = infrastructure_ideas 
		NOT = { has_country_modifier = road_maintenance_modifier }
		NOT = { has_country_modifier = no_road_maintenance_modifier }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.2000.a
		
		if = { 
			limit = { government_rank = 3 }
			add_adm_power = -150
			add_country_modifier = {
				name = road_maintenance_modifier
				duration = 3650 
			}
		}
		else_if = { 
			limit = { government_rank = 2 }
			add_adm_power = -100
			add_country_modifier = {
				name = road_maintenance_modifier
				duration = 3650 
			}
		}
		else = {
			add_adm_power = -50 
			add_country_modifier = {
				name = road_maintenance_modifier
				duration = 3650 
			}
		}
	}
	option = {
		name = ideagroups.2000.b
		
		add_stability = -1 
		add_country_modifier = {
			name = no_road_maintenance_modifier
			duration = 3650 
		}
	}
}

#Rising Tide Lifts All Boats
country_event = {
	id = ideagroups.2001
	title = ideagroups.2001.t
	desc = ideagroups.2001.d
	picture = CITY_DEVELOPMENT_eventPicture
	
	is_triggered_only = yes
	goto = prosperity_province
	trigger = {
		has_idea_group = infrastructure_ideas 
		NOT = { has_country_modifier = shared_prosperity_modifier }
	}

	mean_time_to_happen = {
		days = 1
	}
	
	immediate = {
		random_owned_province = {
			limit = { is_in_capital_area = yes }
			save_event_target_as = prosperity_province
		}
	}

	option = {
		name = ideagroups.2001.a
		
		add_country_modifier = {
			name = shared_prosperity_modifier 
			duration = 3650 
		}
		event_target:prosperity_province = {
			random_list = {
				33 = { add_base_tax = 1 }
				33 = { add_base_production = 1 } 
				33 = { add_base_manpower = 1 }
			}
		}
	}
}

# Inaccurate road maps
country_event = {
	id = ideagroups.2002
	title = ideagroups.2010.t
	desc = ideagroups.2010.d
	picture = CITY_VIEW_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = infrastructure_ideas 
		has_idea = expanded_infrastructure_network
		NOT = { has_country_modifier = inaccurate_road_maps }
		OR = {
			NOT = { has_country_flag = had_road_maps_moment }
			had_country_flag = {
				flag = had_road_maps_moment
				days = 3650
			}
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	immediate = {
		hidden_effect = {
			clr_country_flag = had_road_maps_moment
			set_country_flag = had_road_maps_moment
		}
	}

	#It is what it is
	option = {
		name = ideagroups.2010.a
		add_country_modifier = {
			name = inaccurate_road_maps
			duration = 3650
		}
	}
	#Replace them
	option = {
		name = ideagroups.2010.b
		add_years_of_income = -0.2
	}
}

# Insufficient Construction Supplies
country_event = {
	id = ideagroups.2003
	title = ideagroups.2011.t
	desc = ideagroups.2011.d
	picture = COLONIZATION_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = infrastructure_ideas 
		NOT = { has_country_modifier = insufficient_construction_supplies }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.2011.a
		add_country_modifier = {
			name = insufficient_construction_supplies
			duration = 3650
		}
	}
}

# Province Deveopment Slowed
country_event = {
	id = ideagroups.2004
	title = ideagroups.2020.t
	desc = ideagroups.2020.d
	picture = COLONIZATION_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = infrastructure_ideas 
		any_owned_province = {
			is_in_capital_area = yes
			is_overseas = no
			NOT = { has_province_modifier = slowed_down_development }
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	immediate = {
		hidden_effect = {
			random_owned_province = {
				limit = {
					is_in_capital_area = yes
					is_overseas = no
				}
				save_event_target_as = event_province
			}
			random_owned_province = {
				limit = {
					is_in_capital_area = yes
					is_overseas = no
					is_capital = no
				}
				save_event_target_as = event_province
			}
			random_owned_province = {
				limit = {
					is_in_capital_area = yes
					is_overseas = no
					development = 10
					is_capital = no
				}
				save_event_target_as = event_province
			}
			random_owned_province = {
				limit = {
					is_in_capital_area = yes
					is_overseas = no
					development = 20
					is_capital = no
				}
				save_event_target_as = event_province
			}
			random_owned_province = {
				limit = {
					is_in_capital_area = yes
					is_overseas = no
					development = 30
					is_capital = no
				}
				save_event_target_as = event_province
			}
		}
	}

	option = {
		name = ideagroups.2020.a
		goto = event_province
		event_target:event_province = {
			add_province_modifier = {
				name = slowed_down_development
				duration = 3650
			}
		}
		ai_chance = {
			factor = 1
		}
	}
	option = {
		name = ideagroups.2020.b
		add_adm_power = -50
		ai_chance = {
			factor = 0
		}
	}
}

# Regional Boom
country_event = {
	id = ideagroups.2005
	title = ideagroups.2021.t
	desc = ideagroups.2021.d
	picture = ECONOMICALLY_TALLANTED_RULER_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = infrastructure_ideas 
		OR = {
			NOT = { has_country_flag = had_regional_boom }
			had_country_flag = {
				flag = had_regional_boom
				days = 7300
			}
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	immediate = {
		hidden_effect = {
			clr_country_flag = had_regional_boom
			set_country_flag = had_regional_boom
		}
	}

	#Develop the home region!
	option = {
		name = ideagroups.2021.a
		capital_scope = {
			region = {
				limit = {
					owned_by = ROOT
				}
				add_province_modifier = {
					name = regional_boom
					duration = 3650
				}
			}
		}
	}
	#Focus on the home area instead!
	option = {
		name = ideagroups.2021.b
		capital_scope = {
			area = {
				limit = {
					owned_by = ROOT
				}
				add_province_modifier = {
					name = capital_boom
					duration = 3650
				}
			}
		}
	}
}

# A Talented Architect
country_event = {
	id = ideagroups.2006
	title = ideagroups.2006.t
	desc = ideagroups.2006.d
	picture = ADVISOR_eventPicture
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = infrastructure_ideas 
		NOT = { has_country_modifier = talented_architect }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.2006.a
		define_advisor = {
			type = artist
		}
		add_country_modifier = {
			name = talented_architect
			duration = 3650
		}
	}

	option = {
		name = ideagroups.2006.b
		trigger = {
			OR = {
				ruler_has_personality = architectural_visionary_personality
				ruler_has_personality = patron_of_arts_personality
				ruler_has_personality = well_connected_personality
			}
		}
		define_advisor = {
			type = artist
			cost_multiplier = 0.75
		}
		add_adm_power = 25
		add_country_modifier = {
			name = talented_architect
			duration = 7300
		}
	}
}

# Urbanization
country_event = {
	id = ideagroups.2007
	title = ideagroups.2007.t
	desc = ideagroups.2007.d
	picture = CITY_VIEW_eventPicture
	goto = event_province
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = infrastructure_ideas
	}

	mean_time_to_happen = {
		days = 1
	}

	immediate = {
		hidden_effect = {
			capital_scope = {
				random_province_in_state = {
					save_event_target_as = event_province
				}
			}
		}
	}

	option = {
		name = ideagroups.2007.a
		event_target:event_province = {
			add_base_tax = 2
		}
	}

	option = {
		name = ideagroups.2007.b
		event_target:event_province = {
			add_base_production = 2
		}
	}

	option = {
		name = ideagroups.2007.c
		event_target:event_province = {
			add_base_manpower = 2
		}
	}
}

# Administrative Challeges
country_event = {
	id = ideagroups.2008
	title = ideagroups.2008.t
	desc = ideagroups.2008.d
	picture = OVEREXTENSION_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = infrastructure_ideas 
		NOT = { has_country_modifier = administrative_challenges }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.2008.a
		add_country_modifier = {
			name = administrative_challenges
			duration = 3650
		}
	}
	option = {
		name = ideagroups.2008.b
		add_adm_power = -50
		change_government_reform_progress = -75
	}
}

# Good City Management
country_event = {
	id = ideagroups.2009
	title = ideagroups.2009.t
	desc = ideagroups.2009.d
	picture = GREAT_BUILDING_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = infrastructure_ideas
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.2009.a
		add_stability_or_adm_power = yes
		add_estate_burghers_loyalty_effect = yes
	}
}

#Court Ideas#

# Theatrical Play at the Court
country_event = {
	id = ideagroups.2010
	title = ideagroups.2002.t
	desc = ideagroups.2002.d
	picture = CULTURE_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = court_ideas 
	}

	mean_time_to_happen = {
		days = 1
	}

	option = { #[Root.Monarch.GetName] is a true art enjoyer!
		name = ideagroups.2002.a
		if = {
			limit = { has_dlc = "Mandate of Heaven" } 
			add_splendor = 50 
		}
		else = { add_dip_power = 25 }
		add_prestige_or_monarch_power = { amount = 10 } 
	}
}

# [Root.Monarch.GetName] Embarassing Display
country_event = {
	id = ideagroups.2011
	title = ideagroups.2003.t
	desc = ideagroups.2003.d
	picture = BAD_WITH_MONARCH_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = court_ideas 
		NOT = { has_ruler_modifier = embarassing_display_modifier }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.2003.a
		add_ruler_modifier = {
			name = embarassing_display_modifier
			duration = 3650
		}
	}
	
	option = {
		name = ideagroups.2003.c 
		trigger = { ruler_has_personality = naive_personality }
		highlight = yes 	
		custom_tooltip = usual_conduct_tt
	}
}

# Great Estate Meeting
country_event = {
	id = ideagroups.2012
	title = ideagroups.2012.t
	desc = ideagroups.2012.d
	picture = DEBATE_REPUBLICAN_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = court_ideas 
		has_any_estates = yes
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.2012.a
		add_estate_loyalty = {
			estate = all
			loyalty = 10
		}
	}
}

# Chaos at the Court
country_event = {
	id = ideagroups.2013
	title = ideagroups.2013.t
	desc = ideagroups.2013.d
	picture = ACCUSATION_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = court_ideas 
		has_any_estates = yes
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.2013.a
		add_estate_loyalty = {
			estate = all
			loyalty = -10
		}
	}
}

# Home to Noble Exiles
country_event = {
	id = ideagroups.2014
	title = ideagroups.2014.t
	desc = ideagroups.2014.d
	picture = SPY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = court_ideas
		is_free_or_tributary_trigger = yes
		NOT = { has_country_flag = noble_man_exiled_dynasty_member }
		NOT = { has_country_flag = noble_man_exiled_politician }
		NOT = { has_country_flag = noble_man_thief }
		NOT = { has_country_flag = noble_man_a_unlucky_noble }
		NOT = { has_country_flag = noble_man_a_great_general }
		NOT = { has_country_flag = noble_man_a_great_admiral }
		NOT = { has_country_flag = noble_man_an_excellent_statesman }
		NOT = { has_country_flag = noble_man_a_brilliant_diplomat }
		NOT = { has_country_flag = noble_man_a_new_heir_to_the_throne }
		NOT = { has_country_flag = noble_man_a_new_theocrat }
		NOT = { has_country_flag = noble_man_a_new_politician }
		NOT = { has_country_flag = noble_man_an_assassin }
		NOT = { has_country_flag = noble_man_a_foreign_spy }
		any_neighbor_country = {
			NOT = { is_subject_of = ROOT }
			OR = {
				has_estate = estate_nobles
				has_estate = estate_rajput
				has_estate = estate_maratha
			}
		}
	}

	immediate = {
		hidden_effect = {
			random_neighbor_country = {
				limit = {
					NOT = { is_subject_of = ROOT }
					OR = {
						has_estate = estate_nobles
						has_estate = estate_rajput
						has_estate = estate_maratha
					}
				}
				save_event_target_as = noble_origin_country
			}
			random_list = {
				1 = {
					trigger = {
						valid_for_personal_unions_trigger = yes
						event_target:noble_origin_country = {
							valid_for_personal_unions_trigger = yes
						}
					}
					set_country_flag = noble_man_exiled_dynasty_member
				}
				1 = {
					trigger = {
						OR = {
							NOT = { valid_for_personal_unions_trigger = yes }
							NOT = {
								event_target:noble_origin_country = {
									valid_for_personal_unions_trigger = yes
								}
							}
						}
						event_target:noble_origin_country = {
							government = monarchy
							is_subject = no
							is_emperor_of_china = no
							is_emperor = no
						}
					}
					set_country_flag = noble_man_exiled_politician
				}
				2 = {
					set_country_flag = noble_man_thief
				}
				6 = {
					set_country_flag = noble_man_a_unlucky_noble
				}
				1 = {
					set_country_flag = noble_man_a_great_general
				}
				1 = {
					set_country_flag = noble_man_a_great_admiral
				}
				1 = {
					set_country_flag = noble_man_an_excellent_statesman
				}
				1 = {
					set_country_flag = noble_man_a_brilliant_diplomat
				}
				1 = {
					trigger = {
						government = monarchy
						has_government_attribute = heir
						NOT = { has_government_attribute = has_harem_events }
						has_heir = no
					}
					set_country_flag = noble_man_a_new_heir_to_the_throne
				}
				1 = {
					trigger = {
						government = theocracy
						NOT = { has_reform = papacy_reform }
						has_government_attribute = heir
					}
					set_country_flag = noble_man_a_new_theocrat
				}
				1 = {
					trigger = {
						government = republic
						NOT = { has_reform = military_dictatorship_reform }
					}
					set_country_flag = noble_man_a_new_politician
				}
				1 = {
					set_country_flag = noble_man_an_assassin
				}
				1 = {
					set_country_flag = noble_man_a_foreign_spy
				}
			}
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.2014.a
		if = {
			limit = {
				NOT = { has_country_flag = noble_man_an_assassin }
			}
			event_target:noble_origin_country = {
				add_opinion = {
					who = ROOT
					modifier = granted_sanctuary_to_our_banished_noble
				}
			}
		}
		random_list = {
			1 = {
				trigger = {
					has_estate = estate_nobles
				}
				change_estate_land_share = {
					estate = estate_nobles
					share = 1
				}
			}
			1 = {
				trigger = {
					has_estate = estate_maratha
				}
				change_estate_land_share = {
					estate = estate_maratha
					share = 1
				}
			}
			1 = {
				trigger = {
					has_estate = estate_rajput
				}
				change_estate_land_share = {
					estate = estate_rajput
					share = 1
				}
			}
		}
		custom_tooltip = ideagroups.2014.a.tt
		hidden_effect = {
			event_target:noble_origin_country = {
				country_event = {
					id = ideagroups.201400
				}
			}
		}
		ai_chance = {
			factor = 1	#It's more fun
		}
	}
	option = {
		name = ideagroups.2014.b
		event_target:noble_origin_country = {
			add_opinion = {
				who = ROOT
				modifier = denied_sanctuary_to_our_banished_noble
			}
		}
		ai_chance = {
			factor = 0
		}
	}
}

# The foreign Noble reveals - Interregnum event
country_event = {
	id = ideagroups.201400
	title = none
	desc = none
	picture = none
	hidden = yes
	is_triggered_only = yes

	option = {
		FROM = {
			country_event = {
				id = ideagroups.20140
				days = 90
				random = 60
			}
		}
		ai_chance = {
			factor = 1
		}
	}
}

# The foreign Noble reveals
country_event = {
	id = ideagroups.20140
	title = ideagroups.20140.t
	desc = {
		desc = ideagroups.20140.desc.a
		trigger = { has_country_flag = noble_man_exiled_dynasty_member }
	}
	desc = {
		desc = ideagroups.20140.desc.b
		trigger = { has_country_flag = noble_man_exiled_politician }
	}
	desc = {
		desc = ideagroups.20140.desc.c
		trigger = { has_country_flag = noble_man_thief }
	}
	desc = {
		desc = ideagroups.20140.desc.d
		trigger = { has_country_flag = noble_man_a_unlucky_noble }
	}
	desc = {
		desc = ideagroups.20140.desc.e
		trigger = { has_country_flag = noble_man_a_great_general }
	}
	desc = {
		desc = ideagroups.20140.desc.f
		trigger = { has_country_flag = noble_man_a_great_admiral }
	}
	desc = {
		desc = ideagroups.20140.desc.g
		trigger = { has_country_flag = noble_man_an_excellent_statesman }
	}
	desc = {
		desc = ideagroups.20140.desc.h
		trigger = { has_country_flag = noble_man_a_brilliant_diplomat }
	}
	desc = {
		desc = ideagroups.20140.desc.i
		trigger = { has_country_flag = noble_man_a_new_heir_to_the_throne }
	}
	desc = {
		desc = ideagroups.20140.desc.j
		trigger = { has_country_flag = noble_man_a_new_theocrat }
	}
	desc = {
		desc = ideagroups.20140.desc.k
		trigger = { has_country_flag = noble_man_a_new_politician }
	}
	desc = {
		desc = ideagroups.20140.desc.l
		trigger = { has_country_flag = noble_man_an_assassin }
	}
	desc = {
		desc = ideagroups.20140.desc.m
		trigger = { has_country_flag = noble_man_a_foreign_spy }
	}
	desc = {
		desc = ideagroups.20140.desc.zzz
		trigger = {
			NOT = { has_country_flag = noble_man_exiled_dynasty_member }
			NOT = { has_country_flag = noble_man_exiled_politician }
			NOT = { has_country_flag = noble_man_thief }
			NOT = { has_country_flag = noble_man_a_unlucky_noble }
			NOT = { has_country_flag = noble_man_a_great_general }
			NOT = { has_country_flag = noble_man_a_great_admiral }
			NOT = { has_country_flag = noble_man_an_excellent_statesman }
			NOT = { has_country_flag = noble_man_a_brilliant_diplomat }
			NOT = { has_country_flag = noble_man_a_new_heir_to_the_throne }
			NOT = { has_country_flag = noble_man_a_new_theocrat }
			NOT = { has_country_flag = noble_man_a_new_politician }
			NOT = { has_country_flag = noble_man_an_assassin }
			NOT = { has_country_flag = noble_man_a_foreign_spy }
		}
	}
	picture = {
		picture = GOOD_WITH_MONARCH_eventPicture
		trigger = { has_country_flag = noble_man_exiled_dynasty_member }
	}
	picture = {
		picture = ADVISOR_eventPicture
		trigger = { has_country_flag = noble_man_exiled_politician }
	}
	picture = {
		picture = SPY_eventPicture
		trigger = { has_country_flag = noble_man_thief }
	}
	picture = {
		picture = WESTERNIZATION_eventPicture
		trigger = { has_country_flag = noble_man_a_unlucky_noble }
	}
	picture = {
		picture = LAND_MILITARY_eventPicture
		trigger = { has_country_flag = noble_man_a_great_general }
	}
	picture = {
		picture = SHIP_SAILING_eventPicture
		trigger = { has_country_flag = noble_man_a_great_admiral }
	}
	picture = {
		picture = REFORM_eventPicture
		trigger = { has_country_flag = noble_man_an_excellent_statesman }
	}
	picture = {
		picture = DIPLOMACY_eventPicture
		trigger = { has_country_flag = noble_man_a_brilliant_diplomat }
	}
	picture = {
		picture = COURT_eventPicture
		trigger = { has_country_flag = noble_man_a_new_heir_to_the_throne }
	}
	picture = {
		picture = POPE_PREACHING_eventPicture
		trigger = { has_country_flag = noble_man_a_new_theocrat }
	}
	picture = {
		picture = DEBATE_REPUBLICAN_eventPicture
		trigger = { has_country_flag = noble_man_a_new_politician }
	}
	picture = {
		picture = ASSASSINATION_eventPicture
		trigger = { has_country_flag = noble_man_an_assassin }
	}
	picture = {
		picture = SPY_eventPicture
		trigger = { has_country_flag = noble_man_a_foreign_spy }
	}
	picture = {
		picture = CIVIL_WAR_eventPicture
		trigger = {
			NOT = { has_country_flag = noble_man_exiled_dynasty_member }
			NOT = { has_country_flag = noble_man_exiled_politician }
			NOT = { has_country_flag = noble_man_thief }
			NOT = { has_country_flag = noble_man_a_unlucky_noble }
			NOT = { has_country_flag = noble_man_a_great_general }
			NOT = { has_country_flag = noble_man_a_great_admiral }
			NOT = { has_country_flag = noble_man_an_excellent_statesman }
			NOT = { has_country_flag = noble_man_a_brilliant_diplomat }
			NOT = { has_country_flag = noble_man_a_new_heir_to_the_throne }
			NOT = { has_country_flag = noble_man_a_new_theocrat }
			NOT = { has_country_flag = noble_man_a_new_politician }
			NOT = { has_country_flag = noble_man_an_assassin }
			NOT = { has_country_flag = noble_man_a_foreign_spy }
		}
	}
	is_triggered_only = yes

	after = {
		hidden_effect = {
			clr_country_flag = noble_man_exiled_dynasty_member
			clr_country_flag = noble_man_exiled_politician
			clr_country_flag = noble_man_thief
			clr_country_flag = noble_man_a_unlucky_noble
			clr_country_flag = noble_man_a_great_general
			clr_country_flag = noble_man_a_great_admiral
			clr_country_flag = noble_man_an_excellent_statesman
			clr_country_flag = noble_man_a_brilliant_diplomat
			clr_country_flag = noble_man_a_new_heir_to_the_throne
			clr_country_flag = noble_man_a_new_theocrat
			clr_country_flag = noble_man_a_new_politician
			clr_country_flag = noble_man_an_assassin
			clr_country_flag = noble_man_a_foreign_spy
		}
	}

	option = {
		name = ideagroups.20140.a
		trigger = {
			has_country_flag = noble_man_exiled_dynasty_member
		}
		add_casus_belli = {
			type = cb_restore_personal_union
			target = FROM
			months = 60
		}
		ai_chance = {
			factor = 1
		}
	}
	option = {
		name = ideagroups.20140.b
		trigger = {
			has_country_flag = noble_man_exiled_politician
		}
		add_casus_belli = {
			type = cb_vassalize_mission
			target = FROM
			months = 60
		}
		ai_chance = {
			factor = 1
		}
	}
	option = {
		name = ideagroups.20140.c
		trigger = {
			has_country_flag = noble_man_thief
		}
		add_years_of_income = -1
		ai_chance = {
			factor = 1
		}
	}
	option = {
		name = ideagroups.20140.d
		trigger = {
			has_country_flag = noble_man_a_unlucky_noble
		}
		add_prestige = 10
		add_estate_loyalty = {
			estate = estate_nobles
			loyalty = 5
		}
		ai_chance = {
			factor = 1
		}
	}
	option = {
		name = ideagroups.20140.e
		trigger = {
			has_country_flag = noble_man_a_great_general
		}
		create_general = {
			tradition = 100
		}
		ai_chance = {
			factor = 1
		}
	}
	option = {
		name = ideagroups.20140.f
		trigger = {
			has_country_flag = noble_man_a_great_admiral
		}
		create_admiral = {
			tradition = 100
		}
		ai_chance = {
			factor = 1
		}
	}
	option = {
		name = ideagroups.20140.g
		trigger = {
			has_country_flag = noble_man_an_excellent_statesman
		}
		define_advisor = {
			type = statesman
			skill = 3
			discount = yes
		}
		ai_chance = {
			factor = 1
		}
	}
	option = {
		name = ideagroups.20140.h
		trigger = {
			has_country_flag = noble_man_a_brilliant_diplomat
		}
		define_advisor = {
			type = diplomat
			skill = 3
			discount = yes
		}
		ai_chance = {
			factor = 1
		}
	}
	option = {
		name = ideagroups.20140.i
		trigger = {
			has_country_flag = noble_man_a_new_heir_to_the_throne
		}
		define_heir = {
			change_adm = 3
			change_dip = 3
			change_mil = 3
			age = 30
			claim = 50
		}
		ai_chance = {
			factor = 1
		}
	}
	option = {
		name = ideagroups.20140.j
		trigger = {
			has_country_flag = noble_man_a_new_theocrat
		}
		define_heir = {
			change_adm = 3
			change_dip = 3
			change_mil = 3
			age = 30
		}
		ai_chance = {
			factor = 1
		}
	}
	option = {
		name = ideagroups.20140.k
		trigger = {
			has_country_flag = noble_man_a_new_politician
		}
		define_ruler = {
			change_adm = 3
			change_dip = 3
			change_mil = 3
			min_age = 30
			max_age = 50
		}
		ai_chance = {
			factor = 1
		}
	}
	option = {
		name = ideagroups.20140.l
		trigger = {
			has_country_flag = noble_man_an_assassin
		}
		kill_ruler = yes
		ai_chance = {
			factor = 1
		}
	}
	option = {
		name = ideagroups.20140.m
		trigger = {
			has_country_flag = noble_man_a_foreign_spy
		}
		define_advisor = {
			type = spymaster
			skill = 3
			discount = yes
		}
		ai_chance = {
			factor = 1
		}
	}
	option = {
		name = ideagroups.20140.zzz
		trigger = {
			NOT = { has_country_flag = noble_man_exiled_dynasty_member }
			NOT = { has_country_flag = noble_man_exiled_politician }
			NOT = { has_country_flag = noble_man_thief }
			NOT = { has_country_flag = noble_man_a_unlucky_noble }
			NOT = { has_country_flag = noble_man_a_great_general }
			NOT = { has_country_flag = noble_man_a_great_admiral }
			NOT = { has_country_flag = noble_man_an_excellent_statesman }
			NOT = { has_country_flag = noble_man_a_brilliant_diplomat }
			NOT = { has_country_flag = noble_man_a_new_heir_to_the_throne }
			NOT = { has_country_flag = noble_man_a_new_theocrat }
			NOT = { has_country_flag = noble_man_a_new_politician }
			NOT = { has_country_flag = noble_man_an_assassin }
			NOT = { has_country_flag = noble_man_a_foreign_spy }
		}
		ai_chance = {
			factor = 1
		}
	}
}

# Show of Decadence
country_event = {
	id = ideagroups.2015
	title = ideagroups.2015.t
	desc = ideagroups.2015.d
	picture = BAD_WITH_MONARCH_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = court_ideas 
		OR = {
			num_of_loans = 5
			is_bankrupt = yes
		}
		stability = -2
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.2015.a
		reduce_stability_or_adm_power = yes
	}
}

# Envy for our Court
country_event = {
	id = ideagroups.2016
	title = ideagroups.2016.t
	desc = ideagroups.2016.d
	picture = ARTWORK_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = court_ideas 
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.2016.a
		add_prestige_or_monarch_power = {
			amount = 20
		}
	}
}

# Court in need of Renovation
country_event = {
	id = ideagroups.2017
	title = ideagroups.2017.t
	desc = ideagroups.2017.d
	picture = COURT_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = court_ideas 
		
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.2017.a
		add_prestige = -30
		ai_chance = {
			factor = 1
			modifier = {
				factor = 0
				NOT = { monthly_income = 60 }
				years_of_income = 0.3
			}
		}
	}
	option = {
		name = ideagroups.2017.b
		add_years_of_income = -0.1
		ai_chance = {
			factor = 1
			modifier = {
				factor = 0
				NOT = { years_of_income = 0.3 }
			}
			modifier = {
				factor = 0
				monthly_income = 60
			}
		}
	}
}

#Mercenary Ideas Events 

#The Good Mercenary
country_event = {
	id = ideagroups.2020
	title = ideagroups.2004.t
	desc = ideagroups.2004.d
	picture = LAND_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = mercenary_ideas 
		is_at_war = yes 
		NOT = { has_country_modifier = great_reputation_modifier } 
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.2004.a
		add_country_modifier = {
			name = great_reputation_modifier
			duration = 3650 
		}
	}
}

#Military Leaders Complain
country_event = {
	id = ideagroups.2021
	title = ideagroups.2005.t
	desc = ideagroups.2005.d
	picture = ACCUSATION_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = mercenary_ideas 
		if = {
			limit = { has_dlc = "Cradle of Civilization" } 
			NOT = { army_professionalism = 50 }
		}
		else = {
			NOT = { army_tradition = 80 }
		}
		NOT = { has_country_modifier = shift_on_military_affairs_modifier }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.2005.a
		
		add_country_modifier = {
			name = shift_on_military_affairs_modifier
			duration = 3650
		}
	}
	option = {
		name = ideagroups.2005.b
		add_army_professionalism = -5
		add_army_tradition = -20 
	}
}

# Poor payments
country_event = {
	id = ideagroups.1603
	title = ideagroups.1603.t
	desc = ideagroups.1603.d
	picture = WOUNDED_SOLDIERS_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = mercenary_ideas
		NOT = { has_country_modifier = "trust_from_mercs" }
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.1603.a
		add_country_modifier = {
			name = "trust_from_mercs"
			duration = 3650
		}
	}
}

# Glut of Mercenary Companies
country_event = {
	id = ideagroups.1604
	title = ideagroups.1604.t
	desc = ideagroups.1604.d
	picture = MILITARY_CAMP_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = mercenary_ideas
		NOT = { has_country_modifier = "glut_of_mercs" }
	}

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = ideagroups.1604.a
		add_country_modifier = {
			name = "glut_of_mercs"
			duration = 3650
			hidden = yes
		}
		custom_tooltip = generic_more_mercs_available_tt
	}
}

# Payment Demands
country_event = {
	id = ideagroups.1610
	title = ideagroups.1610.t
	desc = ideagroups.1610.d
	picture = MILITARY_CAMP_eventPicture

	is_triggered_only = yes
	
	trigger = {
		has_idea_group = mercenary_ideas
		NOT = { has_country_modifier = "payment_demands" }
		is_at_war = yes	
		num_of_mercenaries = 1
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.1610.a
		add_country_modifier = {
			name = "payment_demands"
			duration = 3650
		}
	}
}

# Mercenary Tactics Taught
country_event = {
	id = ideagroups.2025
	title = ideagroups.2025.t
	desc = ideagroups.2025.d
	picture = SIEGE_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = mercenary_ideas 
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.2025.a
		add_army_tradition = 10
	}
}

# A Mercenary Advisor
country_event = {
	id = ideagroups.2026
	title = ideagroups.2026.t
	desc = ideagroups.2026.d
	picture = ADVISOR_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = mercenary_ideas 
		NOT = { has_country_modifier = mercenary_leadership }
	}

	mean_time_to_happen = {
		days = 1
	}

	immediate = {
		hidden_effect = {
			random_list = {
				1 = {
					set_country_flag = mercenary_army_reformer
				}
				1 = {
					set_country_flag = mercenary_commandant
				}
				1 = {
					set_country_flag = mercenary_grand_captain
				}
			}
		}
	}

	after = {
		clr_country_flag = mercenary_army_reformer
		clr_country_flag = mercenary_commandant
		clr_country_flag = mercenary_grand_captain
	}

	option = {
		name = ideagroups.2026.a
		trigger_switch = {
			on_trigger = has_country_flag
			mercenary_army_reformer = {
				define_advisor = {
					type = army_reformer
					cost_multiplier = 0.75
				}
			}
			mercenary_commandant = {
				define_advisor = {
					type = commandant
					cost_multiplier = 0.75
				}
			}
			mercenary_grand_captain = {
				define_advisor = {
					type = grand_captain
					cost_multiplier = 0.75
				}
			}
		}
		add_country_modifier = {
			name = mercenary_leadership
			duration = 3650
		}
	}
}

# The Thrill of Combat and Money (merc manpower to your company)
country_event = {
	id = ideagroups.2027
	title = ideagroups.2027.t
	desc = ideagroups.2027.d
	picture = LAND_MILITARY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = mercenary_ideas 
		any_hired_mercenary_company = {
			NOT = { has_company_manpower = 0.75 }
		}
	}

	immediate = {
		hidden_effect = {
			random_hired_mercenary_company = {
				limit = {
					NOT = { has_company_manpower = 0.75 }
				}
				save_event_target_as = excited_mercs
			}
		}
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.2027.a
		event_target:excited_mercs = {
			add_company_manpower = 1
		}

	}
}

# Reputation of a Mercenary
country_event = {
	id = ideagroups.2028
	title = ideagroups.2028.t
	desc = ideagroups.2028.d
	picture = DIPLOMACY_eventPicture
	
	is_triggered_only = yes
	
	trigger = {
		has_idea_group = mercenary_ideas 
		NOT = { has_country_modifier = negative_mercenary_reputation }
		num_of_hired_mercenary_companies = 4
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		name = ideagroups.2028.a
		add_country_modifier = {
			name = negative_mercenary_reputation
			duration = 3650
		}
	}
}