society_decisions = { #only available to members of a society
	request_to_rank_up_within_tutorial_society = { #this is the new rank up decision if you want one, you do not need this if you use de default one

		hide_in_decisions_list = yes # This is shown in the Society View
		
		potential = {
			hidden_tooltip = {
				society_rank <= 3 #is not max rank
				days_in_society > 365 #days requirement
				is_in_society = yes #obviously
				OR = { #Players can always rank up (if they have the power), AI won't if there is no room
					ai = no
					AND = {
						ai = yes
						society_can_rank_up = yes
					}
				}
			}
		}

		allow = {
			#Rank requirements. IMPORTANT!!! If you change the requirements, the customizable loc keys "GetSocietyRankUpTooltip" 1, 2, 3, and 4 must be updated, as it displays these requirements.
			custom_tooltip = { # Sufficient currency
				text = request_to_rank_up_within_tutorial_society_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 #IMPORTANT! Update tooltip.
			}

			custom_tooltip = {
				text = must_have_grandmaster_tooltip #You must have a grand master
				any_society_member = {
					is_society_grandmaster = yes
					same_society_as = ROOT
				}
			}
		}

		effect = {
			#Rank up cost
			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
			}

			#Perform rank up
			hidden_tooltip = {
				save_event_target_as = rank_up_target #mark the character as the one ranking up
				set_character_flag = has_sent_request_to_rank_up
				character_event = { id = TUTOSOCI.120 days = 20 random = 10 } # sends hidden delayed event to self, which then sends request to Leader of the society
				
			}
		}

		revoke_allowed = {
			always = no
		}
		
		ai_will_do = {
			factor = 1
		}
	}
	
	#Decision "power" for rank 1
	tutorial_society_power_1 = {

		potential = { #who can see it
			society_member_of = tutorial_society #which society
		}

		allow = { #requirement to press it
			society_currency >= 100 #need 100 society currency, can be anything
		}

		effect = { #what it does, here is trade 100 society currency for 100 gold
			change_society_currency = -100
			wealth = 100 
			if = { #if on the quest, receive that event
				limit = {
					has_quest = quest_tutorial_quest_1
				}
				character_event = { id = TUTOSOCI.142 }
			}
		}

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