# Crown level (de jure) laws
# Laws ending with 0 will be default laws at game start

de_jure_laws = {

# CENTRALIZATION
	centralization_0 = {
		show_as_title = yes
		group = centralization
		default = yes
		
		castle_opinion = 5
		city_opinion = 5
		temple_opinion = 5
		
		potential = {
			NOT = {
				crownlaw_title = {
					NOT = { title = PREV }
					holder_scope = { ROOT = { holder_scope = { is_liege_or_above = PREVPREV } } }
				}
			}
		}
		allow = {
			# Has a senate (non-senate-havers can just do this by decree)
			has_law = legislative_authority_1
			# Pro-centralization doesn't prevent it
			NOT = { holder_scope = { check_variable = { which = "var_pro_centralization" value = 0 } } }
			holder_scope = { NOT = { has_character_modifier = constitutional_crisis } }
			has_law = centralization_1
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.01
			}
			# Ideology
			modifier = {
				factor = 2
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					religion_authority = 0.75
				}
			}
			modifier = {
				factor = 2
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					religion_authority = 0.5
				}
			}
			modifier = {
				factor = 2
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					religion_authority = 0.25
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 2
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					trait = radical
				}
			}
			modifier = {
				factor = 0.5
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					religion_authority = 0.75
				}
			}
			modifier = {
				factor = 0.5
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					religion_authority = 0.5
				}
			}
			modifier = {
				factor = 0.5
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					religion_authority = 0.25
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 0.5
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					trait = radical
				}
			}
			# Personality
			modifier = {
				factor = 0.25
				holder_scope = { trait = ambitious }
			}
			modifier = {
				factor = 4
				holder_scope = { trait = content }
			}
			modifier = {
				factor = 2
				holder_scope = { trait = disciplined }
			}
			modifier = {
				factor = 0.5
				holder_scope = { trait = carefree }
			}
			
			# Politics
			modifier = {
				factor = 2
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -24 }
						in_faction = faction_anti_centralization
						relative_power_to_liege = 0.1
					}
					NOT = { trait = cold }
				}
			}
			modifier = {
				factor = 2
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -49 }
						in_faction = faction_anti_centralization
						relative_power_to_liege = 0.1
					}
					trait = friendly
				}
			}
			modifier = {
				factor = 0.5
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -24 }
						in_faction = faction_pro_centralization
						relative_power_to_liege = 0.1
					}
					NOT = { trait = cold }
				}
			}
			modifier = {
				factor = 0.5
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -49 }
						in_faction = faction_pro_centralization
						relative_power_to_liege = 0.1
					}
					trait = friendly
				}
			}
			modifier = {
				factor = 5
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = 50 }
						in_faction = faction_anti_centralization
					}
				}
			}
			modifier = {
				factor = 0.2
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = 50 }
						in_faction = faction_pro_centralization
					}
				}
			}
			modifier = {
				factor = 2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 0.5
						}
					}
				}
			}
			modifier = {
				factor = 2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 1
						}
					}
				}
			}
			modifier = {
				factor = 2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 1.5
						}
					}
				}
			}
			modifier = {
				factor = 2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 2
						}
					}
				}
			}
			modifier = {
				factor = 2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 2.5
						}
					}
				}
			}
			modifier = {
				factor = 2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 3
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 0.5
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 1
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 1.5
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 2
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 2.5
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 3
						}
					}
				}
			}
		}
		ai_will_revoke = {
			factor = 0
		}
		# pass_effect = {
			# if = {
				# limit = {
					# holder_scope = {
						# OR = {
							# religion = terran_federalist
							# religion = colonial_separatist
							# religion = neo_feudal
							# religion = adoptionist_cultist
							# religion = adoptionist
							# religion = xenoterran
						# }
					# }
				# }
				# holder_scope = {
					# piety = 100
					# religion_authority = { modifier = major_compatible_reform years = 50 }
				# }
			# }
			# if = {
				# limit = {
					# holder_scope = {
						# OR = {
							# religion = terran_republican
							# religion = terran_imperial
							# religion = astrist
							# religion = neo_socialist
							# religion = orthodox
							# religion = solarian
						# }
					# }
				# }
				# holder_scope = {
					# piety = -100
					# religion_authority = { modifier = major_hypocritical_reform years = 50 }
				# }
			# }
		# }
		effect = {
			hidden_tooltip = { holder_scope = { character_event = { id = maintenance.900 } } } # Recalculate the Senate
			hidden_tooltip = {
				holder_scope = {
					set_character_flag = flag_decreased_crown_authority
					any_vassal = {
						limit = {
							crownlaw_title = { title = PREVPREVPREV }
							NOT = { in_faction = faction_pro_centralization }
						}
						opinion = { who = ROOT modifier = opinion_lowered_crown_authority_good  }
						remove_opinion = { who = ROOT modifier = opinion_raised_crown_authority_good }
						remove_opinion = { who = ROOT modifier = opinion_raised_crown_authority_bad }
					}
					any_vassal = {
						limit = {
							crownlaw_title = { title = PREVPREVPREV }
							in_faction = faction_pro_centralization
						}
						opinion = { who = ROOT modifier = opinion_lowered_crown_authority_bad }
						remove_opinion = { who = ROOT modifier = opinion_raised_crown_authority_good }
						remove_opinion = { who = ROOT modifier = opinion_raised_crown_authority_bad }
					}
				}
			}
			hidden_tooltip = {
				revoke_law = centralization_1
				revoke_law = centralization_2
				revoke_law = centralization_3
				revoke_law = centralization_4
			}
			
			set_appoint_generals = no
			set_appoint_regents = no
#			set_the_kings_peace = no
#			set_the_kings_full_peace = no
			set_protected_inheritance = no
			set_allow_title_revokation = no
			set_allow_free_infidel_revokation = no
			set_allow_free_revokation = no
		}
		
		city_vassal_min_levy = 0.0
		castle_vassal_min_levy = 0.0
		temple_vassal_min_levy = 0.0
	}
	
	centralization_1 = {
		show_as_title = yes
		group = centralization
		
		castle_opinion = -5
		city_opinion = -5
		temple_opinion = -5
		
		potential = {
			NOT = {
				crownlaw_title = {
					NOT = { title = PREV }
					holder_scope = { ROOT = { holder_scope = { is_liege_or_above = PREVPREV } } }
				}
			}
		}
		
		allow = {
			# Has a senate (non-senate-havers can just do this by decree)
			has_law = legislative_authority_1
			# Pro-centralization doesn't prevent it
			NOT = {
				AND = {
					has_law = centralization_2
					holder_scope = { check_variable = { which = "var_pro_centralization" value = 0 } }
				}
			}
			# Anti-centralization doesn't prevent it
			NOT = {
				AND = {
					has_law = centralization_0
					holder_scope = { check_variable = { which = "var_anti_centralization" value = 0 } }
				}
			}
			holder_scope = { NOT = { has_character_modifier = constitutional_crisis } }
			OR = {
				has_law = centralization_0
				has_law = centralization_2
			}
		}
		revoke_allowed = {
			always = no
		}			
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.01
			}
			# Increasing
			# Ideology
			modifier = {
				factor = 0.5
				has_law = centralization_0
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					religion_authority = 0.75
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_0
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					religion_authority = 0.5
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_0
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					religion_authority = 0.25
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_0
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					trait = radical
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_0
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					religion_authority = 0.75
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_0
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					religion_authority = 0.5
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_0
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					religion_authority = 0.25
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_0
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					trait = radical
				}
			}
			# Personality
			modifier = {
				factor = 4
				has_law = centralization_0
				holder_scope = { trait = ambitious }
			}
			modifier = {
				factor = 0.25
				has_law = centralization_0
				holder_scope = { trait = content }
			}
			modifier = {
				factor = 2
				holder_scope = { trait = disciplined }
			}
			modifier = {
				factor = 0.5
				holder_scope = { trait = carefree }
			}
			
			# Politics
			modifier = {
				factor = 0.5
				has_law = centralization_0
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -24 }
						in_faction = faction_anti_centralization
						relative_power_to_liege = 0.1
					}
					NOT = { trait = cold }
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_0
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -49 }
						in_faction = faction_anti_centralization
						relative_power_to_liege = 0.1
					}
					trait = friendly
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_0
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -24 }
						in_faction = faction_pro_centralization
						relative_power_to_liege = 0.1
					}
					NOT = { trait = cold }
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_0
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -49 }
						in_faction = faction_pro_centralization
						relative_power_to_liege = 0.1
					}
					trait = friendly
				}
			}
			modifier = {
				factor = 0.2
				has_law = centralization_0
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = 50 }
						in_faction = faction_anti_centralization
					}
				}
			}
			modifier = {
				factor = 5
				has_law = centralization_0
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = 50 }
						in_faction = faction_pro_centralization
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_0
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 0.5
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_0
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 1
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_0
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 1.5
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_0
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 2
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_0
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 2.5
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_0
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 3
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_0
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 0.5
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_0
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 1
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_0
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 1.5
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_0
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 2
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_0
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 2.5
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_0
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 3
						}
					}
				}
			}
			# Decreasing
			# Ideology
			modifier = {
				factor = 2
				has_law = centralization_2
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					religion_authority = 0.75
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_2
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					religion_authority = 0.5
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_2
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					religion_authority = 0.25
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_2
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					trait = radical
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_2
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					religion_authority = 0.75
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_2
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					religion_authority = 0.5
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_2
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					religion_authority = 0.25
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_2
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					trait = radical
				}
			}
			# Personality
			modifier = {
				factor = 0.25
				has_law = centralization_2
				holder_scope = { trait = ambitious }
			}
			modifier = {
				factor = 4
				has_law = centralization_2
				holder_scope = { trait = content }
			}
			# Politics
			modifier = {
				factor = 2
				has_law = centralization_2
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -24 }
						in_faction = faction_anti_centralization
						relative_power_to_liege = 0.1
					}
					NOT = { trait = cold }
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_2
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -49 }
						in_faction = faction_anti_centralization
						relative_power_to_liege = 0.1
					}
					trait = friendly
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_2
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -24 }
						in_faction = faction_pro_centralization
						relative_power_to_liege = 0.1
					}
					NOT = { trait = cold }
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_2
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -49 }
						in_faction = faction_pro_centralization
						relative_power_to_liege = 0.1
					}
					trait = friendly
				}
			}
			modifier = {
				factor = 5
				has_law = centralization_2
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = 50 }
						in_faction = faction_anti_centralization
					}
				}
			}
			modifier = {
				factor = 0.2
				has_law = centralization_2
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = 50 }
						in_faction = faction_pro_centralization
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 0.5
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 1
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 1.5
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 2
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 2.5
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 3
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 0.5
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 1
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 1.5
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 2
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 2.5
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 3
						}
					}
				}
			}
		}
		ai_will_revoke = {
			factor = 0
		}
		# pass_effect = {
			# if = {
				# limit = {
					# OR = {
						# AND = {
							# has_law = centralization_0
							# holder_scope = {
								# OR = {
									# religion = terran_federalist
									# religion = colonial_separatist
									# religion = neo_feudal
									# religion = adoptionist_cultist
									# religion = adoptionist
									# religion = xenoterran
								# }
							# }
						# }
						# AND = {
							# has_law = centralization_2
							# holder_scope = {
								# OR = {
									# religion = terran_republican
									# religion = terran_imperial
									# religion = astrist
									# religion = neo_socialist
									# religion = orthodox
									# religion = solarian
								# }
							# }
						# }
					# }
				# }
				# holder_scope = {
					# piety = -100
					# religion_authority = { modifier = major_hypocritical_reform years = 50 }
				# }
			# }
			# if = {
				# limit = {
					# OR = {
						# AND = {
							# has_law = centralization_2
							# holder_scope = {
								# OR = {
									# religion = terran_federalist
									# religion = colonial_separatist
									# religion = neo_feudal
									# religion = adoptionist_cultist
									# religion = adoptionist
									# religion = xenoterran
								# }
							# }
						# }
						# AND = {
							# has_law = centralization_0
							# holder_scope = {
								# OR = {
									# religion = terran_republican
									# religion = terran_imperial
									# religion = astrist
									# religion = neo_socialist
									# religion = orthodox
									# religion = solarian
								# }
							# }
						# }
					# }
				# }
				# holder_scope = {
					# piety = 100
					# religion_authority = { modifier = major_compatible_reform years = 50 }
				# }
			# }
		# }
		effect = {
			hidden_tooltip = { holder_scope = { character_event = { id = maintenance.900 } } } # Recalculate the Senate
			hidden_tooltip = {
				if = {
					limit = { has_law = centralization_0 }
					holder_scope = {
						set_character_flag = flag_increased_crown_authority
						any_vassal = {
							limit = {
								crownlaw_title = { title = PREVPREVPREV }
								NOT = { in_faction = faction_pro_centralization }
							}
							opinion = { who = ROOT modifier = opinion_raised_crown_authority_bad }
							remove_opinion = { who = ROOT modifier = opinion_lowered_crown_authority_good }
							remove_opinion = { who = ROOT modifier = opinion_lowered_crown_authority_bad }
						}
						any_vassal = {
							limit = {
								crownlaw_title = { title = PREVPREVPREV }
								in_faction = faction_pro_centralization
							}
							opinion = { who = ROOT modifier = opinion_raised_crown_authority_good }
							remove_opinion = { who = ROOT modifier = opinion_lowered_crown_authority_good }
							remove_opinion = { who = ROOT modifier = opinion_lowered_crown_authority_bad }
						}
					}
				}
				if = {
					limit = { has_law = centralization_2 }
					holder_scope = {
						set_character_flag = flag_decreased_crown_authority
						any_vassal = {
							limit = {
								crownlaw_title = { title = PREVPREVPREV }
								NOT = { in_faction = faction_pro_centralization }
							}
							opinion = { who = ROOT modifier = opinion_lowered_crown_authority_bad }
							remove_opinion = { who = ROOT modifier = opinion_raised_crown_authority_good }
							remove_opinion = { who = ROOT modifier = opinion_raised_crown_authority_bad }
						}
						any_vassal = {
							limit = {
								crownlaw_title = { title = PREVPREVPREV }
								in_faction = faction_pro_centralization
							}
							opinion = { who = ROOT modifier = opinion_lowered_crown_authority_good }
							remove_opinion = { who = ROOT modifier = opinion_raised_crown_authority_good }
							remove_opinion = { who = ROOT modifier = opinion_raised_crown_authority_bad }
						}
					}
				}
			}
			hidden_tooltip = {
				revoke_law = centralization_0
				revoke_law = centralization_2
				revoke_law = centralization_3
				revoke_law = centralization_4
			}
			set_appoint_generals = yes
			set_appoint_regents = no
#			set_the_kings_peace = no
#			set_the_kings_full_peace = no
			set_protected_inheritance = no
			set_allow_title_revokation = yes
			set_allow_free_infidel_revokation = no
			set_allow_free_revokation = no
		}
		
		city_vassal_min_levy = 0.2
		castle_vassal_min_levy = 0.2
		temple_vassal_min_levy = 0.2
	}
	
	centralization_2 = {
		show_as_title = yes
		group = centralization
		
		castle_opinion = -10
		city_opinion = -10
		temple_opinion = -10
		
		potential = {
			NOT = {
				crownlaw_title = {
					NOT = { title = PREV }
					holder_scope = { ROOT = { holder_scope = { is_liege_or_above = PREVPREV } } }
				}
			}
		}
		
		allow = {
			# Has a senate (non-senate-havers can just do this by decree)
			has_law = legislative_authority_1
			# Pro-centralization doesn't prevent it
			NOT = {
				AND = {
					has_law = centralization_3
					holder_scope = { check_variable = { which = "var_pro_centralization" value = 0 } }
				}
			}
			# Anti-centralization doesn't prevent it
			NOT = {
				AND = {
					has_law = centralization_1
					holder_scope = { check_variable = { which = "var_anti_centralization" value = 0 } }
				}
			}
			holder_scope = { NOT = { has_character_modifier = constitutional_crisis } }
			OR = {
				has_law = centralization_1
				has_law = centralization_3
			}
		}
		revoke_allowed = {
			always = no
		}			
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.01
			}
			# Increasing
			# Ideology
			modifier = {
				factor = 0.5
				has_law = centralization_1
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					religion_authority = 0.75
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_1
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					religion_authority = 0.5
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_1
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					religion_authority = 0.25
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_1
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					trait = radical
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_1
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					religion_authority = 0.75
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_1
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					religion_authority = 0.5
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_1
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					religion_authority = 0.25
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_1
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					trait = radical
				}
			}
			# Personality
			modifier = {
				factor = 4
				has_law = centralization_1
				holder_scope = { trait = ambitious }
			}
			modifier = {
				factor = 0.25
				has_law = centralization_1
				holder_scope = { trait = content }
			}
			modifier = {
				factor = 2
				holder_scope = { trait = disciplined }
			}
			modifier = {
				factor = 0.5
				holder_scope = { trait = carefree }
			}
			
			# Politics
			modifier = {
				factor = 0.5
				has_law = centralization_1
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -24 }
						in_faction = faction_anti_centralization
						relative_power_to_liege = 0.1
					}
					NOT = { trait = cold }
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_1
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -49 }
						in_faction = faction_anti_centralization
						relative_power_to_liege = 0.1
					}
					trait = friendly
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_1
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -24 }
						in_faction = faction_pro_centralization
						relative_power_to_liege = 0.1
					}
					NOT = { trait = cold }
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_1
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -49 }
						in_faction = faction_pro_centralization
						relative_power_to_liege = 0.1
					}
					trait = friendly
				}
			}
			modifier = {
				factor = 0.2
				has_law = centralization_1
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = 50 }
						in_faction = faction_anti_centralization
					}
				}
			}
			modifier = {
				factor = 5
				has_law = centralization_1
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = 50 }
						in_faction = faction_pro_centralization
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_1
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 0.5
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_1
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 1
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_1
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 1.5
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_1
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 2
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_1
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 2.5
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_1
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 3
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_1
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 0.5
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_1
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 1
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_1
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 1.5
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_1
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 2
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_1
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 2.5
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_1
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 3
						}
					}
				}
			}
			# Decreasing
			# Ideology
			modifier = {
				factor = 2
				has_law = centralization_3
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					religion_authority = 0.75
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_3
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					religion_authority = 0.5
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_3
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					religion_authority = 0.25
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_3
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					trait = radical
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_3
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					religion_authority = 0.75
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_3
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					religion_authority = 0.5
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_3
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					religion_authority = 0.25
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_3
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					trait = radical
				}
			}
			# Personality
			modifier = {
				factor = 0.25
				has_law = centralization_3
				holder_scope = { trait = ambitious }
			}
			modifier = {
				factor = 4
				has_law = centralization_3
				holder_scope = { trait = content }
			}
			# Politics
			modifier = {
				factor = 2
				has_law = centralization_3
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -24 }
						in_faction = faction_anti_centralization
						relative_power_to_liege = 0.1
					}
					NOT = { trait = cold }
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_3
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -49 }
						in_faction = faction_anti_centralization
						relative_power_to_liege = 0.1
					}
					trait = friendly
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_3
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -24 }
						in_faction = faction_pro_centralization
						relative_power_to_liege = 0.1
					}
					NOT = { trait = cold }
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_3
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -49 }
						in_faction = faction_pro_centralization
						relative_power_to_liege = 0.1
					}
					trait = friendly
				}
			}
			modifier = {
				factor = 5
				has_law = centralization_3
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = 50 }
						in_faction = faction_anti_centralization
					}
				}
			}
			modifier = {
				factor = 0.2
				has_law = centralization_3
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = 50 }
						in_faction = faction_pro_centralization
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_3
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 0.5
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_3
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 1
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_3
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 1.5
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_3
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 2
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_3
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 2.5
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_3
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 3
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_3
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 0.5
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_3
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 1
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_3
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 1.5
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_3
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 2
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_3
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 2.5
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_3
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 3
						}
					}
				}
			}
		}
		ai_will_revoke = {
			factor = 0
		}
		# pass_effect = {
			# if = {
				# limit = {
					# OR = {
						# AND = {
							# has_law = centralization_1
							# holder_scope = {
								# OR = {
									# religion = terran_federalist
									# religion = colonial_separatist
									# religion = neo_feudal
									# religion = adoptionist_cultist
									# religion = adoptionist
									# religion = xenoterran
								# }
							# }
						# }
						# AND = {
							# has_law = centralization_3
							# holder_scope = {
								# OR = {
									# religion = terran_republican
									# religion = terran_imperial
									# religion = astrist
									# religion = neo_socialist
									# religion = orthodox
									# religion = solarian
								# }
							# }
						# }
					# }
				# }
				# holder_scope = {
					# piety = -100
					# religion_authority = { modifier = major_hypocritical_reform years = 50 }
				# }
			# }
			# if = {
				# limit = {
					# OR = {
						# AND = {
							# has_law = centralization_3
							# holder_scope = {
								# OR = {
									# religion = terran_federalist
									# religion = colonial_separatist
									# religion = neo_feudal
									# religion = adoptionist_cultist
									# religion = adoptionist
									# religion = xenoterran
								# }
							# }
						# }
						# AND = {
							# has_law = centralization_1
							# holder_scope = {
								# OR = {
									# religion = terran_republican
									# religion = terran_imperial
									# religion = astrist
									# religion = neo_socialist
									# religion = orthodox
									# religion = solarian
								# }
							# }
						# }
					# }
				# }
				# holder_scope = {
					# piety = 100
					# religion_authority = { modifier = major_compatible_reform years = 50 }
				# }
			# }
		# }
		effect = {
			hidden_tooltip = { holder_scope = { character_event = { id = maintenance.900 } } } # Recalculate the Senate
			hidden_tooltip = {
				if = {
					limit = { has_law = centralization_1 }
					holder_scope = {
						set_character_flag = flag_increased_crown_authority
						any_vassal = {
							limit = {
								crownlaw_title = { title = PREVPREVPREV }
								NOT = { in_faction = faction_pro_centralization }
							}
							opinion = { who = ROOT modifier = opinion_raised_crown_authority_bad }
							remove_opinion = { who = ROOT modifier = opinion_lowered_crown_authority_good }
							remove_opinion = { who = ROOT modifier = opinion_lowered_crown_authority_bad }
						}
						any_vassal = {
							limit = {
								crownlaw_title = { title = PREVPREVPREV }
								in_faction = faction_pro_centralization
							}
							opinion = { who = ROOT modifier = opinion_raised_crown_authority_good }
							remove_opinion = { who = ROOT modifier = opinion_lowered_crown_authority_good }
							remove_opinion = { who = ROOT modifier = opinion_lowered_crown_authority_bad }
						}
					}
				}
				if = {
					limit = { has_law = centralization_3 }
					holder_scope = {
						set_character_flag = flag_decreased_crown_authority
						any_vassal = {
							limit = {
								crownlaw_title = { title = PREVPREVPREV }
								NOT = { in_faction = faction_pro_centralization }
							}
							opinion = { who = ROOT modifier = opinion_lowered_crown_authority_bad }
							remove_opinion = { who = ROOT modifier = opinion_raised_crown_authority_good }
							remove_opinion = { who = ROOT modifier = opinion_raised_crown_authority_bad }
						}
						any_vassal = {
							limit = {
								crownlaw_title = { title = PREVPREVPREV }
								in_faction = faction_pro_centralization
							}
							opinion = { who = ROOT modifier = opinion_lowered_crown_authority_good }
							remove_opinion = { who = ROOT modifier = opinion_raised_crown_authority_good }
							remove_opinion = { who = ROOT modifier = opinion_raised_crown_authority_bad }
						}
					}
				}
			}
			hidden_tooltip = {
				revoke_law = centralization_0
				revoke_law = centralization_1
				revoke_law = centralization_3
				revoke_law = centralization_4
			}
			set_appoint_generals = yes
			set_appoint_regents = no
#			set_the_kings_peace = yes
#			set_the_kings_full_peace = no
			set_protected_inheritance = no
			set_allow_title_revokation = yes
			set_allow_free_infidel_revokation = yes
			set_allow_free_revokation = no
		}
		
		city_vassal_min_levy = 0.4
		castle_vassal_min_levy = 0.4
		temple_vassal_min_levy = 0.4
	}
	
	centralization_3 = {
		show_as_title = yes
		group = centralization
		
		castle_opinion = -20
		city_opinion = -20
		temple_opinion = -20
		
		potential = {
			NOT = {
				crownlaw_title = {
					NOT = { title = PREV }
					holder_scope = { ROOT = { holder_scope = { is_liege_or_above = PREVPREV } } }
				}
			}
		}
		
		allow = {
			# Has a senate (non-senate-havers can just do this by decree)
			has_law = legislative_authority_1
			# Pro-centralization doesn't prevent it
			NOT = {
				AND = {
					has_law = centralization_4
					holder_scope = { check_variable = { which = "var_pro_centralization" value = 0 } }
				}
			}
			# Anti-centralization doesn't prevent it
			NOT = {
				AND = {
					has_law = centralization_2
					holder_scope = { check_variable = { which = "var_anti_centralization" value = 0 } }
				}
			}
			holder_scope = { NOT = { has_character_modifier = constitutional_crisis } }
			OR = {
				has_law = centralization_2
				has_law = centralization_4
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.01
			}
			# Increasing
			# Ideology
			modifier = {
				factor = 0.5
				has_law = centralization_2
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					religion_authority = 0.75
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_2
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					religion_authority = 0.5
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_2
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					religion_authority = 0.25
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_2
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					trait = radical
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_2
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					religion_authority = 0.75
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_2
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					religion_authority = 0.5
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_2
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					religion_authority = 0.25
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_2
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					trait = radical
				}
			}
			# Personality
			modifier = {
				factor = 4
				has_law = centralization_2
				holder_scope = { trait = ambitious }
			}
			modifier = {
				factor = 0.25
				has_law = centralization_2
				holder_scope = { trait = content }
			}
			modifier = {
				factor = 2
				holder_scope = { trait = disciplined }
			}
			modifier = {
				factor = 0.5
				holder_scope = { trait = carefree }
			}
			
			# Politics
			modifier = {
				factor = 0.5
				has_law = centralization_2
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -24 }
						in_faction = faction_anti_centralization
						relative_power_to_liege = 0.1
					}
					NOT = { trait = cold }
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_2
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -49 }
						in_faction = faction_anti_centralization
						relative_power_to_liege = 0.1
					}
					trait = friendly
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_2
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -24 }
						in_faction = faction_pro_centralization
						relative_power_to_liege = 0.1
					}
					NOT = { trait = cold }
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_2
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -49 }
						in_faction = faction_pro_centralization
						relative_power_to_liege = 0.1
					}
					trait = friendly
				}
			}
			modifier = {
				factor = 0.2
				has_law = centralization_2
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = 50 }
						in_faction = faction_anti_centralization
					}
				}
			}
			modifier = {
				factor = 5
				has_law = centralization_2
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = 50 }
						in_faction = faction_pro_centralization
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 0.5
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 1
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 1.5
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 2
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 2.5
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 3
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 0.5
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 1
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 1.5
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 2
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 2.5
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 3
						}
					}
				}
			}
			# Decreasing
			# Ideology
			modifier = {
				factor = 2
				has_law = centralization_4
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					religion_authority = 0.75
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_4
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					religion_authority = 0.5
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_4
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					religion_authority = 0.25
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_4
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					trait = radical
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_4
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					religion_authority = 0.75
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_4
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					religion_authority = 0.5
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_4
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					religion_authority = 0.25
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_4
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					trait = radical
				}
			}
			# Personality
			modifier = {
				factor = 0.25
				has_law = centralization_4
				holder_scope = { trait = ambitious }
			}
			modifier = {
				factor = 4
				has_law = centralization_4
				holder_scope = { trait = content }
			}
			# Politics
			modifier = {
				factor = 2
				has_law = centralization_4
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -24 }
						in_faction = faction_anti_centralization
						relative_power_to_liege = 0.1
					}
					NOT = { trait = cold }
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_4
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -49 }
						in_faction = faction_anti_centralization
						relative_power_to_liege = 0.1
					}
					trait = friendly
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_4
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -24 }
						in_faction = faction_pro_centralization
						relative_power_to_liege = 0.1
					}
					NOT = { trait = cold }
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_4
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -49 }
						in_faction = faction_pro_centralization
						relative_power_to_liege = 0.1
					}
					trait = friendly
				}
			}
			modifier = {
				factor = 5
				has_law = centralization_4
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = 50 }
						in_faction = faction_anti_centralization
					}
				}
			}
			modifier = {
				factor = 0.2
				has_law = centralization_4
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = 50 }
						in_faction = faction_pro_centralization
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_4
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 0.5
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_4
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 1
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_4
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 1.5
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_4
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 2
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_4
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 2.5
						}
					}
				}
			}
			modifier = {
				factor = 2
				has_law = centralization_4
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 3
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_4
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 0.5
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_4
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 1
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_4
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 1.5
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_4
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 2
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_4
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 2.5
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				has_law = centralization_4
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 3
						}
					}
				}
			}
		}
		ai_will_revoke = {
			factor = 0
		}
		# pass_effect = {
			# if = {
				# limit = {
					# OR = {
						# AND = {
							# has_law = centralization_2
							# holder_scope = {
								# OR = {
									# religion = terran_federalist
									# religion = colonial_separatist
									# religion = neo_feudal
									# religion = adoptionist_cultist
									# religion = adoptionist
									# religion = xenoterran
								# }
							# }
						# }
						# AND = {
							# has_law = centralization_4
							# holder_scope = {
								# OR = {
									# religion = terran_republican
									# religion = terran_imperial
									# religion = astrist
									# religion = neo_socialist
									# religion = orthodox
									# religion = solarian
								# }
							# }
						# }
					# }
				# }
				# holder_scope = {
					# piety = -100
					# religion_authority = { modifier = major_hypocritical_reform years = 50 }
				# }
			# }
			# if = {
				# limit = {
					# OR = {
						# AND = {
							# has_law = centralization_4
							# holder_scope = {
								# OR = {
									# religion = terran_federalist
									# religion = colonial_separatist
									# religion = neo_feudal
									# religion = adoptionist_cultist
									# religion = adoptionist
									# religion = xenoterran
								# }
							# }
						# }
						# AND = {
							# has_law = centralization_2
							# holder_scope = {
								# OR = {
									# religion = terran_republican
									# religion = terran_imperial
									# religion = astrist
									# religion = neo_socialist
									# religion = orthodox
									# religion = solarian
								# }
							# }
						# }
					# }
				# }
				# holder_scope = {
					# piety = 100
					# religion_authority = { modifier = major_compatible_reform years = 50 }
				# }
			# }
		# }
		effect = {
			hidden_tooltip = { holder_scope = { character_event = { id = maintenance.900 } } } # Recalculate the Senate
			hidden_tooltip = {
				if = {
					limit = { has_law = centralization_2 }
					holder_scope = {
						set_character_flag = flag_increased_crown_authority
						any_vassal = {
							limit = {
								crownlaw_title = { title = PREVPREVPREV }
								NOT = { in_faction = faction_pro_centralization }
							}
							opinion = { who = ROOT modifier = opinion_raised_crown_authority_bad }
							remove_opinion = { who = ROOT modifier = opinion_lowered_crown_authority_good }
							remove_opinion = { who = ROOT modifier = opinion_lowered_crown_authority_bad }
						}
						any_vassal = {
							limit = {
								crownlaw_title = { title = PREVPREVPREV }
								in_faction = faction_pro_centralization
							}
							opinion = { who = ROOT modifier = opinion_raised_crown_authority_good }
							remove_opinion = { who = ROOT modifier = opinion_lowered_crown_authority_good }
							remove_opinion = { who = ROOT modifier = opinion_lowered_crown_authority_bad }
						}
					}
				}
				if = {
					limit = { has_law = centralization_4 }
					holder_scope = {
						set_character_flag = flag_decreased_crown_authority
						any_vassal = {
							limit = {
								crownlaw_title = { title = PREVPREVPREV }
								NOT = { in_faction = faction_pro_centralization }
							}
							opinion = { who = ROOT modifier = opinion_lowered_crown_authority_bad }
							remove_opinion = { who = ROOT modifier = opinion_raised_crown_authority_good }
							remove_opinion = { who = ROOT modifier = opinion_raised_crown_authority_bad }
						}
						any_vassal = {
							limit = {
								crownlaw_title = { title = PREVPREVPREV }
								in_faction = faction_pro_centralization
							}
							opinion = { who = ROOT modifier = opinion_lowered_crown_authority_good }
							remove_opinion = { who = ROOT modifier = opinion_raised_crown_authority_good }
							remove_opinion = { who = ROOT modifier = opinion_raised_crown_authority_bad }
						}
					}
				}
			}
			hidden_tooltip = {
				revoke_law = centralization_0
				revoke_law = centralization_1
				revoke_law = centralization_2
				revoke_law = centralization_4
			}
			set_appoint_generals = yes
			set_appoint_regents = yes
#			set_the_kings_peace = yes
#			set_the_kings_full_peace = no
			set_protected_inheritance = yes
			set_allow_title_revokation = yes
			set_allow_free_infidel_revokation = yes
			set_allow_free_revokation = no
		}
		
		city_vassal_min_levy = 0.6
		castle_vassal_min_levy = 0.6
		temple_vassal_min_levy = 0.6
	}
	
	centralization_4 = {
		show_as_title = yes
		group = centralization
		
		castle_opinion = -30
		city_opinion = -30
		temple_opinion = -30
		
		potential = {
			NOT = {
				crownlaw_title = {
					NOT = { title = PREV }
					holder_scope = { ROOT = { holder_scope = { is_liege_or_above = PREVPREV } } }
				}
			}
		}
		
		allow = {
			# Has a senate (non-senate-havers can just do this by decree)
			has_law = legislative_authority_1
			# Anti-centralization doesn't prevent it
			NOT = { holder_scope = { check_variable = { which = "var_anti_centralization" value = 0 } } }
			holder_scope = { NOT = { has_character_modifier = constitutional_crisis } }
			has_law = centralization_3
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.01
			}
			# Ideology
			modifier = {
				factor = 0.5
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					religion_authority = 0.75
				}
			}
			modifier = {
				factor = 0.5
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					religion_authority = 0.5
				}
			}
			modifier = {
				factor = 0.5
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					religion_authority = 0.25
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 0.5
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = colonial_separatist
						religion = neo_feudal
						religion = adoptionist_cultist
						religion = adoptionist
						religion = xenoterran
					}
					trait = radical
				}
			}
			modifier = {
				factor = 2
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					religion_authority = 0.75
				}
			}
			modifier = {
				factor = 2
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					religion_authority = 0.5
				}
			}
			modifier = {
				factor = 2
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					religion_authority = 0.25
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 2
				holder_scope = {
					OR = {
						religion = terran_republican
						religion = terran_imperial
						religion = astrist
						religion = neo_socialist
						religion = orthodox
						religion = solarian
					}
					trait = radical
				}
			}
			# Personality
			modifier = {
				factor = 4
				holder_scope = { trait = ambitious }
			}
			modifier = {
				factor = 0.25
				holder_scope = { trait = content }
			}
			modifier = {
				factor = 2
				holder_scope = { trait = disciplined }
			}
			modifier = {
				factor = 0.5
				holder_scope = { trait = carefree }
			}
			
			# Politics
			modifier = {
				factor = 0.5
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -24 }
						in_faction = faction_anti_centralization
						relative_power_to_liege = 0.1
					}
					NOT = { trait = cold }
				}
			}
			modifier = {
				factor = 0.5
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -49 }
						in_faction = faction_anti_centralization
						relative_power_to_liege = 0.1
					}
					trait = friendly
				}
			}
			modifier = {
				factor = 2
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -24 }
						in_faction = faction_pro_centralization
						relative_power_to_liege = 0.1
					}
					NOT = { trait = cold }
				}
			}
			modifier = {
				factor = 2
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = -49 }
						in_faction = faction_pro_centralization
						relative_power_to_liege = 0.1
					}
					trait = friendly
				}
			}
			modifier = {
				factor = 0.2
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = 50 }
						in_faction = faction_anti_centralization
					}
				}
			}
			modifier = {
				factor = 5
				holder_scope = {
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						reverse_opinion = { who = PREV value = 50 }
						in_faction = faction_pro_centralization
					}
				}
			}
			modifier = {
				factor = 0.5
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 0.5
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 1
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 1.5
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 2
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 2.5
						}
					}
				}
			}
			modifier = {
				factor = 0.5
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_anti_centralization
							power = 3
						}
					}
				}
			}
			modifier = {
				factor = 2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 0.5
						}
					}
				}
			}
			modifier = {
				factor = 2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 1
						}
					}
				}
			}
			modifier = {
				factor = 2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 1.5
						}
					}
				}
			}
			modifier = {
				factor = 2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 2
						}
					}
				}
			}
			modifier = {
				factor = 2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 2.5
						}
					}
				}
			}
			modifier = {
				factor = 2
				holder_scope = {
					NOT = { trait = lunatic }
					NOT = { trait = imbecile }
					any_vassal = {
						crownlaw_title = { title = PREVPREVPREV }
						faction_power = {
							faction = faction_pro_centralization
							power = 3
						}
					}
				}
			}
		}
		ai_will_revoke = {
			factor = 0
		}
		# pass_effect = {
			# if = {
				# limit = {
					# holder_scope = {
						# OR = {
							# religion = terran_federalist
							# religion = colonial_separatist
							# religion = neo_feudal
							# religion = adoptionist_cultist
							# religion = adoptionist
							# religion = xenoterran
						# }
					# }
				# }
				# holder_scope = {
					# piety = -100
					# religion_authority = { modifier = major_hypocritical_reform years = 50 }
				# }
			# }
			# if = {
				# limit = {
					# holder_scope = {
						# OR = {
							# religion = terran_republican
							# religion = terran_imperial
							# religion = astrist
							# religion = neo_socialist
							# religion = orthodox
							# religion = solarian
						# }
					# }
				# }
				# holder_scope = {
					# piety = 100
					# religion_authority = { modifier = major_compatible_reform years = 50 }
				# }
			# }
		# }
		effect = {
			hidden_tooltip = { holder_scope = { character_event = { id = maintenance.900 } } } # Recalculate the Senate
			hidden_tooltip = {
				holder_scope = {
					set_character_flag = flag_increased_crown_authority
					any_vassal = {
						limit = {
							crownlaw_title = { title = PREVPREVPREV }
							NOT = { in_faction = faction_pro_centralization }
						}
						opinion = { who = ROOT modifier = opinion_raised_crown_authority_bad }
						remove_opinion = { who = ROOT modifier = opinion_lowered_crown_authority_good }
						remove_opinion = { who = ROOT modifier = opinion_lowered_crown_authority_bad }
					}
					any_vassal = {
						limit = {
							crownlaw_title = { title = PREVPREVPREV }
							in_faction = faction_pro_centralization
						}
						opinion = { who = ROOT modifier = opinion_raised_crown_authority_good }
						remove_opinion = { who = ROOT modifier = opinion_lowered_crown_authority_good }
						remove_opinion = { who = ROOT modifier = opinion_lowered_crown_authority_bad }
					}
				}
			}
			hidden_tooltip = {
				revoke_law = centralization_0
				revoke_law = centralization_1
				revoke_law = centralization_2
				revoke_law = centralization_3
			}
			set_appoint_generals = yes
			set_appoint_regents = yes
#			set_the_kings_peace = yes
#			set_the_kings_full_peace = yes
			set_protected_inheritance = yes
			set_allow_title_revokation = yes
			set_allow_free_infidel_revokation = yes
			set_allow_free_revokation = yes
		}
		
		city_vassal_min_levy = 0.8
		castle_vassal_min_levy = 0.8
		temple_vassal_min_levy = 0.8
	}
	
	# PUBLIC ORDER
	public_order_0 = {
		show_as_title = yes
		group = public_order
		
		potential = {
			NOT = {
				crownlaw_title = {
					NOT = { title = PREV }
					holder_scope = { ROOT = { holder_scope = { is_liege_or_above = PREVPREV } } }
				}
			}
		}
		
		allow = {
			always = yes
		}
		
		revoke_allowed = { always = no }
		
		ai_will_do = { factor = 0 }
		
		pass_effect = {
			holder_scope = {
				prestige = -250
				religion_authority = { modifier = public_order_collapsed years = 100 }
			}
		}
		
		effect = {
			hidden_tooltip = { holder_scope = { character_event = { id = maintenance.900 } } } # Recalculate the Senate
			hidden_tooltip = { revoke_law = public_order_1 }
			set_the_kings_peace = no
		}
		
		# The military can't be relied on to take orders
		city_vassal_min_levy = -10
		castle_vassal_min_levy = -10
		temple_vassal_min_levy = -10
	}
	
	public_order_1 = {
		show_as_title = yes
		group = public_order
		default = yes
		
		potential = {
			NOT = {
				crownlaw_title = {
					NOT = { title = PREV }
					holder_scope = { ROOT = { holder_scope = { is_liege_or_above = PREVPREV } } }
				}
			}
		}
		
		allow = {
			holder_scope = {
				religion_authority = 0.25 # Minimum 25% moral authority
				NOT = { any_vassal = { any_current_enemy = { liege = { character = ROOT } } } } # No vassals at war
				NOT = { has_character_modifier = constitutional_crisis } # No constitutional crisis
				NOT = { any_demesne_province = { revolt_risk = 0.5 } } # No demesne revolt risk above 50%
				hidden_tooltip = { NOT = { any_war = { using_cb = cb_historical_independence_revolt } } }
			}
		}
		
		revoke_allowed = { always = no }
		
		ai_will_do = { factor = 1 } # Always do this if possible
		
		pass_effect = {
			holder_scope = {
				prestige = 250
				religion_authority = { modifier = public_order_restored years = 100 }
			}
		}
		
		effect = {
			hidden_tooltip = { holder_scope = { character_event = { id = maintenance.900 } } } # Recalculate the Senate
			hidden_tooltip = { revoke_law = public_order_0 }
			set_the_kings_peace = yes
		}
	}

	# LEGISLATIVE AUTHORITY
	legislative_authority_0 = {	# No Legislature
		show_as_title = yes
		group = legislative_authority
		default = yes
		
		potential = { always = yes }
		allow = { holder_scope = { check_variable = { which = "var_abolish_legislature" value = 1 } } }
		revoke_allowed = { always = no }
		ai_will_do = { factor = 1 }
		effect = { hidden_tooltip = { revoke_law = legislative_authority_1 } }
	}
	legislative_authority_1 = {	# Legislature
		show_as_title = yes
		group = legislative_authority
		default = no
		
		castle_opinion = 35
		city_opinion = 35
		temple_opinion = 35
		
		potential = { always = yes }
		allow = { always = no } # These decisions are made by decree
		revoke_allowed = { always = no }
		ai_will_do = { factor = 0 }
		effect = {
			hidden_tooltip = { revoke_law = legislative_authority_0 }
			holder_scope = {
				clr_character_flag = flag_founded_legislature
				set_character_flag = flag_founded_legislature
				hidden_tooltip = { character_event = { id = maintenance.900 } } # calculate initial senate
			}
		}
	}
	# CROWN TERM LENGTH
	crown_term_length_0 = { # Annual
		show_as_title = yes
		group = crown_term_length
		
		# Annual elections cause no end of headaches
		city_opinion = -15
		castle_opinion = -15
		temple_opinion = -15
		
		potential = {
			OR = {
				has_law = succ_feudal_elective
				has_law = succ_open_elective
				has_law = succ_patrician_elective
			}
		}
		allow = {
			# Prestige cost
			OR = {
				has_law = crown_term_length_1
				holder_scope = { prestige = 100 }
			}
			OR = {
				has_law = crown_term_length_1
				has_law = crown_term_length_2
				holder_scope = { prestige = 200 }
			}
			OR = {
				has_law = crown_term_length_1
				has_law = crown_term_length_2
				has_law = crown_term_length_3
				holder_scope = { prestige = 300 }
			}
		}
		revoke_allowed = { always = no }
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.1
			}
			modifier = {
				factor = 0.1
				NOT = { has_law = crown_term_length_1 }
			}
			modifier = {
				factor = 0.1
				NOT = { has_law = crown_term_length_1 }
				NOT = { has_law = crown_term_length_2 }
			}
			modifier = {
				factor = 0.1
				NOT = { has_law = crown_term_length_1 }
				NOT = { has_law = crown_term_length_2 }
				NOT = { has_law = crown_term_length_3 }
			}
			# Annual elections are a terrible idea
			modifier = {
				factor = 0
				NOT = {
					holder_scope = {
						OR = {
							religion = terran_federalist
							religion = terran_republican
							religion = colonial_separatist
							religion = neo_socialist
						}
						OR = {
							trait = radical
							trait = lunatic
							trait = imbecile
						}
						OR = {
							trait = content
							trait = friendly
							trait = open_minded
						}
					}
				}
			}
			modifier = {
				factor = 0
				holder_scope = { trait = pragmatic }
			}
			modifier = {
				factor = 0
				holder_scope = { trait = cold }
			}
			modifier = {
				factor = 0
				holder_scope = { trait = ambitious }
			}
			modifier = {
				factor = 0
				holder_scope = { trait = close_minded }
			}
		}
		ai_will_revoke = { factor = 0 }
		pass_effect = {
			if = {
				limit = { has_law = crown_term_length_2 }
				holder_scope = { prestige = -100 }
			}
			if = {
				limit = { has_law = crown_term_length_3 }
				holder_scope = { prestige = -200 }
			}
			if = {
				limit = { has_law = crown_term_length_4 }
				holder_scope = { prestige = -300 }
			}
		}
		effect = {
			hidden_tooltip = { holder_scope = { character_event = { id = maintenance.900 } } } # Recalculate the Senate
			hidden_tooltip = {
				revoke_law = crown_term_length_1
				revoke_law = crown_term_length_2
				revoke_law = crown_term_length_3
				revoke_law = crown_term_length_4
			}
		}
	}
	crown_term_length_1 = { # Every Four Years
		show_as_title = yes
		group = crown_term_length
		
		# The ruler gets an opinion bonus to compensate for short reign penalties
		city_opinion = 20
		castle_opinion = 20
		temple_opinion = 20
		
		potential = {
			OR = {
				has_law = succ_feudal_elective
				has_law = succ_open_elective
				has_law = succ_patrician_elective
			}
			# These are a republican thing
			holder_scope = {
				OR = {
					government = military_republic
					government = corporate_republic
					government = merchant_republic_government
					government = administrative_republic
				}
			}
		}
		allow = {
			# Prestige cost
			OR = {
				has_law = crown_term_length_0
				has_law = crown_term_length_2
				holder_scope = { prestige = 100 }
			}
			OR = {
				has_law = crown_term_length_0
				has_law = crown_term_length_2
				has_law = crown_term_length_3
				holder_scope = { prestige = 200 }
			}
		}
		revoke_allowed = { always = no }
		ai_will_do = {
			factor = 1
			# Inertia
			modifier = {
				factor = 0.1
			}
			modifier = {
				factor = 0.1
				NOT = { has_law = crown_term_length_0 }
				NOT = { has_law = crown_term_length_2 }
			}
			modifier = {
				factor = 0.1
				NOT = { has_law = crown_term_length_0 }
				NOT = { has_law = crown_term_length_2 }
				NOT = { has_law = crown_term_length_3 }
			}
			# Ruler's personality
			modifier = {
				factor = 0.2
				holder_scope = { trait = close_minded }
			}
			modifier = {
				factor = 5
				holder_scope = { trait = open_minded }
			}
			modifier = {
				factor = 0.2
				OR = {
					has_law = crown_term_length_2
					has_law = crown_term_length_3
					has_law = crown_term_length_4
				}
				holder_scope = { trait = ambitious }
			}
			modifier = {
				factor = 5
				has_law = crown_term_length_0
				holder_scope = { trait = ambitious }
			}
			modifier = {
				factor = 0.2
				has_law = crown_term_length_0
				holder_scope = { trait = content }
			}
			# Ruler's ideology
			modifier = {
				factor = 4
				OR = {
					has_law = crown_term_length_2
					has_law = crown_term_length_3
					has_law = crown_term_length_4
				}
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = terran_republican
						religion = colonial_separatist
						religion = neo_socialist
					}
				}
			}
			modifier = {
				factor = 4
				OR = {
					has_law = crown_term_length_2
					has_law = crown_term_length_3
					has_law = crown_term_length_4
				}
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = terran_republican
						religion = colonial_separatist
						religion = neo_socialist
					}
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 4
				OR = {
					has_law = crown_term_length_2
					has_law = crown_term_length_3
					has_law = crown_term_length_4
				}
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = terran_republican
						religion = colonial_separatist
						religion = neo_socialist
					}
					trait = radical
				}
			}
			modifier = {
				factor = 0.25
				OR = {
					has_law = crown_term_length_2
					has_law = crown_term_length_3
					has_law = crown_term_length_4
				}
				holder_scope = {
					OR = {
						religion = terran_imperial
						religion = imperial_cult
						religion = neo_feudal
						religion = astrist
						religion = space_pirate
					}
				}
			}
			modifier = {
				factor = 0.25
				OR = {
					has_law = crown_term_length_2
					has_law = crown_term_length_3
					has_law = crown_term_length_4
				}
				holder_scope = {
					OR = {
						religion = terran_imperial
						religion = imperial_cult
						religion = neo_feudal
						religion = astrist
						religion = space_pirate
					}
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 0.25
				OR = {
					has_law = crown_term_length_2
					has_law = crown_term_length_3
					has_law = crown_term_length_4
				}
				holder_scope = {
					OR = {
						religion = terran_imperial
						religion = imperial_cult
						religion = neo_feudal
						religion = astrist
						religion = space_pirate
					}
					trait = radical
				}
			}
		}
		ai_will_revoke = { factor = 0 }
		pass_effect = {
			if = {
				limit = { has_law = crown_term_length_3 }
				holder_scope = { prestige = -100 }
			}
			if = {
				limit = { has_law = crown_term_length_4 }
				holder_scope = { prestige = -200 }
			}
		}
		effect = {
			hidden_tooltip = { holder_scope = { character_event = { id = maintenance.900 } } } # Recalculate the Senate
			hidden_tooltip = {
				revoke_law = crown_term_length_0
				revoke_law = crown_term_length_2
				revoke_law = crown_term_length_3
				revoke_law = crown_term_length_4
			}
		}
	}
	crown_term_length_2 = { # Every Six Years
		show_as_title = yes
		group = crown_term_length
		
		# The ruler gets an opinion bonus to compensate for short reign penalties
		city_opinion = 15
		castle_opinion = 15
		temple_opinion = 15
		
		potential = {
			OR = {
				has_law = succ_feudal_elective
				has_law = succ_open_elective
				has_law = succ_patrician_elective
			}
			# These are a republican thing
			holder_scope = {
				OR = {
					government = military_republic
					government = corporate_republic
					government = merchant_republic_government
					government = administrative_republic
				}
			}
		}
		allow = {
			# Prestige cost
			OR = {
				has_law = crown_term_length_1
				has_law = crown_term_length_3
				holder_scope = { prestige = 100 }
			}
		}
		revoke_allowed = { always = no }
		ai_will_do = {
			factor = 1
			# Inertia
			modifier = {
				factor = 0.1
			}
			modifier = {
				factor = 0.1
				NOT = { has_law = crown_term_length_1 }
				NOT = { has_law = crown_term_length_3 }
			}
			# Ruler's personality
			modifier = {
				factor = 0.2
				holder_scope = { trait = close_minded }
			}
			modifier = {
				factor = 5
				holder_scope = { trait = open_minded }
			}
			modifier = {
				factor = 0.2
				OR = {
					has_law = crown_term_length_3
					has_law = crown_term_length_4
				}
				holder_scope = { trait = ambitious }
			}
			modifier = {
				factor = 5
				has_law = crown_term_length_0
				holder_scope = { trait = ambitious }
			}
			modifier = {
				factor = 0.2
				has_law = crown_term_length_0
				holder_scope = { trait = content }
			}
			# Ruler's ideology
			modifier = {
				factor = 4
				OR = {
					has_law = crown_term_length_3
					has_law = crown_term_length_4
				}
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = terran_republican
						religion = colonial_separatist
						religion = neo_socialist
					}
				}
			}
			modifier = {
				factor = 4
				OR = {
					has_law = crown_term_length_3
					has_law = crown_term_length_4
				}
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = terran_republican
						religion = colonial_separatist
						religion = neo_socialist
					}
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 4
				OR = {
					has_law = crown_term_length_3
					has_law = crown_term_length_4
				}
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = terran_republican
						religion = colonial_separatist
						religion = neo_socialist
					}
					trait = radical
				}
			}
			modifier = {
				factor = 0.25
				OR = {
					has_law = crown_term_length_0
					has_law = crown_term_length_1
				}
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = terran_republican
						religion = colonial_separatist
						religion = neo_socialist
					}
				}
			}
			modifier = {
				factor = 0.25
				OR = {
					has_law = crown_term_length_0
					has_law = crown_term_length_1
				}
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = terran_republican
						religion = colonial_separatist
						religion = neo_socialist
					}
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 0.25
				OR = {
					has_law = crown_term_length_0
					has_law = crown_term_length_1
				}
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = terran_republican
						religion = colonial_separatist
						religion = neo_socialist
					}
					trait = radical
				}
			}
			modifier = {
				factor = 0.25
				OR = {
					has_law = crown_term_length_3
					has_law = crown_term_length_4
				}
				holder_scope = {
					OR = {
						religion = terran_imperial
						religion = imperial_cult
						religion = neo_feudal
						religion = astrist
						religion = space_pirate
					}
				}
			}
			modifier = {
				factor = 0.25
				OR = {
					has_law = crown_term_length_3
					has_law = crown_term_length_4
				}
				holder_scope = {
					OR = {
						religion = terran_imperial
						religion = imperial_cult
						religion = neo_feudal
						religion = astrist
						religion = space_pirate
					}
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 0.25
				OR = {
					has_law = crown_term_length_3
					has_law = crown_term_length_4
				}
				holder_scope = {
					OR = {
						religion = terran_imperial
						religion = imperial_cult
						religion = neo_feudal
						religion = astrist
						religion = space_pirate
					}
					trait = radical
				}
			}
			modifier = {
				factor = 4
				OR = {
					has_law = crown_term_length_0
					has_law = crown_term_length_1
				}
				holder_scope = {
					OR = {
						religion = terran_imperial
						religion = imperial_cult
						religion = neo_feudal
						religion = astrist
						religion = space_pirate
					}
				}
			}
			modifier = {
				factor = 4
				OR = {
					has_law = crown_term_length_0
					has_law = crown_term_length_1
				}
				holder_scope = {
					OR = {
						religion = terran_imperial
						religion = imperial_cult
						religion = neo_feudal
						religion = astrist
						religion = space_pirate
					}
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 4
				OR = {
					has_law = crown_term_length_0
					has_law = crown_term_length_1
				}
				holder_scope = {
					OR = {
						religion = terran_imperial
						religion = imperial_cult
						religion = neo_feudal
						religion = astrist
						religion = space_pirate
					}
					trait = radical
				}
			}
		}
		ai_will_revoke = { factor = 0 }
		pass_effect = {
			if = {
				limit = {
					OR = {
						has_law = crown_term_length_0
						has_law = crown_term_length_4
					}
				}
				holder_scope = { prestige = -100 }
			}
		}
		effect = {
			hidden_tooltip = { holder_scope = { character_event = { id = maintenance.900 } } } # Recalculate the Senate
			hidden_tooltip = {
				revoke_law = crown_term_length_0
				revoke_law = crown_term_length_1
				revoke_law = crown_term_length_3
				revoke_law = crown_term_length_4
			}
		}
	}
	crown_term_length_3 = { # Every Ten Years
		show_as_title = yes
		group = crown_term_length
		
		# The ruler gets an opinion bonus to compensate for short reign penalties
		city_opinion = 10
		castle_opinion = 10
		temple_opinion = 10
		
		potential = {
			OR = {
				has_law = succ_feudal_elective
				has_law = succ_open_elective
				has_law = succ_patrician_elective
			}
			# These are a republican thing
			holder_scope = {
				OR = {
					government = military_republic
					government = corporate_republic
					government = merchant_republic_government
					government = administrative_republic
				}
			}
		}
		allow = {
			# Prestige cost
			OR = {
				has_law = crown_term_length_2
				has_law = crown_term_length_4
				holder_scope = { prestige = 100 }
			}
			OR = {
				has_law = crown_term_length_1
				has_law = crown_term_length_2
				has_law = crown_term_length_4
				holder_scope = { prestige = 200 }
			}
		}
		revoke_allowed = { always = no }
		ai_will_do = {
			factor = 1
			# Inertia
			modifier = {
				factor = 0.1
			}
			modifier = {
				factor = 0.1
				NOT = { has_law = crown_term_length_2 }
				NOT = { has_law = crown_term_length_4 }
			}
			modifier = {
				factor = 0.1
				NOT = { has_law = crown_term_length_1 }
				NOT = { has_law = crown_term_length_2 }
				NOT = { has_law = crown_term_length_4 }
			}
			# Ruler's personality
			modifier = {
				factor = 0.2
				holder_scope = { trait = close_minded }
			}
			modifier = {
				factor = 5
				holder_scope = { trait = open_minded }
			}
			modifier = {
				factor = 0.2
				has_law = crown_term_length_4
				holder_scope = { trait = ambitious }
			}
			modifier = {
				factor = 5
				OR = {
					has_law = crown_term_length_0
					has_law = crown_term_length_1
					has_law = crown_term_length_2
				}
				holder_scope = { trait = ambitious }
			}
			modifier = {
				factor = 0.2
				OR = {
					has_law = crown_term_length_0
					has_law = crown_term_length_1
					has_law = crown_term_length_2
				}
				holder_scope = { trait = content }
			}
			# Ruler's ideology
			modifier = {
				factor = 0.25
				OR = {
					has_law = crown_term_length_0
					has_law = crown_term_length_1
					has_law = crown_term_length_2
				}
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = terran_republican
						religion = colonial_separatist
						religion = neo_socialist
					}
				}
			}
			modifier = {
				factor = 0.25
				OR = {
					has_law = crown_term_length_0
					has_law = crown_term_length_1
					has_law = crown_term_length_2
				}
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = terran_republican
						religion = colonial_separatist
						religion = neo_socialist
					}
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 0.25
				OR = {
					has_law = crown_term_length_0
					has_law = crown_term_length_1
					has_law = crown_term_length_2
				}
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = terran_republican
						religion = colonial_separatist
						religion = neo_socialist
					}
					trait = radical
				}
			}
			modifier = {
				factor = 4
				OR = {
					has_law = crown_term_length_0
					has_law = crown_term_length_1
					has_law = crown_term_length_2
				}
				holder_scope = {
					OR = {
						religion = terran_imperial
						religion = imperial_cult
						religion = neo_feudal
						religion = astrist
						religion = space_pirate
					}
				}
			}
			modifier = {
				factor = 4
				OR = {
					has_law = crown_term_length_0
					has_law = crown_term_length_1
					has_law = crown_term_length_2
				}
				holder_scope = {
					OR = {
						religion = terran_imperial
						religion = imperial_cult
						religion = neo_feudal
						religion = astrist
						religion = space_pirate
					}
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 4
				OR = {
					has_law = crown_term_length_0
					has_law = crown_term_length_1
					has_law = crown_term_length_2
				}
				holder_scope = {
					OR = {
						religion = terran_imperial
						religion = imperial_cult
						religion = neo_feudal
						religion = astrist
						religion = space_pirate
					}
					trait = radical
				}
			}
		}
		ai_will_revoke = { factor = 0 }
		pass_effect = {
			if = {
				limit = { has_law = crown_term_length_1 }
				holder_scope = { prestige = -100 }
			}
			if = {
				limit = { has_law = crown_term_length_0 }
				holder_scope = { prestige = -200 }
			}
		}
		effect = {
			hidden_tooltip = { holder_scope = { character_event = { id = maintenance.900 } } } # Recalculate the Senate
			hidden_tooltip = {
				revoke_law = crown_term_length_0
				revoke_law = crown_term_length_1
				revoke_law = crown_term_length_2
				revoke_law = crown_term_length_4
			}
		}
	}
	crown_term_length_4 = { # No Elections
		show_as_title = yes
		group = crown_term_length
		default = yes
		
		potential = {
			OR = {
				has_law = succ_feudal_elective
				has_law = succ_open_elective
				has_law = succ_patrician_elective
			}
			# These are a republican thing
			holder_scope = {
				OR = {
					government = military_republic
					government = corporate_republic
					government = merchant_republic_government
					government = administrative_republic
				}
			}
		}
		allow = {
			# Prestige cost
			OR = {
				has_law = crown_term_length_3
				holder_scope = { prestige = 100 }
			}
			OR = {
				has_law = crown_term_length_2
				has_law = crown_term_length_3
				holder_scope = { prestige = 200 }
			}
			OR = {
				has_law = crown_term_length_1
				has_law = crown_term_length_2
				has_law = crown_term_length_3
				holder_scope = { prestige = 300 }
			}
		}
		revoke_allowed = { always = no }
		ai_will_do = {
			factor = 1
			# Inertia
			modifier = {
				factor = 0.1
			}
			modifier = {
				factor = 0.1
				NOT = { has_law = crown_term_length_3 }
			}
			modifier = {
				factor = 0.1
				NOT = { has_law = crown_term_length_2 }
				NOT = { has_law = crown_term_length_3 }
			}
			modifier = {
				factor = 0.1
				NOT = { has_law = crown_term_length_1 }
				NOT = { has_law = crown_term_length_2 }
				NOT = { has_law = crown_term_length_3 }
			}
			modifier = {
				factor = 5
				holder_scope = { trait = ambitious }
			}
			# Need a positive reason to do this
			modifier = {
				factor = 0
				NOT = {
					holder_scope = {
						OR = {
							trait = ambitious
							religion = terran_imperial
							religion = imperial_cult
							religion = neo_feudal
							religion = astrist
							religion = space_pirate
						}
					}
				}
			}
			modifier = {
				factor = 0
				holder_scope = {
					OR = {
						religion = terran_federalist
						religion = terran_republican
						religion = colonial_separatist
						religion = neo_socialist
					}
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 0
				holder_scope = { trait = content }
			}
			modifier = {
				factor = 0
				holder_scope = { trait = close_minded }
			}
		}
		ai_will_revoke = { factor = 0 }
		pass_effect = {
			if = {
				limit = { has_law = crown_term_length_2 }
				holder_scope = { prestige = -100 }
			}
			if = {
				limit = { has_law = crown_term_length_1 }
				holder_scope = { prestige = -200 }
			}
			if = {
				limit = { has_law = crown_term_length_0 }
				holder_scope = { prestige = -300 }
			}
		}
		effect = {
			hidden_tooltip = { holder_scope = { character_event = { id = maintenance.900 } } } # Recalculate the Senate
			hidden_tooltip = {
				revoke_law = crown_term_length_0
				revoke_law = crown_term_length_1
				revoke_law = crown_term_length_2
				revoke_law = crown_term_length_3
			}
		}
	}
	# MILITARY VASSAL LEGITIMACY
	military_vassal_legitimacy_0 = { # Inheritance
		show_as_title = yes
		group = military_vassal_legitimacy
		
		potential = {
			OR = {
				has_law = centralization_1
				has_law = centralization_2
				has_law = centralization_3
				has_law = centralization_4
			}
		}
		
		allow = {
			always = yes
		}
		
		revoke_allowed = { always = no }
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.1
			}
			modifier = {
				factor = 0
				holder_scope = {
					NOT = { religion = terran_imperial }
					NOT = { religion = neo_feudal }
					NOT = { religion = bio_directionist }
				}
			}
			modifier = {
				factor = 0
				holder_scope = { trait = pragmatic }
			}
			modifier = {
				factor = 0
				holder_scope = {
					trait = ambitious
					NOT = { trait = radical }
				}
			}
			modifier = {
				factor = 0
				holder_scope = { trait = content }
			}
			modifier = {
				factor = 0
				NOT = {
					holder_scope = {
						any_vassal = {
							OR = {
								government = military_monarchy
								government = military_republic
								government = military_directorate
							}
						}
					}
				}
			}
		}
		ai_will_revoke = { factor = 0 }
		
		effect = {
			hidden_tooltip = { holder_scope = { character_event = { id = maintenance.900 } } } # Recalculate the Senate
			hidden_tooltip = {
				revoke_law = military_vassal_legitimacy_1
				revoke_law = military_vassal_legitimacy_2
				holder_scope = { any_realm_character = { character_event = { id = government.100 } } }
			}
		}
	}
	military_vassal_legitimacy_1 = { # Election
		show_as_title = yes
		group = military_vassal_legitimacy
		
		potential = {
			OR = {
				has_law = centralization_1
				has_law = centralization_2
				has_law = centralization_3
				has_law = centralization_4
			}
		}
		
		allow = {
			always = yes
		}
		
		revoke_allowed = { always = no }
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.1
			}
			modifier = {
				factor = 0
				holder_scope = {
					NOT = { religion = astrist }
					NOT = { trait = carefree }
					NOT = { trait = humble }
					NOT = { trait = friendly }
				}
			}
			modifier = {
				factor = 0
				holder_scope = {
					NOT = { religion = astrist }
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 0
				holder_scope = { trait = content }
			}
			modifier = {
				factor = 0
				holder_scope = { trait = proud }
			}
			modifier = {
				factor = 0
				holder_scope = { trait = ambitious }
			}
			modifier = {
				factor = 0
				NOT = {
					holder_scope = {
						any_vassal = {
							OR = {
								government = military_monarchy
								government = military_republic
								government = military_directorate
							}
						}
					}
				}
			}
		}
		ai_will_revoke = { factor = 0 }
		
		effect = {
			hidden_tooltip = { holder_scope = { character_event = { id = maintenance.900 } } } # Recalculate the Senate
			hidden_tooltip = {
				revoke_law = military_vassal_legitimacy_0
				revoke_law = military_vassal_legitimacy_2
				holder_scope = { any_realm_character = { character_event = { id = government.200 } } }
			}
		}
	}
	military_vassal_legitimacy_2 = { # Appointment
		show_as_title = yes
		group = military_vassal_legitimacy
		default = yes
		
		potential = {
			OR = {
				has_law = centralization_1
				has_law = centralization_2
				has_law = centralization_3
				has_law = centralization_4
			}
		}
		
		allow = {
			always = yes
		}
		
		revoke_allowed = { always = no }
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.1
			}
			modifier = {
				factor = 0
				holder_scope = {
					OR = {
						religion = neo_feudal
						religion = terran_imperial
						religion = bio_directionist
					}
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 0
				holder_scope = {
					NOT = { trait = radical }
					NOT = { trait = ambitious }
					NOT = { government = military_command }
				}
			}
			modifier = {
				factor = 0
				holder_scope = { trait = content }
			}
			modifier = {
				factor = 0
				holder_scope = { trait = carefree }
			}
			modifier = {
				factor = 0
				NOT = {
					holder_scope = {
						any_vassal = {
							OR = {
								government = military_monarchy
								government = military_republic
								government = military_directorate
							}
						}
					}
				}
			}
		}
		ai_will_revoke = { factor = 0 }
		
		effect = {
			hidden_tooltip = { holder_scope = { character_event = { id = maintenance.900 } } } # Recalculate the Senate
			hidden_tooltip = {
				revoke_law = military_vassal_legitimacy_0
				revoke_law = military_vassal_legitimacy_1
				holder_scope = { any_realm_character = { character_event = { id = government.300 } } }
			}
		}
	}
	# REPUBLIC VASSAL LEGITIMACY
	republic_vassal_legitimacy_0 = { # Inheritance
		show_as_title = yes
		group = republic_vassal_legitimacy
		
		potential = {
			OR = {
				has_law = centralization_1
				has_law = centralization_2
				has_law = centralization_3
				has_law = centralization_4
			}
		}
		
		allow = {
			always = yes
		}
		
		revoke_allowed = { always = no }
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.1
			}
			modifier = {
				factor = 0
				holder_scope = {
					NOT = { religion = neo_feudal }
					NOT = { religion = bio_directionist }
				}
			}
			modifier = {
				factor = 0
				holder_scope = { trait = pragmatic }
			}
			modifier = {
				factor = 0
				holder_scope = {
					trait = ambitious
					NOT = { trait = radical }
				}
			}
			modifier = {
				factor = 0
				holder_scope = { trait = content }
			}
			modifier = {
				factor = 0
				NOT = {
					holder_scope = {
						any_vassal = {
							OR = {
								government = corporate_monarchy
								government = corporate_republic
								government = corporate_directorate
							}
						}
					}
				}
			}
		}
		ai_will_revoke = { factor = 0 }
		
		effect = {
			hidden_tooltip = { holder_scope = { character_event = { id = maintenance.900 } } } # Recalculate the Senate
			hidden_tooltip = {
				revoke_law = republic_vassal_legitimacy_1
				revoke_law = republic_vassal_legitimacy_2
				holder_scope = { any_realm_character = { character_event = { id = government.400 } } }
			}
		}
	}
	republic_vassal_legitimacy_1 = { # Election
		show_as_title = yes
		group = republic_vassal_legitimacy
		default = yes
		
		potential = {
			OR = {
				has_law = centralization_1
				has_law = centralization_2
				has_law = centralization_3
				has_law = centralization_4
			}
		}
		
		allow = {
			always = yes
		}
		
		revoke_allowed = { always = no }
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.1
			}
			modifier = {
				factor = 0
				holder_scope = {
					OR = {
						religion = terran_imperial
						religion = neo_feudal
						religion = imperial_cult
						religion = terran_republican
						religion = bio_directionist
						religion = astrist
						religion = neo_socialist
					}
					NOT = { trait = pragmatic }
				}
			}
			modifier = {
				factor = 0
				holder_scope = {
					NOT = { trait = radical }
					NOT = { trait = humble }
					NOT = { trait = friendly }
				}
			}
			modifier = {
				factor = 0
				holder_scope = { trait = content }
			}
			modifier = {
				factor = 0
				NOT = {
					holder_scope = {
						any_vassal = {
							OR = {
								government = corporate_monarchy
								government = corporate_republic
								government = corporate_directorate
							}
						}
					}
				}
			}
		}
		ai_will_revoke = { factor = 0 }
		
		effect = {
			hidden_tooltip = { holder_scope = { character_event = { id = maintenance.900 } } } # Recalculate the Senate
			hidden_tooltip = {
				revoke_law = republic_vassal_legitimacy_0
				revoke_law = republic_vassal_legitimacy_2
				holder_scope = {
					any_realm_character = {
						character_event = { id = government.500 }
						character_event = { id = government.550 }
					}
				}
			}
		}
	}
	republic_vassal_legitimacy_2 = { # Appointment
		show_as_title = yes
		group = republic_vassal_legitimacy
		
		potential = {
			OR = {
				has_law = centralization_1
				has_law = centralization_2
				has_law = centralization_3
				has_law = centralization_4
			}
		}
		
		allow = {
			always = yes
		}
		
		revoke_allowed = { always = no }
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.1
			}
			modifier = {
				factor = 0
				holder_scope = {
					NOT = { religion = terran_imperial }
					NOT = { religion = imperial_cult }
					NOT = { religion = terran_republican }
					NOT = { religion = astrist }
					NOT = { religion = neo_socialist }
					NAND = {
						trait = pragmatic
						trait = ambitious
					}
				}
			}
			modifier = {
				factor = 0
				holder_scope = { trait = content }
			}
			modifier = {
				factor = 0
				holder_scope = {
					NOT = { trait = radical }
					trait = carefree
				}
			}
			modifier = {
				factor = 0
				NOT = {
					holder_scope = {
						any_vassal = {
							OR = {
								government = corporate_monarchy
								government = corporate_republic
								government = corporate_directorate
							}
						}
					}
				}
			}
		}
		ai_will_revoke = { factor = 0 }
		
		effect = {
			hidden_tooltip = { holder_scope = { character_event = { id = maintenance.900 } } } # Recalculate the Senate
			hidden_tooltip = {
				revoke_law = republic_vassal_legitimacy_0
				revoke_law = republic_vassal_legitimacy_1
				holder_scope = { any_realm_character = { character_event = { id = government.600 } } }
			}
		}
	}
	
	# THEOCRACY VASSAL LEGITIMACY
	theocracy_vassal_legitimacy_0 = { # Inheritance
		show_as_title = yes
		group = theocracy_vassal_legitimacy
		
		potential = {
			OR = {
				has_law = centralization_1
				has_law = centralization_2
				has_law = centralization_3
				has_law = centralization_4
			}
		}
		
		allow = {
			always = yes
		}
		
		revoke_allowed = { always = no }
		ai_will_do = { factor = 0 }
		ai_will_revoke = { factor = 0 }
		
		effect = {
			hidden_tooltip = { holder_scope = { character_event = { id = maintenance.900 } } } # Recalculate the Senate
			hidden_tooltip = {
				revoke_law = theocracy_vassal_legitimacy_1
				revoke_law = theocracy_vassal_legitimacy_2
				holder_scope = { any_realm_character = { character_event = { id = government.700 } } }
			}
		}
	}
	theocracy_vassal_legitimacy_1 = { # Election
		show_as_title = yes
		group = theocracy_vassal_legitimacy
		
		potential = {
			OR = {
				has_law = centralization_1
				has_law = centralization_2
				has_law = centralization_3
				has_law = centralization_4
			}
		}
		
		allow = {
			always = yes
		}
		
		revoke_allowed = { always = no }
		ai_will_do = { factor = 0 }
		ai_will_revoke = { factor = 0 }
		
		effect = {
			hidden_tooltip = { holder_scope = { character_event = { id = maintenance.900 } } } # Recalculate the Senate
			hidden_tooltip = {
				revoke_law = theocracy_vassal_legitimacy_0
				revoke_law = theocracy_vassal_legitimacy_2
				holder_scope = { any_realm_character = { character_event = { id = government.800 } } }
			}
		}
	}
	theocracy_vassal_legitimacy_2 = { # Appointment
		show_as_title = yes
		group = theocracy_vassal_legitimacy
		default = yes
		
		potential = {
			OR = {
				has_law = centralization_1
				has_law = centralization_2
				has_law = centralization_3
				has_law = centralization_4
			}
		}
		
		allow = {
			always = yes
		}
		
		revoke_allowed = { always = no }
		ai_will_do = { factor = 0 }
		ai_will_revoke = { factor = 0 }
		
		effect = {
			hidden_tooltip = { holder_scope = { character_event = { id = maintenance.900 } } } # Recalculate the Senate
			hidden_tooltip = {
				revoke_law = theocracy_vassal_legitimacy_0
				revoke_law = theocracy_vassal_legitimacy_1
				holder_scope = { any_realm_character = { character_event = { id = government.900 } } }
			}
		}
	}
}