﻿##################################################
# #General

GetDiarchyArticle = {
	type = character

	# Fallback: "a".
	text = {
		localization_key = article_a
		fallback = yes
		trigger = { always = no }
	}

	# Some start with vowels.
	text = {
		localization_key = article_an
		trigger = {
			liege = { has_diarchy_parameter = dismissal_requires_gift }
		}
	}
}

GetLiegeYou = {
	type = character

	# You.
	text = {
		trigger = {
			this = { is_local_player = yes }
		}
		localization_key = CHARACTER_NAME_ME
	}
	# The liege.
	text = {
		trigger = { always = no }
		fallback = yes
		localization_key = LIEGE_POSSESSIVE
	}
}

GetLiegeYour = {
	type = character

	# You.
	text = {
		trigger = {
			this = { is_local_player = yes }
		}
		localization_key = CHARACTER_NAME_MY
	}
	# The liege.
	text = {
		trigger = { always = no }
		fallback = yes
		localization_key = LIEGE_POSSESSIVE
	}
}

GetChildInvalid = {
	type = character

	# Child.
	text = {
		trigger = { is_adult = no }
		localization_key = invalid_child
	}
	# Incapable.
	text = {
		trigger = { has_trait = incapable }
		localization_key = invalid_incapable
	}
	# Fallback.
	text = {
		trigger = { always = no }
		fallback = yes
		localization_key = invalid_helpless
	}
}

GetChildInvalidPossessive = {
	type = character

	# Child.
	text = {
		trigger = { is_adult = no }
		localization_key = invalid_child_possessive
	}
	# Incapable.
	text = {
		trigger = { has_trait = incapable }
		localization_key = invalid_incapable_possessive
	}
	# Fallback.
	text = {
		trigger = { always = no }
		fallback = yes
		localization_key = invalid_helpless_possessive
	}
}

GetWarning_WeakDiarchSuccessionScore = {
	type = character

	# People get annoyed if you skip them.
	text = {
		trigger = {
			liege = {
				any_diarchy_succession_character = { diarchy_regent_succession_score_value > root.diarchy_regent_succession_score_value }
			}
		}
		localization_key = diarch.succession_offence.succession_score
	}
}

GetWarning_DiarchAppointmentCourtlies = {
	type = character

	# Unrelated lowborns.
	text = {
		trigger = {
			# Designating the first person in the queue is your best choice, so they can't ever upset anyone.
			liege = {
				any_diarchy_succession_character = { diarchy_regent_succession_score_value > root.diarchy_regent_succession_score_value }
			}
			# Now calc everything else.
			save_temporary_scope_as = char_temp
			liege = {
				any_vassal = {
					has_vassal_stance = courtly
					NOT = { this = scope:char_temp }
				}
			}
			is_lowborn = yes
			NOT = {
				any_close_or_extended_family_member = { this = root.liege }
			}
		}
		localization_key = diarch.succession_offence.unrelated_lowborn
	}
	# Related lowborns.
	text = {
		trigger = {
			# Designating the first person in the queue is your best choice, so they can't ever upset anyone.
			liege = {
				any_diarchy_succession_character = { diarchy_regent_succession_score_value > root.diarchy_regent_succession_score_value }
			}
			# Now calc everything else.
			save_temporary_scope_as = char_temp
			liege = {
				any_vassal = {
					has_vassal_stance = courtly
					NOT = { this = scope:char_temp }
				}
			}
			is_lowborn = yes
			always = no
		}
		localization_key = diarch.succession_offence.related_lowborn
	}
	# Low succession score characters.
	text = {
		trigger = {
			# Designating the first person in the queue is your best choice, so they can't ever upset anyone.
			liege = {
				any_diarchy_succession_character = { diarchy_regent_succession_score_value > root.diarchy_regent_succession_score_value }
			}
			# Now calc everything else.
			save_temporary_scope_as = char_temp
			liege = {
				any_vassal = {
					has_vassal_stance = courtly
					NOT = { this = scope:char_temp }
				}
			}
			diarchy_regent_succession_score_value <= courtly_offence_at_succession_threshold_low
		}
		localization_key = diarch.succession_offence.low_succession
	}
	# Medium succession score characters.
	text = {
		trigger = {
			# Designating the first person in the queue is your best choice, so they can't ever upset anyone.
			liege = {
				any_diarchy_succession_character = { diarchy_regent_succession_score_value > root.diarchy_regent_succession_score_value }
			}
			# Now calc everything else.
			save_temporary_scope_as = char_temp
			liege = {
				any_vassal = {
					has_vassal_stance = courtly
					NOT = { this = scope:char_temp }
				}
			}
			diarchy_regent_succession_score_value <= courtly_offence_at_succession_threshold_medium
		}
		localization_key = diarch.succession_offence.medium_succession
	}
	# High succession score characters.
	text = {
		trigger = {
			# Designating the first person in the queue is your best choice, so they can't ever upset anyone.
			liege = {
				any_diarchy_succession_character = { diarchy_regent_succession_score_value > root.diarchy_regent_succession_score_value }
			}
			# Now calc everything else.
			save_temporary_scope_as = char_temp
			liege = {
				any_vassal = {
					has_vassal_stance = courtly
					NOT = { this = scope:char_temp }
				}
			}
			diarchy_regent_succession_score_value <= courtly_offence_at_succession_threshold_high
		}
		localization_key = diarch.succession_offence.high_succession
	}
	text = { localization_key = diarch.succession_offence.empty }
}

GetCustomTooltip_WeakDiarchSuccessionScore = {
	type = character

	# People get annoyed if you skip them.
	text = {
		trigger = {
			liege = {
				any_diarchy_succession_character = { diarchy_regent_succession_score_value > root.diarchy_regent_succession_score_value }
			}
		}
		localization_key = diarch.succession_offence.succession_score.guts
	}
}

GetCustomTooltip_DiarchAppointmentCourtlies = {
	type = character

	# Unrelated lowborns.
	text = {
		trigger = {
			# Designating the first person in the queue is your best choice, so they can't ever upset anyone.
			liege = {
				any_diarchy_succession_character = { diarchy_regent_succession_score_value > root.diarchy_regent_succession_score_value }
			}
			# Now calc everything else.
			save_temporary_scope_as = char_temp
			liege = {
				any_vassal = {
					has_vassal_stance = courtly
					NOT = { this = scope:char_temp }
				}
			}
			is_lowborn = yes
			NOT = {
				any_close_or_extended_family_member = { this = root.liege }
			}
		}
		localization_key = diarch.succession_offence.unrelated_lowborn.guts
	}
	# Related lowborns.
	text = {
		trigger = {
			# Designating the first person in the queue is your best choice, so they can't ever upset anyone.
			liege = {
				any_diarchy_succession_character = { diarchy_regent_succession_score_value > root.diarchy_regent_succession_score_value }
			}
			# Now calc everything else.
			save_temporary_scope_as = char_temp
			liege = {
				any_vassal = {
					has_vassal_stance = courtly
					NOT = { this = scope:char_temp }
				}
			}
			is_lowborn = yes
			always = no
		}
		localization_key = diarch.succession_offence.related_lowborn.guts
	}
	# Low succession score characters.
	text = {
		trigger = {
			# Designating the first person in the queue is your best choice, so they can't ever upset anyone.
			liege = {
				any_diarchy_succession_character = { diarchy_regent_succession_score_value > root.diarchy_regent_succession_score_value }
			}
			# Now calc everything else.
			save_temporary_scope_as = char_temp
			liege = {
				any_vassal = {
					has_vassal_stance = courtly
					NOT = { this = scope:char_temp }
				}
			}
			diarchy_regent_succession_score_value <= courtly_offence_at_succession_threshold_low
		}
		localization_key = diarch.succession_offence.low_succession.guts
	}
	# Medium succession score characters.
	text = {
		trigger = {
			# Designating the first person in the queue is your best choice, so they can't ever upset anyone.
			liege = {
				any_diarchy_succession_character = { diarchy_regent_succession_score_value > root.diarchy_regent_succession_score_value }
			}
			# Now calc everything else.
			save_temporary_scope_as = char_temp
			liege = {
				any_vassal = {
					has_vassal_stance = courtly
					NOT = { this = scope:char_temp }
				}
			}
			diarchy_regent_succession_score_value <= courtly_offence_at_succession_threshold_medium
		}
		localization_key = diarch.succession_offence.medium_succession.guts
	}
	# High succession score characters.
	text = {
		trigger = {
			# Designating the first person in the queue is your best choice, so they can't ever upset anyone.
			liege = {
				any_diarchy_succession_character = { diarchy_regent_succession_score_value > root.diarchy_regent_succession_score_value }
			}
			# Now calc everything else.
			save_temporary_scope_as = char_temp
			liege = {
				any_vassal = {
					has_vassal_stance = courtly
					NOT = { this = scope:char_temp }
				}
			}
			diarchy_regent_succession_score_value <= courtly_offence_at_succession_threshold_high
		}
		localization_key = diarch.succession_offence.high_succession.guts
	}
	text = { localization_key = diarch.succession_offence.empty }
}

##################################################
# #Vizier Extravagance

# Note: I've tagged stuff below as either "historically attested" where we know someone definitely did it (generally the caliph's vizier, though not always) or else "fictional" where we _don't_ have evidence someone did it. With the exception of some obviously tongue-in-cheek examples, stuff placed under fictional isn't to indicate that we know a thing _wasn't_ practiced, just that, at time of writing, we don't have specific examples for 'em (or, for a couple, examples are _markedly_ out of period but the practice could easily be recurrent).

# Tier 1 custom locs.
VizierExtravagance_T1_Treasure = {
	type = character
	random_valid = yes

	# GENERIC OPTIONS
	## No triggers on the first ~6 or so, so we always have a decent variety of fallbacks.
	## Excessive hankerchiefs.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t1.treasure.hankerchiefs
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = eccentric }
			}
		}
	}
	## Fine perfumes, cosmetics, and ointments.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t1.treasure.cosmetics
	}
	## Jewellery.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t1.treasure.jewellery
	}
	## Furniture.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t1.treasure.furniture
		# Humble characters most likely to avoid personal ostentation, so we weight up furniture for them.
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = humble }
			}
		}
	}
	## Clothing.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t1.treasure.clothing
	}
	## Ostentatious hats.
	### Fictional but probable.
	text = {
		localization_key = viz_extravagance.t1.treasure.hats
	}
	# TRIGGERED OPTIONS
	## Anything a bit more specific from hereon in.
	## Collection of low-tier religious relics.
	### Fictional but probable.
	text = {
		trigger = {
			diarch = {
				faith = {
					NOT = { has_doctrine_parameter = destroying_artifacts_is_pious }
				}
			}
		}
		localization_key = viz_extravagance.t1.treasure.relics
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = zealous }
			}
		}
	}
	## Surprising quantities of drugs.
	### Fictional but probable.
	text = {
		trigger = {
			diarch = {
				NOR = {
					has_trait = temperate
					drinks_alcohol_trigger = yes
				}
			}
		}
		localization_key = viz_extravagance.t1.treasure.drugs
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = gluttonous
						has_trait = hashishiyah
						has_trait = drunkard
					}
				}
			}
		}
	}
	## Expensive game pieces.
	### Historically attested.
	text = {
		trigger = {
			diarch = { has_trait = gregarious }
		}
		localization_key = viz_extravagance.t1.treasure.game_pieces
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = gregarious }
			}
		}
	}
	## Ulta-precise hourglasses.
	text = {
		trigger = {
			diarch = { has_trait = impatient }
		}
		localization_key = viz_extravagance.t1.treasure.hourglasses
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = impatient }
			}
		}
	}
}
VizierExtravagance_T1_Activities = {
	type = character
	random_valid = yes

	# GENERIC OPTIONS
	## No triggers on the first ~6 or so, so we always have a decent variety of fallbacks.
	## Charitable parades.
	### Fictional but probable.
	text = {
		localization_key = viz_extravagance.t1.activities.parades
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = generous
						has_trait = compassionate
					}
				}
			}
		}
	}
	## Backyard festivals.
	### Fictional - well, period fictional, but this was something the local landholders did with the abbey & its grounds near where I grew up, so I'm guessing prior Large Building Owners™ probably thought of it too.
	text = {
		localization_key = viz_extravagance.t1.activities.festivals
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = trusting }
			}
		}
	}
	## Charity auctions.
	### Fictional.
	text = {
		localization_key = viz_extravagance.t1.activities.auctions
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = generous
						has_trait = compassionate
					}
				}
			}
		}
	}
	## Feasted local nobility.
	### Fictional.
	text = {
		localization_key = viz_extravagance.t1.activities.feasts
	}
	## Board game tournaments.
	### Fictional.
	text = {
		localization_key = viz_extravagance.t1.activities.board_game_tourneys
	}
	## Pigeon racing.
	### Historically attested - albeit mainly the preserve of eunuchs.
	text = {
		localization_key = viz_extravagance.t1.activities.pigeon_racing
	}
	# TRIGGERED OPTIONS
	## Anything a bit more specific from hereon in.
	## Discrete parties (orgies).
	### Fictional but probable.
	text = {
		trigger = {
			diarch = {
				has_trait = lustful
				# If the faith calls for this stuff, this'd hardly be unusual.
				faith = {
					NOT = { trait_is_virtue = lustful }
				}
			}
		}
		localization_key = viz_extravagance.t1.activities.orgies
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = lustful }
			}
		}
	}
	## Weekly feasts.
	### Fictional but probable.
	text = {
		trigger = {
			diarch = { has_trait = gregarious }
		}
		localization_key = viz_extravagance.t1.activities.feasts.weekly
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = gregarious }
			}
		}
	}
	## Art exhibitions.
	### Fictional.
	text = {
		trigger = {
			diarch = { has_trait = shy }
		}
		localization_key = viz_extravagance.t1.activities.exhibitions
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = shy }
			}
		}
	}
	## Open house parties.
	### Fictional.
	text = {
		trigger = {
			diarch = {
				has_trait = trusting
				NOT = { has_trait = shy }
			}
		}
		localization_key = viz_extravagance.t1.activities.feasts.commoners
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = trusting }
			}
		}
	}
}
VizierExtravagance_T1_Property = {
	type = character
	random_valid = yes

	# GENERIC OPTIONS
	## No triggers on the first ~6 or so, so we always have a decent variety of fallbacks.
	## Stately townhouse.
	### Fictional but probable.
	text = {
		localization_key = viz_extravagance.t1.property.townhouse
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = humble }
			}
		}
	}
	## Various minor business concerns.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t1.property.minor_businesses
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = greedy }
			}
		}
	}
	## A small arena for horse sports.
	### Fictional but probable.
	text = {
		localization_key = viz_extravagance.t1.property.small_arena
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = profligate }
			}
		}
	}
	## A private manse.
	### Fictional but probable.
	text = {
		localization_key = viz_extravagance.t1.property.manse
	}
	## A key toll road.
	### Fictional but probable.
	text = {
		localization_key = viz_extravagance.t1.property.toll_road
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = greedy
						has_trait = arbitrary
					}
				}
			}
		}
	}
	## A network of trading agents.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t1.property.agent_network
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = greedy }
			}
		}
	}
	# TRIGGERED OPTIONS
	## Anything a bit more specific from hereon in.
	## Personal rooftop garden.
	### Fictional.
	text = {
		trigger = {
			diarch = {
				OR = {
					has_trait = content
					has_trait = lifestyle_gardener
					has_trait = lifestyle_herbalist
					culture = { has_cultural_parameter = can_appoint_court_gardener }
				}
			}
		}
		localization_key = viz_extravagance.t1.property.rooftop_garden
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = content }
			}
		}
	}
	## Bought market inspectors.
	### Fictional but probable.
	text = {
		trigger = {
			diarch = {
				OR = {
					has_trait = arbitrary
					AND = {
						has_trait = deceitful
						NOT = { has_trait = just }
					}
				}
			}
		}
		localization_key = viz_extravagance.t1.property.market_officials_on_payroll
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = arbitrary
						has_trait = deceitful
					}
				}
			}
		}
	}
	## A cheap hostel.
	### Fictional - not actually too probable, as they'd generally likely just make it free for the optics, so mostly here to give humble/compassionate/content something to grab.
	text = {
		trigger = {
			diarch = {
				OR = {
					has_trait = compassionate
					AND = {
						OR = {
							has_trait = humble
							has_trait = content
						}
						NOR = {
							has_trait = callous
							has_trait = sadistic
						}
					}
				}
			}
		}
		localization_key = viz_extravagance.t1.property.hostel
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = compassionate
						has_trait = humble
						has_trait = content
					}
				}
			}
		}
	}
	## A gang of ruthless street thugs and their territory.
	text = {
		trigger = {
			diarch = {
				OR = {
					has_trait = ambitious
					has_trait = callous
					has_trait = sadistic
				}
			}
		}
		localization_key = viz_extravagance.t1.property.gangers
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = ambitious
						has_trait = callous
						has_trait = sadistic
					}
				}
			}
		}
	}
}
VizierExtravagance_T1_Charity = {
	type = character
	random_valid = yes

	# GENERIC OPTIONS
	## No triggers on the first ~6 or so, so we always have a decent variety of fallbacks.
	## An allowance for taking in and educating orphans.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t1.charity.orphans
	}
	## An allowance for the repair of damaged buildings whose owners are too poor to fix 'em.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t1.charity.building_repair
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = architect }
			}
		}
	}
	## Subsidising several annual religious feasts for the poor.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t1.charity.feasts.religious
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = zealous
						has_trait = gregarious
						has_trait = compassionate
					}
				}
			}
		}
	}
	## An endowment for widows/widowers.
	### Historically attested.
	### Female soldiers: widowers.
	text = {
		trigger = {
			dummy_female = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root }
			}
		}
		localization_key = viz_extravagance.t1.charity.widowers
		weight_multiplier = {
			modifier = {
				add = 10
				# Lived experiences.
				diarch = {
					has_trait = education_martial
					has_trait = compassionate
				}
			}
		}
	}
	### Male soldiers: widows.
	text = {
		trigger = {
			dummy_male = {
				can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root }
			}
		}
		localization_key = viz_extravagance.t1.charity.widows
		weight_multiplier = {
			modifier = {
				add = 10
				# Lived experiences.
				diarch = {
					has_trait = education_martial
					has_trait = compassionate
				}
			}
		}
	}
	### And if you allow both, then we allow both and just pick one.
	## A fund for beggars and the destitute.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t1.charity.beggars
	}
	## A fund for buying replacement jugs for child servants who accidentally smash theirs whilst drawing water for the household.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t1.charity.awkward_children
	}
	## A small guard station + guard for civil service buildings.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t1.charity.civil_service.guard
		# Weight up the least-weird sounding option for callous'n'sadistic characters.
		weight_multiplier = {
			modifier = {
				add = 1000
				diarch = {
					OR = {
						has_trait = sadistic
						has_trait = callous
					}
				}
			}
		}
	}
	# TRIGGERED OPTIONS
	## Anything a bit more specific from hereon in.
	## An allowance for feeding the birds of the capital.
	### Historically attested.
	#### And furthermore: n'aww.
	text = {
		trigger = {
			exists = capital_county
			diarch = {
				OR = {
					has_trait = compassionate
					has_trait = humble
				}
			}
		}
		localization_key = viz_extravagance.t1.charity.birds
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = compassionate
						has_trait = humble
					}
				}
			}
		}
	}
	## Funding the creation of an isolated religious community.
	### Historically attested.
	text = {
		trigger = {
			diarch = { has_trait = zealous }
		}
		localization_key = viz_extravagance.t1.charity.monastery
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = zealous }
			}
		}
	}
	## Extra pay for judges to spend more time hearing cases and travelling their circuits.
	### Fictional but probable.
	text = {
		trigger = {
			diarch = { has_trait = just }
		}
		localization_key = viz_extravagance.t1.charity.judges
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = just }
			}
		}
	}
	## Paying for free kitchens to serve the poor.
	### Historically attested.
	text = {
		trigger = {
			diarch = { has_trait = compassionate }
		}
		localization_key = viz_extravagance.t1.charity.kitchens
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = compassionate }
			}
		}
	}
}

# Tier 2 custom locs.
VizierExtravagance_T2_Treasure = {
	type = character
	random_valid = yes

	# GENERIC OPTIONS
	## No triggers on the first ~6 or so, so we always have a decent variety of fallbacks.
	## Cabient of foreign curiosities.
	### Fictional & lightly anachronistic (at least as a widespread practice), but still fairly probable.
	text = {
		localization_key = viz_extravagance.t2.treasure.cabinet_of_curiosities
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = education_learning }
			}
		}
	}
	## Collections of gemstones.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t2.treasure.gems
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = greedy }
			}
		}
	}
	## Clever artful sculptures.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t2.treasure.sculpture
	}
	## Decorative gilded weapons & armour for display.
	### Fictional but probable.
	text = {
		localization_key = viz_extravagance.t2.treasure.decorative_martial_gear
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = education_martial }
			}
		}
	}
	## Bezoar-cut cutlery.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t2.treasure.bezoar_cutlery
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = education_intrigue
						has_trait = deceitful
						has_trait = schemer
					}
				}
			}
		}
	}
	## Fly-stones.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t2.treasure.fly_stones
	}
	# TRIGGERED OPTIONS
	## Anything a bit more specific from hereon in.
	## Pre-measured library of bribery purses.
	### Fictional.
	text = {
		trigger = {
			diarch = { has_trait = deceitful }
		}
		localization_key = viz_extravagance.t2.treasure.indexed_bribes
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = deceitful }
			}
		}
	}
	## Grand map of the known world.
	### Historically attested.
	text = {
		trigger = {
			# More than one kind of person daydreams about far-off lands.
			diarch = {
				OR = {
					has_trait = shy
					has_trait = ambitious
				}
			}
		}
		localization_key = viz_extravagance.t2.treasure.map_of_world
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = shy
						has_trait = ambitious
					}
				}
			}
		}
	}
	## Bling for your steed.
	### Historically attested.
	text = {
		trigger = {
			diarch = { has_trait = arrogant }
		}
		localization_key = viz_extravagance.t2.treasure.horse_armour
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = arrogant }
			}
		}
	}
	## Comically enormous crockery.
	### Historically attested.
	text = {
		trigger = {
			diarch = { has_trait = gluttonous }
		}
		localization_key = viz_extravagance.t2.treasure.crockery
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = gluttonous }
			}
		}
	}
}
VizierExtravagance_T2_Activities = {
	type = character
	random_valid = yes

	# GENERIC OPTIONS
	## No triggers on the first ~6 or so, so we always have a decent variety of fallbacks.
	## Noble pool parties.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t2.activities.feasts.pool
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = gregarious }
			}
		}
	}
	## Horse races w. gambling.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t2.activities.gambling.horse
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = profligate }
			}
		}
	}
	## Interactive feasts.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t2.activities.feasts.interactive
	}
	## Week-long parties.
	### Fictional.
	text = {
		localization_key = viz_extravagance.t2.activities.feasts.long
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = gregarious }
			}
		}
	}
	## Live concerts.
	### Fictional but probable - albeit not in the modern mould.
	text = {
		localization_key = viz_extravagance.t2.activities.concerts
	}
	## Elaborate plays.
	### Fictional but probable.
	text = {
		localization_key = viz_extravagance.t2.activities.theatre
	}
	# TRIGGERED OPTIONS
	## Anything a bit more specific from hereon in.
	## Poetry readings.
	### Fictional.
	text = {
		trigger = {
			diarch = { has_trait = poet }
		}
		localization_key = viz_extravagance.t2.activities.poetry
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = poet }
			}
		}
	}
	## Amnesties for repentant criminals.
	### Fictional.
	text = {
		trigger = {
			diarch = {
				OR = {
					has_trait = forgiving
					AND = {
						has_trait = honest
						NOT = { has_trait = vengeful }
					}
				}
			}
		}
		localization_key = viz_extravagance.t2.activities.amnesties
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = forgiving
						has_trait = honest
					}
				}
			}
		}
	}
	## Animal fights.
	### Fictional but probable.
	text = {
		trigger = {
			diarch = {
				has_trait = wrathful
				NOT = { has_trait = compassionate }
			}
		}
		localization_key = viz_extravagance.t2.activities.animal_baiting
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = wrathful }
			}
		}
	}
	## Passionate religious sermons.
	### Historically attested.
	text = {
		trigger = {
			diarch = { has_trait = zealous }
		}
		localization_key = viz_extravagance.t2.activities.sermons
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = zealous }
			}
		}
	}
}
VizierExtravagance_T2_Property = {
	type = character
	random_valid = yes

	# GENERIC OPTIONS
	## No triggers on the first ~6 or so, so we always have a decent variety of fallbacks.
	## An important monopoly on certain staples.
	### Fictional but probable.
	text = {
		localization_key = viz_extravagance.t2.property.monopoly
	}
	## A famous market of exotic wares.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t2.property.exotic_market
	}
	## An industrious mine.
	### Fictional but probable.
	text = {
		localization_key = viz_extravagance.t2.property.mine
	}
	## An expansive set of warehouses.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t2.property.warehouses
	}
	## A network of loyal messengers.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t2.property.messenger_network
	}
	## A long lane of important workshops.
	### Fictional but probable.
	text = {
		localization_key = viz_extravagance.t2.property.workshops
	}
	# TRIGGERED OPTIONS
	## Anything a bit more specific from hereon in.
	## Personal temple.
	### Fictional but probable.
	text = {
		trigger = {
			diarch = {
				NOT = { has_trait = cynical }
			}
		}
		localization_key = viz_extravagance.t2.property.personal_temple
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = zealous }
			}
		}
	}
	## Small fort in a dangerous, but lucrative, hinterland.
	### Fictional
	text = {
		trigger = {
			diarch = { has_trait = brave }
		}
		localization_key = viz_extravagance.t2.property.fort
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = brave }
			}
		}
	}
	## A formidably defended personal treasury.
	### Fictional.
	text = {
		trigger = {
			diarch = {
				OR = {
					has_trait = stubborn
					has_trait = greedy
				}
			}
		}
		localization_key = viz_extravagance.t2.property.treasury
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = stubborn
						has_trait = greedy
					}
				}
			}
		}
	}
	## A small fortified palace with various secret passages and escape routes.
	### Fictional but probable.
	text = {
		trigger = {
			diarch = { has_trait = craven }
		}
		localization_key = viz_extravagance.t2.property.defensible_palace
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = craven }
			}
		}
	}
}
VizierExtravagance_T2_Charity = {
	type = character
	random_valid = yes

	# GENERIC OPTIONS
	## No triggers on the first ~6 or so, so we always have a decent variety of fallbacks.
	## Paying for several schools for young children.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t2.charity.schools
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = education_learning }
			}
		}
	}
	## Creating hospitals to treat the poor.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t2.charity.hospitals
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = compassionate }
			}
		}
	}
	## Paying for funerals for those who died too poor or whilst travelling.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t2.charity.poor_funerals
	}
	## Sponsoring local philosophical scholars.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t2.charity.scholars.philosophical
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = education_learning }
			}
		}
	}
	## Sponsoring local legal scholars.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t2.charity.scholars.legal
	}
	## Supplemental pay for key civil service positions.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t2.charity.civil_service.extra_positions
		# Weight up the least-weird sounding option for callous'n'sadistic characters.
		weight_multiplier = {
			modifier = {
				add = 1000
				diarch = {
					OR = {
						has_trait = sadistic
						has_trait = callous
					}
				}
			}
		}
	}
	# TRIGGERED OPTIONS
	## Anything a bit more specific from hereon in.
	## Funding the creation/expansion of a police force for the capital — and uhh, doing what private police tend to do.
	### Fictional but probable.
	text = {
		trigger = {
			exists = capital_barony
			diarch = { has_trait = vengeful }
		}
		localization_key = viz_extravagance.t2.charity.police
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = vengeful }
			}
		}
	}
	## Sponsoring local theological scholars.
	### Historically attested.
	text = {
		trigger = {
			diarch = {
				NOT = { has_trait = cynical }
			}
		}
		localization_key = viz_extravagance.t2.charity.scholars.theological
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = zealous }
			}
		}
	}
	## Sponsoring local mystical scholars.
	### Historically attested.
	text = {
		trigger = {
			diarch.faith = {
				NOT = { has_doctrine_parameter = witchcraft_illegal }
			}
		}
		localization_key = viz_extravagance.t2.charity.scholars.mystical
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = lifestyle_mystic
						# Technically the stereotype of the rich man funding occultists is really, really anachronistic but...
						has_trait = eccentric
					}
				}
			}
		}
	}
	## Paying to have orphans circumcised.
	### Historically attested.
	#### Really, really frequently historically attested.
	##### They held celebratory circumcision banquests, even.
	###### Generally this was a prerequisite/bonus attached to caring for male orphans in the relevant faiths.
	text = {
		trigger = {
			religion_has_circumcision_trigger = yes
			diarch = { religion_has_circumcision_trigger = yes }
		}
		localization_key = viz_extravagance.t2.charity.circumcision
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = zealous }
			}
		}
	}
	## Paying for roaming preachers to take the faith to the streets.
	### Fictional.
	text = {
		trigger = {
			faith = diarch.faith
			diarch = { has_trait = zealous  }
		}
		localization_key = viz_extravagance.t2.charity.preachers
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = zealous }
			}
		}
	}
}

# Tier 3 custom locs.
VizierExtravagance_T3_Treasure = {
	type = character
	random_valid = yes

	# GENERIC OPTIONS
	## No triggers on the first ~6 or so, so we always have a decent variety of fallbacks.
	## Fancy mirrors.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t3.treasure.mirrors
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = arrogant }
			}
		}
	}
	## A collection of parasols.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t3.treasure.parasols
	}
	## A massive silken travelling tent.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t3.treasure.silk_bigtop
	}
	## A warehouse of exotic fabrics.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t3.treasure.fabrics
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = greedy }
			}
		}
	}
	## Exotic animals from far away kept as pets.
	text = {
		localization_key = viz_extravagance.t3.treasure.exotic_pets
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = eccentric }
			}
		}
	}
	## Truly phenomenal carpets.
	### Historically attested - and weirdly enthusiastically, I might add.
	text = {
		localization_key = viz_extravagance.t3.treasure.carpets
		weight_multiplier = {
			modifier = {
				add = 10
				# Sometimes you just want to lie down, y'know?
				diarch = { has_trait = lazy }
			}
		}
	}
	# TRIGGERED OPTIONS
	## Anything a bit more specific from hereon in.
	## A woven golden mattress.
	### Historically attested.
	text = {
		trigger = {
			diarch = { has_trait = lazy }
		}
		localization_key = viz_extravagance.t3.treasure.gold_mattress
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = lazy }
			}
		}
	}
	## Exotic birth control solutions.
	### Fictional but probable.
	text = {
		trigger = {
			diarch = { has_trait = lustful }
		}
		localization_key = viz_extravagance.t3.treasure.birth_control
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = lustful }
			}
		}
	}
	## A multi-articulated sculpture of the vizier, who pose and clothing can be changed endlessly.
	### Fictional.
	text = {
		trigger = {
			diarch = { has_trait = fickle }
		}
		localization_key = viz_extravagance.t3.treasure.sculpture.articulated
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = fickle }
			}
		}
	}
	## Five hundred crystal pots containing rare plants.
	### Fictional-ish; pots ain't, plants are.
	text = {
		trigger = {
			diarch = {
				OR = {
					has_trait = lifestyle_gardener
					has_trait = lifestyle_herbalist
					culture = { has_cultural_parameter = can_appoint_court_gardener }
				}
			}
		}
		localization_key = viz_extravagance.t3.treasure.plants
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = lifestyle_gardener
						has_trait = lifestyle_herbalist
					}
				}
			}
		}
	}
}
VizierExtravagance_T3_Activities = {
	type = character
	random_valid = yes

	# GENERIC OPTIONS
	## No triggers on the first ~6 or so, so we always have a decent variety of fallbacks.
	## Surprise give-away feasts (e.g., hiding a gem inside a chicken).
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t3.activities.feasts.surprise
	}
	## Gift packages for neighbouring nobles.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t3.activities.aid
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = gregarious
						has_trait = diplomat
					}
				}
			}
		}
	}
	## Lively scholarly debates.
	### Fictional but probable.
	text = {
		localization_key = viz_extravagance.t3.activities.scholars.debates
	}
	## Overt give-away feasts.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t3.activities.feasts.give_away
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = generous }
			}
		}
	}
	## Land & livestock grants.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t3.activities.land_and_livestock_grants
	}
	## Spectacle feasts.
	### Fictional but probable.
	text = {
		localization_key = viz_extravagance.t3.activities.feasts.spectacle
	}
	# TRIGGERED OPTIONS
	## Anything a bit more specific from hereon in.
	## Shower silver coins over party guests.
	### Historically attested.
	text = {
		trigger = {
			diarch = { has_trait = generous }
		}
		localization_key = viz_extravagance.t3.activities.feasts.coin_shower
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = generous }
			}
		}
	}
	## Palanquin races.
	### Fictional. Sadly.
	text = {
		trigger = {
			diarch = { has_trait = eccentric }
		}
		localization_key = viz_extravagance.t3.activities.gambling.palanquin
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = eccentric }
			}
		}
	}
	## Debauched parties.
	### Fictional but probable.
	text = {
		# Unlike the subtler ones, anyone can make a name for themselves here, regardless of what their faith says.
		## For good or for ill.
		trigger = {
			diarch = { has_trait = lustful }
		}
		localization_key = viz_extravagance.t3.activities.orgies
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = lustful }
			}
		}
	}
	## Elaborate showcase parades.
	### Fictional.
	text = {
		trigger = {
			diarch = { has_trait = arrogant }
		}
		localization_key = viz_extravagance.t3.activities.parades
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = arrogant }
			}
		}
	}
}
VizierExtravagance_T3_Property = {
	type = character
	random_valid = yes

	# GENERIC OPTIONS
	## No triggers on the first ~6 or so, so we always have a decent variety of fallbacks.
	## Cushioned pool.
	### Fictional.
	text = {
		localization_key = viz_extravagance.t3.property.pool.cushions
	}
	## Labyrinthine business interests.
	### Fictional but probable.
	text = {
		localization_key = viz_extravagance.t3.property.businesses
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = greedy }
			}
		}
	}
	## Gargantuan palace.
	### Fictional but probable.
	text = {
		localization_key = viz_extravagance.t3.property.palace.huge
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = lazy
						has_trait = arrogant
					}
				}
			}
		}
	}
	## Personal bathhouse.
	### Fictional but probable.
	text = {
		localization_key = viz_extravagance.t3.property.bathhouse
	}
	## Colossal stables.
	### Fictional but probable.
	text = {
		localization_key = viz_extravagance.t3.property.stables
	}
	## A large pool layered with gold coins.
	### Fictional.
	text = {
		localization_key = viz_extravagance.t3.property.pool.gold
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = greedy
						has_trait = avaricious
					}
				}
			}
		}
	}
	# TRIGGERED OPTIONS
	## Anything a bit more specific from hereon in.
	## A commercial fleet.
	### Fictional but probable.
	text = {
		trigger = {
			any_held_county = { is_coastal_county = yes }
		}
		localization_key = viz_extravagance.t3.property.fleet.commercial
	}
	## Reclaimed businesses.
	### Historically attested.
	text = {
		trigger = {
			diarch = {
				OR = {
					has_trait = arbitrary
					AND = {
						has_trait = greedy
						NOT = { has_trait = just }
					}
				}
			}
		}
		localization_key = viz_extravagance.t3.property.business.stolen
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = arbitrary
						has_trait = greedy
					}
				}
			}
		}
	}
	## Entire capital districts.
	### Historically attested.
	text = {
		trigger = {
			diarch = { exists = capital_county }
		}
		localization_key = viz_extravagance.t3.property.tycoon
	}
	## Den of Vice
	### Fictional but probable.
	text = {
		trigger = {
			diarch = {
				OR = {
					has_trait = gluttonous
					AND = {
						faith = { trait_is_virtue = gluttonous }
						has_trait = zealous
					}
					has_trait = drunkard
					has_trait = hashishiyah
				}
			}
		}
		localization_key = viz_extravagance.t3.property.den_of_vice
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = gluttonous
						has_trait = drunkard
						has_trait = hashishiyah
					}
				}
			}
		}
	}
}
VizierExtravagance_T3_Charity = {
	type = character
	random_valid = yes

	# GENERIC OPTIONS
	## No triggers on the first ~6 or so, so we always have a decent variety of fallbacks.
	## Patronising observatories.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t3.charity.observatories
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = education_learning }
			}
		}
	}
	## Patronising institutions of higher learning.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t3.charity.universities
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = scholar }
			}
		}
	}
	## Patronising libraries.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t3.charity.libraries
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = education_learning }
			}
		}
	}
	## Paying for the construction and maintenance of public baths.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t3.charity.bathhouses
	}
	## Paying for advanced medical equipment for local hospitals.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t3.charity.hospitals.equipment
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = lifestyle_physician }
			}
		}
	}
	## Paying for extra positions within the administration to exist.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t3.charity.civil_service.expansion
		# Weight up the least-weird sounding option for callous'n'sadistic characters.
		weight_multiplier = {
			modifier = {
				add = 1000
				diarch = {
					OR = {
						has_trait = sadistic
						has_trait = callous
					}
				}
			}
		}
	}
	# TRIGGERED OPTIONS
	## Anything a bit more specific from hereon in.
	## Paying for the construction and maintenance of watermills.
	### Historically attested.
	text = {
		trigger = {
			holds_county_with_water_trigger = yes
			culture = { has_innovation = innovation_windmills }
		}
		localization_key = viz_extravagance.t3.charity.watermills
	}
	## Paying for network of beggar-spies.
	### Fictional.
	text = {
		trigger = {
			diarch = { has_trait = paranoid }
		}
		localization_key = viz_extravagance.t3.charity.beggar_spies
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = paranoid }
			}
		}
	}
	## Creation & fill of water tanks for the Hajj
	### Historically attested.
	text = {
		trigger = {
			diarch.faith = {
				religion = religion:islam_religion
				NOT = { has_doctrine_parameter = forbidden_from_pilgrimage }
			}
		}
		localization_key = viz_extravagance.t3.charity.hajj_water_tanks
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = zealous
						has_trait = pilgrim
					}
				}
			}
		}
	}
	## Donating gear to holy warriors.
	### Historically attested.
	text = {
		trigger = {
			diarch = {
				has_trait = zealous
				faith = {
					this = liege.faith
					NOT = { has_doctrine_parameter = holy_wars_forbidden }
				}
			}
		}
		localization_key = viz_extravagance.t3.charity.holy_warrior_gear
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = zealous
						has_trait = faith_warrior
						has_trait = holy_warrior
					}
				}
			}
		}
	}
}

# Tier 4 custom locs.
VizierExtravagance_T4_Treasure = {
	type = character
	random_valid = yes

	# GENERIC OPTIONS
	## No triggers on the first ~6 or so, so we always have a decent variety of fallbacks.
	## Literal thousands of cushions.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t4.treasure.cushions
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = lazy }
			}
		}
	}
	## An army's worth of decorative weapons and armour.
	### Historically attested.
	#### Honestly I'm under-selling it.
	##### They weren't always decorative.
	###### Sometimes you just have four thousand military-grade saddles just... because...
	text = {
		localization_key = viz_extravagance.t4.treasure.martial_gear
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = education_martial }
			}
		}
	}
	## A king's ransom in ambergris, perfumes, and exotic ointments.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t4.treasure.cosmetics
	}
	## A vizierial office carved and furnished with the most expensive of metal-inlaid stone furniture.
	### Historically attested - sorta, common to do aspects of this but rarely all at the same time.
	text = {
		localization_key = viz_extravagance.t4.treasure.office
		# Humble characters most likely to avoid personal ostentation, so we weight up furniture for them.
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = humble }
			}
		}
	}
	## The cutlery and crockery for a full feast of people, each piece once held by the ruler of some foreign or dead empire.
	### Historically attested but heavily exaggerated; you were actually more likely to encounter _a_ set of this attached to some specific ruler.
	text = {
		localization_key = viz_extravagance.t4.treasure.crockery.historic
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = education_learning }
			}
		}
	}
	## An artificial orchard of precious metal trees, with carved gem stone fruit.
	### Historically attested - surprisingly common, even.
	text = {
		localization_key = viz_extravagance.t4.treasure.precious_orchard
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = avaricious
						has_trait = greedy
					}
				}
			}
		}
	}
	# TRIGGERED OPTIONS
	## Anything a bit more specific from hereon in.
	## A personal flotilla of barques for transport.
	### Historically attested.
	text = {
		trigger = {
			capital_county ?= {
				OR = {
					is_riverside_county = yes
					is_coastal_county = yes
				}
			}
		}
		localization_key = viz_extravagance.t4.treasure.fleet.personal
	}
	## A sword as long as three men.
	### Fictional.
	text = {
		trigger = {
			diarch = { has_trait = wrathful }
		}
		localization_key = viz_extravagance.t4.treasure.massive_sword
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = wrathful }
			}
		}
	}
	## Alchemical & potion ingredients, including those (reportedly) from mythical animals.
	### Historically attested.
	text = {
		trigger = {
			diarch = {
				OR = {
					has_trait = eccentric
					has_trait = lifestyle_mystic
					has_trait = lifestyle_physician
					has_trait = lifestyle_herbalist
				}
			}
		}
		localization_key = viz_extravagance.t4.treasure.mystic_ingredients
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = eccentric }
			}
		}
	}
	## Illuminated manuscripts featuring apes.
	### Fictional but sadly apparently incredibly probable.
	text = {
		trigger = {
			diarch = {
				OR = {
					learning <= 0
					AND = {
						learning <= low_skill_rating
						OR = {
							has_trait = trusting
							has_trait = profligate
						}
					}
				}
			}
		}
		weight_multiplier = 0.1
		localization_key = viz_extravagance.t4.treasure.sensible_investments_for_smart_adults
	}
}
VizierExtravagance_T4_Activities = {
	type = character
	random_valid = yes

	# GENERIC OPTIONS
	## No triggers on the first ~6 or so, so we always have a decent variety of fallbacks.
	## Rose pool parties.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t4.activities.feasts.pool.rose
	}
	## Legendary give-aways.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t4.activities.give_aways
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = generous }
			}
		}
	}
	## Sprawling festivities.
	### Fictional but probable.
	text = {
		localization_key = viz_extravagance.t4.activities.feasts.big
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = gregarious }
			}
		}
	}
	## World-renowned menagerie shows.
	### Fictional.
	text = {
		localization_key = viz_extravagance.t4.activities.menagerie
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = lifestyle_hunter }
			}
		}
	}
	## Local nobility aid packages.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t4.activities.aid
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = generous }
			}
		}
	}
	## Magnanimous hosting of foreign embassies.
	### Fictional but probable.
	text = {
		localization_key = viz_extravagance.t4.activities.host
	}
	# TRIGGERED OPTIONS
	## Anything a bit more specific from hereon in.
	## High stakes gambling.
	### Fictional but probable.
	text = {
		trigger = {
			diarch = { has_trait = arbitrary }
		}
		localization_key = viz_extravagance.t4.activities.gambling.xtra_xtreme
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = arbitrary }
			}
		}
	}
	## Elite costume parties.
	### Fictional.
	text = {
		trigger = {
			diarch = {
				OR = {
					has_trait = eccentric
					has_trait = deceitful
					has_trait = gregarious
				}
			}
		}
		localization_key = viz_extravagance.t4.activities.masquerade
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = eccentric
						has_trait = deceitful
						has_trait = gregarious
					}
				}
			}
		}
	}
	## Mercurial garden
	### Fictional.
	text = {
		trigger = {
			diarch = {
				OR = {
					has_trait = fickle
					has_trait = lifestyle_gardener
					# We're a little more restrictive here than other garden triggers — gardening isn't actually the primary motivation.
				}
			}
		}
		localization_key = viz_extravagance.t4.activities.plants.ever_changing
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = fickle }
			}
		}
	}
	## Delectable feasts.
	text = {
		trigger = {
			diarch = {
				has_trait = eccentric
				OR = {
					has_trait = cannibal
					any_secret = { secret_type = secret_cannibal }
				}
			}
		}
		localization_key = viz_extravagance.t4.activities.feasts.cannibal
		# Don't weight this up - it's not something we want to see very commonly.
	}
}
VizierExtravagance_T4_Property = {
	type = character
	random_valid = yes

	# GENERIC OPTIONS
	## No triggers on the first ~6 or so, so we always have a decent variety of fallbacks.
	## Pool Palace.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t4.property.palace.pool
	}
	## Vast countryside retreat.
	### Fictional but probable.
	text = {
		localization_key = viz_extravagance.t4.property.palace.spa
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = shy }
			}
		}
	}
	## Private army.
	### Fictional but probable.
	text = {
		localization_key = viz_extravagance.t4.property.army
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = ambitious }
			}
		}
	}
	## Tens of thousands of head of livestock.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t4.property.livestock
	}
	## Guest Palace.
	### Fictional but probable.
	text = {
		localization_key = viz_extravagance.t4.property.palace.guest
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = shy }
			}
		}
	}
	## Vizierial Spire.
	### Fictional.
	text = {
		localization_key = viz_extravagance.t4.property.spire
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = architect
						has_trait = overseer
					}
				}
			}
		}
	}
	# TRIGGERED OPTIONS
	## Anything a bit more specific from hereon in.
	## Palace of the Month
	### Fictional but semi-probable; you wouldn't move literally _per_ month but they could and would own substantially more palaces than any one civil servant _needs_.
	text = {
		trigger = {
			diarch = {
				NOT = { has_trait = humble }
			}
		}
		localization_key = viz_extravagance.t4.property.palace.monthly
	}
	## Personal Bordello.
	### Fictional but probable.
	text = {
		trigger = {
			diarch = { has_trait = lustful }
		}
		localization_key = viz_extravagance.t4.property.bordello
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = lustful }
			}
		}
	}
	## Personal debtor's prison.
	### Fictional but probable.
	text = {
		trigger = {
			diarch = {
				OR = {
					has_trait = greedy
					AND = {
						has_trait = callous
						NOT = { has_trait = generous }
					}
				}
			}
		}
		localization_key = viz_extravagance.t4.property.gaol
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = greedy
						has_trait = callous
					}
				}
			}
		}
	}
	## Eponymous Hell.
	### Fictional.
	#### Loosely based on the legendary Ashoka's Hell.
	text = {
		trigger = {
			diarch = { has_trait = sadistic }
		}
		localization_key = viz_extravagance.t4.property.palace.torture
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = sadistic }
			}
		}
	}
}
VizierExtravagance_T4_Charity = {
	type = character
	random_valid = yes

	# GENERIC OPTIONS
	## No triggers on the first ~6 or so, so we always have a decent variety of fallbacks.
	## Paying for waystations & caravanserais for long-distance travellers.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t4.charity.waystations
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = lifestyle_traveler }
			}
		}
	}
	## Funding the construction and maintenance of major bridges.
	### Historically attested.
	text = {
		localization_key = viz_extravagance.t4.charity.bridges
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = architect }
			}
		}
	}
	## A staple food dole.
	### Fictional but probable.
	text = {
		localization_key = viz_extravagance.t4.charity.dole
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = compassionate }
			}
		}
	}
	## Cheap urban housing.
	### Fictional.
	text = {
		localization_key = viz_extravagance.t4.charity.housing
	}
	## Sprawling public gardens.
	### Fictional.
	text = {
		localization_key = viz_extravagance.t4.charity.gardens
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = lifestyle_gardener }
			}
		}
	}
	## Paying for organised local fire services.
	### Fictional.
	text = {
		localization_key = viz_extravagance.t4.charity.civil_service.fire
		# Weight up the least-weird sounding option for callous'n'sadistic characters.
		weight_multiplier = {
			modifier = {
				add = 1000
				diarch = {
					OR = {
						has_trait = sadistic
						has_trait = callous
					}
				}
			}
		}
	}
	# TRIGGERED OPTIONS
	## Anything a bit more specific from hereon in.
	## Paying for the construction and maintenance of aqueducts.
	### Historically attested.
	text = {
		trigger = { holds_county_with_water_trigger = yes }
		localization_key = viz_extravagance.t4.charity.aqueducts
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = architect }
			}
		}
	}
	## A grand public festival.
	### Fictional but probable.
	text = {
		trigger = {
			diarch = { has_trait = gregarious }
		}
		localization_key = viz_extravagance.t4.charity.festivals
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = gregarious }
			}
		}
	}
	## A fund for people to go on pilgrimage.
	### Historically attested.
	text = {
		trigger = {
			diarch = {
				NOR = {
					has_trait = cynical
					faith = { has_doctrine_parameter = forbidden_from_pilgrimage }
				}
			}
		}
		localization_key = viz_extravagance.t4.charity.pilgrimage
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = {
					OR = {
						has_trait = zealous
						has_trait = pilgrim
					}
				}
			}
		}
	}
	## Loan remittance service.
	text = {
		trigger = {
			diarch = { has_trait = generous }
		}
		localization_key = viz_extravagance.t4.charity.loans
		weight_multiplier = {
			modifier = {
				add = 10
				diarch = { has_trait = generous }
			}
		}
	}
}
