ConsortEvents.txt

(104 KB) Pobierz
########################################################################
# Events for Consorts
#
# written by Henrik Lohmander, Milla Isaksson and Mathilda Bjarnehed
########################################################################

namespace = consort_events

#Consorts from Local Noble House
#Generated on Heir creation or through Events
#The seat of the Queen's family will be assigned upon creation

#Marriage Proposal
country_event = {
	id = consort_events.1
	title = consort_events.1.t
	picture = GOOD_WITH_MONARCH_eventPicture
	
	desc = {
		trigger = {
			religion_group = christian
			NOT = { has_ruler_flag = widow_widower }
		}
		desc = consort_events.1.da #Monarch seems oblivious to offers so far.
	}
	desc = {
		trigger = {
			religion_group = christian
			has_ruler_flag = widow_widower
		}
		desc = consort_events.1.db #Help Finding a Second wife.
	}
	desc = {
		trigger = {
			religion_group = christian
		}
		desc = consort_events.1.dc #No special reason
	}
	desc = {
		trigger = {
			NOT = { religion_group = christian }
		}
		desc = consort_events.1.dd #Base text for regions where multiple spouses are the norm.
	}
	
	trigger = {
		has_dlc = "Rights of Man"
		has_consort = no
		is_lesser_in_union = no
		num_of_cities = 2
		government = monarchy
		NOT = { government = iqta }
		NOT = { government = elective_monarchy }
		num_of_royal_marriages = 4
		NOT = { has_ruler_flag = approached_by_leading_families_of_the_realm }
		OR = {
			has_heir = no
			NOT = { heir_claim = 50 }
		}
		any_owned_province = {
			is_capital = no
			is_state = yes
			is_in_capital_area = yes
			NOT = { has_estate = estate_nobles }
			NOT = { has_estate = estate_church }
		}
		OR = {
			AND = {
				NOT = { has_dlc = "The Cossacks" }
				legitimacy = 50 #Weaker than this and the Nobles won't want to support you.
			}
			AND = {
				estate_influence = {
					estate = estate_nobles
					influence = 25 #Weaker than this and the Nobles won't make an offer.
				}
				estate_loyalty = {
					estate = estate_nobles
					loyalty = 40 #Less Loyal than this and the Nobles won't want to support you.
				}
			}
		}
	}
	
	immediate = {
		hidden_effect = {
			set_ruler_flag = approached_by_leading_families_of_the_realm
			random_owned_province = {
				limit = {
					is_capital = no
					is_state = yes
					is_in_capital_area = yes 
					NOT = { has_estate = estate_burghers }
					NOT = { has_estate = estate_church }
				}
				save_event_target_as = origin_of_queens_family
			}
		}
	}
	
	mean_time_to_happen = {
		months = 360
	}

	option = {
		name = consort_events.1.a #
		custom_tooltip = consort_events.1.a.tt #The Queens Family will expect special treatment.
		add_years_of_income = 0.15
		event_target:origin_of_queens_family = {
			add_province_modifier = {
				name = "domain_of_spouses_family"
				duration = -1
			}
		}
		define_consort = {
		}
	}
	option = {
		name = consort_events.1.b #
		add_prestige = 10
		if = {
			limit = { has_dlc = "The Cossacks" }
			add_estate_loyalty = {
				estate = estate_nobles
				loyalty = -5
			}
		}
	}
}

#Noble Family Queen - OnAction

#Meet the in-laws
country_event = {
	id = consort_events.2
	title = consort_events.2.t
	desc = consort_events.2.d
	picture = ROYAL_COUPLE_FUTURE_eventPicture

	
	trigger = {
		has_dlc = "Rights of Man"
		has_foreign_consort = no
		is_lesser_in_union = no
		num_of_cities = 2
		NOT = { has_ruler_flag = has_lowborn_consort }
		NOT = {
			any_owned_province = {
				has_province_modifier = domain_of_spouses_family
			}
		}
	}
	
	immediate = {
		hidden_effect = {
			random_owned_province = {
				limit = {
					is_capital = no
					OR = {
						is_state = yes
						is_in_capital_area = yes 
						NOT = { has_estate = estate_burghers }
						NOT = { has_estate = estate_church }
					}
				}
				save_event_target_as = origin_of_queens_family
			}
		}
	}
	
	is_triggered_only = yes

	option = {
		name = consort_events.2.a #
		custom_tooltip = consort_events.2.a.tt #The Queens Family will expect special treatment.
		event_target:origin_of_queens_family = {
			add_province_modifier = {
				name = "domain_of_spouses_family"
				duration = -1
			}
		}
	}
}

#Spouses Family Wants your help
country_event = {
	id = consort_events.3
	title = consort_events.3.t
	picture = ROYAL_COUPLE_FUTURE_eventPicture
	
	desc = {
		trigger = {
			always = yes
		}
		desc = consort_events.3.d
	}
	
	trigger = {
		has_dlc = "Rights of Man"
		has_consort = yes
		is_lesser_in_union = no
		has_foreign_consort = no #Local Dynasty
		NOT = { has_ruler_flag = has_lowborn_consort }
		has_regency = no
		any_owned_province = {
			has_province_modifier = domain_of_spouses_family #If this has been lost they're not really powerful enough to either demand or help the ruler.
		}
	}
	
	immediate = {
		hidden_effect = {
			random_list = {
				15 = { set_country_flag = develop_seat_province }
				15 = { set_country_flag = pay_money }
				15 = { set_country_flag = pay_legitimacy_or_give_noble_influence }
				15 = { set_country_flag = kick_advisor }
				15 = { set_country_flag = pay_mil_trad }
				15 = { set_country_flag = pay_nav_trad }
			}
		}
	}
	
	mean_time_to_happen = {
		months = 800
		modifier = {
			factor = 0.9
			OR = {
				AND = {
					has_dlc = "The Cossacks"
					estate_influence = {
						estate = estate_nobles
						influence = 60
					}
				}
				AND = {
					NOT = { has_dlc = "The Cossacks" }
					NOT = { legitimacy = 60 }
				}
			}
		}
		modifier = {
			factor = 0.65
			has_ruler_flag = accepted_help_from_spouses_family
		}
		modifier = {
			factor = 1.5
			has_ruler_flag = helped_spouses_family
		}
	}

	option = {
		name = consort_events.3.a #
		if = {
			limit = { has_ruler_flag = accepted_help_from_spouses_family }
			clr_ruler_flag = accepted_help_from_spouses_family
		}
		set_ruler_flag = helped_spouses_family
		trigger_switch = {
			on_trigger = has_country_flag
			develop_seat_province = {
				custom_tooltip = consort_events.3.a.tt.1
				random_owned_province = {
					limit = {
						has_province_modifier = domain_of_spouses_family
					}
					add_base_tax = 1
				}
				add_adm_power = -100 #Overpriced development
				clr_country_flag = develop_seat_province
			}
			pay_money = {
				custom_tooltip = consort_events.3.a.tt.2
				add_years_of_income = -0.25
				clr_country_flag = pay_money
			}
			pay_legitimacy_or_give_noble_influence = {
				custom_tooltip = consort_events.3.a.tt.3
				if = {
					limit = {
						has_dlc = "The Cossacks"
						has_estate = estate_nobles
					}
					add_estate_influence_modifier = {
						estate = estate_nobles
						desc = EST_VAL_FURTHERED_SPOUSES_FAMILY_NOBLES
						influence = 10
						duration = 7300
					}
				}
				if = {
					limit = {
						OR = {
							NOT = { has_dlc = "The Cossacks" }
							NOT = { has_estate = estate_nobles }
						}
					}
					add_legitimacy = -10
					add_horde_unity = -10
				}
				clr_country_flag = pay_legitimacy_or_give_noble_influence
			}
			kick_advisor = {
				custom_tooltip = consort_events.3.a.tt.4
				kill_advisor = random
				add_adm_power = -50
				clr_country_flag = kick_advisor
			}
			pay_mil_trad = {
				if = {
					limit = {
						army_tradition = 50
					}
					custom_tooltip = consort_events.3.a.tt.5
					add_army_tradition = -20
				}
				if = {
					limit = {
						NOT = { army_tradition = 50 } #Fallback
					}
					custom_tooltip = consort_events.3.a.tt.6b
					add_corruption = 1
				}
				clr_country_flag = pay_mil_trad
			}
			pay_nav_trad = {
				if = {
					limit = {
						OR = {
							num_of_ports = 5
							navy_tradition = 50
						}
					}
					custom_tooltip = consort_events.3.a.tt.6
					add_navy_tradition = -20
				}
				if = {
					limit = {
						NOT = { num_of_ports = 5 } #fallback
						NOT = { navy_tradition = 50 } #fallback
					}
					custom_tooltip = consort_events.3.a.tt.6b
					add_corruption = 1
				}
				clr_country_flag = pay_nav_trad
			}
		}
		custom_tooltip = consort_events.3.a.tt.0
	}
	option = {
		name = consort_events.3.b #Refuse
		custom_tooltip = consort_events.3.b.tt
		set_ruler_flag = refused_to_help_spouses_family
		add_prestige = -10
		random_owned_province = {
			limit = {
				has_province_modifier = domain_of_spouses_family
			}
			add_local_autonomy = 25
		}
	}
}

#The Crown has the support of the spouses family
country_event = {
	id = consort_events.4
	title = consort_events.4.t
	desc = consort_events.4.d
	picture = KING_DOING_GREAT_eventPicture
	
	trigger = {
		has_dlc = "Rights of Man"
		is_lesser_in_union = no
		has_consort = yes
		has_foreign_consort = no #Local Dynasty
		NOT = { has_ruler_flag = has_lowborn_consort }
		NOT = { has_ruler_flag = refused_to_help_consort_regents_family }
		has_regency = no
		any_owned_province = {
			has_province_modifier = domain_of_spouses_family #If this has been lost they're not really powerful enough to either demand or help the ruler.
		}
	}
	
	immediate = {
		hidden_effect = {
			if = {
				limit = { has_ruler_flag = helped_spouses_family }
				clr_ruler_flag = helped_spouses_family
			}
			random_list = {
				15 = { set_country_flag = in_laws_fund_development }
				15 = { set_country_flag = in_laws_provide_mil_advisor }
				15 = { set_country_flag = in_laws_provide_dip_advisor }
				15 = { set_country_flag = in_laws_provide_help_with_nobility }
				15 = { set_country_flag = in_laws_provide_adm_advisor }
				15 = { set_country_flag = in_laws_provide_money }
			}
		}
	}
	
	mean_time_to_happen = ...
Zgłoś jeśli naruszono regulamin