dragonkin_society = { #society code name
	primary_attribute = intrigue
	society_ranks_gfx = secret_ranks
	opinion_to_other_members = +10
	opinion_per_rank_above = +10
	opinion_to_pretenders = -40
	opinion_to_perceived_members = -40
	society_rank_up_decision = request_to_rank_up_within_society
	sound = land_ambient
	is_secret = yes
	criminal = yes
	is_religious = no
	devil_worshipper = no
	society_influence = no
	non_interference = { #AI will avoid messing with each others
		always = no
	}
	
	active = { #if its on by default or not
		#default to always active, will start empty unless "indestructible = yes" and "startup_populate" are filled.
	}
	
	indestructible = yes #if it can be destroyed and if not will add members up to the start-up limit
	
	can_join_society = { #add restriction for joining
		hidden_trigger = {
			NAND = { #AI cannot join if the society first rank is full
				ai = yes
				NOT = { has_character_flag = dragonkin_society_inducted_into_society }
				is_society_rank_full = { 
					society = dragonkin_society
					rank = 1
				}
			}
		}
		OR = {
			AND = {
				intrigue = 10
				age = 16
			}
			has_character_flag = dragonkin_society_inducted_into_society
		}
		trigger_if = {
			limit = { prisoner = yes }
			prisoner = no
		}
		hidden_trigger = {
			OR = {
				NOT = { has_character_flag = society_join_block }
				AND = {
					has_character_flag = society_join_block
					has_character_flag = dragonkin_society_inducted_into_society
				}
			}
		}
	}

	show_society = { #society will appear in the list if these are met
		OR = {
			age = 16
			has_character_flag = dragonkin_society_inducted_into_society
		}
	}
	
	potential = { #will kick from society if these are no longer met
	}
	
	society_rank = { #society ranks
		level = 1
		limit = 100
		startup_limit = 10
		modifier = {
			is_visible = {
				OR = {
					society_member_of = dragonkin_society
					FROM = { is_society_discovered = yes }
				}
			}
			intrigue = 1
		}
		decisions = { #rank based decisions power
			dragonkin_society_artefact_hunt
			dragonkin_society_hidden_vault
			dragonkin_society_resist_evil
		}
	}
	
	society_rank = {
		level = 2
		limit = 50
		startup_limit = 5
		modifier = {
			is_visible = {
				OR = {
					society_member_of = dragonkin_society
					FROM = { is_society_discovered = yes }
				}
			}
			intrigue = 2
			global_tax_modifier = 0.01
		}
		decisions = {
			dragonkin_society_master_of_flame
			dragonkin_society_dragonheart
		}
	}
	
	society_rank = {
		level = 3
		limit = 25
		startup_limit = 0
		modifier = {
			is_visible = {
				OR = {
					society_member_of = dragonkin_society
					FROM = { is_society_discovered = yes }
				}
			}
			intrigue = 3
			global_tax_modifier = 0.025
		}
		decisions = {
			dragonkin_society_burn_incense
			dragonkin_society_become_dragon_passive
		}
	}

	society_rank = {
		level = 4
		limit = 10
		startup_limit = 2
		modifier = {
			is_visible = {
				OR = {
					society_member_of = dragonkin_society
					FROM = { is_society_discovered = yes }
				}
			}
			intrigue = 4
			global_tax_modifier = 0.05
		}
		decisions = {
			dragonkin_society_culture_convert_county
			dragonkin_society_improve_province
		}
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #how much society currency they gain
		name = dragonkin_society_currency #localization name of the society currency, also see custom_localization
		
		per_attribute = { #based on attribute
    		name = intrigue
    		value = 0.5
    	}
		has_trait = {
			trait = erudite
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = greedy
			value = 3
		}
		has_trait = {
			trait = schemer
			value = 3
		}
		has_trait = {
			trait = strong
			value = 1
		}
		has_trait = {
			trait = robust
			value = 1
		}
		has_trait = {
			trait = genius
			value = 1
		}
		has_trait = {
			trait = quick
			value = 1
		}
		has_trait = {
			trait = shrewd
			value = 1
		}
		has_trait = {
			trait = diligent
			value = 1
		}
		has_trait = {
			trait = patient
			value = 1
		}
		has_trait = {
			trait = gluttonous
			value = 1
		}
		has_trait = {
			value = -10
			trait = possessed
		}
		has_trait = {
			value = -5
			trait = lunatic
		}
		has_trait = {
			value = -2
			trait = cannibal
		}
		has_trait = {
			value = -1
			trait = weak
		}
		has_trait = {
			value = -0.5
			trait = craven
		}
		society_rank = {
			rank = 4
			value = 10
		}
		
		triggered_gain = { #based on any trigger you can think about
			desc = "society_gain_dragon_culture_tooltip" #what will appear on the tooltip, you have to write the number itself, see the localization file
			trigger = {
				culture = dragon_culture
			}
			value = 10
		}
	}

	member_score_per_attribute = 3 #scores, mostly about who will be the bext leader
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			culture = dragon_culture
			factor = 3
		}
		modifier = {
			trait = erudite
			factor = 1.3
		}
		modifier = {
			trait = scholar
			factor = 1.3
		}
		modifier = {
			trait = greedy
			factor = 1.3
		}
		modifier = {
			trait = schemer
			factor = 1.3
		}
		modifier = {
			trait = strong
			factor = 1.1
		}
		modifier = {
			trait = robust
			factor = 1.1
		}
		modifier = {
			trait = genius
			factor = 1.1
		}
		modifier = {
			trait = quick
			factor = 1.1
		}
		modifier = {
			trait = shrewd
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = gluttonous
			factor = 1.1
		}
		modifier = {
			factor = -5
			trait = possessed
		}
		modifier = {
			factor = -5
			trait = lunatic
		}
		modifier = {
			factor = -5
			trait = cannibal
		}
		modifier = {
			factor = -2
			trait = weak
		}
	}
	
	startup_populate = { #trigger for who can be  the start-up population
	    trigger = {
			ai = yes
	    	controls_religion = no
			age = 16
			is_in_society = no
			is_female = no
		}
	}
}