celestial_obligations = {
	obligation_levels = {
		default = {
			levies = {
				value = 0.3
			}

			tax = {
				value = 0.75
			}
		}
	}
}

### brief: administrative_themes
# This is referenced in code.
#
celestial_provinces = {
	display_mode = radiobutton
	is_shown = {
		scope:subject = {
			OR = {
				highest_held_title_tier >= main_administrative_tier
				highest_held_title_tier >= min_title_maa_tier
			}
			is_landless_ruler = no
		}
	}
	obligation_levels = {
		celestial_province_standard = {
			default = yes
			position = { 0 0 }
			icon = "gfx/interface/icons/celestial_administration_types/icon_standard_administration.dds"
			gui_tags = { civilian }

			ai_liege_desire = {
				value = 0
				if = {
					limit = {
						scope:subject = {
							is_ai = yes
						}
					}
					add = 1

					# Cautious AI should tend to have a minor bias towards the default
					if = {
						limit = {
							scope:liege = {
								ai_has_cautious_personality = yes
							}
						}
						add = 1
					}
				}
			}
			ai_subject_desire = 0

			score = 0
			color = { 0.7 0.7 0.7 1.0 }

			enable_title_maa = no

			subject_modifier = {
				monthly_merit_per_liege_tax = 0.8
			}

			flag = celestial_civil_appointment
			flag = celestial_province_standard
			appointment_trait_flag = civilian_province
		}
		celestial_province_industrial = {
			position = { 1 0 }
			icon = "gfx/interface/icons/celestial_administration_types/icon_industrial_administration.dds"
			gui_tags = { civilian }

			ai_liege_desire = {
				value = 0
				if = {
					limit = {
						scope:subject = {
							is_ai = yes
							OR = {
								has_trait = education_stewardship
								stewardship >= very_high_skill_rating
							}
							# Avoid replacing any military types if they have title troops already
							primary_title = { any_owned_title_maa_regiment = { count < 1 } }
						}
					}
					add = 3

					# Economical AI wants more of civic vassals
					if = {
						limit = {
							scope:liege = {
								ai_has_builder_or_pious_builder_personality = yes
							}
						}
						add = 2
					}
				}
			}
			ai_subject_desire = 0

			score = 0
			color = { 0.2 0.2 0.7 1.0 }

			is_shown = {
			}

			is_valid = {
				# Only for direct vassals of the top liege or sub-vassals of a civilian province
				custom_tooltip = {
					text = liege_is_not_civilian_desc
					scope:liege = {
						trigger_if = {
							limit = {
								this != top_liege
							}
							vassal_contract_has_flag = celestial_civil_appointment
						}
					}
				}

				# Vassal has to be landed
				scope:subject = {
					is_landed = yes
				}
				# There can only be a limited number of industries at a time
				custom_tooltip = {
					text = celestial_province_industrial_amount_desc
					OR = {
						scope:liege = {
							any_vassal = {
								count < celestial_province_industrial_max_value
								vassal_contract_has_flag = celestial_province_industrial
							}
						}
						scope:subject = { vassal_contract_has_flag = celestial_province_industrial }
					}
				}
			}

			enable_title_maa = no

			subject_modifier = {
				development_growth_factor = 0.05
				build_gold_cost = -0.1
				build_speed = -0.2
				monthly_merit_per_liege_tax = 1.2
			}

			flag = celestial_civil_appointment
			flag = admin_ai_is_builder
			flag = celestial_province_industrial
			flag = obligation_high_taxes
			appointment_trait_flag = civilian_province
		}
		celestial_province_metropolitan = {
			position = { 2 0 }
			icon = "gfx/interface/icons/celestial_administration_types/icon_metropolitan_administration.dds"
			gui_tags = { civilian }

			ai_liege_desire = {
				value = 0
				if = {
					limit = {
						scope:subject = {
							is_ai = yes
						}
					}
					# The AI should always want to fill the limit
					add = 8

					# Avoid border provinces if possible
					if = {
						limit = {
							scope:subject = {
								any_sub_realm_county = {
									any_neighboring_county = {
										holder = {
											top_liege != scope:subject.top_liege
										}
									}
								}
							}
						}
						add = -5
					}

					# Even more so if they are close to the capital
					if = {
						limit = {
							scope:subject = {
								realm_to_title_distance_squared = { target = scope:liege.capital_county value < 60000 }
							}
						}
						add = 3
					}

					# Don't swap away from this too easily
					if = {
						limit = {
							scope:subject = {
								vassal_contract_has_flag = celestial_province_metropolitan
							}
						}
						add = 4
					}

					# Economical AI wants more of civic vassals
					if = {
						limit = {
							scope:liege = {
								ai_has_builder_or_pious_builder_personality = yes
							}
						}
						add = 2
					}

					# If above the limit, try to replace some obligations until that isn't a problem
					if = {
						limit = {
							scope:liege = {
								any_vassal = {
									count > celestial_province_metropolitan_max_value
									vassal_contract_has_flag = celestial_province_metropolitan
								}
							}
						}
						multiply = 0
					}
				}
			}
			ai_subject_desire = 0

			score = 0
			color = { 0.7 0.2 0.2 1.0 }

			is_shown = {
			}

			is_valid = {
				# Only available in the Advancement phase of the Dynastic Cycle
				trigger_if = {
					limit = {
						exists = situation:dynastic_cycle
					}
					situation:dynastic_cycle = { has_situation_top_phase_parameter = dynastic_cycle_hegemon_increased_metropolitan_limit }
				}
				#situation:dynastic_cycle ?= { situation_current_phase = situation_dynastic_cycle_phase_stability_advancement }
				# Only the hegemon can appoint these
				scope:liege = {
					highest_held_title_tier = tier_hegemony
				}
				# And only for high tier vassals who are de jure
				scope:subject = {
					is_landed = yes
					highest_held_title_tier >= tier_kingdom
					custom_tooltip = {
						text = celestial_province_de_jure_desc
						primary_title = { target_is_de_jure_liege_or_above = scope:liege.primary_title }
					}
				}
				# There can only be a limited number of metropols at a time - Changes with the Dynastic Cycle
				custom_tooltip = {
					text = celestial_province_metropolitan_amount_desc
					OR = {
						scope:liege = {
							any_vassal = {
								count < celestial_province_metropolitan_max_value
								vassal_contract_has_flag = celestial_province_metropolitan
							}
						}
						scope:subject = { vassal_contract_has_flag = celestial_province_metropolitan }
					}
				}
			}

			tax_factor = 0.05
			enable_title_maa = no

			subject_modifier = {
				domain_tax_mult = 0.05
				development_growth_factor = 0.05
				monthly_county_control_growth_factor = -0.1
				monthly_merit_per_liege_tax = 2.4
			}

			flag = celestial_civil_appointment
			flag = celestial_province_metropolitan
			flag = obligation_high_levies
			appointment_trait_flag = civilian_province
		}
		celestial_province_military = {
			position = { 0 1 }
			icon = "gfx/interface/icons/celestial_administration_types/icon_military_administration.dds"
			gui_tags = { military }

			ai_liege_desire = {
				value = 0
				if = {
					limit = {
						scope:subject = {
							is_ai = yes
							OR = {
								primary_title = { any_owned_title_maa_regiment = { count >= 3 } }
								any_sub_realm_county = { # Is a border province
									any_neighboring_county = {
										holder = {
											top_liege != scope:subject.top_liege
										}
									}
								}
							}
						}
					}
					add = 5

					# Preference for vassals along the border
					if = {
						limit = {
							scope:subject = {
								any_sub_realm_county = {
									any_neighboring_county = {
										holder = {
											top_liege != scope:subject.top_liege
										}
									}
								}
							}
						}
						add = 6
					}

					# Warlike AI wants more military vassals
					if = {
						limit = {
							scope:liege = {
								ai_has_warlike_personality = yes
							}
						}
						add = 2
					}

					# Don't make lone duchies/counties at the border military
					if = {
						limit = {
							scope:liege.highest_held_title_tier = tier_hegemony
							scope:subject.highest_held_title_tier <= tier_duchy
						}
						multiply = 0
					}
					if = {
						limit = {
							scope:liege.highest_held_title_tier = tier_empire
							scope:subject.highest_held_title_tier <= tier_county
						}
						multiply = 0
					}
				}

				# Prefer to make military sub-vassals, as a military/protectorate
				if = {
					limit = {
						scope:liege = {
							vassal_contract_has_flag = celestial_military_appointment
						}
					}
					add = 4
				}
			}
			ai_subject_desire = 0

			score = 0
			color = { 0.7 0.2 0.2 1.0 }

			is_shown = {
			}

			is_valid = {
				# Vassal has to be landed and direct vassal of the top liege, or a vassal of another military governor
				custom_tooltip = {
					text = liege_is_not_military_desc
					scope:liege = {
						trigger_if = {
							limit = {
								this != top_liege
							}
							vassal_contract_has_flag = celestial_military_appointment
						}
					}
				}
				trigger_if = {
					limit = {
						scope:subject = {
							liege = top_liege
						}
					}
					# There can only be a limited number of militaries at a time
					custom_tooltip = {
						text = celestial_province_military_amount_desc
						OR = {
							scope:subject.liege = {
								any_vassal = {
									count < celestial_province_military_max_value
									vassal_contract_has_flag = celestial_province_military

									# We don't care about vassals two steps down in tier (for AI)
									trigger_if = {
										limit = {
											liege = {
												is_ai = yes
												highest_held_title_tier = tier_hegemony
											}
										}
										highest_held_title_tier >= tier_kingdom
									}
									trigger_if = {
										limit = {
											liege = {
												is_ai = yes
												highest_held_title_tier = tier_empire
											}
										}
										highest_held_title_tier >= tier_duchy
									}
								}
							}
							scope:subject = { vassal_contract_has_flag = celestial_province_military }
						}
					}
				}
			}

			levies_factor = 0.5

			subject_modifier = {
				development_growth_factor = -0.2
				monthly_county_control_growth_factor = 0.1
				additional_fort_level = 2
				defender_advantage = 4
				monthly_merit_per_title_maa_value = 0.024
				domain_tax_mult = -0.3

				monthly_treasury_from_military_budget_base = 1.0
			}

			flag = celestial_province_military
			flag = celestial_military_appointment
			flag = obligation_high_levies
			appointment_trait_flag = military_province
		}
		celestial_province_protectorate = {
			position = { 1 1 }
			icon = "gfx/interface/icons/celestial_administration_types/icon_protectorate_administration.dds"
			gui_tags = { military }

			ai_liege_desire = {
				value = 0
				if = {
					limit = {
						scope:subject = {
							is_ai = yes
						}
					}
					# The AI should always want to fill the limit
					add = 5

					# Increase desirability if the vassal is neighboring another realm
					if = {
						limit = {
							scope:subject = {
								any_sub_realm_county = {
									any_neighboring_county = {
										holder = {
											top_liege != scope:subject.top_liege
										}
									}
								}
							}
						}
						add = 4
					}

					# Don't swap away from this too easily
					if = {
						limit = {
							scope:subject = {
								vassal_contract_has_flag = celestial_province_protectorate
							}
						}
						add = 2
					}

					# Warlike AI wants more military vassals
					if = {
						limit = {
							scope:liege = {
								ai_has_warlike_personality = yes
							}
						}
						add = 1
					}

					# If above the limit, try to replace some obligations until that isn't a problem
					if = {
						limit = {
							scope:liege = {
								any_vassal = {
									count > celestial_province_protectorate_max_value
									vassal_contract_has_flag = celestial_province_protectorate
								}
							}
						}
						multiply = 0
					}

					# Don't make lone duchies/counties at the border military
					if = {
						limit = {
							liege.highest_held_title_tier = tier_hegemony
							scope:subject.highest_held_title_tier <= tier_duchy
						}
						multiply = 0
					}
					if = {
						limit = {
							liege.highest_held_title_tier = tier_empire
							scope:subject.highest_held_title_tier <= tier_county
						}
						multiply = 0
					}
				}
			}
			ai_subject_desire = 0

			score = 0
			color = { 0.7 0.2 0.2 1.0 }

			is_shown = {
			}

			is_valid = {
				# Only available in the Expansion phase of the Dynastic Cycle
				#situation:dynastic_cycle ?= { has_situation_top_phase_parameter = dynastic_cycle_hegemon_increased_protectorate_limit }
				trigger_if = {
					limit = {
						exists = situation:dynastic_cycle
					}
					situation:dynastic_cycle = { has_situation_top_phase_parameter = dynastic_cycle_hegemon_increased_protectorate_limit }
				}
				# Only the hegemon can appoint these
				scope:liege = {
					highest_held_title_tier = tier_hegemony
				}
				# And only for high tier vassals
				scope:subject = {
					is_landed = yes
					highest_held_title_tier >= tier_kingdom
				}
				# There can only be a limited number of protectorates at a time - Changes with the Dynastic Cycle
				custom_tooltip = {
					text = celestial_province_protectorate_amount_desc
					OR = {
						scope:liege = {
							any_vassal = {
								count < celestial_province_protectorate_max_value
								vassal_contract_has_flag = celestial_province_protectorate
							}
						}
						scope:subject = { vassal_contract_has_flag = celestial_province_protectorate }
					}
				}
			}

			levies_factor = -1

			subject_modifier = {
				development_growth_factor = -0.3
				maa_damage_mult = 0.1
				men_at_arms_title_cap = 1
				men_at_arms_title_limit = 1
				levy_reinforcement_rate = 0.2
				monthly_merit_per_title_maa_value = 0.032
				domain_tax_mult = -0.2

				monthly_treasury_from_military_budget_base = 1.5
			}

			flag = admin_ai_is_warlike
			flag = celestial_province_protectorate
			flag = celestial_military_appointment
			flag = obligation_high_levies
			appointment_trait_flag = military_province
		}
	}
}

celestial_ministry_obligations = {
	display_mode = tree
	defaults_to_highest_valid_level = yes
	is_shown = {
		scope:subject = {
			OR = {
				has_title = title:e_minister_chancellor
				has_title = title:e_minister_censor
				has_title = title:e_minister_grand_marshal
				has_title = title:e_minister_of_personnel
				has_title = title:e_minister_of_revenue
				has_title = title:e_minister_of_rites
				has_title = title:e_minister_of_war
				has_title = title:e_minister_of_justice
				has_title = title:e_minister_of_works
			}
		}
	}
	can_be_changed = {
		scope:subject = {
			trigger_if = {
				limit = {
					has_title = title:e_minister_grand_marshal
				}
				NOT = { vassal_contract_has_flag = celestial_grand_marshal_obligation }
			}
			trigger_else = {
				always = no
			}
		}
	}
	obligation_levels = {
		celestial_minister_none = {
			position = { 0 0 }
			icon = "gfx/interface/icons/celestial_administration_types/icon_standard_administration.dds"
			gui_tags = { civilian }
			default = yes

			ai_liege_desire = {
				value = 1
			}
			ai_subject_desire = 0

			score = 1
			color = { 0.7 0.7 0.7 1.0 }

			subject_modifier = {
			}

			flag = celestial_minister_obligation
		}
		celestial_minister_civil = {
			position = { 1 0 }
			icon = "gfx/interface/icons/celestial_administration_types/icon_standard_administration.dds"
			gui_tags = { civilian }
			parent = celestial_minister_none

			ai_liege_desire = {
				value = 2
			}
			ai_subject_desire = 0
			
			is_valid = {
				scope:subject = {
					tgp_is_any_minister = yes
					NOT = { has_title = title:e_minister_grand_marshal }
				}
			}

			score = 2
			color = { 0.7 0.7 0.7 1.0 }

			enable_title_maa = no

			subject_modifier = {
				monthly_merit = 20
				monthly_treasury_from_ministry_budget_base = 1
			}

			flag = celestial_minister_obligation
			appointment_trait_flag = civilian_province
		}
		celestial_minister_military = {
			position = { 2 0 }
			icon = "gfx/interface/icons/celestial_administration_types/icon_military_administration.dds"
			gui_tags = { military }
			parent = celestial_minister_none
		
			ai_liege_desire = {
				value = 3
			}
			ai_subject_desire = 0
			
			is_valid = {
				scope:subject = {
					has_title = title:e_minister_grand_marshal
				}
			}
		
			score = 3
			color = { 0.7 0.7 0.7 1.0 }
		
			enable_title_maa = yes
		
			subject_modifier = {
				monthly_merit = 20
				men_at_arms_recruitment_cost = -0.5
				men_at_arms_maintenance = -0.5
				monthly_treasury_from_military_budget_base = 2.5
				monthly_treasury_from_ministry_budget_base = 1
			}
		
			flag = celestial_minister_obligation
			flag = celestial_grand_marshal_obligation
			appointment_trait_flag = military_province
		}
	}
}

celestial_treasury = {
	display_mode = tree
	is_shown = {
		scope:subject.primary_title = {
			tier >= tier_duchy
			NOT = {
				has_title_law = celestial_ministry_appointment_succession_law
			}
		}
	}
	obligation_levels = {
		celestial_treasury_very_low = {
			position = { 0 0 }

			subject_modifier = {
				monthly_treasury_from_liege_mult = -0.10
			}

			ai_liege_desire = 5
			ai_subject_desire = 1

			subject_opinion = -25

			score = -2
		}
		celestial_treasury_low = {
			parent = celestial_treasury_very_low
			position = { 1 0 }

			subject_modifier = {
				monthly_treasury_from_liege_mult = -0.05
			}

			ai_liege_desire = 4
			ai_subject_desire = 2

			subject_opinion = -15

			score = -1
		}
		celestial_treasury_medium = {
			parent = celestial_treasury_low
			default = yes
			position = { 2 0 }

			ai_liege_desire = 3
			ai_subject_desire = 3

			score = 0
		}
		celestial_treasury_high = {
			parent = celestial_treasury_medium
			position = { 3 0 }

			subject_modifier = {
				monthly_treasury_from_liege_mult = 0.05
			}

			ai_liege_desire = 2
			ai_subject_desire = 4

			subject_opinion = 5

			score = 1
		}
		celestial_treasury_very_high = {
			parent = celestial_treasury_high
			position = { 4 0 }

			subject_modifier = {
				monthly_treasury_from_liege_mult = 0.10
			}

			ai_liege_desire = 1
			ai_subject_desire = 5

			subject_opinion = 15

			score = 2
		}
	}
}

celestial_ministry_budget = {
	display_mode = tree

	is_shown = {
		scope:subject.primary_title = {
			has_title_law = celestial_ministry_appointment_succession_law
		}
	}

	obligation_levels = {
		celestial_ministry_budget_low = {
			position = { 0 0 }

			is_valid = {
				scope:subject.primary_title = {
					has_title_law = celestial_ministry_appointment_succession_law 
				}
			}

			subject_modifier = {
				monthly_treasury_from_ministry_budget_base = -0.5
			}

			ai_liege_desire = 0
			ai_subject_desire = 0

			subject_opinion = -15

			score = -1

		}
		celestial_ministry_budget_medium = {
			parent = celestial_ministry_budget_low
			position = { 1 0 }

			default = yes

			ai_liege_desire = 0
			ai_subject_desire = 0

			subject_modifier = {

			}

			score = 0
		}
		celestial_ministry_budget_high = {
			parent = celestial_ministry_budget_medium
			position = { 2 0 }

			is_valid = {
				scope:subject.primary_title = {
					has_title_law = celestial_ministry_appointment_succession_law
				}
			}

			subject_modifier = {
				monthly_treasury_from_ministry_budget_base = 0.5
			}

			ai_liege_desire = 0
			ai_subject_desire = 0

			subject_opinion = 0

			score = 1
		}
	}
}

celestial_salary = {
	display_mode = tree
	is_shown = {
		scope:subject.primary_title.tier >= tier_duchy
	}
	obligation_levels = {
		celestial_salary_very_low = {
			position = { 0 0 }

			subject_modifier = {
				monthly_treasury_from_salary_budget_mult = -0.5
			}

			ai_liege_desire = 5
			ai_subject_desire = 1

			subject_opinion = -25

			score = -2
		}
		celestial_salary_low = {
			parent = celestial_salary_very_low
			position = { 1 0 }

			subject_modifier = {
				monthly_treasury_from_salary_budget_mult = -0.25
			}

			ai_liege_desire = 4
			ai_subject_desire = 2

			subject_opinion = -15

			score = -1
		}
		celestial_salary_medium = {
			parent = celestial_salary_low
			default = yes
			position = { 2 0 }

			subject_modifier = {
			}

			ai_liege_desire = 3
			ai_subject_desire = 3

			score = 0
		}
		celestial_salary_high = {
			parent = celestial_salary_medium
			position = { 3 0 }

			subject_modifier = {
				monthly_treasury_from_salary_budget_mult = 0.25
			}

			ai_liege_desire = 2
			ai_subject_desire = 4

			subject_opinion = 5

			score = 1
		}
		celestial_salary_very_high = {
			parent = celestial_salary_high
			position = { 4 0 }

			subject_modifier = {
				monthly_treasury_from_salary_budget_mult = 0.5
			}

			ai_liege_desire = 1
			ai_subject_desire = 5

			subject_opinion = 10

			score = 2
		}
	}
}

celestial_salary_rank = {
	display_mode = hidden

	defaults_to_highest_valid_level = yes

	can_be_changed = {
		always = no
	}

	obligation_levels = {
		celestial_salary_rank_none = {
			position = { 0 0 }
			default = yes

			ai_liege_desire = 0
			ai_subject_desire = 0
		}

		celestial_salary_rank_county = {
			position = { 1 0 }

			parent = celestial_salary_rank_none
			is_valid = {
				scope:subject = {
					highest_held_title_tier = tier_county
					primary_title = {
						is_noble_family_title = no
					}
				}
			}

			ai_liege_desire = 2
			ai_subject_desire = 2

			subject_modifier = {
				monthly_treasury_from_salary_budget_base = 0.3

				monthly_treasury_from_military_budget_base = -0.6 # (only relevant if Military Gov)
				men_at_arms_title_cap = -1
			}
		}

		celestial_salary_rank_duchy = {
			position = { 2 0 }

			parent = celestial_salary_rank_county
			is_valid = {
				scope:subject = {
					highest_held_title_tier = tier_duchy
				}
			}

			ai_liege_desire = 3
			ai_subject_desire = 3

			subject_modifier = {
				monthly_treasury_from_salary_budget_base = 0.75

				monthly_treasury_from_military_budget_base = -0.3 # (only relevant if Military Gov)
				men_at_arms_title_cap = -1
			}
		}
		celestial_salary_rank_kingdom = {
			position = { 3 0 }

			parent = celestial_salary_rank_duchy
			is_valid = {
				scope:subject = {
					highest_held_title_tier = tier_kingdom
				}
			}

			ai_liege_desire = 4
			ai_subject_desire = 4

			subject_modifier = {
				monthly_treasury_from_salary_budget_base = 1.0
			}
		}
		celestial_salary_rank_empire = {
			position = { 4 0 }

			parent = celestial_salary_rank_kingdom

			ai_liege_desire = 5
			ai_subject_desire = 5

			is_valid = {
				scope:subject = {
					highest_held_title_tier = tier_empire
					is_landless_ruler = no
				}
			}
			subject_modifier = {
				monthly_treasury_from_salary_budget_base = 2.0
			}
		}
		celestial_salary_rank_minister = {
			position = { 0 2 }

			parent = celestial_salary_rank_kingdom

			ai_liege_desire = 6
			ai_subject_desire = 6

			is_valid = {
				scope:subject = {
					highest_held_title_tier = tier_empire
					is_landless_ruler = yes
				}
			}
			subject_modifier = {
				monthly_treasury_from_salary_budget_base = 3
			}
		}
	}
}

celestial_tribute_gold = {
	display_mode = tree
	icon = gold_icon
	obligation_levels = {
		celestial_tributary_tax_none = {
			position = { 0 0 }

			tax = 0
			subject_opinion = 5

			subject_modifier = {
				monthly_legitimacy_add = 0.1
			}

			ai_liege_desire = 1
			ai_subject_desire = 4
			score = 2
		}
		celestial_tributary_tax_low = {
			default = yes
			parent = celestial_tributary_tax_none
			position = { 1 0 }

			tax = low_celestial_tributary_tax
			subject_opinion = -5

			subject_modifier = {
				monthly_legitimacy_add = 0.2
			}

			ai_liege_desire = 2
			ai_subject_desire = 3
			score = 1
		}
		celestial_tributary_tax_normal = {
			parent = celestial_tributary_tax_low
			position = { 2 0 }

			tax = normal_celestial_tributary_tax
			subject_opinion = -10

			subject_modifier = {
				monthly_legitimacy_add = 0.3
			}

			ai_liege_desire = 3
			ai_subject_desire = 2
			score = 0
		}
		celestial_tributary_tax_high = {
			parent = celestial_tributary_tax_normal
			position = { 3 0 }

			tax = high_celestial_tributary_tax
			subject_opinion = -25

			subject_modifier = {
				monthly_legitimacy_add = 0.5
			}

			ai_liege_desire = 4
			ai_subject_desire = 1
			score = -1
		}
	}
}

celestial_tribute_prestige = {
	display_mode = tree
	icon = prestige_icon
	obligation_levels = {
		celestial_prestige_transfer_none = {
			position = { 0 1 }

			prestige = 0
			subject_opinion = 5

			subject_modifier = {
				monthly_legitimacy_add = 0.1
			}

			ai_liege_desire = 1
			ai_subject_desire = 4
			score = 2
		}
		celestial_prestige_transfer_low = {
			default = yes
			parent = celestial_prestige_transfer_none
			position = { 1 1 }

			prestige = low_celestial_prestige_transfer
			subject_opinion = -5

			subject_modifier = {
				monthly_legitimacy_add = 0.2
			}

			ai_liege_desire = 2
			ai_subject_desire = 3
			score = 1
		}
		celestial_prestige_transfer_normal = {
			default = yes
			parent = celestial_prestige_transfer_low
			position = { 2 1 }

			prestige = normal_celestial_prestige_transfer
			subject_opinion = -10

			subject_modifier = {
				monthly_legitimacy_add = 0.3
			}

			ai_liege_desire = 3
			ai_subject_desire = 2
			score = 0
		}
		celestial_prestige_transfer_high = {
			parent = celestial_prestige_transfer_normal
			position = { 3 1 }

			prestige = high_celestial_prestige_transfer
			subject_opinion = -25

			subject_modifier = {
				monthly_legitimacy_add = 0.5
			}

			ai_liege_desire = 4
			ai_subject_desire = 1
			score = -1
		}
	}
}

celestial_tributary_investiture_privilege_trade = {
	display_mode = checkbox
	is_shown = {
		scope:liege = { has_title = title:h_china }
	}
	obligation_levels = {
		investiture_trade_no = {
			default = yes
			position = { 0 1 }
			ai_liege_desire = 0
			ai_subject_desire = 0
			score = 0
		}
		investiture_trade_yes = {
			default = no
			parent = investiture_trade_no
			position = { 0 1 }
			is_valid = {
				custom_tooltip = {
					text = "NO_SEAL_OF_INVESTITURE"
					scope:subject = {
						any_character_artifact = {
							OR = {
								artifact_type = seal_of_investiture
								artifact_type = seal_of_investiture_court
							}
						}
					}
				}
			}
			ai_liege_desire = 0
			ai_subject_desire = 0
			score = 0

			flag = celestial_investiture_trade
		}
	}
}

celestial_tributary_investiture_privilege_marriage = {
	display_mode = checkbox
	is_shown = {
		scope:liege = { has_title = title:h_china }
	}
	obligation_levels = {
		investiture_marriage_no = {
			default = yes
			position = { 0 1 }
			ai_liege_desire = 0
			ai_subject_desire = 0
			score = 0
		}
		investiture_marriage_yes = {
			default = no
			parent = investiture_marriage_no
			position = { 0 1 }
			is_valid = {
				custom_tooltip = {
					text = "NO_SEAL_OF_INVESTITURE"
					scope:subject = {
						any_character_artifact = {
							OR = {
								artifact_type = seal_of_investiture
								artifact_type = seal_of_investiture_court
							}
						}
					}
				}
			}
			ai_liege_desire = 0
			ai_subject_desire = 0
			score = 0

			flag = celestial_investiture_marriage
		}
	}
}

celestial_tributary_investiture_privilege_politics = {
	display_mode = checkbox
	is_shown = {
		scope:liege = { has_title = title:h_china }
	}
	obligation_levels = {
		investiture_politics_no = {
			default = yes
			position = { 0 1 }
			ai_liege_desire = 0
			ai_subject_desire = 0
			score = 0
		}
		investiture_politics_yes = {
			default = no
			parent = investiture_politics_no
			position = { 0 1 }
			is_valid = {
				custom_tooltip = {
					text = "NO_SEAL_OF_INVESTITURE"
					scope:subject = {
						any_character_artifact = {
							OR = {
								artifact_type = seal_of_investiture
								artifact_type = seal_of_investiture_court
							}
						}
					}
				}
			}
			ai_liege_desire = 0
			ai_subject_desire = 0
			score = 0

			flag = celestial_investiture_politics
		}
	}
}

hegemonic_tribute_gold = {
	display_mode = tree
	icon = gold_icon
	obligation_levels = {
		hegemonic_tributary_tax_none = {
			position = { 0 0 }

			tax = 0
			subject_opinion = 5

			subject_modifier = {
				monthly_legitimacy_add = 0.1
			}

			ai_liege_desire = 1
			ai_subject_desire = 4
			score = -2
		}
		hegemonic_tributary_tax_low = {
			default = yes
			parent = hegemonic_tributary_tax_none
			position = { 1 0 }

			tax = low_hegemonic_tributary_tax
			subject_opinion = -5

			subject_modifier = {
				monthly_legitimacy_add = 0.2
			}

			ai_liege_desire = 2
			ai_subject_desire = 3
			score = 1
		}
		hegemonic_tributary_tax_normal = {
			parent = hegemonic_tributary_tax_low
			position = { 2 0 }

			tax = normal_hegemonic_tributary_tax
			subject_opinion = -10

			subject_modifier = {
				monthly_legitimacy_add = 0.3
			}

			ai_liege_desire = 3
			ai_subject_desire = 2
			score = 0
		}
		hegemonic_tributary_tax_high = {
			parent = hegemonic_tributary_tax_normal
			position = { 3 0 }

			tax = high_hegemonic_tributary_tax
			subject_opinion = -25

			subject_modifier = {
				monthly_legitimacy_add = 0.5
			}

			ai_liege_desire = 4
			ai_subject_desire = 1
			score = -1
		}
	}
}

hegemonic_tribute_prestige = {
	display_mode = tree
	icon = prestige_icon
	obligation_levels = {
		hegemonic_prestige_transfer_none = {
			position = { 0 1 }

			prestige = 0
			subject_opinion = 5

			subject_modifier = {
				monthly_legitimacy_add = 0.1
			}

			ai_liege_desire = 1
			ai_subject_desire = 4
			score = 2
		}
		hegemonic_prestige_transfer_low = {
			default = yes
			parent = hegemonic_prestige_transfer_none
			position = { 1 1 }

			prestige = low_hegemonic_prestige_transfer
			subject_opinion = -5

			subject_modifier = {
				monthly_legitimacy_add = 0.2
			}

			ai_liege_desire = 2
			ai_subject_desire = 3
			score = 1
		}
		hegemonic_prestige_transfer_normal = {
			default = yes
			parent = hegemonic_prestige_transfer_low
			position = { 2 1 }

			prestige = normal_hegemonic_prestige_transfer
			subject_opinion = -10

			subject_modifier = {
				monthly_legitimacy_add = 0.3
			}

			ai_liege_desire = 3
			ai_subject_desire = 2
			score = 0
		}
		hegemonic_prestige_transfer_high = {
			parent = hegemonic_prestige_transfer_normal
			position = { 3 1 }

			prestige = high_hegemonic_prestige_transfer
			subject_opinion = -25

			subject_modifier = {
				monthly_legitimacy_add = 0.5
			}

			ai_liege_desire = 4
			ai_subject_desire = 1
			score = -1
		}
	}
}
