﻿add_namespace = baden
add_namespace = badenevent #needs to be deleted after changes

#baden.1-300	Political Events
#baden.501-700	Economy and Trade Events
#baden.702		Flavor Events

##### POLITICAL EVENTS (baden.1-300) #####

### GENERAL POLITICAL EVENTS (baden.1-50) ###

#Grand Duke Friedrich I
country_event = {
	id = baden.1
	title = baden.1.t
	desc = baden.1.d

	fire_only_once = yes
	is_triggered_only = yes
	
	option = {
		ai_chance = { base = 100 }
		name = baden.1.a
		add_stability = 0.05
	}
}

#The Stengel Cabinet
country_event = {
	id = baden.2
	title = baden.2.t
	desc = baden.2.d

	fire_only_once = yes
	is_triggered_only = yes
	
	option = {
		ai_chance = { base = 100 }
		name = baden.2.a
		custom_effect_tooltip = BAD_advisors_unlocked_effect_tt
		hidden_effect = {
			set_country_flag = BAD_kabinett_stengel_flag
		}
	}
}

#The Stabel Cabinet
country_event = {
	id = baden.3
	title = baden.3.t
	desc = baden.3.d

	fire_only_once = yes
	is_triggered_only = yes
	
	option = {
		ai_chance = { base = 100 }
		name = baden.3.a
		custom_effect_tooltip = BAD_advisors_unlocked_effect_tt
		hidden_effect = {
			set_country_flag = BAD_kabinett_stabel_flag
		}
	}
}

#The Grand Ducal Trade Ministry
country_event = {
	id = baden.4
	title = baden.4.t
	desc = baden.4.d

	fire_only_once = yes
	is_triggered_only = yes
	
	option = {
		ai_chance = { base = 100 }
		name = baden.4.a
		add_tech_bonus = { bonus = 0.25 uses = 1 category = economics_tech }
	}
}

### KULTURKAMPF EVENTS (baden.51-100) ###

#BAD - A Treaty with the Catholic Church?
country_event = {
	id = baden.51
	title = baden.51.t
	desc = baden.51.d

	fire_only_once = yes
	is_triggered_only = yes
	
	#Request an agreement.
	option = {
		ai_chance = { base = 100 }
		name = baden.51.a
		PAP = { country_event = { id = baden.52 days = 5 } }
		custom_effect_tooltip = historical_option
	}
	
	#Continue with the status quo.
	option = {
		ai_chance = { base = 0 }
		name = baden.51.b
		decrease_ps_by_one = yes
		unlock_national_focus = BAD_focus_second_chamber_opposition
	}
}

#PAP - Baden Requests an Agreement
country_event = {
	id = baden.52
	title = baden.52.t
	desc = baden.52.d

	fire_only_once = yes
	is_triggered_only = yes
	
	#Agree to negotiate.
	option = {
		ai_chance = { base = 100 }
		name = baden.52.a
		custom_effect_tooltip = PAP_baden_kulturkampf_negotiations_effect_tt
		BAD = { country_event = { id = baden.53 days = 5 } }
		custom_effect_tooltip = historical_option
	}
	
	#There's no need to negotiate.
	option = {
		ai_chance = { base = 0 }
		name = baden.52.b
		add_political_power = -50
		custom_effect_tooltip = PAP_baden_kulturkampf_no_negotiations_effect_tt
		BAD = { country_event = { id = baden.54 days = 5 } }
	}
}

#BAD - Vatican Willing to Negotiate
country_event = {
	id = baden.53
	title = baden.53.t
	desc = baden.53.d

	fire_only_once = yes
	is_triggered_only = yes
	
	#Make an acceptable offer.
	option = {
		ai_chance = { base = 100 }
		name = baden.53.a
		custom_effect_tooltip = BAD_baden_kulturkampf_acceptable_offer_effect_tt
		PAP = { country_event = { id = baden.55 days = 5 } }
		custom_effect_tooltip = historical_option
	}

	#Make an audacious offer.
	option = {
		ai_chance = { base = 0 }
		name = baden.53.b
		custom_effect_tooltip = BAD_baden_kulturkampf_audacious_offer_effect_tt
		PAP = { country_event = { id = baden.56 days = 5 } }
	}
}

#BAD - Vatican Rejects Negotiation
country_event = {
	id = baden.54
	title = baden.54.t
	desc = baden.54.d

	fire_only_once = yes
	is_triggered_only = yes
	
	option = {
		ai_chance = { base = 100 }
		name = baden.54.a
		custom_effect_tooltip = BAD_change_kulturkampf_modifiers_tt
		add_to_variable = { BAD_kulturkampf_fund_drift = -0.01 tooltip = fundamentalism_drift_tooltip }
		add_to_variable = { BAD_kulturkampf_lib_drift = 0.01 tooltip = centrism_drift_tooltip }
		add_to_variable = { BAD_kulturkampf_sf = -0.025 tooltip = stability_factor_tooltip }
		add_to_variable = { BAD_kulturkampf_ppf = -0.05 tooltip = political_power_factor_tooltip }
		decrease_ps_by_one = yes
		unlock_national_focus = BAD_focus_second_chamber_opposition
		hidden_effect = {
			set_country_flag = BAD_baden_kulturkampf_vatican_rejection_flag
		}
	}
}

#PAP - Baden Makes an Acceptable Offer
country_event = {
	id = baden.55
	title = baden.55.t
	desc = baden.55.d

	fire_only_once = yes
	is_triggered_only = yes
	
	#Accept their offer.
	option = {
		ai_chance = { base = 95 }
		name = baden.55.a
		add_political_power = 50
		BAD = { country_event = { id = baden.57 days = 5 } }
		custom_effect_tooltip = historical_option
	}
	
	#Reject their offer.
	option = {
		ai_chance = {
			base = 5
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
		name = baden.55.b
		add_political_power = -50
		custom_effect_tooltip = PAP_baden_kulturkampf_no_negotiations_effect_tt
		BAD = { country_event = { id = baden.58 days = 5 } }
		hidden_effect = {
			BAD = { set_country_flag = BAD_baden_kulturkampf_vatican_rejected_acceptable_offer_flag }
		}
	}
}

#PAP - Baden Makes an Audacious Offer
country_event = {
	id = baden.56
	title = baden.56.t
	desc = baden.56.d

	fire_only_once = yes
	is_triggered_only = yes
	
	#Accept their offer.
	option = {
		ai_chance = { base = 5 }
		name = baden.56.a
		add_political_power = 25
		BAD = { country_event = { id = baden.57 days = 5 } }
	}
	
	#Reject their offer.
	option = {
		ai_chance = { base = 95 }
		name = baden.56.b
		add_political_power = -25
		custom_effect_tooltip = PAP_baden_kulturkampf_no_negotiations_effect_tt
		BAD = { country_event = { id = baden.58 days = 5 } }
		hidden_effect = {
			BAD = { set_country_flag = BAD_baden_kulturkampf_vatican_rejected_audacious_offer_flag }
		}
	}
}

#BAD - Vatican Agrees to the Convention
country_event = {
	id = baden.57
	title = baden.57.t
	desc = baden.57.d

	fire_only_once = yes
	is_triggered_only = yes
	
	option = {
		ai_chance = { base = 100 }
		name = baden.57.a
		add_political_power = 25
		add_stability = 0.02
		unlock_decision_tooltip = BAD_decision_convention_with_the_vatican
		hidden_effect = {
			set_country_flag = BAD_baden_kulturkampf_vatican_convention_flag
		}
	}
}

#BAD - Vatican Rejects the Convention
country_event = {
	id = baden.58
	title = baden.58.t
	desc = baden.58.d

	is_triggered_only = yes
	
	#Make a more acceptable offer.
	option = {
		ai_chance = { base = 80 }
		trigger = {
			NOT = { has_country_flag = BAD_baden_kulturkampf_vatican_rejected_acceptable_offer_flag }
		}
		name = baden.58.a
		PAP = { country_event = { id = baden.55 days = 5 } }
		hidden_effect = {
			clr_country_flag = BAD_baden_kulturkampf_vatican_rejected_audacious_offer_flag
		}
	}

	#We got what we came for.
	option = {
		ai_chance = { base = 20 }
		trigger = {
			has_country_flag = BAD_baden_kulturkampf_vatican_rejected_audacious_offer_flag
		}
		name = baden.58.b
		add_political_power = 25
		custom_effect_tooltip = BAD_change_kulturkampf_modifiers_tt
		add_to_variable = { BAD_kulturkampf_fund_drift = -0.01 tooltip = fundamentalism_drift_tooltip }
		add_to_variable = { BAD_kulturkampf_lib_drift = 0.01 tooltip = centrism_drift_tooltip }
		add_to_variable = { BAD_kulturkampf_sf = -0.025 tooltip = stability_factor_tooltip }
		decrease_ps_by_one = yes
		unlock_national_focus = BAD_focus_second_chamber_opposition
		hidden_effect = {
			every_other_country = {
				limit = {
					is_part_of_the_german_confederation = yes
				}
				country_event = { id = gerconfed.551 days = 3 }
			}
			set_country_flag = BAD_baden_kulturkampf_vatican_rejection_flag
			clr_country_flag = BAD_baden_kulturkampf_vatican_rejected_audacious_offer_flag
		}
	}

	#So be it.
	option = {
		ai_chance = { base = 100 }
		trigger = {
			#has_country_flag = BAD_baden_kulturkampf_vatican_rejected_acceptable_offer_flag
		}
		name = baden.58.c
		add_political_power = -25
		custom_effect_tooltip = BAD_change_kulturkampf_modifiers_tt
		add_to_variable = { BAD_kulturkampf_fund_drift = -0.01 tooltip = fundamentalism_drift_tooltip }
		add_to_variable = { BAD_kulturkampf_lib_drift = 0.01 tooltip = centrism_drift_tooltip }
		add_to_variable = { BAD_kulturkampf_sf = -0.025 tooltip = stability_factor_tooltip }
		add_to_variable = { BAD_kulturkampf_ppf = -0.05 tooltip = political_power_factor_tooltip }
		decrease_ps_by_one = yes
		unlock_national_focus = BAD_focus_second_chamber_opposition
		hidden_effect = {
			every_other_country = {
				limit = {
					is_part_of_the_german_confederation = yes
				}
				country_event = { id = gerconfed.551 days = 3 }
			}
			set_country_flag = BAD_baden_kulturkampf_vatican_rejection_flag
			clr_country_flag = BAD_baden_kulturkampf_vatican_rejected_acceptable_offer_flag
		}
	}
}

#The Concordat of 1859
country_event = {
	id = baden.59
	title = baden.59.t
	desc = baden.59.d

	fire_only_once = yes
	is_triggered_only = yes
	
	option = {
		ai_chance = { base = 100 }
		name = baden.59.a
		custom_effect_tooltip = BAD_change_kulturkampf_modifiers_tt
		add_to_variable = { BAD_kulturkampf_fund_drift = -0.01 tooltip = fundamentalism_drift_tooltip }
		add_to_variable = { BAD_kulturkampf_lib_drift = 0.01 tooltip = centrism_drift_tooltip }
		add_to_variable = { BAD_kulturkampf_sf = 0.05 tooltip = stability_factor_tooltip }
		add_to_variable = { BAD_kulturkampf_ppf = 0.05 tooltip = political_power_factor_tooltip }
		hidden_effect = {
			set_country_flag = BAD_baden_kulturkampf_vatican_convention_signed_flag
			every_country = {
				limit = {
					is_part_of_the_german_confederation = yes
				}
				country_event = { id = gerconfed.552 days = 5 }
			}
			country_event = { id = baden.60 days = 21 }
		}
	}
}

#Second Chamber in Opposition to the Concordat
country_event = {
	id = baden.60
	title = baden.60.t
	desc = baden.60.d

	fire_only_once = yes
	is_triggered_only = yes

	immediate = {
		set_variable = { political_legitimacy_equilibrium_custom = -0.15 }
	}
	
	option = {
		ai_chance = { base = 100 }
		name = baden.60.a
		complete_national_focus = BAD_focus_second_chamber_opposition
		add_political_power = -50
		add_stability = -0.05
		decrease_ps_by_one = yes
		set_temp_variable = { political_legitimacy_change = -0.05 }
		eoanb_political_legitimacy_change = yes
		custom_effect_tooltip = BAD_legitimacy_decrease_effect_tt
		set_temp_variable = { EOANBSYS_humanitive_change = 0.1 }
		EOANBSYS_institutions_humanitive_change = yes
		hidden_effect = {
			#set_variable = { political_legitimacy_equilibrium_custom = -0.15 }
			set_country_flag = BAD_baden_kulturkampf_second_chamber_opposition_flag
			mark_focus_tree_layout_dirty = yes
		}
	}
}

#Dissolution of the Cabinet? - Conservatives or Liberals?
country_event = {
	id = baden.61
	title = baden.61.t
	desc = baden.61.d

	fire_only_once = yes
	is_triggered_only = yes
	
	#Dissolve the cabinet and go with the Liberals.
	option = {
		ai_chance = { base = 85 }
		name = baden.61.a
		add_political_power = 10
		add_stability = 0.01
		decrease_ps_by_one = yes
		add_popularity = {
			ideology = centrism
			popularity = 0.05
		}
		set_politics = { ruling_party = centrism }
		custom_effect_tooltip = historical_option
		hidden_effect = {
			clr_country_flag = BAD_kabinett_stengel_flag
			set_country_flag = BAD_dissolution_cabinet_liberals_flag
		}
	}

	#Keep the cabinet and stick with the conservatives.
	option = {
		ai_chance = {
			base = 15
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
		name = baden.61.b
		add_political_power = -20
		add_stability = -0.02
		decrease_ps_by_one = yes
		add_popularity = {
			ideology = centrism
			popularity = 0.1
		}
		hidden_effect = {
			set_country_flag = BAD_dissolution_cabinet_conservatives_flag
		}
	}
}

#The Easter Proclamation
country_event = {
	id = baden.62
	title = baden.62.t
	desc = baden.62.d

	fire_only_once = yes
	is_triggered_only = yes
	
	option = {
		ai_chance = { base = 100 }
		name = baden.62.a
		add_stability = 0.02
		every_other_country = {
			limit = {
				is_part_of_the_german_confederation = yes
			}
			country_event = { id = gerconfed.553 days = 5 }
		}
	}
}

#Establishment of the Catholic People's Party/ Katholische Volkspartei
country_event = {
	id = baden.63
	title = baden.63.t
	desc = baden.63.d

	fire_only_once = yes
	is_triggered_only = yes
	
	option = {
		ai_chance = { base = 100 }
		name = baden.63.a
	}
}

### GENERAL POLITICAL EVENTS (baden.151-200) ###


### FLAVOR EVENTS (baden.701+)

#Badisch Observer/ Badischer Beobachter
country_event = {
	id = baden.701
	title = baden.701.t
	desc = baden.701.d

	fire_only_once = yes
	is_triggered_only = yes
	
	option = {
		ai_chance = { base = 100 }
		name = baden.701.a
	}
}
#Karlsruhe Polytechnic raised to technical university		### Note: the Decision for this is to fire not coded
country_event = {
	id = baden.702
	title = baden.702.t
	desc = baden.702.d

	fire_only_once = yes
	is_triggered_only = yes
	
	option = {
		ai_chance = { base = 100 }
		name = baden.702.a
	}
}

#Sofja Kovalevskaja
country_event = {
	id = baden.703
	title = baden.703.t
	desc = baden.703.d

	fire_only_once = yes
	is_triggered_only = yes
	
	option = {
		ai_chance = { base = 100 }
		name = baden.703.a
	}
}

#Der Badische Frauenverein
country_event = {
	id = baden.704
	title = baden.704.t
	desc = baden.704.d

	fire_only_once = yes
	is_triggered_only = yes
	
	option = {
		ai_chance = { base = 100 }
		name = baden.704.a
	}
}

#Verein der Geflügelzucht
country_event = {
	id = baden.705
	title = baden.705.t
	desc = baden.705.d

	fire_only_once = yes
	is_triggered_only = yes
	
	option = {
		ai_chance = { base = 100 }
		name = baden.705.a

		hidden_effect = {
			country_event = {
				id = baden.706
				days = 1155
			}
		}
	}
}

#Grand Duke helps with funds and place
country_event = {
	id = baden.706
	title = baden.706.t
	desc = baden.706.d

	fire_only_once = yes
	is_triggered_only = yes
	
	option = {
		ai_chance = { base = 100 }
		name = baden.706.a
		
		# Mission
	}
	option = {
		ai_chance = { base = 100 }
		name = baden.706.b

		# Mission
	}
}

#Zoologische Garten Karlsruhe		# Triggerd by Mission from above
country_event = {
	id = baden.707
	title = baden.707.t
	desc = baden.707.d

	fire_only_once = yes
	is_triggered_only = yes
	
	option = {
		ai_chance = { base = 100 }
		name = baden.707.a
	}
}
#Elections in September 1859



country_event = {
	id = badenevent.1
	title = badenevent.1.t
	desc = badenevent.1.d

	
	fire_only_once = yes
	is_triggered_only = yes
	
	option = {
		ai_chance = { base = 0 }
		name = badenevent.1.a
		
		complete_national_focus = BAD_focus_side_with_prussia
	}
	option = {
		ai_chance = { base = 0 }
		name = badenevent.1.b
		
		complete_national_focus = BAD_focus_stay_neutral
		hidden_effect = {
		}
	}
	option = {
		ai_chance = { base = 100 }
		name = badenevent.1.c
		
		complete_national_focus = BAD_focus_side_with_austria
		custom_effect_tooltip = historical_option
	}
}


country_event = {
	id = badenevent.2
	title = badenevent.2.t
	desc = badenevent.2.d
	
	fire_only_once = yes
	is_triggered_only = yes
	
	immediate = { 
		hidden_effect = { unlock_national_focus = BAD_focus_national_question }
	}
					
	option = {
		ai_chance = { base = 0 }
		name = badenevent.2.a
		
		complete_national_focus = BAD_focus_side_with_prussia
	}
	option = {
		ai_chance = { base = 0 }
		name = badenevent.2.b
		
		complete_national_focus = BAD_focus_stay_neutral
		hidden_effect = {
		}
	}
	option = {
		ai_chance = { base = 100 }
		name = badenevent.2.c
		
		complete_national_focus = BAD_focus_side_with_austria
		custom_effect_tooltip = historical_option
	}
}

country_event = {
	id = badenevent.4
	title = badenevent.4.t
	desc = badenevent.4.d

	
	fire_only_once = yes
	is_triggered_only = yes
	
	option = {
		ai_chance = { base = 100 }
		name = badenevent.4.a
		add_ideas = BAD_court_reform
	}
}

country_event = { #Elections of 1859
	id = badenevent.9
	title = badenevent.9.t
	desc = badenevent.9.d

	
	fire_only_once = yes
	is_triggered_only = yes
	
	option = {
		ai_chance = { base = 100 }
		name = badenevent.9.a
		add_popularity = {
		    ideology = centrism
			popularity = 0.15
		}
	}
}

country_event = { #Baden Administration Court
	id = badenevent.11
	title = badenevent.11.t
	desc = badenevent.11.d

	
	fire_only_once = yes
	is_triggered_only = yes
	
	option = {
		ai_chance = { base = 100 }
		name = badenevent.11.a
			hidden_effect = {
				if = {
					limit = {
						centrism > 0.6
						traditional_conservatism < 0.3
				}
				set_temp_variable = { political_legitimacy_change = 0.04 }
				eoanb_political_legitimacy_change = yes
				set_temp_variable = { EOANBSYS_humanitive_change = 0.04 }
				EOANBSYS_institutions_humanitive_change = yes
				add_stability = 0.05
				add_political_power = 70
				add_tech_bonus = { bonus = 0.25 uses = 1 category = humanities_tech }
			}
			else_if = {
				limit = {
					centrism < 0.6
					traditional_conservatism > 0.3
				}
				set_temp_variable = { political_legitimacy_change = 0.02 }
				eoanb_political_legitimacy_change = yes
				set_temp_variable = { EOANBSYS_humanitive_change = 0.02 }
				EOANBSYS_institutions_humanitive_change = yes
				add_stability = 0.05
				add_political_power = 70
				add_tech_bonus = { bonus = 0.25 uses = 1 category = humanities_tech }
			}
		}
	}
}

###Baden - Austria/Prussia Treaties
country_event = {
	id = badenevent.13
	title = badenevent.13.t
	desc = badenevent.13.d
	picture = GFX_report_event_saxony_coat_of_arms
	
	fire_only_once = yes
	is_triggered_only = yes
	
	option = {
		name = badenevent.13.a
		ai_chance = { base = 100 }
		army_experience = 10
		BAD = { army_experience = 20 }
		give_military_access = BAD
		BAD = { give_military_access = ROOT }
		add_opinion_modifier = { target = BAD modifier = SAX_MILITARY_CONVENTION_EARLY_REL }
		reverse_add_opinion_modifier = { target = BAD modifier = SAX_MILITARY_CONVENTION_EARLY_REL }
		BAD = { country_event = { id = badenevent.14 } }
	}
	
	option = {
		name = badenevent.13.b
		ai_chance = { base = 0 }
		add_opinion_modifier = { target = BAD modifier = SAX_MILITARY_CONVENTION_REJECTED_REL }
		reverse_add_opinion_modifier = { target = BAD modifier = SAX_MILITARY_CONVENTION_REJECTED_REL }
		BAD = { country_event = { id = badenevent.15 } }
	}
}

#Baden – Prussia/Austria Agrees to Military Convention
country_event = {
	id = badenevent.14
	title = badenevent.14.t
	desc = badenevent.14.d
	picture = GFX_report_event_saxony_coat_of_arms
	
	fire_only_once = yes
	is_triggered_only = yes
	
	option = {
		name = badenevent.14.a
		ai_chance = { base = 100 }
		if = {
			limit = {
				FROM = { tag = PRS }
			}
			add_ideas = SAX_idea_PRS_military_convention_1
		}
		if = {
			limit = {
				FROM = { tag = AUS }
			}
			add_ideas = SAX_idea_AUS_military_convention_1
		}
		#unlock_decision_tooltip = SAX_decision_intensify_convention
	}
}

#Baden – Prussia/Austria Rejects Military Convention
country_event = {
	id = badenevent.15
	title = badenevent.15.t
	desc = badenevent.15.d
	picture = GFX_report_event_saxony_coat_of_arms
	
	fire_only_once = yes
	is_triggered_only = yes
	
	option = {
		name = badenevent.15.a
		ai_chance = { base = 100 }
		add_political_power = -25
		add_stability = -0.03
	}
}