society_decisions = {
	request_to_rank_up_within_esoteric_order = {

		hide_in_decisions_list = yes
		
		potential = {
			hidden_tooltip = {
				society_rank < 4
				days_in_society > 365
				is_in_society = yes
				OR = {
					ai = no
					AND = {
						ai = yes
						society_can_rank_up = yes
					}
				}
			}
		}

		allow = {
			custom_tooltip = {
				text = request_to_rank_up_within_esoteric_order_tt
				OR = {
					AND = {
						society_rank == 1
						society_currency >= 750
					}
					AND = {
						society_rank == 2
						society_currency >= 1000
					}
					AND = {
						society_rank == 3
						society_currency >= 2000
					}
				}
			}

			custom_tooltip = {
				text = must_not_have_sent_request_already_tooltip 
				NOT = { has_character_flag = has_sent_request_to_rank_up }
			}

			custom_tooltip = {
				text = must_be_allowed_to_rank_up_tooltip 
				days_at_current_society_rank >= 1095
			}

			custom_tooltip = {
				text = must_have_grandmaster_tooltip
				any_society_member = {
					is_society_grandmaster = yes
					same_society_as = ROOT
				}
			}
		}

		effect = {
			if = {
				limit = { society_rank == 1 }
				change_society_currency = -750
			}
			if = {
				limit = { society_rank == 2 }
				change_society_currency = -1000
			}
			if = {
				limit = { society_rank == 3 }
				change_society_currency = -2000
			}

			hidden_tooltip = {
				save_event_target_as = rank_up_target
				set_character_flag = has_sent_request_to_rank_up
				character_event = { id = anl.993 days = 20 random = 10 }
				
			}
		}

		revoke_allowed = { always = no }
		
		ai_will_do = { factor = 1 }
	}
}