# Holy Orders
society_knights_templar = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		is_title_active = d_knights_templar
	}
	
	indestructible = yes
	
	can_join_society = {
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_knights_templar
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_knights_templar
			liege = { has_landed_title = d_knights_templar }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_catholic = yes
		NOT = { has_character_modifier = expelled_d_knights_templar }
	}

	show_society = { 
		has_holyorder_societies_religion_catholic = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_catholic = yes
		NOT = { has_character_modifier = expelled_d_knights_templar }
	}
	
	society_rank = { #catholics numbers are halved
		level = 1 
		limit = 24
		startup_limit = 12
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 8
		startup_limit = 4
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 4
		startup_limit = 2
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}

    	has_trait = {#religion stuff
			trait = monk
			value = 5
		}
		has_trait = {
			trait = nun 
			value = 5
		}
		has_trait = {
			trait = crusader 
			value = 5
		}
		has_trait = {
			trait = crusader_king
			value = 5
		}
		has_trait = {
			trait = crusader_queen
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = monk
			factor = 5
		}
		modifier = {
			trait = nun 
			factor = 5
		}
		modifier = {
			trait = crusader 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_knights_templar
				liege = { has_landed_title = d_knights_templar }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_catholic = yes
			NOT = { has_character_modifier = expelled_d_knights_templar }
		}
	}
}
society_knights_hospitaller = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		is_title_active = d_knights_hospitaler
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_knights_hospitaller
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_knights_hospitaler
			liege = { has_landed_title = d_knights_hospitaler }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_catholic = yes
		NOT = { has_character_modifier = expelled_d_knights_hospitaler }
	}

	show_society = { 
		has_holyorder_societies_religion_catholic = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_catholic = yes
		NOT = { has_character_modifier = expelled_d_knights_hospitaler }
	}
	
	society_rank = { #catholics numbers are halved
		level = 1 
		limit = 24
		startup_limit = 12
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 8
		startup_limit = 4
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 4
		startup_limit = 2
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = monk
			value = 5
		}
		has_trait = {
			trait = nun 
			value = 5
		}
		has_trait = {
			trait = crusader 
			value = 5
		}
		has_trait = {
			trait = crusader_king
			value = 5
		}
		has_trait = {
			trait = crusader_queen
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = monk
			factor = 5
		}
		modifier = {
			trait = nun 
			factor = 5
		}
		modifier = {
			trait = crusader 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_knights_hospitaler
				liege = { has_landed_title = d_knights_hospitaler }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_catholic = yes
			NOT = { has_character_modifier = expelled_d_knights_hospitaler }
		}
	}
}
society_teutonic_order = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		is_teutonic_order_active = yes
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_teutonic_order
					rank = 1
				}
			}
		}
		OR = {
			is_teutonic_order_owner = yes
			liege = { is_teutonic_order_owner = yes }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_catholic = yes
		NOT = { has_character_modifier = expelled_d_teutonic_order }
	}

	show_society = { 
		has_holyorder_societies_religion_catholic = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_catholic = yes
		NOT = { has_character_modifier = expelled_d_teutonic_order }
	}
	
	society_rank = { #catholics numbers are halved
		level = 1 
		limit = 24
		startup_limit = 12
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 8
		startup_limit = 4
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 4
		startup_limit = 2
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = monk
			value = 5
		}
		has_trait = {
			trait = nun 
			value = 5
		}
		has_trait = {
			trait = crusader 
			value = 5
		}
		has_trait = {
			trait = crusader_king
			value = 5
		}
		has_trait = {
			trait = crusader_queen
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = monk
			factor = 5
		}
		modifier = {
			trait = nun 
			factor = 5
		}
		modifier = {
			trait = crusader 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				is_teutonic_order_owner = yes
				liege = { is_teutonic_order_owner = yes }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_catholic = yes
			NOT = { has_character_modifier = expelled_d_teutonic_order }
		}
	}
}
society_knights_calatrava = {
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		is_title_active = d_knights_calatrava
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_knights_calatrava
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_knights_calatrava
			liege = { has_landed_title = d_knights_calatrava }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_catholic = yes
		NOT = { has_character_modifier = expelled_d_knights_calatrava }
	}

	show_society = { 
		has_holyorder_societies_religion_catholic = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_catholic = yes
		NOT = { has_character_modifier = expelled_d_knights_calatrava }
	}
	
	society_rank = { #catholics numbers are halved
		level = 1 
		limit = 24
		startup_limit = 12
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 8
		startup_limit = 4
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 4
		startup_limit = 2
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = monk
			value = 5
		}
		has_trait = {
			trait = nun 
			value = 5
		}
		has_trait = {
			trait = crusader 
			value = 5
		}
		has_trait = {
			trait = crusader_king
			value = 5
		}
		has_trait = {
			trait = crusader_queen
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = monk
			factor = 5
		}
		modifier = {
			trait = nun 
			factor = 5
		}
		modifier = {
			trait = crusader 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_knights_calatrava
				liege = { has_landed_title = d_knights_calatrava }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_catholic = yes
			NOT = { has_character_modifier = expelled_d_knights_calatrava }
		}
	}
}
society_knights_santiago = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		is_title_active = d_knights_santiago
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_knights_santiago
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_knights_santiago
			liege = { has_landed_title = d_knights_santiago }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_catholic = yes
		NOT = { has_character_modifier = expelled_d_knights_santiago }
	}

	show_society = { 
		has_holyorder_societies_religion_catholic = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_catholic = yes
		NOT = { has_character_modifier = expelled_d_knights_santiago }
	}
	
	society_rank = { #catholics numbers are halved
		level = 1 
		limit = 24
		startup_limit = 12
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 8
		startup_limit = 4
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 4
		startup_limit = 2
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = monk
			value = 5
		}
		has_trait = {
			trait = nun 
			value = 5
		}
		has_trait = {
			trait = crusader 
			value = 5
		}
		has_trait = {
			trait = crusader_king
			value = 5
		}
		has_trait = {
			trait = crusader_queen
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = monk
			factor = 5
		}
		modifier = {
			trait = nun 
			factor = 5
		}
		modifier = {
			trait = crusader 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_knights_santiago
				liege = { has_landed_title = d_knights_santiago }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_catholic = yes
			NOT = { has_character_modifier = expelled_d_knights_santiago }
		}
	}
}
society_holy_sepulchre = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		is_title_active = d_holy_sepulchre
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_holy_sepulchre
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_holy_sepulchre
			liege = { has_landed_title = d_holy_sepulchre }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_orthodox = yes
		NOT = { has_character_modifier = expelled_d_holy_sepulchre }
	}

	show_society = { 
		has_holyorder_societies_religion_orthodox = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_orthodox = yes
		NOT = { has_character_modifier = expelled_d_holy_sepulchre }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = monk
			value = 5
		}
		has_trait = {
			trait = nun 
			value = 5
		}
		has_trait = {
			trait = crusader 
			value = 5
		}
		has_trait = {
			trait = crusader_king
			value = 5
		}
		has_trait = {
			trait = crusader_queen
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = monk
			factor = 5
		}
		modifier = {
			trait = nun 
			factor = 5
		}
		modifier = {
			trait = crusader 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_holy_sepulchre
				liege = { has_landed_title = d_holy_sepulchre }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_orthodox = yes
			NOT = { has_character_modifier = expelled_d_holy_sepulchre }
		}
	}
}
society_saint_anthony = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		is_title_active = d_saint_anthony
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_saint_anthony
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_saint_anthony
			liege = { has_landed_title = d_saint_anthony }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_miaphysite = yes
		NOT = { has_character_modifier = expelled_d_saint_anthony }
	}

	show_society = { 
		has_holyorder_societies_religion_miaphysite = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_miaphysite = yes
		NOT = { has_character_modifier = expelled_d_saint_anthony }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = monk
			value = 5
		}
		has_trait = {
			trait = nun 
			value = 5
		}
		has_trait = {
			trait = crusader 
			value = 5
		}
		has_trait = {
			trait = crusader_king
			value = 5
		}
		has_trait = {
			trait = crusader_queen
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = monk
			factor = 5
		}
		modifier = {
			trait = nun 
			factor = 5
		}
		modifier = {
			trait = crusader 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_saint_anthony
				liege = { has_landed_title = d_saint_anthony }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_miaphysite = yes
			NOT = { has_character_modifier = expelled_d_saint_anthony }
		}
	}
}
society_saint_addai = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		is_title_active = d_saint_addai
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_saint_addai
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_saint_addai
			liege = { has_landed_title = d_saint_addai }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_nestorian = yes
		NOT = { has_character_modifier = expelled_d_saint_addai }
	}

	show_society = { 
		has_holyorder_societies_religion_nestorian = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_nestorian = yes
		NOT = { has_character_modifier = expelled_d_saint_addai }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = monk
			value = 5
		}
		has_trait = {
			trait = nun 
			value = 5
		}
		has_trait = {
			trait = crusader 
			value = 5
		}
		has_trait = {
			trait = crusader_king
			value = 5
		}
		has_trait = {
			trait = crusader_queen
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = monk
			factor = 5
		}
		modifier = {
			trait = nun 
			factor = 5
		}
		modifier = {
			trait = crusader 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_saint_addai
				liege = { has_landed_title = d_saint_addai }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_nestorian = yes
			NOT = { has_character_modifier = expelled_d_saint_addai }
		}
	}
}
#society_hashshashin #Paradox made the Assassin society
society_bektashi = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		NOT = { has_global_flag = CK2PLUS_ACTIVE } #doesn't exist in PLUS
		is_title_active = d_bektashi
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_bektashi
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_bektashi
			liege = { has_landed_title = d_bektashi }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_sunni = yes
		NOT = { has_character_modifier = expelled_d_bektashi }
	}

	show_society = { 
		has_holyorder_societies_religion_sunni = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_sunni = yes
		NOT = { has_character_modifier = expelled_d_bektashi }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check mujahids, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = sayyid
			value = 5
		}
		has_trait = {
			trait = mirza 
			value = 5
		}
		has_trait = {
			trait = mujahid 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = faqih
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = hajjaj
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = decadent
			value = -5
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = sayyid
			factor = 5
		}
		modifier = {
			trait = mirza 
			factor = 5
		}
		modifier = {
			trait = mujahid 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = faqih
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = hajjaj
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = decadent
			factor = 0.5
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_bektashi
				liege = { has_landed_title = d_bektashi }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_sunni = yes
			NOT = { has_character_modifier = expelled_d_bektashi }
		}
	}
}
society_haruriyyah = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		is_title_active = d_haruriyyah
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_haruriyyah
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_haruriyyah
			liege = { has_landed_title = d_haruriyyah }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_ibadi = yes
		NOT = { has_character_modifier = expelled_d_haruriyyah }
	}

	show_society = { 
		has_holyorder_societies_religion_ibadi = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_ibadi = yes
		NOT = { has_character_modifier = expelled_d_haruriyyah }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check mujahids, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = sayyid
			value = 5
		}
		has_trait = {
			trait = mirza 
			value = 5
		}
		has_trait = {
			trait = mujahid 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = faqih
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = hajjaj
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = decadent
			value = -5
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = sayyid
			factor = 5
		}
		modifier = {
			trait = mirza 
			factor = 5
		}
		modifier = {
			trait = mujahid 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = faqih
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = hajjaj
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = decadent
			factor = 0.5
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_haruriyyah
				liege = { has_landed_title = d_haruriyyah }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_ibadi = yes
			NOT = { has_character_modifier = expelled_d_haruriyyah }
		}
	}
}
society_zealots = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		is_title_active = d_zealots
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_zealots
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_zealots
			liege = { has_landed_title = d_zealots }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_jewish = yes
		NOT = { has_character_modifier = expelled_d_zealots }
	}

	show_society = { 
		has_holyorder_societies_religion_jewish = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_jewish = yes
		NOT = { has_character_modifier = expelled_d_zealots }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = monk
			value = 5
		}
		has_trait = {
			trait = nun 
			value = 5
		}
		has_trait = {
			trait = shaddai 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = monk
			factor = 5
		}
		modifier = {
			trait = nun 
			factor = 5
		}
		modifier = {
			trait = shaddai 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_zealots
				liege = { has_landed_title = d_zealots }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_jewish = yes
			NOT = { has_character_modifier = expelled_d_zealots }
		}
	}
}
society_immortals = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		is_title_active = d_immortals
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_immortals
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_immortals
			liege = { has_landed_title = d_immortals }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_zoroastrian = yes
		NOT = { has_character_modifier = expelled_d_immortals }
	}

	show_society = { 
		has_holyorder_societies_religion_zoroastrian = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_zoroastrian = yes
		NOT = { has_character_modifier = expelled_d_immortals }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = saoshyant
			value = 10
		}
		has_trait = {
			trait = saoshyant_descendant 
			value = 5
		}
		has_trait = {
			trait = gondi_shahansha 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = saoshyant
			factor = 10
		}
		modifier = {
			trait = saoshyant_descendant 
			factor = 5
		}
		modifier = {
			trait = gondi_shahansha 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_immortals
				liege = { has_landed_title = d_immortals }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_zoroastrian = yes
			NOT = { has_character_modifier = expelled_d_immortals }
		}
	}
}
society_jomsvikings = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		is_title_active = d_jomsvikings
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_jomsvikings
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_jomsvikings
			liege = { has_landed_title = d_jomsvikings }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_norse = yes
		NOT = { has_character_modifier = expelled_d_jomsvikings }
	}

	show_society = { 
		has_holyorder_societies_religion_norse = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_norse = yes
		NOT = { has_character_modifier = expelled_d_jomsvikings }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		# triggered_gain = {
			# desc = "zodiac_aquarius"
			# trigger = {
				# has_religion_feature = religion_astrology
				# trait = zodiac_aquarius
			# }
			# value = -1
		# }
		# triggered_gain = {
			# desc = "zodiac_leo"
			# trigger = {
				# has_religion_feature = religion_astrology
				# trait = zodiac_leo
			# }
			# value = 1
		# }
		# triggered_gain = {
			# desc = "zodiac_libra"
			# trigger = {
				# has_religion_feature = religion_astrology
				# trait = zodiac_libra
			# }
			# value = 1
		# }
		# triggered_gain = {
			# desc = "zodiac_aries"
			# trigger = {
				# has_religion_feature = religion_astrology
				# trait = zodiac_aries
			# }
			# value = 1
		# }
		triggered_gain = {
			desc = "bloodthirsty_gods_1"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_1
			}
			value = 1
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_2_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_2
			}
			value = 2
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_3_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_3
			}
			value = 3
		}
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = seaking
			value = 5
		}
		has_trait = {
			trait = sea_queen 
			value = 5
		}
		has_trait = {
			trait = valhalla_bound 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = ravager
			value = 3
		}
		has_trait = {
			trait = viking
			value = 2
		}
		has_trait = {
			trait = shieldmaiden
			value = 2
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = seaking
			factor = 5
		}
		modifier = {
			trait = sea_queen 
			factor = 5
		}
		modifier = {
			trait = valhalla_bound 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = ravager
			factor = 1.25
		}
		modifier = {
			trait = viking
			factor = 1.1
		}
		modifier = {
			trait = shieldmaiden
			factor = 1.1
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_jomsvikings
				liege = { has_landed_title = d_jomsvikings }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_norse = yes
			NOT = { has_character_modifier = expelled_d_jomsvikings }
		}
	}
}
society_sky_lords = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		is_title_active = d_sky_lords
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_sky_lords
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_sky_lords
			liege = { has_landed_title = d_sky_lords }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_tengri = yes
		NOT = { has_character_modifier = expelled_d_sky_lords }
	}

	show_society = { 
		has_holyorder_societies_religion_tengri = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_tengri = yes
		NOT = { has_character_modifier = expelled_d_sky_lords }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_1"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_1
			}
			value = 1
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_2_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_2
			}
			value = 2
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_3_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_3
			}
			value = 3
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = monk
			value = 5
		}
		has_trait = {
			trait = nun 
			value = 5
		}
		has_trait = {
			trait = tengri_warrior 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = monk
			factor = 5
		}
		modifier = {
			trait = nun 
			factor = 5
		}
		modifier = {
			trait = tengri_warrior 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_sky_lords
				liege = { has_landed_title = d_sky_lords }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_tengri = yes
			NOT = { has_character_modifier = expelled_d_sky_lords }
		}
	}
}
society_spirit_guardians = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		is_title_active = d_spirit_guardians 
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_spirit_guardians 
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_spirit_guardians
			liege = { has_landed_title = d_spirit_guardians }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_wafrican = yes
		NOT = { has_character_modifier = expelled_d_spirit_guardians }
	}

	show_society = { 
		has_holyorder_societies_religion_wafrican = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_wafrican = yes
		NOT = { has_character_modifier = expelled_d_spirit_guardians }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_1"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_1
			}
			value = 1
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_2_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_2
			}
			value = 2
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_3_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_3
			}
			value = 3
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = monk
			value = 5
		}
		has_trait = {
			trait = nun 
			value = 5
		}
		has_trait = {
			trait = nyames_shield 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = monk
			factor = 5
		}
		modifier = {
			trait = nun 
			factor = 5
		}
		modifier = {
			trait = nyames_shield 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_spirit_guardians
				liege = { has_landed_title = d_spirit_guardians }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_wafrican = yes
			NOT = { has_character_modifier = expelled_d_spirit_guardians }
		}
	}
}
society_warriors_perun = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		is_title_active = d_warriors_perun 
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_warriors_perun 
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_warriors_perun
			liege = { has_landed_title = d_warriors_perun }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_slavic = yes
		NOT = { has_character_modifier = expelled_d_warriors_perun }
	}

	show_society = { 
		has_holyorder_societies_religion_slavic = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_slavic = yes
		NOT = { has_character_modifier = expelled_d_warriors_perun }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_1"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_1
			}
			value = 1
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_2_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_2
			}
			value = 2
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_3_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_3
			}
			value = 3
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = monk
			value = 5
		}
		has_trait = {
			trait = nun 
			value = 5
		}
		has_trait = {
			trait = peruns_chosen 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = monk
			factor = 5
		}
		modifier = {
			trait = nun 
			factor = 5
		}
		modifier = {
			trait = peruns_chosen 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_warriors_perun
				liege = { has_landed_title = d_warriors_perun }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_slavic = yes
			NOT = { has_character_modifier = expelled_d_warriors_perun }
		}
	}
}
society_chosen_perkunas = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		is_title_active = d_chosen_perkunas 
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_chosen_perkunas 
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_chosen_perkunas
			liege = { has_landed_title = d_chosen_perkunas }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_baltic = yes
		NOT = { has_character_modifier = expelled_d_chosen_perkunas }
	}

	show_society = { 
		has_holyorder_societies_religion_baltic = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_baltic = yes
		NOT = { has_character_modifier = expelled_d_chosen_perkunas }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_1"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_1
			}
			value = 1
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_2_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_2
			}
			value = 2
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_3_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_3
			}
			value = 3
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = monk
			value = 5
		}
		has_trait = {
			trait = nun 
			value = 5
		}
		has_trait = {
			trait = romuvas_own 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = monk
			factor = 5
		}
		modifier = {
			trait = nun 
			factor = 5
		}
		modifier = {
			trait = romuvas_own 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_chosen_perkunas
				liege = { has_landed_title = d_chosen_perkunas }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_baltic = yes
			NOT = { has_character_modifier = expelled_d_chosen_perkunas }
		}
	}
}
society_sons_kaleva = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		is_title_active = d_sons_kaleva 
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_sons_kaleva 
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_sons_kaleva
			liege = { has_landed_title = d_sons_kaleva }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_finnish = yes
		NOT = { has_character_modifier = expelled_d_sons_kaleva }
	}

	show_society = { 
		has_holyorder_societies_religion_finnish = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_finnish = yes
		NOT = { has_character_modifier = expelled_d_sons_kaleva }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_1"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_1
			}
			value = 1
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_2_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_2
			}
			value = 2
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_3_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_3
			}
			value = 3
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = monk
			value = 5
		}
		has_trait = {
			trait = nun 
			value = 5
		}
		has_trait = {
			trait = ukkos_shield 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = monk
			factor = 5
		}
		modifier = {
			trait = nun 
			factor = 5
		}
		modifier = {
			trait = ukkos_shield 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_sons_kaleva
				liege = { has_landed_title = d_sons_kaleva }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_finnish = yes
			NOT = { has_character_modifier = expelled_d_sons_kaleva }
		}
	}
}
society_huitzilopochtli = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		is_title_active = d_huitzilopochtli 
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_huitzilopochtli 
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_huitzilopochtli
			liege = { has_landed_title = d_huitzilopochtli }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_aztec = yes
		NOT = { has_character_modifier = expelled_d_huitzilopochtli }
	}

	show_society = { 
		has_holyorder_societies_religion_aztec = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_aztec = yes
		NOT = { has_character_modifier = expelled_d_huitzilopochtli }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
    	has_trait = {
			trait = bloodthirsty_gods_1 
			value = 1
		}
		has_trait = {
			trait = bloodthirsty_gods_2
			value = 2
		}
		has_trait = {
			trait = bloodthirsty_gods_3
			value = 3
		}
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = monk
			value = 5
		}
		has_trait = {
			trait = nun 
			value = 5
		}
		has_trait = {
			trait = eagle_warrior 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = monk
			factor = 5
		}
		modifier = {
			trait = nun 
			factor = 5
		}
		modifier = {
			trait = eagle_warrior 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_huitzilopochtli
				liege = { has_landed_title = d_huitzilopochtli }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_aztec = yes
			NOT = { has_character_modifier = expelled_d_huitzilopochtli }
		}
	}
}
society_ashokas_chosen = { #maybe give indians something about their religious sects
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		is_title_active = d_ashokas_chosen 
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_ashokas_chosen 
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_ashokas_chosen
			liege = { has_landed_title = d_ashokas_chosen }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_buddhist = yes
		NOT = { has_character_modifier = expelled_d_ashokas_chosen }
	}

	show_society = { 
		has_holyorder_societies_religion_buddhist = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_buddhist = yes
		NOT = { has_character_modifier = expelled_d_ashokas_chosen }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = bhikkhu
			value = 5
		}
		has_trait = {
			trait = bhikkhuni 
			value = 5
		}
		has_trait = {
			trait = kshatriya 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = brahmin
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = vaishya
			value = -3
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = bhikkhu
			factor = 5
		}
		modifier = {
			trait = bhikkhuni 
			factor = 5
		}
		modifier = {
			trait = kshatriya 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = brahmin
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = vaishya
			factor = 0.75
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_ashokas_chosen
				liege = { has_landed_title = d_ashokas_chosen }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_buddhist = yes
			NOT = { has_character_modifier = expelled_d_ashokas_chosen }
		}
	}
}
society_followers_arjuna = { #maybe give indians something about their religious sects
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		is_title_active = d_followers_arjuna 
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_followers_arjuna 
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_followers_arjuna
			liege = { has_landed_title = d_followers_arjuna }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_hindu = yes
		NOT = { has_character_modifier = expelled_d_followers_arjuna }
	}

	show_society = { 
		has_holyorder_societies_religion_hindu = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_hindu = yes
		NOT = { has_character_modifier = expelled_d_followers_arjuna }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = sanyasi
			value = 5
		}
		has_trait = {
			trait = sanyasini 
			value = 5
		}
		has_trait = {
			trait = kshatriya 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = brahmin
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = vaishya
			value = -3
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = sanyasi
			factor = 5
		}
		modifier = {
			trait = sanyasini 
			factor = 5
		}
		modifier = {
			trait = kshatriya 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = brahmin
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = vaishya
			factor = 0.75
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_followers_arjuna
				liege = { has_landed_title = d_followers_arjuna }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_hindu = yes
			NOT = { has_character_modifier = expelled_d_followers_arjuna }
		}
	}
}
society_bulls_rishabha = { #maybe give indians something about their religious sects
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		is_title_active = d_bulls_rishabha 
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_bulls_rishabha 
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_bulls_rishabha
			liege = { has_landed_title = d_bulls_rishabha }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_jain = yes
		NOT = { has_character_modifier = expelled_d_bulls_rishabha }
	}

	show_society = { 
		has_holyorder_societies_religion_jain = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_jain = yes
		NOT = { has_character_modifier = expelled_d_bulls_rishabha }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = muni
			value = 5
		}
		has_trait = {
			trait = aryika 
			value = 5
		}
		has_trait = {
			trait = kshatriya 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = brahmin
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = vaishya
			value = -3
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = muni
			factor = 5
		}
		modifier = {
			trait = aryika 
			factor = 5
		}
		modifier = {
			trait = kshatriya 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = brahmin
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = vaishya
			factor = 0.75
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_bulls_rishabha
				liege = { has_landed_title = d_bulls_rishabha }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_jain = yes
			NOT = { has_character_modifier = expelled_d_bulls_rishabha }
		}
	}
}
society_zun_warriors = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		is_title_active = d_zun_warriors 
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_zun_warriors 
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_zun_warriors
			liege = { has_landed_title = d_zun_warriors }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_zun = yes
		NOT = { has_character_modifier = expelled_d_zun_warriors }
	}

	show_society = { 
		has_holyorder_societies_religion_zun = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_zun = yes
		NOT = { has_character_modifier = expelled_d_zun_warriors }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_1"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_1
			}
			value = 1
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_2_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_2
			}
			value = 2
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_3_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_3
			}
			value = 3
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = monk
			value = 5
		}
		has_trait = {
			trait = nun 
			value = 5
		}
		has_trait = {
			trait = sun_warrior 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait =  indian_pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = monk
			factor = 5
		}
		modifier = {
			trait = nun 
			factor = 5
		}
		modifier = {
			trait = sun_warrior 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait =  indian_pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_zun_warriors
				liege = { has_landed_title = d_zun_warriors }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_zun = yes
			NOT = { has_character_modifier = expelled_d_zun_warriors }
		}
	}
}
society_army_light = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		is_title_active = d_army_light
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_army_light
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_army_light
			liege = { has_landed_title = d_army_light }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_manichean = yes
		NOT = { has_character_modifier = expelled_d_army_light }
	}

	show_society = { 
		OR = {
			has_holyorder_societies_religion_manichean = yes
			has_holyorder_societies_religion_zoroastrian = yes #is heresy of
		}
	}
	
	potential = { 
		# OR = { #is heretics
			# is_heretic = no
			# society = {
				# any_society_member = {
					# is_society_grandmaster = yes
					# has_character_modifier = chivalry_law_heretic
				# }
			# }
		# }
		has_holyorder_societies_religion_manichean = yes
		NOT = { has_character_modifier = expelled_d_army_light }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_1"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_1
			}
			value = 1
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_2_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_2
			}
			value = 2
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_3_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_3
			}
			value = 3
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = saoshyant
			value = 10
		}
		has_trait = {
			trait = saoshyant_descendant 
			value = 5
		}
		has_trait = {
			trait = gondi_shahansha 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = saoshyant
			factor = 10
		}
		modifier = {
			trait = saoshyant_descendant 
			factor = 5
		}
		modifier = {
			trait = gondi_shahansha 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_army_light
				liege = { has_landed_title = d_army_light }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_manichean = yes
			NOT = { has_character_modifier = expelled_d_army_light }
		}
	}
}
society_myrmidons = {
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		is_title_active = d_myrmidons
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_myrmidons
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_myrmidons
			liege = { has_landed_title = d_myrmidons }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_hellenic = yes
		NOT = { has_character_modifier = expelled_d_myrmidons }
	}

	show_society = { 
		has_holyorder_societies_religion_hellenic = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_hellenic = yes
		NOT = { has_character_modifier = expelled_d_myrmidons }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check mujahids, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_1"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_1
			}
			value = 1
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_2_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_2
			}
			value = 2
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_3_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_3
			}
			value = 3
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = augustus
			value = 5
		}
		has_trait = {
			trait = born_in_the_purple 
			value = 5
		}
		has_trait = {
			trait = ares_own  
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = faqih
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = decadent
			value = -5
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = augustus
			factor = 5
		}
		modifier = {
			trait = born_in_the_purple 
			factor = 5
		}
		modifier = {
			trait = ares_own 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = faqih
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = decadent
			factor = 0.5
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_myrmidons
				liege = { has_landed_title = d_myrmidons }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_hellenic = yes
			NOT = { has_character_modifier = expelled_d_myrmidons }
		}
	}
}
society_dralhas_children = { #maybe give indians something about their religious sects
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		is_title_active = d_dralhas_children 
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_dralhas_children 
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_dralhas_children
			liege = { has_landed_title = d_dralhas_children }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_bon = yes
		NOT = { has_character_modifier = expelled_d_dralhas_children }
	}

	show_society = { 
		has_holyorder_societies_religion_bon = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_bon = yes
		NOT = { has_character_modifier = expelled_d_dralhas_children }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_1"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_1
			}
			value = 1
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_2_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_2
			}
			value = 2
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_3_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_3
			}
			value = 3
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = bhikkhu
			value = 5
		}
		has_trait = {
			trait = bhikkhuni 
			value = 5
		}
		has_trait = {
			trait = kailash_guardian 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = brahmin
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = vaishya
			value = -3
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = bhikkhu
			factor = 5
		}
		modifier = {
			trait = bhikkhuni 
			factor = 5
		}
		modifier = {
			trait = kailash_guardian 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = brahmin
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = vaishya
			factor = 0.75
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_dralhas_children
				liege = { has_landed_title = d_dralhas_children }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_bon = yes
			NOT = { has_character_modifier = expelled_d_dralhas_children }
		}
	}
}
# Fighters Guilds
society_western_guild = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_fighter_societies 
	sound = land_battle_background 
	is_secret = no 
	criminal = no
	is_religious = no
	devil_worshipper = no 
	non_interference = { 
		always = no
	}
	
	active = { 
		OR = {
			has_game_rule = {
				name = chivalry_rule_fight
				value = europextra
			}
			has_game_rule = {
				name = chivalry_rule_fight
				value = europe
			}
		}
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_western_guild
					rank = 1
				}
			}
		}
		has_fighter_societies_prerequisites = yes
		has_fighter_societies_western_culture = yes
		NOT = { has_character_flag = betrayed_western_guild }
	}

	show_society = { 
		has_fighter_societies_western_culture = yes
	}
	
	potential = { 
		has_fighter_societies_western_culture = yes
		NOT = { has_character_flag = betrayed_western_guild }
		is_incapable = no
	}
	
	society_rank = { 
		level = 1 
		limit = 60
		startup_limit = 30
		modifier = {
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			chivalry_power_weapon
			chivalry_power_take_bounty
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 30
		startup_limit = 20
		modifier = { 
			martial = 1 
			combat_rating = 3
			monthly_character_prestige = 0.25
			sex_appeal_opinion = 5
		}
		decisions = {
			chivalry_power_commander_fighter
			chivalry_power_commander_fighter_upgrade
			chivalry_power_army_fighter
		}
	}
	
	society_rank = {
		level = 3
		limit = 10
		startup_limit = 10
		modifier = {
			martial = 2
			combat_rating = 6
			monthly_character_prestige = 0.5
			sex_appeal_opinion = 10
		}
		decisions = {
			chivalry_power_merc_governement
			chivalry_power_arena_dummy
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			martial = 3
			combat_rating = 10
			monthly_character_prestige = 1
			sex_appeal_opinion = 25
		}
		decisions = {
			chivalry_power_arena_champ_dummy
		}
		custom_tooltip = society_champion_blood_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = {
		name = fighter_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = hunter
			value = 3
		}
		has_trait = {#key stuff
			trait = strong
			value = 3
		}
		has_trait = {
			trait = robust
			value = 3
		}
		has_trait = {
			trait = sturdy
			value = 2
		}
		has_trait = {
			trait = genius
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {#medium stuff
			trait = quick
			value = 2
		}
		has_trait = {
			trait = shrewd
			value = 2
		}
		has_trait = {
			trait = giant
			value = 2
		}
		has_trait = {
			trait = wroth
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = ambitious
			value = 2
		}
		has_trait = {
			trait = scarred
			value = 1
		}
		has_trait = {
			trait = scarred_mid
			value = 2
		}
		has_trait = {
			trait = scarred_high
			value = 3
		}
		has_trait = {
			trait = proud
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = deceitful
			value = 1
		}
		has_trait = {
			trait = arbitrary
			value = 1
		}
		has_trait = {
			trait = cruel
			value = 1
		}
		has_trait = {
			trait = erudite
			value = -1
		}
		has_trait = {
			trait = trusting
			value = -1
		}
		has_trait = {
			trait = shy
			value = -1
		}
		has_trait = {
			trait = kind
			value = -1
		}
		has_trait = {
			trait = greedy
			value = -1
		}
		has_trait = {
			trait = gluttonous
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#medium stuff
			trait = wounded
			value = -2
		}
		has_trait = {
			trait = disfigured
			value = -2
		}
		has_trait = {
			trait = clubfooted
			value = -2
		}
		has_trait = {
			trait = dwarf
			value = -2
		}
		has_trait = {
			trait = slow
			value = -2
		}
		has_trait = {
			trait = dull
			value = -2
		}
		has_trait = {#key stuff
			trait = maimed
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = mangled
			value = -2
		}
		has_trait = {
			trait = one_eyed
			value = -2
		}
		has_trait = {
			trait = one_handed
			value = -2
		}
		has_trait = {
			trait = one_legged
			value = -2
		}
		has_trait = {
			trait = imbecile
			value = -3
		}
		has_trait = {
			trait = inbred
			value = -3
		}
		has_trait = {
			trait = weak
			value = -3
		}
		has_trait = {
			trait = feeble
			value = -3
		}
		triggered_gain = {
			desc = "justified_resting_tt"
			trigger = {
				has_character_modifier = chivalry_justified_rest
				society_rank < 4
			}
			value = -5
		}
		triggered_gain = {
			desc = "justified_resting_champ_tt"
			trigger = {
				has_character_modifier = chivalry_justified_rest
				society_rank = 4
			}
			value = -25
		}
		triggered_gain = {
			desc = "unjustified_resting_tt"
			trigger = {
				has_character_modifier = chivalry_unjustified_rest
				society_rank < 4
			}
			value = -10
		}
		triggered_gain = {
			desc = "unjustified_resting_champ_tt"
			trigger = {
				has_character_modifier = chivalry_unjustified_rest
				society_rank = 4
			}
			value = -50
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			has_minor_title = title_commander
			factor = 5
		}
		
		
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = hunter
			factor = 1.5
		}
		modifier = {#key stuff
			trait = strong
			factor = 1.5
		}
		modifier = {
			trait = robust
			factor = 1.5
		}
		modifier = {
			trait = genius
			factor = 1.5
		}
		modifier = {
			trait = brave
			factor = 1.5
		}
		modifier = {#medium stuff
			trait = quick
			factor = 1.25
		}
		modifier = {
			trait = shrewd
			factor = 1.25
		}
		modifier = {
			trait = wroth
			factor = 1.25
		}
		modifier = {
			trait = diligent
			factor = 1.25
		}
		modifier = {
			trait = patient
			factor = 1.25
		}
		modifier = {
			trait = ambitious
			factor = 1.25
		}
		modifier = { #small stuff
			trait = scarred
			factor = 1.1
		}
		modifier = {
			trait = proud
			factor = 1.1
		}
		modifier = {
			trait = deceitful
			factor = 1.1
		}
		modifier = {
			trait = arbitrary
			factor = 1.1
		}
		modifier = {
			trait = cruel
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 0.9
		}
		modifier = {
			trait = trusting
			factor = 0.9
		}
		modifier = {
			trait = shy
			factor = 0.9
		}
		modifier = {
			trait = kind
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {#medium stuff
			trait = wounded
			factor = 0.75
		}
		modifier = {
			trait = disfigured
			factor = 0.75
		}
		modifier = {
			trait = clubfooted
			factor = 0.75
		}
		modifier = {
			trait = dwarf
			factor = 0.75
		}
		modifier = {
			trait = slow
			factor = 0.75
		}
		modifier = {
			trait = dull
			factor = 0.75
		}
		modifier = {#key stuff
			trait = maimed
			factor = 0.5
		}
		modifier = {
			trait = craven
			factor = 0.5
		}
		modifier = {
			trait = mangled
			factor = 0.5
		}
		modifier = {
			trait = one_eyed
			factor = 0.5
		}
		modifier = {
			trait = one_handed
			factor = 0.5
		}
		modifier = {
			trait = one_legged
			factor = 0.5
		}
		modifier = {
			trait = imbecile
			factor = 0.5
		}
		modifier = {
			trait = inbred
			factor = 0.5
		}
		modifier = {
			trait = weak
			factor = 0.5
		}
		modifier = {
			trait = feeble
			factor = 0.5
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			lower_tier_than = king
			has_fighter_societies_prerequisites = yes
			has_fighter_societies_western_culture = yes
			NOT = { has_character_flag = betrayed_western_guild }
		}
	}
}
society_southern_guild = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_fighter_societies 
	sound = land_battle_background 
	is_secret = no 
	criminal = no
	is_religious = no
	devil_worshipper = no 
	non_interference = { 
		always = no
	}
	
	active = { 
		OR = {
			has_game_rule = {
				name = chivalry_rule_fight
				value = europextra
			}
			has_game_rule = {
				name = chivalry_rule_fight
				value = europe
			}
		}
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_southern_guild
					rank = 1
				}
			}
		}
		has_fighter_societies_prerequisites = yes
		has_fighter_societies_southern_culture = yes
		NOT = { has_character_flag = betrayed_southern_guild }
	}

	show_society = { 
		has_fighter_societies_southern_culture = yes
	}
	
	potential = { 
		has_fighter_societies_southern_culture = yes
		NOT = { has_character_flag = betrayed_southern_guild }
		is_incapable = no
	}
	
	society_rank = { 
		level = 1 
		limit = 60
		startup_limit = 30
		modifier = {
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			chivalry_power_weapon
			chivalry_power_take_bounty
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 30
		startup_limit = 20
		modifier = { 
			martial = 1 
			combat_rating = 3
			monthly_character_prestige = 0.25
			sex_appeal_opinion = 5
		}
		decisions = {
			chivalry_power_commander_fighter
			chivalry_power_commander_fighter_upgrade
			chivalry_power_army_fighter
		}
	}
	
	society_rank = {
		level = 3
		limit = 10
		startup_limit = 10
		modifier = {
			martial = 2
			combat_rating = 6
			monthly_character_prestige = 0.5
			sex_appeal_opinion = 10
		}
		decisions = {
			chivalry_power_merc_governement
			chivalry_power_arena_dummy
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			martial = 3
			combat_rating = 10
			monthly_character_prestige = 1
			sex_appeal_opinion = 25
		}
		decisions = {
			chivalry_power_arena_champ_dummy
		}
		custom_tooltip = society_champion_blood_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = {
		name = fighter_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = hunter
			value = 3
		}
		has_trait = {#key stuff
			trait = strong
			value = 3
		}
		has_trait = {
			trait = robust
			value = 3
		}
		has_trait = {
			trait = sturdy
			value = 2
		}
		has_trait = {
			trait = genius
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {#medium stuff
			trait = quick
			value = 2
		}
		has_trait = {
			trait = shrewd
			value = 2
		}
		has_trait = {
			trait = giant
			value = 2
		}
		has_trait = {
			trait = wroth
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = ambitious
			value = 2
		}
		has_trait = {
			trait = scarred
			value = 1
		}
		has_trait = {
			trait = scarred_mid
			value = 2
		}
		has_trait = {
			trait = scarred_high
			value = 3
		}
		has_trait = {
			trait = proud
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = deceitful
			value = 1
		}
		has_trait = {
			trait = arbitrary
			value = 1
		}
		has_trait = {
			trait = cruel
			value = 1
		}
		has_trait = {
			trait = erudite
			value = -1
		}
		has_trait = {
			trait = trusting
			value = -1
		}
		has_trait = {
			trait = shy
			value = -1
		}
		has_trait = {
			trait = kind
			value = -1
		}
		has_trait = {
			trait = greedy
			value = -1
		}
		has_trait = {
			trait = gluttonous
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}

		has_trait = {#medium stuff
			trait = wounded
			value = -2
		}
		has_trait = {
			trait = disfigured
			value = -2
		}
		has_trait = {
			trait = clubfooted
			value = -2
		}
		has_trait = {
			trait = dwarf
			value = -2
		}
		has_trait = {
			trait = slow
			value = -2
		}
		has_trait = {
			trait = dull
			value = -2
		}
		has_trait = {#key stuff
			trait = maimed
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = mangled
			value = -2
		}
		has_trait = {
			trait = one_eyed
			value = -2
		}
		has_trait = {
			trait = one_handed
			value = -2
		}
		has_trait = {
			trait = one_legged
			value = -2
		}
		has_trait = {
			trait = imbecile
			value = -3
		}
		has_trait = {
			trait = inbred
			value = -3
		}
		has_trait = {
			trait = weak
			value = -3
		}
		has_trait = {
			trait = feeble
			value = -3
		}
		triggered_gain = {
			desc = "justified_resting_tt"
			trigger = {
				has_character_modifier = chivalry_justified_rest
				society_rank < 4
			}
			value = -5
		}
		triggered_gain = {
			desc = "justified_resting_champ_tt"
			trigger = {
				has_character_modifier = chivalry_justified_rest
				society_rank = 4
			}
			value = -25
		}
		triggered_gain = {
			desc = "unjustified_resting_tt"
			trigger = {
				has_character_modifier = chivalry_unjustified_rest
				society_rank < 4
			}
			value = -10
		}
		triggered_gain = {
			desc = "unjustified_resting_champ_tt"
			trigger = {
				has_character_modifier = chivalry_unjustified_rest
				society_rank = 4
			}
			value = -50
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			has_minor_title = title_commander
			factor = 5
		}
		
		
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = hunter
			factor = 1.5
		}
		modifier = {#key stuff
			trait = strong
			factor = 1.5
		}
		modifier = {
			trait = robust
			factor = 1.5
		}
		modifier = {
			trait = genius
			factor = 1.5
		}
		modifier = {
			trait = brave
			factor = 1.5
		}
		modifier = {#medium stuff
			trait = quick
			factor = 1.25
		}
		modifier = {
			trait = shrewd
			factor = 1.25
		}
		modifier = {
			trait = wroth
			factor = 1.25
		}
		modifier = {
			trait = diligent
			factor = 1.25
		}
		modifier = {
			trait = patient
			factor = 1.25
		}
		modifier = {
			trait = ambitious
			factor = 1.25
		}
		modifier = { #small stuff
			trait = scarred
			factor = 1.1
		}
		modifier = {
			trait = proud
			factor = 1.1
		}
		modifier = {
			trait = deceitful
			factor = 1.1
		}
		modifier = {
			trait = arbitrary
			factor = 1.1
		}
		modifier = {
			trait = cruel
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 0.9
		}
		modifier = {
			trait = trusting
			factor = 0.9
		}
		modifier = {
			trait = shy
			factor = 0.9
		}
		modifier = {
			trait = kind
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {#medium stuff
			trait = wounded
			factor = 0.75
		}
		modifier = {
			trait = disfigured
			factor = 0.75
		}
		modifier = {
			trait = clubfooted
			factor = 0.75
		}
		modifier = {
			trait = dwarf
			factor = 0.75
		}
		modifier = {
			trait = slow
			factor = 0.75
		}
		modifier = {
			trait = dull
			factor = 0.75
		}
		modifier = {#key stuff
			trait = maimed
			factor = 0.5
		}
		modifier = {
			trait = craven
			factor = 0.5
		}
		modifier = {
			trait = mangled
			factor = 0.5
		}
		modifier = {
			trait = one_eyed
			factor = 0.5
		}
		modifier = {
			trait = one_handed
			factor = 0.5
		}
		modifier = {
			trait = one_legged
			factor = 0.5
		}
		modifier = {
			trait = imbecile
			factor = 0.5
		}
		modifier = {
			trait = inbred
			factor = 0.5
		}
		modifier = {
			trait = weak
			factor = 0.5
		}
		modifier = {
			trait = feeble
			factor = 0.5
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			lower_tier_than = king
			has_fighter_societies_prerequisites = yes
			has_fighter_societies_southern_culture = yes
			NOT = { has_character_flag = betrayed_southern_guild }
		}
	}
}
society_northern_guild = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_fighter_societies 
	sound = land_battle_background 
	is_secret = no 
	criminal = no
	is_religious = no
	devil_worshipper = no 
	non_interference = { 
		always = no
	}
	
	active = { 
		OR = {
			has_game_rule = {
				name = chivalry_rule_fight
				value = europextra
			}
			has_game_rule = {
				name = chivalry_rule_fight
				value = europe
			}
		}
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_northern_guild
					rank = 1
				}
			}
		}
		has_fighter_societies_prerequisites = yes
		has_fighter_societies_northern_culture = yes
		NOT = { has_character_flag = betrayed_northern_guild }
	}

	show_society = { 
		has_fighter_societies_northern_culture = yes
	}
	
	potential = { 
		has_fighter_societies_northern_culture = yes
		NOT = { has_character_flag = betrayed_northern_guild }
		is_incapable = no
		is_incapable = no
	}
	
	society_rank = { 
		level = 1 
		limit = 60
		startup_limit = 30
		modifier = {
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			chivalry_power_weapon
			chivalry_power_take_bounty
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 30
		startup_limit = 20
		modifier = { 
			martial = 1 
			combat_rating = 3
			monthly_character_prestige = 0.25
			sex_appeal_opinion = 5
		}
		decisions = {
			chivalry_power_commander_fighter
			chivalry_power_commander_fighter_upgrade
			chivalry_power_army_fighter
		}
	}
	
	society_rank = {
		level = 3
		limit = 10
		startup_limit = 10
		modifier = {
			martial = 2
			combat_rating = 6
			monthly_character_prestige = 0.5
			sex_appeal_opinion = 10
		}
		decisions = {
			chivalry_power_merc_governement
			chivalry_power_arena_dummy
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			martial = 3
			combat_rating = 10
			monthly_character_prestige = 1
			sex_appeal_opinion = 25
		}
		decisions = {
			chivalry_power_arena_champ_dummy
		}
		custom_tooltip = society_champion_blood_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = {
		name = fighter_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = hunter
			value = 3
		}
		has_trait = {#key stuff
			trait = strong
			value = 3
		}
		has_trait = {
			trait = robust
			value = 3
		}
		has_trait = {
			trait = sturdy
			value = 2
		}
		has_trait = {
			trait = genius
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {#medium stuff
			trait = quick
			value = 2
		}
		has_trait = {
			trait = shrewd
			value = 2
		}
		has_trait = {
			trait = giant
			value = 2
		}
		has_trait = {
			trait = wroth
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = ambitious
			value = 2
		}
		has_trait = {
			trait = scarred
			value = 1
		}
		has_trait = {
			trait = scarred_mid
			value = 2
		}
		has_trait = {
			trait = scarred_high
			value = 3
		}
		has_trait = {
			trait = proud
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = deceitful
			value = 1
		}
		has_trait = {
			trait = arbitrary
			value = 1
		}
		has_trait = {
			trait = cruel
			value = 1
		}
		has_trait = {
			trait = erudite
			value = -1
		}
		has_trait = {
			trait = trusting
			value = -1
		}
		has_trait = {
			trait = shy
			value = -1
		}
		has_trait = {
			trait = kind
			value = -1
		}
		has_trait = {
			trait = greedy
			value = -1
		}
		has_trait = {
			trait = gluttonous
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}

		has_trait = {#medium stuff
			trait = wounded
			value = -2
		}
		has_trait = {
			trait = disfigured
			value = -2
		}
		has_trait = {
			trait = clubfooted
			value = -2
		}
		has_trait = {
			trait = dwarf
			value = -2
		}
		has_trait = {
			trait = slow
			value = -2
		}
		has_trait = {
			trait = dull
			value = -2
		}
		has_trait = {#key stuff
			trait = maimed
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = mangled
			value = -2
		}
		has_trait = {
			trait = one_eyed
			value = -2
		}
		has_trait = {
			trait = one_handed
			value = -2
		}
		has_trait = {
			trait = one_legged
			value = -2
		}
		has_trait = {
			trait = imbecile
			value = -3
		}
		has_trait = {
			trait = inbred
			value = -3
		}
		has_trait = {
			trait = weak
			value = -3
		}
		has_trait = {
			trait = feeble
			value = -3
		}
		triggered_gain = {
			desc = "justified_resting_tt"
			trigger = {
				has_character_modifier = chivalry_justified_rest
				society_rank < 4
			}
			value = -5
		}
		triggered_gain = {
			desc = "justified_resting_champ_tt"
			trigger = {
				has_character_modifier = chivalry_justified_rest
				society_rank = 4
			}
			value = -25
		}
		triggered_gain = {
			desc = "unjustified_resting_tt"
			trigger = {
				has_character_modifier = chivalry_unjustified_rest
				society_rank < 4
			}
			value = -10
		}
		triggered_gain = {
			desc = "unjustified_resting_champ_tt"
			trigger = {
				has_character_modifier = chivalry_unjustified_rest
				society_rank = 4
			}
			value = -50
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			has_minor_title = title_commander
			factor = 5
		}
		
		
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = hunter
			factor = 1.5
		}
		modifier = {#key stuff
			trait = strong
			factor = 1.5
		}
		modifier = {
			trait = robust
			factor = 1.5
		}
		modifier = {
			trait = genius
			factor = 1.5
		}
		modifier = {
			trait = brave
			factor = 1.5
		}
		modifier = {#medium stuff
			trait = quick
			factor = 1.25
		}
		modifier = {
			trait = shrewd
			factor = 1.25
		}
		modifier = {
			trait = wroth
			factor = 1.25
		}
		modifier = {
			trait = diligent
			factor = 1.25
		}
		modifier = {
			trait = patient
			factor = 1.25
		}
		modifier = {
			trait = ambitious
			factor = 1.25
		}
		modifier = { #small stuff
			trait = scarred
			factor = 1.1
		}
		modifier = {
			trait = proud
			factor = 1.1
		}
		modifier = {
			trait = deceitful
			factor = 1.1
		}
		modifier = {
			trait = arbitrary
			factor = 1.1
		}
		modifier = {
			trait = cruel
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 0.9
		}
		modifier = {
			trait = trusting
			factor = 0.9
		}
		modifier = {
			trait = shy
			factor = 0.9
		}
		modifier = {
			trait = kind
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {#medium stuff
			trait = wounded
			factor = 0.75
		}
		modifier = {
			trait = disfigured
			factor = 0.75
		}
		modifier = {
			trait = clubfooted
			factor = 0.75
		}
		modifier = {
			trait = dwarf
			factor = 0.75
		}
		modifier = {
			trait = slow
			factor = 0.75
		}
		modifier = {
			trait = dull
			factor = 0.75
		}
		modifier = {#key stuff
			trait = maimed
			factor = 0.5
		}
		modifier = {
			trait = craven
			factor = 0.5
		}
		modifier = {
			trait = mangled
			factor = 0.5
		}
		modifier = {
			trait = one_eyed
			factor = 0.5
		}
		modifier = {
			trait = one_handed
			factor = 0.5
		}
		modifier = {
			trait = one_legged
			factor = 0.5
		}
		modifier = {
			trait = imbecile
			factor = 0.5
		}
		modifier = {
			trait = inbred
			factor = 0.5
		}
		modifier = {
			trait = weak
			factor = 0.5
		}
		modifier = {
			trait = feeble
			factor = 0.5
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			lower_tier_than = king
			has_fighter_societies_prerequisites = yes
			has_fighter_societies_northern_culture = yes
			NOT = { has_character_flag = betrayed_northern_guild }
		}
	}
}
society_eastern_guild = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_fighter_societies 
	sound = land_battle_background 
	is_secret = no 
	criminal = no
	is_religious = no
	devil_worshipper = no 
	non_interference = { 
		always = no
	}
	
	active = { 
		OR = {
			has_game_rule = {
				name = chivalry_rule_fight
				value = europextra
			}
			has_game_rule = {
				name = chivalry_rule_fight
				value = europe
			}
		}
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_eastern_guild
					rank = 1
				}
			}
		}
		has_fighter_societies_prerequisites = yes
		has_fighter_societies_eastern_culture = yes
		NOT = { has_character_flag = betrayed_eastern_guild }
	}

	show_society = { 
		has_fighter_societies_eastern_culture = yes
	}
	
	potential = { 
		has_fighter_societies_eastern_culture = yes
		NOT = { has_character_flag = betrayed_eastern_guild }
		is_incapable = no
	}
	
	society_rank = { 
		level = 1 
		limit = 60
		startup_limit = 30
		modifier = {
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			chivalry_power_weapon
			chivalry_power_take_bounty
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 30
		startup_limit = 20
		modifier = { 
			martial = 1 
			combat_rating = 3
			monthly_character_prestige = 0.25
			sex_appeal_opinion = 5
		}
		decisions = {
			chivalry_power_commander_fighter
			chivalry_power_commander_fighter_upgrade
			chivalry_power_army_fighter
		}
	}
	
	society_rank = {
		level = 3
		limit = 10
		startup_limit = 10
		modifier = {
			martial = 2
			combat_rating = 6
			monthly_character_prestige = 0.5
			sex_appeal_opinion = 10
		}
		decisions = {
			chivalry_power_merc_governement
			chivalry_power_arena_dummy
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			martial = 3
			combat_rating = 10
			monthly_character_prestige = 1
			sex_appeal_opinion = 25
		}
		decisions = {
			chivalry_power_arena_champ_dummy
		}
		custom_tooltip = society_champion_blood_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = {
		name = fighter_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = hunter
			value = 3
		}
		has_trait = {#key stuff
			trait = strong
			value = 3
		}
		has_trait = {
			trait = robust
			value = 3
		}
		has_trait = {
			trait = sturdy
			value = 2
		}
		has_trait = {
			trait = genius
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {#medium stuff
			trait = quick
			value = 2
		}
		has_trait = {
			trait = shrewd
			value = 2
		}
		has_trait = {
			trait = giant
			value = 2
		}
		has_trait = {
			trait = wroth
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = ambitious
			value = 2
		}
		has_trait = {
			trait = scarred
			value = 1
		}
		has_trait = {
			trait = scarred_mid
			value = 2
		}
		has_trait = {
			trait = scarred_high
			value = 3
		}
		has_trait = {
			trait = proud
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = deceitful
			value = 1
		}
		has_trait = {
			trait = arbitrary
			value = 1
		}
		has_trait = {
			trait = cruel
			value = 1
		}
		has_trait = {
			trait = erudite
			value = -1
		}
		has_trait = {
			trait = trusting
			value = -1
		}
		has_trait = {
			trait = shy
			value = -1
		}
		has_trait = {
			trait = kind
			value = -1
		}
		has_trait = {
			trait = greedy
			value = -1
		}
		has_trait = {
			trait = gluttonous
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}

		has_trait = {#medium stuff
			trait = wounded
			value = -2
		}
		has_trait = {
			trait = disfigured
			value = -2
		}
		has_trait = {
			trait = clubfooted
			value = -2
		}
		has_trait = {
			trait = dwarf
			value = -2
		}
		has_trait = {
			trait = slow
			value = -2
		}
		has_trait = {
			trait = dull
			value = -2
		}
		has_trait = {#key stuff
			trait = maimed
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = mangled
			value = -2
		}
		has_trait = {
			trait = one_eyed
			value = -2
		}
		has_trait = {
			trait = one_handed
			value = -2
		}
		has_trait = {
			trait = one_legged
			value = -2
		}
		has_trait = {
			trait = imbecile
			value = -3
		}
		has_trait = {
			trait = inbred
			value = -3
		}
		has_trait = {
			trait = weak
			value = -3
		}
		has_trait = {
			trait = feeble
			value = -3
		}
		triggered_gain = {
			desc = "justified_resting_tt"
			trigger = {
				has_character_modifier = chivalry_justified_rest
				society_rank < 4
			}
			value = -5
		}
		triggered_gain = {
			desc = "justified_resting_champ_tt"
			trigger = {
				has_character_modifier = chivalry_justified_rest
				society_rank = 4
			}
			value = -25
		}
		triggered_gain = {
			desc = "unjustified_resting_tt"
			trigger = {
				has_character_modifier = chivalry_unjustified_rest
				society_rank < 4
			}
			value = -10
		}
		triggered_gain = {
			desc = "unjustified_resting_champ_tt"
			trigger = {
				has_character_modifier = chivalry_unjustified_rest
				society_rank = 4
			}
			value = -50
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			has_minor_title = title_commander
			factor = 5
		}
		
		
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = hunter
			factor = 1.5
		}
		modifier = {#key stuff
			trait = strong
			factor = 1.5
		}
		modifier = {
			trait = robust
			factor = 1.5
		}
		modifier = {
			trait = genius
			factor = 1.5
		}
		modifier = {
			trait = brave
			factor = 1.5
		}
		modifier = {#medium stuff
			trait = quick
			factor = 1.25
		}
		modifier = {
			trait = shrewd
			factor = 1.25
		}
		modifier = {
			trait = wroth
			factor = 1.25
		}
		modifier = {
			trait = diligent
			factor = 1.25
		}
		modifier = {
			trait = patient
			factor = 1.25
		}
		modifier = {
			trait = ambitious
			factor = 1.25
		}
		modifier = { #small stuff
			trait = scarred
			factor = 1.1
		}
		modifier = {
			trait = proud
			factor = 1.1
		}
		modifier = {
			trait = deceitful
			factor = 1.1
		}
		modifier = {
			trait = arbitrary
			factor = 1.1
		}
		modifier = {
			trait = cruel
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 0.9
		}
		modifier = {
			trait = trusting
			factor = 0.9
		}
		modifier = {
			trait = shy
			factor = 0.9
		}
		modifier = {
			trait = kind
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {#medium stuff
			trait = wounded
			factor = 0.75
		}
		modifier = {
			trait = disfigured
			factor = 0.75
		}
		modifier = {
			trait = clubfooted
			factor = 0.75
		}
		modifier = {
			trait = dwarf
			factor = 0.75
		}
		modifier = {
			trait = slow
			factor = 0.75
		}
		modifier = {
			trait = dull
			factor = 0.75
		}
		modifier = {#key stuff
			trait = maimed
			factor = 0.5
		}
		modifier = {
			trait = craven
			factor = 0.5
		}
		modifier = {
			trait = mangled
			factor = 0.5
		}
		modifier = {
			trait = one_eyed
			factor = 0.5
		}
		modifier = {
			trait = one_handed
			factor = 0.5
		}
		modifier = {
			trait = one_legged
			factor = 0.5
		}
		modifier = {
			trait = imbecile
			factor = 0.5
		}
		modifier = {
			trait = inbred
			factor = 0.5
		}
		modifier = {
			trait = weak
			factor = 0.5
		}
		modifier = {
			trait = feeble
			factor = 0.5
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			lower_tier_than = king
			has_fighter_societies_prerequisites = yes
			has_fighter_societies_eastern_culture = yes
			NOT = { has_character_flag = betrayed_eastern_guild }
		}
	}
}
# HIP/CK2Plus societies
society_livonian_brothers_of_the_sword = {
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		is_livonian_order_active = yes
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_livonian_brothers_of_the_sword
					rank = 1
				}
			}
		}
		OR = {
			is_livonian_order_owner = yes
			liege = { is_livonian_order_owner = yes }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_catholic = yes
		NOT = { has_character_modifier = expelled_d_livonian_brothers_of_the_sword }
	}

	show_society = { 
		has_holyorder_societies_religion_catholic = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_catholic = yes
		NOT = { has_character_modifier = expelled_d_livonian_brothers_of_the_sword }
	}
	
	society_rank = { #catholics numbers are halved
		level = 1 
		limit = 24
		startup_limit = 12
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 8
		startup_limit = 4
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 4
		startup_limit = 2
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = monk
			value = 5
		}
		has_trait = {
			trait = nun 
			value = 5
		}
		has_trait = {
			trait = crusader 
			value = 5
		}
		has_trait = {
			trait = crusader_king
			value = 5
		}
		has_trait = {
			trait = crusader_queen
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = monk
			factor = 5
		}
		modifier = {
			trait = nun 
			factor = 5
		}
		modifier = {
			trait = crusader 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				is_livonian_order_owner = yes
				liege = { is_livonian_order_owner = yes }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_catholic = yes
			NOT = { has_character_modifier = expelled_d_livonian_brothers_of_the_sword } #check those
		}
	}
}
society_saint_blaise = { #HIP+PLUS
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		OR = {
			has_global_flag = CK2PLUS_ACTIVE
			has_global_flag = HIPEMF_ACTIVE
		}
		is_title_active = d_saint_blaise
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_saint_blaise
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_saint_blaise
			liege = { has_landed_title = d_saint_blaise }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_apostolic = yes
		NOT = { has_character_modifier = expelled_d_saint_blaise }
	}

	show_society = { 
		has_holyorder_societies_religion_apostolic = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_apostolic = yes
		NOT = { has_character_modifier = expelled_d_saint_blaise }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = monk
			value = 5
		}
		has_trait = {
			trait = nun 
			value = 5
		}
		has_trait = {
			trait = crusader 
			value = 5
		}
		has_trait = {
			trait = crusader_king
			value = 5
		}
		has_trait = {
			trait = crusader_queen
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = monk
			factor = 5
		}
		modifier = {
			trait = nun 
			factor = 5
		}
		modifier = {
			trait = crusader 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_saint_blaise
				liege = { has_landed_title = d_saint_blaise }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_apostolic = yes
			NOT = { has_character_modifier = expelled_d_saint_blaise }
		}
	}
}
society_knights_saint_mark = { #HIP+PLUS
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		OR = {
			has_global_flag = CK2PLUS_ACTIVE
			has_global_flag = HIPEMF_ACTIVE
		}
		is_title_active = d_knights_saint_mark
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_knights_saint_mark
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_knights_saint_mark
			liege = { has_landed_title = d_knights_saint_mark }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_miaphysite = yes
		NOT = { has_character_modifier = expelled_d_knights_saint_mark }
	}

	show_society = { 
		has_holyorder_societies_religion_miaphysite = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_miaphysite = yes
		NOT = { has_character_modifier = expelled_d_knights_saint_mark }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = monk
			value = 5
		}
		has_trait = {
			trait = nun 
			value = 5
		}
		has_trait = {
			trait = crusader 
			value = 5
		}
		has_trait = {
			trait = crusader_king
			value = 5
		}
		has_trait = {
			trait = crusader_queen
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = monk
			factor = 5
		}
		modifier = {
			trait = nun 
			factor = 5
		}
		modifier = {
			trait = crusader 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_knights_saint_mark
				liege = { has_landed_title = d_knights_saint_mark }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_miaphysite = yes
			NOT = { has_character_modifier = expelled_d_knights_saint_mark }
		}
	}
}
society_army_lucifer = { #HIP+PLUS
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		OR = {
			has_global_flag = CK2PLUS_ACTIVE
			has_global_flag = HIPEMF_ACTIVE
		}
		is_title_active = d_army_lucifer
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_army_lucifer
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_army_lucifer
			liege = { has_landed_title = d_army_lucifer }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_messalian = yes
		NOT = { has_character_modifier = expelled_d_army_lucifer }
	}

	show_society = { 
		has_holyorder_societies_religion_messalian = yes #is heresy of
	}
	
	potential = { 
		# OR = { #is heretic
			# is_heretic = no
			# society = {
				# any_society_member = {
					# is_society_grandmaster = yes
					# has_character_modifier = chivalry_law_heretic
				# }
			# }
		# }
		has_holyorder_societies_religion_messalian = yes
		NOT = { has_character_modifier = expelled_d_army_lucifer }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = monk
			value = 5
		}
		has_trait = {
			trait = nun 
			value = 5
		}
		has_trait = {
			trait = crusader 
			value = 5
		}
		has_trait = {
			trait = crusader_king
			value = 5
		}
		has_trait = {
			trait = crusader_queen
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = monk
			factor = 5
		}
		modifier = {
			trait = nun 
			factor = 5
		}
		modifier = {
			trait = crusader 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_army_lucifer
				liege = { has_landed_title = d_army_lucifer }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_messalian = yes
			NOT = { has_character_modifier = expelled_d_army_lucifer }
		}
	}
}
society_arsiyah = { #HIP
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		has_global_flag = HIPEMF_ACTIVE
		is_title_active = d_arsiyah
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_arsiyah
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_arsiyah
			liege = { has_landed_title = d_arsiyah }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_sunni = yes
		NOT = { has_character_modifier = expelled_d_arsiyah }
	}

	show_society = { 
		has_holyorder_societies_religion_sunni = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_sunni = yes
		NOT = { has_character_modifier = expelled_d_arsiyah }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check mujahids, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = sayyid
			value = 5
		}
		has_trait = {
			trait = mirza 
			value = 5
		}
		has_trait = {
			trait = mujahid 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = faqih
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = hajjaj
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = decadent
			value = -5
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = sayyid
			factor = 5
		}
		modifier = {
			trait = mirza 
			factor = 5
		}
		modifier = {
			trait = mujahid 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = faqih
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = hajjaj
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = decadent
			factor = 0.5
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_arsiyah
				liege = { has_landed_title = d_arsiyah }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_sunni = yes
			NOT = { has_character_modifier = expelled_d_arsiyah }
		}
	}
}
society_saqaliba = { #HIP
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		has_global_flag = HIPEMF_ACTIVE
		is_title_active = d_saqaliba
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_saqaliba
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_saqaliba
			liege = { has_landed_title = d_saqaliba }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_ismaili = yes
		NOT = { has_character_modifier = expelled_d_saqaliba }
	}

	show_society = { 
		has_holyorder_societies_religion_shiite = yes #is heresy of
	}
	
	potential = { 
		# OR = { #is heretic
			# is_heretic = no
			# society = {
				# any_society_member = {
					# is_society_grandmaster = yes
					# has_character_modifier = chivalry_law_heretic
				# }
			# }
		# }
		has_holyorder_societies_religion_ismaili = yes
		NOT = { has_character_modifier = expelled_d_saqaliba }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check mujahids, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = sayyid
			value = 5
		}
		has_trait = {
			trait = mirza 
			value = 5
		}
		has_trait = {
			trait = mujahid 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = faqih
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = hajjaj
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = decadent
			value = -5
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = sayyid
			factor = 5
		}
		modifier = {
			trait = mirza 
			factor = 5
		}
		modifier = {
			trait = mujahid 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = faqih
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = hajjaj
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = decadent
			factor = 0.5
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_saqaliba
				liege = { has_landed_title = d_saqaliba }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_ismaili = yes
			NOT = { has_character_modifier = expelled_d_saqaliba }
		}
	}
}
society_devotees_of_the_true_prophet = { #PLUS
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		has_global_flag = CK2PLUS_ACTIVE
		is_title_active = d_devotees_of_the_true_prophet
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_devotees_of_the_true_prophet
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_devotees_of_the_true_prophet
			liege = { has_landed_title = d_devotees_of_the_true_prophet }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_sunni = yes
		NOT = { has_character_modifier = expelled_d_devotees_of_the_true_prophet }
	}

	show_society = { 
		has_holyorder_societies_religion_sunni = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_sunni = yes
		NOT = { has_character_modifier = expelled_d_devotees_of_the_true_prophet }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check mujahids, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = sayyid
			value = 5
		}
		has_trait = {
			trait = mirza 
			value = 5
		}
		has_trait = {
			trait = mujahid 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = faqih
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = hajjaj
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = decadent
			value = -5
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = sayyid
			factor = 5
		}
		modifier = {
			trait = mirza 
			factor = 5
		}
		modifier = {
			trait = mujahid 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = faqih
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = hajjaj
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = decadent
			factor = 0.5
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_devotees_of_the_true_prophet
				liege = { has_landed_title = d_devotees_of_the_true_prophet }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_sunni = yes
			NOT = { has_character_modifier = expelled_d_devotees_of_the_true_prophet }
		}
	}
}
society_ansar = { #PLUS
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		has_global_flag = CK2PLUS_ACTIVE
		is_title_active = d_ansar
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_ansar
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_ansar
			liege = { has_landed_title = d_ansar }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_sunni = yes
		NOT = { has_character_modifier = expelled_d_ansar }
	}

	show_society = { 
		has_holyorder_societies_religion_sunni = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_sunni = yes
		NOT = { has_character_modifier = expelled_d_ansar }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check mujahids, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = sayyid
			value = 5
		}
		has_trait = {
			trait = mirza 
			value = 5
		}
		has_trait = {
			trait = mujahid 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = faqih
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = hajjaj
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = decadent
			value = -5
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = sayyid
			factor = 5
		}
		modifier = {
			trait = mirza 
			factor = 5
		}
		modifier = {
			trait = mujahid 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = faqih
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = hajjaj
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = decadent
			factor = 0.5
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_ansar
				liege = { has_landed_title = d_ansar }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_sunni = yes
			NOT = { has_character_modifier = expelled_d_ansar }
		}
	}
}
society_ghazi_sunni = { #PLUS
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		has_global_flag = CK2PLUS_ACTIVE
		is_title_active = d_ghazi_sunni
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_ghazi_sunni
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_ghazi_sunni
			liege = { has_landed_title = d_ghazi_sunni }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_sunni = yes
		NOT = { has_character_modifier = expelled_d_ghazi_sunni }
	}

	show_society = { 
		has_holyorder_societies_religion_sunni = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_sunni = yes
		NOT = { has_character_modifier = expelled_d_ghazi_sunni }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check mujahids, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = sayyid
			value = 5
		}
		has_trait = {
			trait = mirza 
			value = 5
		}
		has_trait = {
			trait = mujahid 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = faqih
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = hajjaj
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = decadent
			value = -5
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = sayyid
			factor = 5
		}
		modifier = {
			trait = mirza 
			factor = 5
		}
		modifier = {
			trait = mujahid 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = faqih
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = hajjaj
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = decadent
			factor = 0.5
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_ghazi_sunni
				liege = { has_landed_title = d_ghazi_sunni }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_sunni = yes
			NOT = { has_character_modifier = expelled_d_ghazi_sunni }
		}
	}
}
society_ghazi_shiite = { #PLUS
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		has_global_flag = CK2PLUS_ACTIVE
		is_title_active = d_ghazi_shiite
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_ghazi_shiite
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_ghazi_shiite
			liege = { has_landed_title = d_ghazi_shiite }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_shiite = yes
		NOT = { has_character_modifier = expelled_d_ghazi_shiite }
	}

	show_society = { 
		has_holyorder_societies_religion_shiite = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_shiite = yes
		NOT = { has_character_modifier = expelled_d_ghazi_shiite }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check mujahids, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = sayyid
			value = 5
		}
		has_trait = {
			trait = mirza 
			value = 5
		}
		has_trait = {
			trait = mujahid 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = faqih
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = hajjaj
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = decadent
			value = -5
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = sayyid
			factor = 5
		}
		modifier = {
			trait = mirza 
			factor = 5
		}
		modifier = {
			trait = mujahid 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = faqih
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = hajjaj
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = decadent
			factor = 0.5
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_ghazi_shiite
				liege = { has_landed_title = d_ghazi_shiite }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_shiite = yes
			NOT = { has_character_modifier = expelled_d_ghazi_shiite }
		}
	}
}
society_sons_of_judea = { #PLUS
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		has_global_flag = CK2PLUS_ACTIVE
		is_title_active = d_sons_of_judea
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_sons_of_judea
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_sons_of_judea
			liege = { has_landed_title = d_sons_of_judea }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_jewish = yes
		NOT = { has_character_modifier = expelled_d_sons_of_judea }
	}

	show_society = { 
		has_holyorder_societies_religion_jewish = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_jewish = yes
		NOT = { has_character_modifier = expelled_d_sons_of_judea }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = monk
			value = 5
		}
		has_trait = {
			trait = nun 
			value = 5
		}
		has_trait = {
			trait = shaddai 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = monk
			factor = 5
		}
		modifier = {
			trait = nun 
			factor = 5
		}
		modifier = {
			trait = shaddai 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_sons_of_judea
				liege = { has_landed_title = d_sons_of_judea }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_jewish = yes
			NOT = { has_character_modifier = expelled_d_sons_of_judea }
		}
	}
}
society_braedralag = { #PLUS
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		has_global_flag = CK2PLUS_ACTIVE
		is_title_active = d_braedralag
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_braedralag
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_braedralag
			liege = { has_landed_title = d_braedralag }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_norse = yes
		NOT = { has_character_modifier = expelled_d_braedralag }
	}

	show_society = { 
		has_holyorder_societies_religion_norse = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_norse = yes
		NOT = { has_character_modifier = expelled_d_braedralag }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_1"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_1
			}
			value = 1
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_2_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_2
			}
			value = 2
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_3_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_3
			}
			value = 3
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = seaking
			value = 5
		}
		has_trait = {
			trait = sea_queen 
			value = 5
		}
		has_trait = {
			trait = valhalla_bound 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = ravager
			value = 3
		}
		has_trait = {
			trait = viking
			value = 2
		}
		has_trait = {
			trait = shieldmaiden
			value = 2
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = seaking
			factor = 5
		}
		modifier = {
			trait = sea_queen 
			factor = 5
		}
		modifier = {
			trait = valhalla_bound 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = ravager
			factor = 1.25
		}
		modifier = {
			trait = viking
			factor = 1.1
		}
		modifier = {
			trait = shieldmaiden
			factor = 1.1
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_braedralag
				liege = { has_landed_title = d_braedralag }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_norse = yes
			NOT = { has_character_modifier = expelled_d_braedralag }
		}
	}
}
society_harii = { #PLUS
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		has_global_flag = CK2PLUS_ACTIVE
		is_title_active = d_harii
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_harii
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_harii
			liege = { has_landed_title = d_harii }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_german = yes
		NOT = { has_character_modifier = expelled_d_harii }
	}

	show_society = { 
		has_holyorder_societies_religion_german = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_german = yes
		NOT = { has_character_modifier = expelled_d_harii }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_1"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_1
			}
			value = 1
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_2_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_2
			}
			value = 2
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_3_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_3
			}
			value = 3
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = seaking
			value = 5
		}
		has_trait = {
			trait = sea_queen 
			value = 5
		}
		has_trait = {
			trait = valhalla_bound 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = ravager
			value = 3
		}
		has_trait = {
			trait = viking
			value = 2
		}
		has_trait = {
			trait = shieldmaiden
			value = 2
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = seaking
			factor = 5
		}
		modifier = {
			trait = sea_queen 
			factor = 5
		}
		modifier = {
			trait = valhalla_bound 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = ravager
			factor = 1.25
		}
		modifier = {
			trait = viking
			factor = 1.1
		}
		modifier = {
			trait = shieldmaiden
			factor = 1.1
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_harii
				liege = { has_landed_title = d_harii }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_german = yes
			NOT = { has_character_modifier = expelled_d_harii }
		}
	}
}
society_fianna = { #PLUS / AC
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		OR = {
			has_global_flag = ANCREL_ACTIVE
			has_global_flag = CK2PLUS_ACTIVE
		}
		is_title_active = d_fianna
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_fianna
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_fianna
			liege = { has_landed_title = d_fianna }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_celtic = yes
		NOT = { has_character_modifier = expelled_d_fianna }
	}

	show_society = { 
		has_holyorder_societies_religion_celtic = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_celtic = yes
		NOT = { has_character_modifier = expelled_d_fianna }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_1"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_1
			}
			value = 1
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_2_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_2
			}
			value = 2
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_3_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_3
			}
			value = 3
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = wolf
			value = 5
		}
		has_trait = {
			trait = fian 
			value = 5
		}
		has_trait = {
			trait = holy_crusader 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = druid
			value = 3
		}
		has_trait = {
			trait = changeling
			value = 2
		}
		has_trait = {
			trait = learning_druidic_arts
			value = 2
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = bad_druid
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = wolf
			factor = 5
		}
		modifier = {
			trait = fian 
			factor = 5
		}
		modifier = {
			trait = holy_crusader 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = druid
			factor = 1.25
		}
		modifier = {
			trait = changeling
			factor = 1.1
		}
		modifier = {
			trait = learning_druidic_arts
			factor = 1.1
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = bad_druid
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_fianna
				liege = { has_landed_title = d_fianna }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_celtic = yes
			NOT = { has_character_modifier = expelled_d_fianna }
		}
	}
}
society_gwydion = { #PLUS / Merc in AC
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		has_global_flag = CK2PLUS_ACTIVE
		is_title_active = d_gwydion
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_gwydion
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_gwydion
			liege = { has_landed_title = d_gwydion }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_celtic = yes
		NOT = { has_character_modifier = expelled_d_gwydion }
	}

	show_society = { 
		has_holyorder_societies_religion_celtic = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_celtic = yes
		NOT = { has_character_modifier = expelled_d_gwydion }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_1"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_1
			}
			value = 1
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_2_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_2
			}
			value = 2
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_3_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_3
			}
			value = 3
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = wolf
			value = 5
		}
		has_trait = {
			trait = fian 
			value = 5
		}
		has_trait = {
			trait = holy_crusader 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = druid
			value = 3
		}
		has_trait = {
			trait = changeling
			value = 2
		}
		has_trait = {
			trait = learning_druidic_arts
			value = 2
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = bad_druid
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = wolf
			factor = 5
		}
		modifier = {
			trait = fian 
			factor = 5
		}
		modifier = {
			trait = holy_crusader 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = druid
			factor = 1.25
		}
		modifier = {
			trait = changeling
			factor = 1.1
		}
		modifier = {
			trait = learning_druidic_arts
			factor = 1.1
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = bad_druid
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_gwydion
				liege = { has_landed_title = d_gwydion }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_celtic = yes
			NOT = { has_character_modifier = expelled_d_gwydion }
		}
	}
}
society_red_dragons = { #PLUS / AC
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		OR = {
			has_global_flag = ANCREL_ACTIVE
			has_global_flag = CK2PLUS_ACTIVE
		}
		is_title_active = d_red_dragons
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_red_dragons
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_red_dragons
			liege = { has_landed_title = d_red_dragons }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_celtic = yes
		NOT = { has_character_modifier = expelled_d_red_dragons }
	}

	show_society = { 
		has_holyorder_societies_religion_celtic = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_celtic = yes
		NOT = { has_character_modifier = expelled_d_red_dragons }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_1"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_1
			}
			value = 1
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_2_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_2
			}
			value = 2
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_3_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_3
			}
			value = 3
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = wolf
			value = 5
		}
		has_trait = {
			trait = fian 
			value = 5
		}
		has_trait = {
			trait = holy_crusader 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = druid
			value = 3
		}
		has_trait = {
			trait = changeling
			value = 2
		}
		has_trait = {
			trait = learning_druidic_arts
			value = 2
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = bad_druid
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = wolf
			factor = 5
		}
		modifier = {
			trait = fian 
			factor = 5
		}
		modifier = {
			trait = holy_crusader 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = druid
			factor = 1.25
		}
		modifier = {
			trait = changeling
			factor = 1.1
		}
		modifier = {
			trait = learning_druidic_arts
			factor = 1.1
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = bad_druid
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_red_dragons
				liege = { has_landed_title = d_red_dragons }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_celtic = yes
			NOT = { has_character_modifier = expelled_d_red_dragons }
		}
	}
}
society_anubis = { #PLUS / AC
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		OR = {
			has_global_flag = ANCREL_ACTIVE
			has_global_flag = CK2PLUS_ACTIVE
		}
		is_title_active = d_anubis
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_anubis
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_anubis
			liege = { has_landed_title = d_anubis }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_egyptian = yes
		NOT = { has_character_modifier = expelled_d_anubis }
	}

	show_society = { 
		has_holyorder_societies_religion_egyptian = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_egyptian = yes
		NOT = { has_character_modifier = expelled_d_anubis }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_1"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_1
			}
			value = 1
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_2_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_2
			}
			value = 2
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_3_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_3
			}
			value = 3
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = immortal
			value = 10
		}
		has_trait = {
			trait = holy_crusader 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = immortal
			factor = 10
		}
		modifier = {
			trait = holy_crusader 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_anubis
				liege = { has_landed_title = d_anubis }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_egyptian = yes
			NOT = { has_character_modifier = expelled_d_anubis }
		}
	}
}
society_horus = { #PLUS / AC
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		OR = {
			has_global_flag = ANCREL_ACTIVE
			has_global_flag = CK2PLUS_ACTIVE
		}
		is_title_active = d_horus
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_horus
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_horus
			liege = { has_landed_title = d_horus }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_egyptian = yes
		NOT = { has_character_modifier = expelled_d_horus }
	}

	show_society = { 
		has_holyorder_societies_religion_egyptian = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_egyptian = yes
		NOT = { has_character_modifier = expelled_d_horus }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_1"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_1
			}
			value = 1
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_2_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_2
			}
			value = 2
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_3_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_3
			}
			value = 3
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = immortal
			value = 10
		}
		has_trait = {
			trait = holy_crusader 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = immortal
			factor = 10
		}
		modifier = {
			trait = holy_crusader 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_horus
				liege = { has_landed_title = d_horus }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_egyptian = yes
			NOT = { has_character_modifier = expelled_d_horus }
		}
	}
}
society_herculean = { #PLUS
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		has_global_flag = CK2PLUS_ACTIVE
		is_title_active = d_herculean
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_herculean
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_herculean
			liege = { has_landed_title = d_herculean }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_hellenic = yes
		NOT = { has_character_modifier = expelled_d_herculean }
	}

	show_society = { 
		has_holyorder_societies_religion_hellenic = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_hellenic = yes
		NOT = { has_character_modifier = expelled_d_herculean }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check mujahids, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_1"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_1
			}
			value = 1
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_2_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_2
			}
			value = 2
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_3_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_3
			}
			value = 3
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = augustus
			value = 5
		}
		has_trait = {
			trait = born_in_the_purple 
			value = 5
		}
		has_trait = {
			trait = ares_own  
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = faqih
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = decadent
			value = -5
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = augustus
			factor = 5
		}
		modifier = {
			trait = born_in_the_purple 
			factor = 5
		}
		modifier = {
			trait = ares_own 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = faqih
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = decadent
			factor = 0.5
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_herculean
				liege = { has_landed_title = d_herculean }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_hellenic = yes
			NOT = { has_character_modifier = expelled_d_herculean }
		}
	}
}
society_sacred_band = { #PLUS / AC
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		OR = {
			has_global_flag = ANCREL_ACTIVE
			has_global_flag = CK2PLUS_ACTIVE
		}
		is_title_active = d_sacred_band
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_sacred_band
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_sacred_band
			liege = { has_landed_title = d_sacred_band }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_hellenic = yes
		NOT = { has_character_modifier = expelled_d_sacred_band }
	}

	show_society = { 
		has_holyorder_societies_religion_hellenic = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_hellenic = yes
		NOT = { has_character_modifier = expelled_d_sacred_band }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check mujahids, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_1"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_1
			}
			value = 1
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_2_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_2
			}
			value = 2
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_3_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_3
			}
			value = 3
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = augustus
			value = 5
		}
		has_trait = {
			trait = born_in_the_purple 
			value = 5
		}
		has_trait = {
			trait = ares_own  
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = faqih
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = homosexual
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = decadent
			value = -5
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = augustus
			factor = 5
		}
		modifier = {
			trait = born_in_the_purple 
			factor = 5
		}
		modifier = {
			trait = ares_own 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = faqih
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = homosexual
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = decadent
			factor = 0.5
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_sacred_band
				liege = { has_landed_title = d_sacred_band }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_hellenic = yes
			NOT = { has_character_modifier = expelled_d_sacred_band }
		}
	}
}
society_great_host = { #PLUS
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		has_global_flag = CK2PLUS_ACTIVE
		is_title_active = d_great_host
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_great_host
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_great_host
			liege = { has_landed_title = d_great_host }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_tengri = yes
		NOT = { has_character_modifier = expelled_d_great_host }
	}

	show_society = { 
		has_holyorder_societies_religion_tengri = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_tengri = yes
		NOT = { has_character_modifier = expelled_d_great_host }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_1"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_1
			}
			value = 1
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_2_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_2
			}
			value = 2
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_3_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_3
			}
			value = 3
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = monk
			value = 5
		}
		has_trait = {
			trait = nun 
			value = 5
		}
		has_trait = {
			trait = tengri_warrior 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = monk
			factor = 5
		}
		modifier = {
			trait = nun 
			factor = 5
		}
		modifier = {
			trait = tengri_warrior 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_great_host
				liege = { has_landed_title = d_great_host }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_tengri = yes
			NOT = { has_character_modifier = expelled_d_great_host }
		}
	}
}
society_guardians_of_the_sacred_flame = { #PLUS
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		has_global_flag = CK2PLUS_ACTIVE
		is_title_active = d_guardians_of_the_sacred_flame 
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_guardians_of_the_sacred_flame 
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_guardians_of_the_sacred_flame
			liege = { has_landed_title = d_guardians_of_the_sacred_flame }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_baltic = yes
		NOT = { has_character_modifier = expelled_d_guardians_of_the_sacred_flame }
	}

	show_society = { 
		has_holyorder_societies_religion_baltic = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_baltic = yes
		NOT = { has_character_modifier = expelled_d_guardians_of_the_sacred_flame }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_1"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_1
			}
			value = 1
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_2_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_2
			}
			value = 2
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_3_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_3
			}
			value = 3
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = monk
			value = 5
		}
		has_trait = {
			trait = nun 
			value = 5
		}
		has_trait = {
			trait = romuvas_own 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = monk
			factor = 5
		}
		modifier = {
			trait = nun 
			factor = 5
		}
		modifier = {
			trait = romuvas_own 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_guardians_of_the_sacred_flame
				liege = { has_landed_title = d_guardians_of_the_sacred_flame }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_baltic = yes
			NOT = { has_character_modifier = expelled_d_guardians_of_the_sacred_flame }
		}
	}
}
society_disciples_of_the_old_gods = { #PLUS
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_game_rule = {
			name = chivalry_rule_holy
			value = default
		}
		has_global_flag = CK2PLUS_ACTIVE
		is_title_active = d_disciples_of_the_old_gods 
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_disciples_of_the_old_gods 
					rank = 1
				}
			}
		}
		OR = {
			has_landed_title = d_disciples_of_the_old_gods
			liege = { has_landed_title = d_disciples_of_the_old_gods }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_finnish = yes
		NOT = { has_character_modifier = expelled_d_disciples_of_the_old_gods }
	}

	show_society = { 
		has_holyorder_societies_religion_finnish = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_finnish = yes
		NOT = { has_character_modifier = expelled_d_disciples_of_the_old_gods }
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 24
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 10
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 5
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_1"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_1
			}
			value = 1
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_2_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_2
			}
			value = 2
		}
		triggered_gain = {
			desc = "bloodthirsty_gods_3_tt"
			trigger = {
				has_religion_feature = religion_ritual_sacrifice
				trait = bloodthirsty_gods_3
			}
			value = 3
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = monk
			value = 5
		}
		has_trait = {
			trait = nun 
			value = 5
		}
		has_trait = {
			trait = ukkos_shield 
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = monk
			factor = 5
		}
		modifier = {
			trait = nun 
			factor = 5
		}
		modifier = {
			trait = ukkos_shield 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			OR = {
				has_landed_title = d_disciples_of_the_old_gods
				liege = { has_landed_title = d_disciples_of_the_old_gods }
				AND = {
					is_ruler = yes
					is_chivalry_martial_education = yes
				}
			}
			has_holyorder_societies_prerequisites_notrait = yes
			has_holyorder_societies_religion_finnish = yes
			NOT = { has_character_modifier = expelled_d_disciples_of_the_old_gods }
		}
	}
}
#Exra
society_generic_fighter_guild = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_fighter_societies 
	sound = land_battle_background 
	is_secret = no 
	criminal = no
	is_religious = no
	devil_worshipper = no 
	non_interference = { 
		always = no
	}
	active = { 
		OR = {
			has_game_rule = {
				name = chivalry_rule_fight
				value = europextra
			}
			has_game_rule = {
				name = chivalry_rule_fight
				value = extra
			}
		}
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_generic_fighter_guild
					rank = 1
				}
			}
		}
		has_fighter_societies_prerequisites = yes
		has_fighter_societies_generic = yes
		NOT = { has_character_flag = betrayed_generic_fighter_guild }
	}

	show_society = { 
		always = yes
	}
	
	potential = { 
		# has_fighter_societies_generic = yes
		NOT = { has_character_flag = betrayed_generic_fighter_guild }
		is_incapable = no
	}
	
	society_rank = { 
		level = 1 
		limit = 80
		startup_limit = 50
		modifier = {
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			chivalry_power_weapon
			chivalry_power_take_bounty
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 40
		startup_limit = 25
		modifier = { 
			martial = 1 
			combat_rating = 3
		}
		decisions = {
			chivalry_power_commander_fighter
			chivalry_power_commander_fighter_upgrade
			chivalry_power_army_fighter
		}
	}
	
	society_rank = {
		level = 3
		limit = 10
		startup_limit = 10
		modifier = {
			martial = 2
			combat_rating = 6
			monthly_character_prestige = 0.5
			sex_appeal_opinion = 10
		}
		decisions = {
			chivalry_power_merc_governement
			chivalry_power_arena_dummy
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			martial = 3
			combat_rating = 10
			monthly_character_prestige = 1
			sex_appeal_opinion = 25
		}
		decisions = {
			chivalry_power_arena_champ_dummy
		}
		custom_tooltip = society_champion_blood_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = {
		name = fighter_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = hunter
			value = 3
		}
		has_trait = {#key stuff
			trait = strong
			value = 3
		}
		has_trait = {
			trait = robust
			value = 3
		}
		has_trait = {
			trait = sturdy
			value = 2
		}
		has_trait = {
			trait = genius
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {#medium stuff
			trait = quick
			value = 2
		}
		has_trait = {
			trait = shrewd
			value = 2
		}
		has_trait = {
			trait = giant
			value = 2
		}
		has_trait = {
			trait = wroth
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = ambitious
			value = 2
		}
		has_trait = {
			trait = scarred
			value = 1
		}
		has_trait = {
			trait = scarred_mid
			value = 2
		}
		has_trait = {
			trait = scarred_high
			value = 3
		}
		has_trait = {
			trait = proud
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = deceitful
			value = 1
		}
		has_trait = {
			trait = arbitrary
			value = 1
		}
		has_trait = {
			trait = cruel
			value = 1
		}
		has_trait = {
			trait = erudite
			value = -1
		}
		has_trait = {
			trait = trusting
			value = -1
		}
		has_trait = {
			trait = shy
			value = -1
		}
		has_trait = {
			trait = kind
			value = -1
		}
		has_trait = {
			trait = greedy
			value = -1
		}
		has_trait = {
			trait = gluttonous
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#medium stuff
			trait = wounded
			value = -2
		}
		has_trait = {
			trait = disfigured
			value = -2
		}
		has_trait = {
			trait = clubfooted
			value = -2
		}
		has_trait = {
			trait = dwarf
			value = -2
		}
		has_trait = {
			trait = slow
			value = -2
		}
		has_trait = {
			trait = dull
			value = -2
		}
		has_trait = {#key stuff
			trait = maimed
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = mangled
			value = -2
		}
		has_trait = {
			trait = one_eyed
			value = -2
		}
		has_trait = {
			trait = one_handed
			value = -2
		}
		has_trait = {
			trait = one_legged
			value = -2
		}
		has_trait = {
			trait = imbecile
			value = -3
		}
		has_trait = {
			trait = inbred
			value = -3
		}
		has_trait = {
			trait = weak
			value = -3
		}
		has_trait = {
			trait = feeble
			value = -3
		}
		triggered_gain = {
			desc = "justified_resting_tt"
			trigger = {
				has_character_modifier = chivalry_justified_rest
				society_rank < 4
			}
			value = -5
		}
		triggered_gain = {
			desc = "justified_resting_champ_tt"
			trigger = {
				has_character_modifier = chivalry_justified_rest
				society_rank = 4
			}
			value = -25
		}
		triggered_gain = {
			desc = "unjustified_resting_tt"
			trigger = {
				has_character_modifier = chivalry_unjustified_rest
				society_rank < 4
			}
			value = -10
		}
		triggered_gain = {
			desc = "unjustified_resting_champ_tt"
			trigger = {
				has_character_modifier = chivalry_unjustified_rest
				society_rank = 4
			}
			value = -50
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			has_minor_title = title_commander
			factor = 5
		}
		
		
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = hunter
			factor = 1.5
		}
		modifier = {#key stuff
			trait = strong
			factor = 1.5
		}
		modifier = {
			trait = robust
			factor = 1.5
		}
		modifier = {
			trait = genius
			factor = 1.5
		}
		modifier = {
			trait = brave
			factor = 1.5
		}
		modifier = {#medium stuff
			trait = quick
			factor = 1.25
		}
		modifier = {
			trait = shrewd
			factor = 1.25
		}
		modifier = {
			trait = wroth
			factor = 1.25
		}
		modifier = {
			trait = diligent
			factor = 1.25
		}
		modifier = {
			trait = patient
			factor = 1.25
		}
		modifier = {
			trait = ambitious
			factor = 1.25
		}
		modifier = { #small stuff
			trait = scarred
			factor = 1.1
		}
		modifier = {
			trait = proud
			factor = 1.1
		}
		modifier = {
			trait = deceitful
			factor = 1.1
		}
		modifier = {
			trait = arbitrary
			factor = 1.1
		}
		modifier = {
			trait = cruel
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 0.9
		}
		modifier = {
			trait = trusting
			factor = 0.9
		}
		modifier = {
			trait = shy
			factor = 0.9
		}
		modifier = {
			trait = kind
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {#medium stuff
			trait = wounded
			factor = 0.75
		}
		modifier = {
			trait = disfigured
			factor = 0.75
		}
		modifier = {
			trait = clubfooted
			factor = 0.75
		}
		modifier = {
			trait = dwarf
			factor = 0.75
		}
		modifier = {
			trait = slow
			factor = 0.75
		}
		modifier = {
			trait = dull
			factor = 0.75
		}
		modifier = {#key stuff
			trait = maimed
			factor = 0.5
		}
		modifier = {
			trait = craven
			factor = 0.5
		}
		modifier = {
			trait = mangled
			factor = 0.5
		}
		modifier = {
			trait = one_eyed
			factor = 0.5
		}
		modifier = {
			trait = one_handed
			factor = 0.5
		}
		modifier = {
			trait = one_legged
			factor = 0.5
		}
		modifier = {
			trait = imbecile
			factor = 0.5
		}
		modifier = {
			trait = inbred
			factor = 0.5
		}
		modifier = {
			trait = weak
			factor = 0.5
		}
		modifier = {
			trait = feeble
			factor = 0.5
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			lower_tier_than = king
			has_fighter_societies_prerequisites = yes
			has_fighter_societies_generic = yes
			NOT = { has_character_flag = betrayed_generic_fighter_guild }
		}
	}
}
society_risk_fighter_guild = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +10
	opinion_per_rank_above = +20
	society_rank_up_decision = request_to_rank_up_within_fighter_societies 
	sound = land_battle_background 
	is_secret = no 
	criminal = no
	is_religious = no
	devil_worshipper = no 
	non_interference = { 
		always = no
	}
	active = { 
		OR = {
			has_game_rule = {
				name = chivalry_rule_fight
				value = europextra
			}
			has_game_rule = {
				name = chivalry_rule_fight
				value = extra
			}
		}
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_risk_fighter_guild
					rank = 1
				}
			}
		}
		has_fighter_societies_prerequisites = yes
		has_fighter_societies_risk = yes
		NOT = { has_character_flag = betrayed_risk_fighter_guild }
	}

	show_society = { 
		always = yes
	}
	
	potential = { 
		# has_fighter_societies_risk = yes
		NOT = { has_character_flag = betrayed_generic_fighter_guild }
		is_incapable = no
	}
	
	society_rank = { 
		level = 1 
		limit = 30
		startup_limit = 20
		modifier = {
			combat_rating = 5
			monthly_character_prestige = 0.5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			chivalry_power_weapon
			chivalry_power_take_bounty
		}
		custom_tooltip = society_risk_fighter_guild_tt
	}
	
	society_rank = {
		level = 2
		limit = 15
		startup_limit = 10
		modifier = { 
			martial = 1 
			combat_rating = 10
			monthly_character_prestige = 1
			sex_appeal_opinion = 5
		}
		decisions = {
			chivalry_power_commander_fighter
			chivalry_power_commander_fighter_upgrade
			chivalry_power_army_fighter
		}
	}
	
	society_rank = {
		level = 3
		limit = 5
		startup_limit = 5
		modifier = {
			martial = 2
			combat_rating = 20
			monthly_character_prestige = 2
			sex_appeal_opinion = 10
		}
		decisions = {
			chivalry_power_merc_governement
			chivalry_power_arena_dummy
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			martial = 3
			combat_rating = 30
			monthly_character_prestige = 5
			sex_appeal_opinion = 25
		}
		decisions = {
			chivalry_power_arena_champ_dummy
		}
		custom_tooltip = society_champion_blood_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = {
		name = fighter_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.5
    	}
		society_rank = {
			rank = 1
			value = 2
		}
		society_rank = {
			rank = 2
			value = 4
		}
		society_rank = {
			rank = 3
			value = 6
		}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = hunter
			value = 3
		}
		has_trait = {#key stuff
			trait = strong
			value = 3
		}
		has_trait = {
			trait = robust
			value = 3
		}
		has_trait = {
			trait = sturdy
			value = 2
		}
		has_trait = {
			trait = genius
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {#medium stuff
			trait = quick
			value = 2
		}
		has_trait = {
			trait = shrewd
			value = 2
		}
		has_trait = {
			trait = giant
			value = 2
		}
		has_trait = {
			trait = wroth
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = ambitious
			value = 2
		}
		has_trait = {
			trait = scarred
			value = 1
		}
		has_trait = {
			trait = scarred_mid
			value = 2
		}
		has_trait = {
			trait = scarred_high
			value = 3
		}
		has_trait = {
			trait = proud
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = deceitful
			value = 1
		}
		has_trait = {
			trait = arbitrary
			value = 1
		}
		has_trait = {
			trait = cruel
			value = 3
		}
		has_trait = {
			trait = erudite
			value = -1
		}
		has_trait = {
			trait = trusting
			value = -1
		}
		has_trait = {
			trait = shy
			value = -1
		}
		has_trait = {
			trait = kind
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -1
		}
		has_trait = {
			trait = gluttonous
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#medium stuff
			trait = wounded
			value = -2
		}
		has_trait = {
			trait = disfigured
			value = -2
		}
		has_trait = {
			trait = clubfooted
			value = -2
		}
		has_trait = {
			trait = dwarf
			value = -2
		}
		has_trait = {
			trait = slow
			value = -2
		}
		has_trait = {
			trait = dull
			value = -2
		}
		has_trait = {#key stuff
			trait = maimed
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = mangled
			value = -2
		}
		has_trait = {
			trait = one_eyed
			value = -2
		}
		has_trait = {
			trait = one_handed
			value = -2
		}
		has_trait = {
			trait = one_legged
			value = -2
		}
		has_trait = {
			trait = imbecile
			value = -3
		}
		has_trait = {
			trait = inbred
			value = -3
		}
		has_trait = {
			trait = weak
			value = -3
		}
		has_trait = {
			trait = feeble
			value = -3
		}
		triggered_gain = {
			desc = "justified_resting_tt"
			trigger = {
				has_character_modifier = chivalry_justified_rest
				society_rank < 4
			}
			value = -5
		}
		triggered_gain = {
			desc = "justified_resting_champ_tt"
			trigger = {
				has_character_modifier = chivalry_justified_rest
				society_rank = 4
			}
			value = -25
		}
		triggered_gain = {
			desc = "unjustified_resting_tt"
			trigger = {
				has_character_modifier = chivalry_unjustified_rest
				society_rank < 4
			}
			value = -10
		}
		triggered_gain = {
			desc = "unjustified_resting_champ_tt"
			trigger = {
				has_character_modifier = chivalry_unjustified_rest
				society_rank = 4
			}
			value = -50
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			has_minor_title = title_commander
			factor = 5
		}
		
		
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = hunter
			factor = 1.5
		}
		modifier = {#key stuff
			trait = strong
			factor = 1.5
		}
		modifier = {
			trait = robust
			factor = 1.5
		}
		modifier = {
			trait = genius
			factor = 1.5
		}
		modifier = {
			trait = brave
			factor = 1.5
		}
		modifier = {#medium stuff
			trait = quick
			factor = 1.25
		}
		modifier = {
			trait = shrewd
			factor = 1.25
		}
		modifier = {
			trait = wroth
			factor = 1.25
		}
		modifier = {
			trait = diligent
			factor = 1.25
		}
		modifier = {
			trait = patient
			factor = 1.25
		}
		modifier = {
			trait = ambitious
			factor = 1.25
		}
		modifier = { #small stuff
			trait = scarred
			factor = 1.1
		}
		modifier = {
			trait = proud
			factor = 1.1
		}
		modifier = {
			trait = deceitful
			factor = 1.1
		}
		modifier = {
			trait = arbitrary
			factor = 1.1
		}
		modifier = {
			trait = cruel
			factor = 1.5
		}
		modifier = {
			trait = erudite
			factor = 0.9
		}
		modifier = {
			trait = trusting
			factor = 0.9
		}
		modifier = {
			trait = shy
			factor = 0.9
		}
		modifier = {
			trait = kind
			factor = 0.7
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {#medium stuff
			trait = wounded
			factor = 0.75
		}
		modifier = {
			trait = disfigured
			factor = 0.75
		}
		modifier = {
			trait = clubfooted
			factor = 0.75
		}
		modifier = {
			trait = dwarf
			factor = 0.75
		}
		modifier = {
			trait = slow
			factor = 0.75
		}
		modifier = {
			trait = dull
			factor = 0.75
		}
		modifier = {#key stuff
			trait = maimed
			factor = 0.5
		}
		modifier = {
			trait = craven
			factor = 0.5
		}
		modifier = {
			trait = mangled
			factor = 0.5
		}
		modifier = {
			trait = one_eyed
			factor = 0.5
		}
		modifier = {
			trait = one_handed
			factor = 0.5
		}
		modifier = {
			trait = one_legged
			factor = 0.5
		}
		modifier = {
			trait = imbecile
			factor = 0.5
		}
		modifier = {
			trait = inbred
			factor = 0.5
		}
		modifier = {
			trait = weak
			factor = 0.5
		}
		modifier = {
			trait = feeble
			factor = 0.5
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			lower_tier_than = king
			has_fighter_societies_prerequisites = yes
			has_fighter_societies_risk = yes
			NOT = { has_character_flag = betrayed_risk_fighter_guild }
		}
	}
}
society_female_fighter_guild = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_fighter_societies 
	sound = land_battle_background 
	is_secret = no 
	criminal = no
	is_religious = no
	devil_worshipper = no 
	non_interference = { 
		always = no
	}
	active = { 
		OR = {
			has_game_rule = {
				name = chivalry_rule_fight
				value = europextra
			}
			has_game_rule = {
				name = chivalry_rule_fight
				value = extra
			}
		}
	}
	
	indestructible = yes
	
	can_join_society = { 
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_female_fighter_guild
					rank = 1
				}
			}
		}
		has_female_fighter_societies_prerequisites = yes
		has_fighter_societies_female = yes
		NOT = { has_character_flag = betrayed_female_fighter_guild }
	}

	show_society = { 
		always = yes
	}
	
	potential = { 
		# has_fighter_societies_female = yes
		NOT = { has_character_flag = betrayed_female_fighter_guild }
		is_incapable = no
	}
	
	society_rank = { 
		level = 1 
		limit = 50
		startup_limit = 25
		modifier = {
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			chivalry_power_weapon
			chivalry_power_take_bounty
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 30 
		startup_limit = 20
		modifier = { 
			martial = 1 
			combat_rating = 3
		}
		decisions = {
			chivalry_power_commander_fighter
			chivalry_power_commander_fighter_upgrade
			chivalry_power_army_fighter
		}
	}
	
	society_rank = {
		level = 3
		limit = 10
		startup_limit = 10
		modifier = {
			martial = 2
			combat_rating = 6
			monthly_character_prestige = 0.5
			sex_appeal_opinion = 10
		}
		decisions = {
			chivalry_power_merc_governement
			chivalry_power_arena_dummy
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 1
		modifier = { 
			martial = 3
			combat_rating = 10
			monthly_character_prestige = 1
			sex_appeal_opinion = 25
		}
		decisions = {
			chivalry_power_arena_champ_dummy
		}
		custom_tooltip = society_champion_blood_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = {
		name = fighter_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = hunter
			value = 3
		}
		has_trait = {#key stuff
			trait = strong
			value = 3
		}
		has_trait = {
			trait = robust
			value = 3
		}
		has_trait = {
			trait = sturdy
			value = 2
		}
		has_trait = {
			trait = genius
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {#medium stuff
			trait = quick
			value = 2
		}
		has_trait = {
			trait = shrewd
			value = 2
		}
		has_trait = {
			trait = giant
			value = 2
		}
		has_trait = {
			trait = wroth
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = ambitious
			value = 2
		}
		has_trait = {
			trait = scarred
			value = 1
		}
		has_trait = {
			trait = scarred_mid
			value = 2
		}
		has_trait = {
			trait = scarred_high
			value = 3
		}
		has_trait = {
			trait = proud
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = deceitful
			value = 1
		}
		has_trait = {
			trait = arbitrary
			value = 1
		}
		has_trait = {
			trait = cruel
			value = 1
		}
		has_trait = {
			trait = erudite
			value = -1
		}
		has_trait = {
			trait = trusting
			value = -1
		}
		has_trait = {
			trait = shy
			value = -1
		}
		has_trait = {
			trait = kind
			value = -1
		}
		has_trait = {
			trait = greedy
			value = -1
		}
		has_trait = {
			trait = gluttonous
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#medium stuff
			trait = wounded
			value = -2
		}
		has_trait = {
			trait = disfigured
			value = -2
		}
		has_trait = {
			trait = clubfooted
			value = -2
		}
		has_trait = {
			trait = dwarf
			value = -2
		}
		has_trait = {
			trait = slow
			value = -2
		}
		has_trait = {
			trait = dull
			value = -2
		}
		has_trait = {#key stuff
			trait = maimed
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = mangled
			value = -2
		}
		has_trait = {
			trait = one_eyed
			value = -2
		}
		has_trait = {
			trait = one_handed
			value = -2
		}
		has_trait = {
			trait = one_legged
			value = -2
		}
		has_trait = {
			trait = imbecile
			value = -3
		}
		has_trait = {
			trait = inbred
			value = -3
		}
		has_trait = {
			trait = weak
			value = -3
		}
		has_trait = {
			trait = feeble
			value = -3
		}
		triggered_gain = {
			desc = "justified_resting_tt"
			trigger = {
				has_character_modifier = chivalry_justified_rest
				society_rank < 4
			}
			value = -5
		}
		triggered_gain = {
			desc = "justified_resting_champ_tt"
			trigger = {
				has_character_modifier = chivalry_justified_rest
				society_rank = 4
			}
			value = -25
		}
		triggered_gain = {
			desc = "unjustified_resting_tt"
			trigger = {
				has_character_modifier = chivalry_unjustified_rest
				society_rank < 4
			}
			value = -10
		}
		triggered_gain = {
			desc = "unjustified_resting_champ_tt"
			trigger = {
				has_character_modifier = chivalry_unjustified_rest
				society_rank = 4
			}
			value = -50
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			has_minor_title = title_commander
			factor = 5
		}
		
		
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = hunter
			factor = 1.5
		}
		modifier = {#key stuff
			trait = strong
			factor = 1.5
		}
		modifier = {
			trait = robust
			factor = 1.5
		}
		modifier = {
			trait = genius
			factor = 1.5
		}
		modifier = {
			trait = brave
			factor = 1.5
		}
		modifier = {#medium stuff
			trait = quick
			factor = 1.25
		}
		modifier = {
			trait = shrewd
			factor = 1.25
		}
		modifier = {
			trait = wroth
			factor = 1.25
		}
		modifier = {
			trait = diligent
			factor = 1.25
		}
		modifier = {
			trait = patient
			factor = 1.25
		}
		modifier = {
			trait = ambitious
			factor = 1.25
		}
		modifier = { #small stuff
			trait = scarred
			factor = 1.1
		}
		modifier = {
			trait = proud
			factor = 1.1
		}
		modifier = {
			trait = deceitful
			factor = 1.1
		}
		modifier = {
			trait = arbitrary
			factor = 1.1
		}
		modifier = {
			trait = cruel
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 0.9
		}
		modifier = {
			trait = trusting
			factor = 0.9
		}
		modifier = {
			trait = shy
			factor = 0.9
		}
		modifier = {
			trait = kind
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {#medium stuff
			trait = wounded
			factor = 0.75
		}
		modifier = {
			trait = disfigured
			factor = 0.75
		}
		modifier = {
			trait = clubfooted
			factor = 0.75
		}
		modifier = {
			trait = dwarf
			factor = 0.75
		}
		modifier = {
			trait = slow
			factor = 0.75
		}
		modifier = {
			trait = dull
			factor = 0.75
		}
		modifier = {#key stuff
			trait = maimed
			factor = 0.5
		}
		modifier = {
			trait = craven
			factor = 0.5
		}
		modifier = {
			trait = mangled
			factor = 0.5
		}
		modifier = {
			trait = one_eyed
			factor = 0.5
		}
		modifier = {
			trait = one_handed
			factor = 0.5
		}
		modifier = {
			trait = one_legged
			factor = 0.5
		}
		modifier = {
			trait = imbecile
			factor = 0.5
		}
		modifier = {
			trait = inbred
			factor = 0.5
		}
		modifier = {
			trait = weak
			factor = 0.5
		}
		modifier = {
			trait = feeble
			factor = 0.5
		}
	}
	
	startup_populate = {
		trigger = {
			ai = yes
			war = no
			lower_tier_than = king
			has_female_fighter_societies_prerequisites = yes
			has_fighter_societies_female = yes
			NOT = { has_character_flag = betrayed_female_fighter_guild }
		}
	}
}
society_holy_one = { 
	primary_attribute = martial
	society_ranks_gfx = chivalry_societies_ranks 
	opinion_to_other_members = +5 
	opinion_per_rank_above = +10
	society_rank_up_decision = request_to_rank_up_within_holyorder_societies 
	sound = religion_view 
	is_secret = no 
	criminal = no
	is_religious = yes
	devil_worshipper = no 
	non_interference = { 
		always = yes
	}
	
	active = { 
		has_global_flag = chivalry_holy_society_one_global
	}
	
	indestructible = yes
	
	can_join_society = {
		hidden_trigger = {
			NOT = { has_character_flag = society_join_block }
		}
		hidden_trigger = {
			NAND = { 
				ai = yes
				is_society_rank_full = { 
					society = society_holy_one
					rank = 1
				}
			}
		}
		OR = {
			primary_title { has_title_flag = chivalry_holy_society_one_flag }
			liege = { primary_title { has_title_flag = chivalry_holy_society_one_flag } }
			has_holyorder_societies_prerequisites = yes
		}
		has_holyorder_societies_religion_holy = yes
	}

	show_society = { 
		# has_holyorder_societies_religion_holy = yes
	}
	
	potential = { 
		OR = {
			is_heretic = no
			society = {
				any_society_member = {
					is_society_grandmaster = yes
					has_character_modifier = chivalry_law_heretic
				}
			}
		}
		has_holyorder_societies_religion_holy = yes
	}
	
	society_rank = {
		level = 1 
		limit = 32
		startup_limit = 0
		modifier = {
			church_opinion  = 5
		}
		decisions = {
			chivalry_power_training
			chivalry_power_gym
			chivalry_power_squire_dummy
			
		}
	}
	
	society_rank = {
		level = 2
		limit = 16
		startup_limit = 0
		modifier = { 
			church_opinion  = 10
			martial = 1 
		}
		decisions = {
			chivalry_power_commander_holy
			chivalry_power_commander_holy_upgrade
			chivalry_power_army_holy
		}
	}
	
	society_rank = {
		level = 3
		limit = 8
		startup_limit = 0
		modifier = {
			church_opinion  = 15
			martial = 2
			learning = 1
		}
		decisions = {
			chivalry_power_vote_law
			chivalry_power_holy_castle
			chivalry_power_holy_governement
		}
	}

	society_rank = {
		level = 4
		limit = 1 
		startup_limit = 0
		modifier = { 
			church_opinion  = 20
			martial = 1
			learning = 1
			monthly_character_piety = 0.5
			monthly_character_prestige = 0.5
		}
		decisions = {
		}
		custom_tooltip = society_holy_order_gm_tt
	}
	
	plots = {
	}
	
	monthly_currency_gain = { #check crusaders, monks, muslim stuffs.
		name = holyorder_societies_currency 
    	
    	per_attribute = {
    		name = martial
    		value = 0.25
    	}
		society_rank = {
			rank = 4
			value = 5
		}
		
    	has_trait = {#Education
			trait = misguided_warrior 
			value = 1
		}
		has_trait = {
			trait = tough_soldier 
			value = 2
		}
		has_trait = {
			trait = skilled_tactician
			value = 3
		}
		has_trait = {
			trait = brilliant_strategist
			value = 4
		}
    	has_trait = {
			trait = detached_priest
			value = 1
		}
		has_trait = {
			trait = martial_cleric
			value = 2
		}
		has_trait = {
			trait = scholarly_theologian
			value = 3
		}
		has_trait = {
			trait = mastermind_theologian
			value = 4
		}
		triggered_gain = {
			desc = "chivalry_focus_war_tt"
			trigger = {
				has_focus = focus_war
				has_education_martial_trigger = no
			}
			value = 2
		}
		triggered_gain = {
			desc = "chivalry_focus_theology_tt"
			trigger = {
				has_focus = focus_theology
				has_education_learning_trigger = no
			}
			value = 2
		}
		
    	has_trait = {#religion stuff
			trait = monk
			value = 5
		}
		has_trait = {
			trait = nun 
			value = 5
		}
		has_trait = {
			trait = crusader 
			value = 5
		}
		has_trait = {
			trait = crusader_king
			value = 5
		}
		has_trait = {
			trait = crusader_queen
			value = 5
		}
		has_trait = {#lifestyle
			trait = duelist
			value = 3
		}
		has_trait = {
			trait = strategist
			value = 3
		}
		has_trait = {
			trait = scholar
			value = 3
		}
		has_trait = {
			trait = theologian
			value = 3
		}
		has_trait = {#key stuff
			trait = zealous
			value = 3
		}
		has_trait = {
			trait = brave
			value = 3
		}
		has_trait = {
			trait = celibate
			value = 3
		}
		has_trait = {
			trait = pilgrim
			value = 3
		}
		has_trait = {#virtue
			trait = chaste
			value = 2
		}
		has_trait = {
			trait = temperate
			value = 2
		}
		has_trait = {
			trait = charitable
			value = 2
		}
		has_trait = {
			trait = diligent
			value = 2
		}
		has_trait = {
			trait = patient
			value = 2
		}
		has_trait = {
			trait = kind
			value = 2
		}
		has_trait = {
			trait = humble
			value = 2
		}
		has_trait = { #others
			trait = honest
			value = 1
		}
		triggered_gain = {
			desc = "chivalry_gym_shape_tt"
			trigger = {
				has_character_modifier = chivalry_gym_shape
			}
			value = 1
		}
		has_trait = {
			trait = erudite
			value = 1
		}
		has_trait = {
			trait = just
			value = 1
		}
		has_trait = {
			trait = trusting
			value = 1
		}
		has_trait = {
			trait = drunkard
			value = -1
		}
		has_trait = {
			trait = possessed
			value = -1
		}
		has_trait = {
			trait = deceitful
			value = -1
		}
		has_trait = {
			trait = arbitrary
			value = -1
		}
		has_trait = {
			trait = cruel
			value = -1
		}
		has_trait = {
			trait = is_malnourished
			value = -1
		}
		has_trait = {
			trait = is_fat
			value = -1
		}
		has_trait = {#sins
			trait = lustful
			value = -2
		}
		has_trait = {
			trait = gluttonous
			value = -2
		}
		has_trait = {
			trait = greedy
			value = -2
		}
		has_trait = {
			trait = slothful
			value = -2
		}
		has_trait = {
			trait = wroth
			value = -2
		}
		has_trait = {
			trait = envious
			value = -2
		}
		has_trait = {
			trait = proud
			value = -2
		}
		has_trait = {#key stuff
			trait = cynical
			value = -3
		}
		has_trait = {
			trait = craven
			value = -3
		}
		has_trait = {
			trait = hedonist
			value = -3
		}
		has_trait = {
			trait = excommunicated
			value = -10
		}
	}

	member_score_per_attribute = 3
	member_score_per_rank = 100

	member_score = {
		value = 10

		modifier = {
			is_priest = yes
			factor = 5
		}
		
		modifier = {#religion stuff
			trait = monk
			factor = 5
		}
		modifier = {
			trait = nun 
			factor = 5
		}
		modifier = {
			trait = crusader 
			factor = 5
		}
		modifier = {#lifestyle
			trait = duelist
			factor = 1.5
		}
		modifier = {
			trait = strategist
			factor = 1.5
		}
		modifier = {
			trait = scholar
			factor = 1.5
		}
		modifier = {
			trait = theologian
			factor = 1.5
		}
		modifier = {#key stuff
			trait = zealous
			factor = 1.25
		}
		modifier = {
			trait = brave
			factor = 1.25
		}
		modifier = {
			trait = celibate
			factor = 1.25
		}
		modifier = {
			trait = pilgrim
			factor = 1.25
		}
		modifier = {#virtue
			trait = chaste
			factor = 1.1
		}
		modifier = {
			trait = temperate
			factor = 1.1
		}
		modifier = {
			trait = charitable
			factor = 1.1
		}
		modifier = {
			trait = diligent
			factor = 1.1
		}
		modifier = {
			trait = patient
			factor = 1.1
		}
		modifier = {
			trait = kind
			factor = 1.1
		}
		modifier = {
			trait = humble
			factor = 1.1
		}
		modifier = { #others
			trait = honest
			factor = 1.1
		}
		modifier = {
			trait = erudite
			factor = 1.1
		}
		modifier = {
			trait = just
			factor = 1.1
		}
		modifier = {
			trait = trusting
			factor = 1.1
		}
		modifier = {
			trait = drunkard
			factor = 0.9
		}
		modifier = {
			trait = possessed
			factor = 0.9
		}
		modifier = {
			trait = deceitful
			factor = 0.9
		}
		modifier = {
			trait = arbitrary
			factor = 0.9
		}
		modifier = {
			trait = cruel
			factor = 0.9
		}
		modifier = {#sins
			trait = lustful
			factor = 0.9
		}
		modifier = {
			trait = gluttonous
			factor = 0.9
		}
		modifier = {
			trait = greedy
			factor = 0.9
		}
		modifier = {
			trait = slothful
			factor = 0.9
		}
		modifier = {
			trait = wroth
			factor = 0.9
		}
		modifier = {
			trait = envious
			factor = 0.9
		}
		modifier = {
			trait = proud
			factor = 0.9
		}
		modifier = {#key stuff
			trait = cynical
			factor = 0.75
		}
		modifier = {
			trait = craven
			factor = 0.75
		}
		modifier = {
			trait = hedonist
			factor = 0.75
		}
		modifier = {
			trait = excommunicated
			factor = 0.1
		}
	}
	
	startup_populate = {
	}
}



#possible addition:
#d_papal_knights (plus)
#Varangian guards