title_decisions = {
	claim_settlement = {
		filter = all
		ai_target_filter = self

		from_potential = {
			ai = no
		}
		potential = {
			holder_scope = {
				liege = { character = FROM }
				NOT = { character = FROM }
				OR = {
					NOT = { higher_tier_than = BARON }
					AND = {
						NOT = { higher_tier_than = DUKE }
						is_theocracy = yes
					}
				}
			}
		}
		allow = {
			is_capital = no
		}
		effect = {
			add_pressed_claim = FROM
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}
	zero_build = {
		filter = all
		ai_target_filter = owned

		from_potential = {
			ai = no
		}
		potential = {
			real_tier = COUNT
		}
		allow = {
			NOT = {
				location = { has_province_modifier = grandmaster_builder }
			}
		}
		effect = {
			location = {
				add_province_modifier = {
					name = grandmaster_builder
					duration = 365
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}
}
settlement_decisions = {
	castle_convert_settlement = {
		filter = sub_realm_owned
		ai_target_filter = owned

		from_potential = {
			ai = no
			is_tribal = no
		}
		potential = {
			holder_scope = {
				character = FROM
			}
			not = { holding_type = tribal }
			not = { is_holy_site = FROM }
			not = { holding_type = castle }
		}
		allow = {
			is_capital = no
		}
		effect = {
			convert_to = castle
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}

	city_convert_settlement = {
		filter = sub_realm_owned
		ai_target_filter = owned

		from_potential = {
			ai = no
			is_tribal = no
		}
		potential = {
			holder_scope = {
				character = FROM
			}
			not = { holding_type = tribal }
			not = { is_holy_site = FROM }
			not = { holding_type = city }
		}
		allow = {
			is_capital = no
		}
		effect = {
			convert_to = city
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}

	tribal_convert_settlement = {
		filter = sub_realm_owned
		ai_target_filter = owned

		from_potential = {
			ai = no
			is_tribal = yes
		}
		potential = {
			holder_scope = {
				character = FROM
			}
			not = { holding_type = tribal }
			not = { is_holy_site = FROM }
			not = { holding_type = temple }
		}
		allow = {
			is_capital = yes
		}
		effect = {
			convert_to = tribal
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}

	tribal_destroy_settlement = {
		filter = sub_realm_owned
		ai_target_filter = owned

		from_potential = {
			ai = no
			is_tribal = yes
		}
		potential = {
			holder_scope = {
				character = FROM
			}
			not = { is_holy_site = FROM }
		}
		allow = {
			is_capital = no
		}
		effect = {
			destroy_settlement = this
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}

	refill_levy_settlement = {
		filter = all
		ai_target_filter = sub_realm_owned

		from_potential = {
			ai = no
		}
		potential = {
		}
		allow = {
		}
		effect = {
			refill_holding_levy = yes
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}
}

trade_post_decisions = {
	destroy_trade_post = {
		filter = sub_realm_owned
		ai_target_filter = sub_realm_owned

		from_potential = {
			ai = no
		}
		potential = {
		}
		allow = {
		}
		effect = {
			destroy_tradepost = THIS
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0
		}
	}
}