# Demesne type (de facto) laws (set for the PRIMARY title in a demesne but affects the whole demesne)

law_groups = {
	centralization = {
		law_type = realm
	}
	tribal_organization = {
		law_type = realm
		allowed_for_councillors = yes
	}
	vice_royalty = {
		law_type = realm
	}
	administration = {
		law_type = realm
	}
	feudal_contract = {
		law_type = realm
	}
	feudal_tax = {
		law_type = realm
	}
	iqta_contract = {
		law_type = realm
	}
	iqta_tax = {
		law_type = realm
	}
	city_contract = {
		law_type = realm
	}
	city_tax = {
		law_type = realm
	}
	temple_contract = {
		law_type = realm
	}
	temple_tax = {
		law_type = realm
	}
	tribal_contract = {
		law_type = realm
	}
	tribal_tax = {
		law_type = realm
	}
}

laws = {
	# CENTRALIZATION LAWS
	##############################

	centralization_0 = {
		group = centralization
		default = yes

		vassal_limit = 10

		potential = {
			always = no # Integrated into Crown Authority

			holder_scope = {
				higher_real_tier_than = COUNT
				is_nomadic = no
			}
		}

		allow = {
			show_only_failed_conditions = yes

			trigger_if = {
				limit = {
					OR = {
						has_law = centralization_1
						has_law = centralization_2
						has_law = centralization_3
						has_law = centralization_4
					}
				}

				show_only_failed_conditions = yes

				has_law = centralization_1
			}
		}

		pass_effect = {
			# log = "centralization_0 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "centralization_0 ([This.GetFullBaseName])"
			revoke_law = centralization_1
			revoke_law = centralization_2
			revoke_law = centralization_3
			revoke_law = centralization_4
		}

		ai_will_do = {
			factor = 0.8

			trigger = {
				trigger_if = { # Need to increase vassal limit
					limit = { has_law = centralization_1 }

					over_vassal_limit > 0
					over_max_demesne_size <= 0
				}
				trigger_else = {
					NOR = {
						has_law = centralization_0
						has_law = centralization_1
						has_law = centralization_2
						has_law = centralization_3
						has_law = centralization_4
					}
				}
			}
		}
	}

	centralization_1 = {
		group = centralization

		vassal_limit = 5
		demesne_size = 1

		potential = {
			is_law_potential = centralization_0
		}

		allow = {
			show_only_failed_conditions = yes

			OR = {
				has_law = centralization_0
				has_law = centralization_2
			}

			trigger_if = {
				limit = { holder_scope = { is_tribal = yes } }

				show_only_failed_conditions = yes

				OR = {
					has_law = tribal_organization_2
					has_law = tribal_organization_3
					has_law = tribal_organization_4
				}
			}
			trigger_else_if = {
				limit = { is_crown_law_title = yes }

				show_only_failed_conditions = yes

				OR = {
					has_law = crown_authority_1
					has_law = crown_authority_2
					has_law = crown_authority_3
					has_law = crown_authority_4
				}
			}
			trigger_else_if = {
				limit = {
					has_crown_law_title = yes
					crownlaw_title = { holder_scope = { has_landed_title = ROOT } }
				}

				show_only_failed_conditions = yes

				crownlaw_title = {
					OR = {
						has_law = crown_authority_1
						has_law = crown_authority_2
						has_law = crown_authority_3
						has_law = crown_authority_4
					}
				}
			}

			holder_scope = {
				show_scope_change = no
				NOT = { trait = uncrowned }
			}
		}

		pass_effect = {
			# log = "centralization_1 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "centralization_1 ([This.GetFullBaseName])"
			revoke_law = centralization_0
			revoke_law = centralization_2
			revoke_law = centralization_3
			revoke_law = centralization_4
		}

		ai_will_do = {
			factor = 0.9

			trigger = {
				trigger_if = { # Need to increase vassal limit
					limit = { has_law = centralization_2 }

					over_vassal_limit > 0
					over_max_demesne_size <= 0
				}
				trigger_else = { # Vassal limit left over
					over_vassal_limit <= 5
					over_max_demesne_size > 0
				}
			}
		}
	}

	centralization_2 = {
		group = centralization

		vassal_limit = 0
		demesne_size = 2

		potential = {
			is_law_potential = centralization_0
		}

		allow = {
			show_only_failed_conditions = yes

			OR = {
				has_law = centralization_1
				has_law = centralization_3
			}

			trigger_if = {
				limit = { holder_scope = { is_tribal = yes } }

				show_only_failed_conditions = yes

				OR = {
					has_law = tribal_organization_2
					has_law = tribal_organization_3
					has_law = tribal_organization_4
				}
			}
			trigger_else_if = {
				limit = { is_crown_law_title = yes }

				show_only_failed_conditions = yes

				OR = {
					has_law = crown_authority_1
					has_law = crown_authority_2
					has_law = crown_authority_3
					has_law = crown_authority_4
				}
			}
			trigger_else_if = {
				limit = {
					has_crown_law_title = yes
					crownlaw_title = { holder_scope = { has_landed_title = ROOT } }
				}

				show_only_failed_conditions = yes

				crownlaw_title = {
					OR = {
						has_law = crown_authority_1
						has_law = crown_authority_2
						has_law = crown_authority_3
						has_law = crown_authority_4
					}
				}
			}

			holder_scope = {
				show_scope_change = no
				NOT = { trait = uncrowned }
			}
		}

		pass_effect = {
			# log = "centralization_2 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "centralization_2 ([This.GetFullBaseName])"
			revoke_law = centralization_0
			revoke_law = centralization_1
			revoke_law = centralization_3
			revoke_law = centralization_4
		}

		ai_will_do = {
			factor = 1

			trigger = {
				trigger_if = { # Need to increase vassal limit
					limit = { has_law = centralization_3 }

					over_vassal_limit > 0
					over_max_demesne_size <= 0
				}
				trigger_else = { # Vassal limit left over
					over_vassal_limit <= 5
					over_max_demesne_size > 0
				}
			}
		}
	}

	centralization_3 = {
		group = centralization

		vassal_limit = -5
		demesne_size = 3

		potential = {
			is_law_potential = centralization_0
		}

		allow = {
			show_only_failed_conditions = yes

			OR = {
				has_law = centralization_2
				has_law = centralization_4
			}

			trigger_if = {
				limit = { holder_scope = { is_tribal = yes } }

				show_only_failed_conditions = yes

				OR = {
					has_law = tribal_organization_2
					has_law = tribal_organization_3
					has_law = tribal_organization_4
				}
			}
			trigger_else_if = {
				limit = { is_crown_law_title = yes }

				show_only_failed_conditions = yes

				OR = {
					has_law = crown_authority_1
					has_law = crown_authority_2
					has_law = crown_authority_3
					has_law = crown_authority_4
				}
			}
			trigger_else_if = {
				limit = {
					has_crown_law_title = yes
					crownlaw_title = { holder_scope = { has_landed_title = ROOT } }
				}

				show_only_failed_conditions = yes

				crownlaw_title = {
					OR = {
						has_law = crown_authority_1
						has_law = crown_authority_2
						has_law = crown_authority_3
						has_law = crown_authority_4
					}
				}
			}

			holder_scope = {
				show_scope_change = no
				NOT = { trait = uncrowned }
			}
		}

		pass_effect = {
			# log = "centralization_3 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "centralization_3 ([This.GetFullBaseName])"
			revoke_law = centralization_0
			revoke_law = centralization_1
			revoke_law = centralization_2
			revoke_law = centralization_4
		}

		ai_will_do = {
			factor = 0.9

			trigger = {
				trigger_if = { # Need to increase vassal limit
					limit = { has_law = centralization_4 }

					over_vassal_limit > 0
					over_max_demesne_size <= 0
				}
				trigger_else = { # Vassal limit left over
					over_vassal_limit <= 5
					over_max_demesne_size > 0
				}
			}
		}
	}

	centralization_4 = {
		group = centralization

		vassal_limit = -10
		demesne_size = 4

		potential = {
			is_law_potential = centralization_0
		}

		allow = {
			show_only_failed_conditions = yes

			has_law = centralization_3

			trigger_if = {
				limit = { holder_scope = { is_tribal = yes } }

				show_only_failed_conditions = yes

				OR = {
					has_law = tribal_organization_2
					has_law = tribal_organization_3
					has_law = tribal_organization_4
				}
			}
			trigger_else_if = {
				limit = { is_crown_law_title = yes }

				show_only_failed_conditions = yes

				OR = {
					has_law = crown_authority_1
					has_law = crown_authority_2
					has_law = crown_authority_3
					has_law = crown_authority_4
				}
			}
			trigger_else_if = {
				limit = {
					has_crown_law_title = yes
					crownlaw_title = { holder_scope = { has_landed_title = ROOT } }
				}

				show_only_failed_conditions = yes

				crownlaw_title = {
					OR = {
						has_law = crown_authority_1
						has_law = crown_authority_2
						has_law = crown_authority_3
						has_law = crown_authority_4
					}
				}
			}

			holder_scope = {
				show_scope_change = no
				NOT = { trait = uncrowned }
			}
		}

		pass_effect = {
			# log = "centralization_4 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "centralization_4 ([This.GetFullBaseName])"
			revoke_law = centralization_0
			revoke_law = centralization_1
			revoke_law = centralization_2
			revoke_law = centralization_3
		}

		ai_will_do = {
			factor = 0.8

			trigger = {
				trigger_if = { # Vassal limit left over
					limit = { has_law = centralization_3 }

					over_vassal_limit <= 5
					over_max_demesne_size > 0
				}
			}
		}
	}


	# TRIBAL ORGANIZATION
	##############################

	tribal_organization_0 = {
		group = tribal_organization
		default = yes

		unreformed_tribal_opinion = 5

		potential = {
			holder_scope = {
				is_tribal = yes
			}
		}

		allow = {
			show_only_failed_conditions = yes

			higher_real_tier_than = COUNT

			trigger_if = {
				limit = {
					OR = {
						has_law = tribal_organization_1
						has_law = tribal_organization_2
						has_law = tribal_organization_3
						has_law = tribal_organization_4
					}
				}

				has_law = tribal_organization_1
			}
		}

		pass_effect = {
			# log = "tribal_organization_0 pass ([This.GetFullBaseName])"
			decreased_tribal_organization_effect = yes
		}

		effect = {
			# log = "tribal_organization_0 ([This.GetFullBaseName])"

			if = {
				limit = { has_dlc = "Conclave" }

				hidden_effect = {
					revoke_law = law_voting_power_1
					revoke_law = war_voting_power_1
					disable_council_voting_on_issue = laws
					disable_council_voting_on_issue = enforce_peace
					disable_council_voting_on_issue = declare_war_interaction
				}
			}
			else = {
				set_allow_title_revokation = no
				set_allow_free_infidel_revokation = no
				set_tribal_vassal_levy_control = no
				set_tribal_vassal_tax_income = no
			}

			trigger_switch = {
				on_trigger = has_law

				tribal_organization_1 = {
					custom_tooltip = { text = disables_centralization_1 }
				}
				tribal_organization_2 = {
					custom_tooltip = { text = disables_centralization_2 }
				}
				tribal_organization_3 = {
					custom_tooltip = { text = disables_centralization_3 }
					custom_tooltip = { text = disables_tribal_levy_laws }
					custom_tooltip = { text = disables_tribal_tax_laws }
				}
				tribal_organization_4 = {
					custom_tooltip = { text = disables_centralization_4 }
					custom_tooltip = { text = disallows_change_government }
				}
			}

			if = {
				limit = {
					has_game_rule = {
						name = vassal_obligation
						value = vanilla
					}
				}

				revoke_law = tribal_contract_0
				revoke_law = tribal_contract_1
				revoke_law = tribal_contract_2
				revoke_law = tribal_contract_3
				revoke_law = tribal_tax_0
				revoke_law = tribal_tax_1
				revoke_law = tribal_tax_2
				revoke_law = tribal_tax_3
			}

			revoke_law = tribal_organization_1
			revoke_law = tribal_organization_2
			revoke_law = tribal_organization_3
			revoke_law = tribal_organization_4
		}

		ai_will_do = {
			factor = 1

			trigger = {
				trigger_if = {
					limit = { has_law = tribal_organization_1 }

					# Try to increase vassal opinion, if necessary
					holder_scope = {
						any_vassal = {
							is_tribal = yes
							dislike_tribal_organization = yes

							opinion = {
								who = liege
								value < 0
							}
						}
					}
				}
			}

			mult_modifier = {
				factor = 0.5

				has_law = tribal_organization_1
				holder_scope = { dislike_tribal_organization = no }
			}
		}
	}

	tribal_organization_1 = {
		group = tribal_organization

		unreformed_tribal_opinion = -5
		vassal_limit = 2

		potential = {
			is_law_potential = tribal_organization_0
		}

		allow = {
			show_only_failed_conditions = yes

			higher_real_tier_than = COUNT

			OR = {
				has_law = tribal_organization_0
				has_law = tribal_organization_2
			}

			holder_scope = {
				show_scope_change = no

				trigger_if = {
					limit = {
						NOR = {
							has_law = tribal_organization_2
							has_law = tribal_organization_3
							has_law = tribal_organization_4
						}
					}

					show_only_failed_conditions = yes

					plus_law_prestige_trigger_1 = yes
				}
			}
		}

		pass_effect = {
			# log = "tribal_organization_1 pass ([This.GetFullBaseName])"

			if = {
				limit = { has_law = tribal_organization_0 }
				increased_tribal_organization_effect = yes
			}
			else = {
				decreased_tribal_organization_effect = yes
			}

			if = {
				limit = {
					NOR = {
						has_law = tribal_organization_2
						has_law = tribal_organization_3
						has_law = tribal_organization_4
					}
				}

				plus_law_change_prestige_effect_1 = yes
			}
		}

		effect = {
			# log = "tribal_organization_1 ([This.GetFullBaseName])"

			tooltip = { # pass_effect doesn't generate tooltips
				if = {
					limit = {
						NOR = {
							has_law = tribal_organization_2
							has_law = tribal_organization_3
							has_law = tribal_organization_4
						}
					}

					plus_law_change_prestige_effect_1 = yes
				}
			}

			if = {
				limit = { has_dlc = "Conclave" }

				add_law = law_voting_power_1
				add_law = war_voting_power_1

				hidden_effect = {
					enable_council_voting_on_issue = laws
					enable_council_voting_on_issue = declare_war_interaction
					enable_council_voting_on_issue = enforce_peace
				}
			}
			else = {
				set_allow_title_revokation = yes
				set_allow_free_infidel_revokation = no
				set_tribal_vassal_levy_control = no
				set_tribal_vassal_tax_income = no
			}

			trigger_switch = {
				on_trigger = has_law

				tribal_organization_0 = {
					custom_tooltip = { text = enables_centralization_1 }
				}
				tribal_organization_2 = {
					custom_tooltip = { text = disables_centralization_2 }
				}
				tribal_organization_3 = {
					custom_tooltip = { text = disables_centralization_3 }
					custom_tooltip = { text = disables_tribal_levy_laws }
					custom_tooltip = { text = disables_tribal_tax_laws }
				}
				tribal_organization_4 = {
					custom_tooltip = { text = disables_centralization_4 }
					custom_tooltip = { text = disallows_change_government }
				}
			}

			if = {
				limit = {
					has_game_rule = {
						name = vassal_obligation
						value = vanilla
					}
				}

				revoke_law = tribal_contract_0
				revoke_law = tribal_contract_1
				revoke_law = tribal_contract_2
				revoke_law = tribal_contract_3
				revoke_law = tribal_tax_0
				revoke_law = tribal_tax_1
				revoke_law = tribal_tax_2
				revoke_law = tribal_tax_3
			}

			revoke_law = tribal_organization_0
			revoke_law = tribal_organization_2
			revoke_law = tribal_organization_3
			revoke_law = tribal_organization_4
		}

		ai_will_do = {
			factor = 1

			trigger = {
				trigger_if = {
					limit = { has_law = tribal_organization_2 }

					# Try to increase vassal opinion, if necessary
					holder_scope = {
						any_vassal = {
							is_tribal = yes
							dislike_tribal_organization = yes

							opinion = {
								who = liege
								value < 0
							}
						}
					}
				}
			}

			mult_modifier = {
				factor = 0.5

				has_law = tribal_organization_0

				holder_scope = {
					any_vassal = {
						is_tribal = yes
						dislike_tribal_organization = yes

						opinion = {
							who = liege
							value < 10
						}
					}
				}
			}

			mult_modifier = {
				factor = 2

				has_law = tribal_organization_0
				holder_scope = { dislike_tribal_organization = no }
			}

			mult_modifier = {
				factor = 0.5

				has_law = tribal_organization_2
				holder_scope = { dislike_tribal_organization = no }
			}
		}
	}

	tribal_organization_2 = {
		group = tribal_organization

		unreformed_tribal_opinion = -10
		vassal_limit = 4

		potential = {
			is_law_potential = tribal_organization_0
		}

		allow = {
			show_only_failed_conditions = yes

			higher_real_tier_than = COUNT

			OR = {
				has_law = tribal_organization_1
				has_law = tribal_organization_3
			}

			holder_scope = {
				show_scope_change = no

				trigger_if = {
					limit = {
						NOR = {
							has_law = tribal_organization_3
							has_law = tribal_organization_4
						}
					}

					show_only_failed_conditions = yes

					plus_law_prestige_trigger_2 = yes
				}
			}
		}

		pass_effect = {
			# log = "tribal_organization_2 pass ([This.GetFullBaseName])"

			if = {
				limit = { has_law = tribal_organization_1 }
				increased_tribal_organization_effect = yes
			}
			else = {
				decreased_tribal_organization_effect = yes
			}

			if = {
				limit = {
					NOR = {
						has_law = tribal_organization_3
						has_law = tribal_organization_4
					}
				}

				plus_law_change_prestige_effect_2 = yes
			}
		}

		effect = {
			# log = "tribal_organization_2 ([This.GetFullBaseName])"

			tooltip = { # pass_effect doesn't generate tooltips
				if = {
					limit = {
						NOR = {
							has_law = tribal_organization_3
							has_law = tribal_organization_4
						}
					}

					plus_law_change_prestige_effect_2 = yes
				}
			}

			if = {
				limit = { has_dlc = "Conclave" }

				add_law = grant_title_voting_power_1
				add_law = revoke_title_voting_power_1

				hidden_effect = {
					enable_council_voting_on_issue = grant_landed_title_interaction
					enable_council_voting_on_issue = revoke_title_interaction
				}
			}
			else = {
				set_allow_title_revokation = yes
				set_allow_free_infidel_revokation = yes
				set_tribal_vassal_levy_control = no
				set_tribal_vassal_tax_income = no
			}

			trigger_switch = {
				on_trigger = has_law

				tribal_organization_0 = {
					custom_tooltip = { text = enables_centralization_2 }
				}
				tribal_organization_1 = {
					custom_tooltip = { text = enables_centralization_2 }
				}
				tribal_organization_3 = {
					custom_tooltip = { text = disables_centralization_3 }
					custom_tooltip = { text = disables_tribal_levy_laws }
					custom_tooltip = { text = disables_tribal_tax_laws }
				}
				tribal_organization_4 = {
					custom_tooltip = { text = disables_centralization_4 }
					custom_tooltip = { text = disallows_change_government }
				}
			}

			if = {
				limit = {
					has_game_rule = {
						name = vassal_obligation
						value = vanilla
					}
				}

				revoke_law = tribal_contract_0
				revoke_law = tribal_contract_1
				revoke_law = tribal_contract_2
				revoke_law = tribal_contract_3
				revoke_law = tribal_tax_0
				revoke_law = tribal_tax_1
				revoke_law = tribal_tax_2
				revoke_law = tribal_tax_3
			}

			revoke_law = tribal_organization_0
			revoke_law = tribal_organization_1
			revoke_law = tribal_organization_3
			revoke_law = tribal_organization_4
		}

		ai_will_do = {
			factor = 1

			trigger = {
				trigger_if = {
					limit = { has_law = tribal_organization_3 }

					# Try to increase vassal opinion, if necessary
					holder_scope = {
						any_vassal = {
							is_tribal = yes
							dislike_tribal_organization = yes

							opinion = {
								who = liege
								value < 0
							}
						}
					}
				}
			}

			mult_modifier = {
				factor = 0.5

				has_law = tribal_organization_1

				holder_scope = {
					any_vassal = {
						is_tribal = yes
						dislike_tribal_organization = yes

						opinion = {
							who = liege
							value < 5
						}
					}
				}
			}

			mult_modifier = {
				factor = 2

				has_law = tribal_organization_1
				holder_scope = { dislike_tribal_organization = no }
			}

			mult_modifier = {
				factor = 0.5

				has_law = tribal_organization_3
				holder_scope = { dislike_tribal_organization = no }
			}
		}
	}

	tribal_organization_3 = {
		group = tribal_organization

		unreformed_tribal_opinion = -15
		vassal_limit = 6

		potential = {
			is_law_potential = tribal_organization_0
		}

		allow = {
			show_only_failed_conditions = yes

			higher_real_tier_than = COUNT

			OR = {
				has_law = tribal_organization_2
				has_law = tribal_organization_4
			}

			holder_scope = {
				show_scope_change = no

				trigger_if = {
					limit = { NOT = { has_law = tribal_organization_4 } }
					show_only_failed_conditions = yes
					plus_law_prestige_trigger_3 = yes
				}
			}
		}

		pass_effect = {
			# log = "tribal_organization_3 pass ([This.GetFullBaseName])"

			if = {
				limit = { has_law = tribal_organization_2 }
				increased_tribal_organization_effect = yes
			}
			else = {
				decreased_tribal_organization_effect = yes
			}

			if = {
				limit = { NOT = { has_law = tribal_organization_4 } }
				plus_law_change_prestige_effect_3 = yes
			}
		}

		effect = {
			# log = "tribal_organization_3 ([This.GetFullBaseName])"

			tooltip = { # pass_effect doesn't generate tooltips
				if = {
					limit = { NOT = { has_law = tribal_organization_4 } }
					plus_law_change_prestige_effect_3 = yes
				}
			}

			if = {
				limit = { has_dlc = "Conclave" }

				add_law = imprison_voting_power_1
				add_law = banish_voting_power_1
				add_law = execution_voting_power_1

				hidden_effect = {
					enable_council_voting_on_issue = imprison_character_interaction
					enable_council_voting_on_issue = exile_imprisoned_interaction
					enable_council_voting_on_issue = execute_imprisoned_interaction
				}
			}
			else = {
				set_allow_title_revokation = yes
				set_allow_free_infidel_revokation = yes
				set_tribal_vassal_levy_control = yes
				set_tribal_vassal_tax_income = yes
			}

			revoke_law = tribal_organization_0
			revoke_law = tribal_organization_1
			revoke_law = tribal_organization_2
			revoke_law = tribal_organization_4
		}

		ai_will_do = {
			factor = 1

			trigger = {
				trigger_if = {
					limit = { has_law = tribal_organization_4 }

					# Try to increase vassal opinion, if necessary
					holder_scope = {
						any_vassal = {
							is_tribal = yes
							dislike_tribal_organization = yes

							opinion = {
								who = liege
								value < 0
							}
						}
					}
				}
			}

			mult_modifier = {
				factor = 0.5

				has_law = tribal_organization_2

				holder_scope = {
					any_vassal = {
						is_tribal = yes
						dislike_tribal_organization = yes

						opinion = {
							who = liege
							value < 10
						}
					}
				}
			}

			mult_modifier = {
				factor = 2

				has_law = tribal_organization_2
				holder_scope = { dislike_tribal_organization = no }
			}

			mult_modifier = {
				factor = 0.5

				has_law = tribal_organization_4
				holder_scope = { dislike_tribal_organization = no }
			}
		}
	}

	tribal_organization_4 = {
		group = tribal_organization

		unreformed_tribal_opinion = -20
		vassal_limit = 8

		potential = {
			is_law_potential = tribal_organization_0
		}

		allow = {
			show_only_failed_conditions = yes

			higher_real_tier_than = COUNT
			has_law = tribal_organization_3

			holder_scope = {
				show_scope_change = no
				plus_law_prestige_trigger_4 = yes
			}
		}

		pass_effect = {
			# log = "tribal_organization_4 pass ([This.GetFullBaseName])"
			increased_tribal_organization_effect = yes
			plus_law_change_prestige_effect_4 = yes
		}

		effect = {
			# log = "tribal_organization_4 ([This.GetFullBaseName])"

			tooltip = { # pass_effect doesn't generate tooltips
				plus_law_change_prestige_effect_4 = yes
			}

			if = {
				limit = { has_dlc = "Conclave" }

				add_law = succession_voting_power_1
				add_law = tribal_focus_0
				add_law = tribal_obligations_0
			}
			else = {
				set_allow_title_revokation = yes
				set_allow_free_infidel_revokation = yes
				set_tribal_vassal_levy_control = yes
				set_tribal_vassal_tax_income = yes
			}

			custom_tooltip = {
				text = allows_change_government
			}

			revoke_law = tribal_organization_0
			revoke_law = tribal_organization_1
			revoke_law = tribal_organization_2
			revoke_law = tribal_organization_3
		}

		ai_will_do = {
			factor = 1

			mult_modifier = {
				factor = 0.5

				has_law = tribal_organization_3

				holder_scope = {
					any_vassal = {
						is_tribal = yes
						dislike_tribal_organization = yes

						opinion = {
							who = liege
							value < 10
						}
					}
				}
			}

			mult_modifier = {
				factor = 2

				has_law = tribal_organization_3
				holder_scope = { dislike_tribal_organization = no }
			}
		}
	}

	# VICE ROYALTY LAWS
	##############################

	vice_royalty_0 = {
		group = vice_royalty
		default = yes

		potential = {
			always = no # Plus uses event-driven viceroyalties instead
			has_dlc = "Charlemagne"
			real_tier = EMPEROR

			holder_scope = {
				is_feudal = yes
			}
		}

		allow = {
			show_only_failed_conditions = yes

			holder_scope = {
				show_scope_change = no
				NOT = { trait = uncrowned }
			}
		}

		pass_effect = {
			# log = "vice_royalty_0 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "vice_royalty_0 ([This.GetFullBaseName])"
			# set_allow_vice_royalties = no # Plus uses event-driven viceroyalties instead
			revoke_law = vice_royalty_1
			revoke_law = vice_royalty_2
		}

		ai_will_do = {
			factor = 0
		}
	}

	vice_royalty_1 = {
		group = vice_royalty

		vassal_limit = -5

		potential = {
			is_law_potential = vice_royalty_0
		}

		allow = {
			show_only_failed_conditions = yes

			OR = {
				has_law = crown_authority_3
				has_law = crown_authority_4
			}

			holder_scope = {
				show_scope_change = no

				NOT = { trait = uncrowned }

				trigger_if = {
					limit = { has_game_started = yes }
					plus_law_prestige_trigger_2 = yes
				}
			}
		}

		pass_effect = {
			# log = "vice_royalty_1 pass ([This.GetFullBaseName])"
			plus_law_change_prestige_effect_2 = yes
		}

		effect = {
			# log = "vice_royalty_1 ([This.GetFullBaseName])"

			tooltip = { # pass_effect doesn't generate tooltips
				plus_law_change_prestige_effect_2 = yes
			}

			set_allow_vice_royalties = KING
			revoke_law = vice_royalty_0
			revoke_law = vice_royalty_2
		}

		ai_will_do = {
			factor = 2

			trigger = {
				# Must have enough vassal limit left over
				has_law = vice_royalty_0
				over_vassal_limit <= -5
			}
		}
	}

	vice_royalty_2 = {
		group = vice_royalty

		vassal_limit = -10

		potential = {
			is_law_potential = vice_royalty_0
		}

		allow = {
			has_law = ze_administration_laws_1

			trigger_if = {
				limit = { has_crown_law_title = yes }

				crownlaw_title = {
					has_law = crown_authority_4
				}
			}

			holder_scope = {
				show_scope_change = no

				NOT = { trait = uncrowned }

				trigger_if = {
					limit = { has_game_started = yes }
					plus_law_prestige_trigger_4 = yes
				}
			}
		}

		pass_effect = {
			# log = "vice_royalty_2 pass ([This.GetFullBaseName])"
			plus_law_change_prestige_effect_4 = yes
		}

		effect = {
			# log = "vice_royalty_2 ([This.GetFullBaseName])"

			tooltip = { # pass_effect doesn't generate tooltips
				plus_law_change_prestige_effect_4 = yes
			}

			set_allow_vice_royalties = DUKE
			revoke_law = vice_royalty_0
			revoke_law = vice_royalty_1
		}

		ai_will_do = {
			factor = 3

			trigger = {
				# Must have enough vassal limit left over
				trigger_if = {
					limit = { has_law = vice_royalty_0 }
					over_vassal_limit <= -10
				}
				trigger_else = {
					has_law = vice_royalty_1
					over_vassal_limit <= -5
				}
			}
		}
	}

	# BYZANTINE ADMINISTRATION
	##############################

	feudal_administration = {
		group = administration
		default = yes

		potential = {
			real_tier = EMPEROR
			NOT = { has_dlc = "Conclave" }

			holder_scope = {
				is_feudal = yes

				NOR = {
					government = theocratic_feudal_government
					government = chinese_imperial_government
				}
			}
		}

		pass_effect = {
			# log = "feudal_administration pass ([This.GetFullBaseName])"

			holder_scope = {
				if = {
					limit = {
						has_game_started = yes
						is_feudal = yes
					}

					switch_to_feudal_effect = yes

					any_realm_lord = {
						limit = {
							is_feudal = yes
							in_revolt = no
							NOT = { any_liege = { in_revolt = yes } }
						}

						switch_to_feudal_effect = yes
					}
				}
			}
		}

		effect = {
			# log = "feudal_administration ([This.GetFullBaseName])"

			if = {
				limit = { has_dlc = "Charlemagne" }
				set_allow_free_vice_royalty_revokation = no
			}
			else = {
				set_allow_free_duchy_revokation = no
			}

			revoke_law = imperial_administration
		}

		ai_will_do = {
			factor = 0
		}
	}

	imperial_administration = {
		group = administration

		vassal_limit = 10
		castle_vassal_tax_modifier = 0.1
		city_vassal_tax_modifier = 0.1
		temple_vassal_tax_modifier = 0.1
		feudal_opinion = -10
		tribal_opinion = -20

		potential = {
			is_law_potential = feudal_administration
		}

		allow = {
			show_only_failed_conditions = yes

			is_titular = no
			has_law = crown_authority_4
			has_law = revoke_title_law_2
			has_law = out_of_realm_inheritance_law_1

			holder_scope = {
				show_scope_change = no

				NOT = { trait = uncrowned }

				trigger_if = {
					limit = { has_game_started = yes }
					plus_law_prestige_trigger_2 = yes
				}

				custom_tooltip = {
					text = HAS_NO_TRIBAL_VASSALS

					NOT = {
						any_vassal = {
							is_tribal = yes
							is_playable = yes
						}
					}
				}
			}
		}

		pass_effect = {
			# log = "imperial_administration pass ([This.GetFullBaseName])"

			# Set flag required to obtain government before law is enacted
			set_title_flag = has_imperial_administration

			holder_scope = {
				if = {
					limit = {
						has_game_started = yes
						could_be_temporal_religious_head_trigger = yes
						has_imperial_government_trigger = no
					}

					switch_to_imperial_effect = yes

					any_realm_lord = {
						limit = {
							is_feudal = yes
							in_revolt = no
							NOT = { any_liege = { in_revolt = yes } }
							could_be_temporal_religious_head_trigger = yes
							has_imperial_government_trigger = no
						}

						switch_to_imperial_effect = yes
					}
				}
			}

			clr_title_flag = has_imperial_administration
			plus_law_change_prestige_effect_2 = yes
		}

		effect = {
			# log = "imperial_administration ([This.GetFullBaseName])"

			tooltip = { # pass_effect doesn't generate tooltips
				plus_law_change_prestige_effect_2 = yes
			}

			if = {
				limit = { has_dlc = "Charlemagne" }

				# add_law = vice_royalty_2
				# set_allow_free_vice_royalty_revokation = yes
			}
			else = {
				set_allow_free_duchy_revokation = yes
			}

			revoke_law = feudal_administration
		}

		ai_will_do = {
			factor = 1
		}
	}

	# FEUDAL VASSAL LEVY SIZE LAWS
	##############################

	feudal_contract_0 = {
		group = feudal_contract

		feudal_opinion = 10
		castle_vassal_max_levy = -0.40

		potential = {
			NOT = { has_dlc = "Conclave" }

			has_game_rule = {
				name = vassal_obligation
				value = vanilla
			}

			holder_scope = {
				is_playable = yes
				NOT = { government = muslim_government }
			}
		}

		pass_effect = {
			# log = "feudal_contract_0 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "feudal_contract_0 ([This.GetFullBaseName])"
			revoke_law = feudal_contract_1
			revoke_law = feudal_contract_2
			revoke_law = feudal_contract_3
		}

		ai_will_do = {
			factor = 0
		}
	}

	feudal_contract_1 = {
		group = feudal_contract

		feudal_opinion = 5
		castle_vassal_max_levy = -0.30

		potential = {
			is_law_potential = feudal_contract_0
		}

		pass_effect = {
			# log = "feudal_contract_1 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "feudal_contract_1 ([This.GetFullBaseName])"
			revoke_law = feudal_contract_0
			revoke_law = feudal_contract_2
			revoke_law = feudal_contract_3
		}

		ai_will_do = {
			factor = 0
		}
	}

	feudal_contract_2 = {
		group = feudal_contract
		default = yes

		castle_vassal_max_levy = -0.20

		potential = {
			is_law_potential = feudal_contract_0
		}

		pass_effect = {
			# log = "feudal_contract_2 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "feudal_contract_2 ([This.GetFullBaseName])"
			revoke_law = feudal_contract_0
			revoke_law = feudal_contract_1
			revoke_law = feudal_contract_3
		}

		ai_will_do = {
			factor = 1
		}
	}

	feudal_contract_3 = {
		group = feudal_contract

		feudal_opinion = -5

		potential = {
			is_law_potential = feudal_contract_0
		}

		pass_effect = {
			# log = "feudal_contract_3 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "feudal_contract_3 ([This.GetFullBaseName])"
			revoke_law = feudal_contract_0
			revoke_law = feudal_contract_1
			revoke_law = feudal_contract_2
		}

		ai_will_do = {
			factor = 0
		}
	}

	# FEUDAL VASSAL TAX SIZE LAWS
	##############################

	feudal_tax_0 = {
		group = feudal_tax
		default = yes

		potential = {
			NOT = { has_dlc = "Conclave" }

			has_game_rule = {
				name = vassal_obligation
				value = vanilla
			}

			holder_scope = {
				is_playable = yes
				NOT = { government = muslim_government }
			}
		}

		pass_effect = {
			# log = "feudal_tax_0 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "feudal_tax_0 ([This.GetFullBaseName])"
			revoke_law = feudal_tax_1
			revoke_law = feudal_tax_2
			revoke_law = feudal_tax_3
		}

		ai_will_do = {
			factor = 1
		}
	}

	feudal_tax_1 = {
		group = feudal_tax
		feudal_opinion = -10
		castle_vassal_tax_modifier = 0.10

		potential = {
			is_law_potential = feudal_tax_0
		}

		pass_effect = {
			# log = "feudal_tax_1 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "feudal_tax_1 ([This.GetFullBaseName])"
			revoke_law = feudal_tax_0
			revoke_law = feudal_tax_2
			revoke_law = feudal_tax_3
		}

		ai_will_do = {
			factor = 0
		}
	}

	feudal_tax_2 = {
		group = feudal_tax

		feudal_opinion = -20
		castle_vassal_tax_modifier = 0.20

		potential = {
			is_law_potential = feudal_tax_0
		}

		pass_effect = {
			# log = "feudal_tax_2 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "feudal_tax_2 ([This.GetFullBaseName])"
			revoke_law = feudal_tax_0
			revoke_law = feudal_tax_1
			revoke_law = feudal_tax_3
		}

		ai_will_do = {
			factor = 0
		}
	}

	feudal_tax_3 = {
		group = feudal_tax

		feudal_opinion = -30
		castle_vassal_tax_modifier = 0.30

		potential = {
			is_law_potential = feudal_tax_0
		}

		pass_effect = {
			# log = "feudal_tax_3 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "feudal_tax_3 ([This.GetFullBaseName])"
			revoke_law = feudal_tax_0
			revoke_law = feudal_tax_1
			revoke_law = feudal_tax_2
		}

		ai_will_do = {
			factor = 0
		}
	}

	##############################
	# MUSLIM FEUDAL LAWS
	##############################

	# IQTA VASSAL LEVY SIZE LAWS
	##############################

	iqta_contract_0 = {
		group = iqta_contract

		feudal_opinion = 10
		castle_vassal_max_levy = -0.40

		potential = {
			NOT = { has_dlc = "Conclave" }

			has_game_rule = {
				name = vassal_obligation
				value = vanilla
			}

			holder_scope = {
				is_playable = yes
				government = muslim_government
			}
		}

		pass_effect = {
			# log = "iqta_contract_0 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "iqta_contract_0 ([This.GetFullBaseName])"
			revoke_law = iqta_contract_1
			revoke_law = iqta_contract_2
			revoke_law = iqta_contract_3
		}

		ai_will_do = {
			factor = 0
		}
	}

	iqta_contract_1 = {
		group = iqta_contract

		feudal_opinion = 5
		castle_vassal_max_levy = -0.30

		potential = {
			is_law_potential = iqta_contract_0
		}

		pass_effect = {
			# log = "iqta_contract_1 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "iqta_contract_1 ([This.GetFullBaseName])"
			revoke_law = iqta_contract_0
			revoke_law = iqta_contract_2
			revoke_law = iqta_contract_3
		}

		ai_will_do = {
			factor = 0
		}
	}

	iqta_contract_2 = {
		group = iqta_contract
		default = yes

		castle_vassal_max_levy = -0.20

		potential = {
			is_law_potential = iqta_contract_0
		}

		pass_effect = {
			# log = "iqta_contract_2 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "iqta_contract_2 ([This.GetFullBaseName])"
			revoke_law = iqta_contract_0
			revoke_law = iqta_contract_1
			revoke_law = iqta_contract_3
		}

		ai_will_do = {
			factor = 1
		}
	}

	iqta_contract_3 = {
		group = iqta_contract
		feudal_opinion = -5

		potential = {
			is_law_potential = iqta_contract_0
		}

		pass_effect = {
			# log = "iqta_contract_3 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "iqta_contract_3 ([This.GetFullBaseName])"
			revoke_law = iqta_contract_0
			revoke_law = iqta_contract_1
			revoke_law = iqta_contract_2
		}

		ai_will_do = {
			factor = 0
		}
	}


	# FEUDAL VASSAL TAX SIZE LAWS
	##############################

	iqta_tax_0 = {
		group = iqta_tax
		feudal_opinion = 10

		potential = {
			NOT = { has_dlc = "Conclave" }

			has_game_rule = {
				name = vassal_obligation
				value = vanilla
			}

			holder_scope = {
				is_playable = yes
				government = muslim_government
			}
		}

		pass_effect = {
			# log = "iqta_tax_0 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "iqta_tax_0 ([This.GetFullBaseName])"
			revoke_law = iqta_tax_1
			revoke_law = iqta_tax_2
			revoke_law = iqta_tax_3
		}

		ai_will_do = {
			factor = 0
		}
	}

	iqta_tax_1 = {
		group = iqta_tax
		default = yes

		castle_vassal_tax_modifier = 0.10

		potential = {
			is_law_potential = iqta_tax_0
		}

		pass_effect = {
			# log = "iqta_tax_1 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "iqta_tax_1 ([This.GetFullBaseName])"
			revoke_law = iqta_tax_0
			revoke_law = iqta_tax_2
			revoke_law = iqta_tax_3
		}

		ai_will_do = {
			factor = 1
		}
	}

	iqta_tax_2 = {
		group = iqta_tax

		feudal_opinion = -10
		castle_vassal_tax_modifier = 0.20

		potential = {
			is_law_potential = iqta_tax_0
		}

		pass_effect = {
			# log = "iqta_tax_2 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "iqta_tax_2 ([This.GetFullBaseName])"
			revoke_law = iqta_tax_0
			revoke_law = iqta_tax_1
			revoke_law = iqta_tax_3
		}

		ai_will_do = {
			factor = 0
		}
	}

	iqta_tax_3 = {
		group = iqta_tax

		feudal_opinion = -20
		castle_vassal_tax_modifier = 0.30

		potential = {
			is_law_potential = iqta_tax_0
		}

		pass_effect = {
			# log = "iqta_tax_3 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "iqta_tax_3 ([This.GetFullBaseName])"
			revoke_law = iqta_tax_0
			revoke_law = iqta_tax_1
			revoke_law = iqta_tax_2
		}

		ai_will_do = {
			factor = 0
		}
	}

	# CITY VASSAL LEVY SIZE LAWS
	##############################

	city_contract_0 = {
		group = city_contract

		city_opinion = 10
		city_vassal_max_levy = -0.50

		potential = {
			NOT = { has_dlc = "Conclave" }

			has_game_rule = {
				name = vassal_obligation
				value = vanilla
			}

			holder_scope = {
				is_playable = yes
			}
		}

		pass_effect = {
			# log = "city_contract_0 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "city_contract_0 ([This.GetFullBaseName])"
			revoke_law = city_contract_1
			revoke_law = city_contract_2
			revoke_law = city_contract_3
		}

		ai_will_do = {
			factor = 0
		}
	}

	city_contract_1 = {
		group = city_contract
		default = yes

		city_vassal_max_levy = -0.35

		potential = {
			is_law_potential = city_contract_0
		}

		pass_effect = {
			# log = "city_contract_1 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "city_contract_1 ([This.GetFullBaseName])"
			revoke_law = city_contract_0
			revoke_law = city_contract_2
			revoke_law = city_contract_3
		}

		ai_will_do = {
			factor = 1
		}
	}

	city_contract_2 = {
		group = city_contract

		city_opinion = -10
		city_vassal_max_levy = -0.20

		potential = {
			is_law_potential = city_contract_0
		}

		pass_effect = {
			# log = "city_contract_2 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "city_contract_2 ([This.GetFullBaseName])"
			revoke_law = city_contract_0
			revoke_law = city_contract_1
			revoke_law = city_contract_3
		}

		ai_will_do = {
			factor = 0
		}
	}

	city_contract_3 = {
		group = city_contract

		city_opinion = -20
		city_vassal_max_levy = -0.05

		potential = {
			is_law_potential = city_contract_0
		}

		pass_effect = {
			# log = "city_contract_3 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "city_contract_3 ([This.GetFullBaseName])"
			revoke_law = city_contract_0
			revoke_law = city_contract_1
			revoke_law = city_contract_2
		}

		ai_will_do = {
			factor = 0
		}
	}

	# CITY VASSAL TAX SIZE LAWS
	##############################

	city_tax_0 = {
		group = city_tax

		city_opinion = 10
		city_vassal_tax_modifier = 0.15

		potential = {
			NOT = { has_dlc = "Conclave" }

			has_game_rule = {
				name = vassal_obligation
				value = vanilla
			}

			holder_scope = {
				is_playable = yes
			}
		}

		pass_effect = {
			# log = "city_tax_0 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "city_tax_0 ([This.GetFullBaseName])"
			revoke_law = city_tax_1
			revoke_law = city_tax_2
			revoke_law = city_tax_3
		}

		ai_will_do = {
			factor = 0
		}
	}

	city_tax_1 = {
		group = city_tax
		default = yes

		city_vassal_tax_modifier = 0.25

		potential = {
			is_law_potential = city_tax_0
		}

		pass_effect = {
			# log = "city_tax_1 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "city_tax_1 ([This.GetFullBaseName])"
			revoke_law = city_tax_0
			revoke_law = city_tax_2
			revoke_law = city_tax_3
		}

		ai_will_do = {
			factor = 1
		}
	}

	city_tax_2 = {
		group = city_tax

		city_opinion = -10
		city_vassal_tax_modifier = 0.35

		potential = {
			is_law_potential = city_tax_0
		}

		pass_effect = {
			# log = "city_tax_2 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "city_tax_2 ([This.GetFullBaseName])"
			revoke_law = city_tax_0
			revoke_law = city_tax_1
			revoke_law = city_tax_3
		}

		ai_will_do = {
			factor = 0
		}
	}

	city_tax_3 = {
		group = city_tax

		city_opinion = -20
		city_vassal_tax_modifier = 0.45

		potential = {
			is_law_potential = city_tax_0
		}

		pass_effect = {
			# log = "city_tax_3 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "city_tax_3 ([This.GetFullBaseName])"
			revoke_law = city_tax_0
			revoke_law = city_tax_1
			revoke_law = city_tax_2
		}

		ai_will_do = {
			factor = 0
		}
	}

	# TEMPLE VASSAL LEVY SIZE LAWS
	##############################

	temple_contract_0 = {
		group = temple_contract

		temple_opinion = 10
		temple_vassal_max_levy = -0.50

		potential = {
			NOT = { has_dlc = "Conclave" }

			has_game_rule = {
				name = vassal_obligation
				value = vanilla
			}

			holder_scope = {
				is_playable = yes
			}
		}

		pass_effect = {
			# log = "temple_contract_0 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "temple_contract_0 ([This.GetFullBaseName])"
			revoke_law = temple_contract_1
			revoke_law = temple_contract_2
			revoke_law = temple_contract_3
		}

		ai_will_do = {
			factor = 0
		}
	}

	temple_contract_1 = {
		group = temple_contract
		default = yes

		temple_vassal_max_levy = -0.40

		potential = {
			is_law_potential = temple_contract_0
		}

		pass_effect = {
			# log = "temple_contract_1 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "temple_contract_1 ([This.GetFullBaseName])"
			revoke_law = temple_contract_0
			revoke_law = temple_contract_2
			revoke_law = temple_contract_3
		}

		ai_will_do = {
			factor = 1
		}
	}

	temple_contract_2 = {
		group = temple_contract

		temple_opinion = -10
		temple_vassal_max_levy = -0.30

		potential = {
			is_law_potential = temple_contract_0
		}

		pass_effect = {
			# log = "temple_contract_2 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "temple_contract_2 ([This.GetFullBaseName])"
			revoke_law = temple_contract_0
			revoke_law = temple_contract_1
			revoke_law = temple_contract_3
		}

		ai_will_do = {
			factor = 0
		}
	}

	temple_contract_3 = {
		group = temple_contract

		temple_opinion = -20
		temple_vassal_max_levy = -0.20

		potential = {
			is_law_potential = temple_contract_0
		}

		pass_effect = {
			# log = "temple_contract_3 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "temple_contract_3 ([This.GetFullBaseName])"
			revoke_law = temple_contract_0
			revoke_law = temple_contract_1
			revoke_law = temple_contract_2
		}

		ai_will_do = {
			factor = 0
		}
	}

	# TEMPLE VASSAL TAX SIZE LAWS
	##############################

	temple_tax_0 = {
		group = temple_tax

		temple_opinion = 20

		potential = {
			NOT = { has_dlc = "Conclave" }

			has_game_rule = {
				name = vassal_obligation
				value = vanilla
			}

			holder_scope = {
				is_playable = yes
			}
		}

		pass_effect = {
			# log = "temple_tax_0 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "temple_tax_0 ([This.GetFullBaseName])"
			revoke_law = temple_tax_1
			revoke_law = temple_tax_2
			revoke_law = temple_tax_3
		}

		ai_will_do = {
			factor = 0
		}
	}

	temple_tax_1 = {
		group = temple_tax
		default = yes

		temple_opinion = 0
		temple_vassal_tax_modifier = 0.35

		potential = {
			is_law_potential = temple_tax_0
		}

		pass_effect = {
			# log = "temple_tax_1 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "temple_tax_1 ([This.GetFullBaseName])"
			revoke_law = temple_tax_0
			revoke_law = temple_tax_2
			revoke_law = temple_tax_3
		}

		ai_will_do = {
			factor = 1
		}
	}

	temple_tax_2 = {
		group = temple_tax

		temple_opinion = -10
		temple_vassal_tax_modifier = 0.45

		potential = {
			is_law_potential = temple_tax_0
		}

		pass_effect = {
			# log = "temple_tax_2 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "temple_tax_2 ([This.GetFullBaseName])"
			revoke_law = temple_tax_0
			revoke_law = temple_tax_1
			revoke_law = temple_tax_3
		}

		ai_will_do = {
			factor = 0
		}
	}

	temple_tax_3 = {
		group = temple_tax

		temple_opinion = -20
		temple_vassal_tax_modifier = 0.55

		potential = {
			is_law_potential = temple_tax_0
		}

		pass_effect = {
			# log = "temple_tax_3 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "temple_tax_3 ([This.GetFullBaseName])"
			revoke_law = temple_tax_0
			revoke_law = temple_tax_1
			revoke_law = temple_tax_2
		}

		ai_will_do = {
			factor = 0
		}
	}

	# TRIBAL VASSAL LEVY SIZE LAWS
	##############################

	tribal_contract_0 = {
		group = tribal_contract

		tribal_vassal_max_levy = -0.50

		potential = {
			NOT = { has_dlc = "Conclave" }

			has_game_rule = {
				name = vassal_obligation
				value = vanilla
			}

			holder_scope = {
				trigger_if = {
					limit = { is_tribal = yes }

					OR = {
						has_law = tribal_organization_3
						has_law = tribal_organization_4
					}
				}
				trigger_else = {
					is_playable = yes
				}
			}
		}

		pass_effect = {
			# log = "tribal_contract_0 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "tribal_contract_0 ([This.GetFullBaseName])"
			revoke_law = tribal_contract_1
			revoke_law = tribal_contract_2
			revoke_law = tribal_contract_3
		}

		ai_will_do = {
			factor = 0
		}
	}

	tribal_contract_1 = {
		group = tribal_contract
		default = yes

		tribal_opinion = -10
		tribal_vassal_max_levy = -0.40

		potential = {
			is_law_potential = tribal_contract_0
		}

		pass_effect = {
			# log = "tribal_contract_1 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "tribal_contract_1 ([This.GetFullBaseName])"
			revoke_law = tribal_contract_0
			revoke_law = tribal_contract_2
			revoke_law = tribal_contract_3
		}

		ai_will_do = {
			factor = 1
		}
	}

	tribal_contract_2 = {
		group = tribal_contract

		tribal_opinion = -20
		tribal_vassal_max_levy = -0.30

		potential = {
			is_law_potential = tribal_contract_0
		}

		pass_effect = {
			# log = "tribal_contract_2 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "tribal_contract_2 ([This.GetFullBaseName])"
			revoke_law = tribal_contract_0
			revoke_law = tribal_contract_1
			revoke_law = tribal_contract_3
		}

		ai_will_do = {
			factor = 0
		}
	}

	tribal_contract_3 = {
		group = tribal_contract

		tribal_opinion = -30
		tribal_vassal_max_levy = -0.20

		potential = {
			is_law_potential = tribal_contract_0
		}

		pass_effect = {
			# log = "tribal_contract_3 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "tribal_contract_3 ([This.GetFullBaseName])"
			revoke_law = tribal_contract_0
			revoke_law = tribal_contract_1
			revoke_law = tribal_contract_2
		}

		ai_will_do = {
			factor = 0
		}
	}

	# TRIBAL VASSAL TAX SIZE LAWS
	##############################

	tribal_tax_0 = {
		group = tribal_tax
		default = yes

		potential = {
			NOT = { has_dlc = "Conclave" }

			has_game_rule = {
				name = vassal_obligation
				value = vanilla
			}

			holder_scope = {
				trigger_if = {
					limit = { is_tribal = yes }

					OR = {
						has_law = tribal_organization_3
						has_law = tribal_organization_4
					}
				}
				trigger_else = {
					is_playable = yes
				}
			}
		}

		pass_effect = {
			# log = "tribal_tax_0 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "tribal_tax_0 ([This.GetFullBaseName])"
			revoke_law = tribal_tax_1
			revoke_law = tribal_tax_2
			revoke_law = tribal_tax_3
		}

		ai_will_do = {
			factor = 1
		}
	}

	tribal_tax_1 = {
		group = tribal_tax

		tribal_opinion = -10
		tribal_vassal_tax_modifier = 0.10

		potential = {
			is_law_potential = tribal_tax_0
		}

		pass_effect = {
			# log = "tribal_tax_1 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "tribal_tax_1 ([This.GetFullBaseName])"
			revoke_law = tribal_tax_0
			revoke_law = tribal_tax_2
			revoke_law = tribal_tax_3
		}

		ai_will_do = {
			factor = 0
		}
	}

	tribal_tax_2 = {
		group = tribal_tax

		tribal_opinion = -20
		tribal_vassal_tax_modifier = 0.20

		potential = {
			is_law_potential = tribal_tax_0
		}

		pass_effect = {
			# log = "tribal_tax_2 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "tribal_tax_2 ([This.GetFullBaseName])"
			revoke_law = tribal_tax_0
			revoke_law = tribal_tax_1
			revoke_law = tribal_tax_3
		}

		ai_will_do = {
			factor = 0
		}
	}

	tribal_tax_3 = {
		group = tribal_tax

		tribal_opinion = -30
		tribal_vassal_tax_modifier = 0.30

		potential = {
			is_law_potential = tribal_tax_0
		}

		pass_effect = {
			# log = "tribal_tax_3 pass ([This.GetFullBaseName])"
		}

		effect = {
			# log = "tribal_tax_3 ([This.GetFullBaseName])"
			revoke_law = tribal_tax_0
			revoke_law = tribal_tax_1
			revoke_law = tribal_tax_2
		}

		ai_will_do = {
			factor = 0
		}
	}
}