﻿base_prisoner_cost = {
	# Base cost
	value = 0
	if = {
		limit = {
			scope:secondary_actor = {
                age <= 6
            }
		}
		add = -5
	}
	if = {
		limit = {
			scope:secondary_actor = {
                age <= 10
            }
		}
		add = -5
	}
	if = {
		limit = {
			scope:secondary_actor = {
                age <= 14
            }
		}
		add = -5
	}
	if = {
		limit = {
			scope:secondary_actor = {
                is_female = yes
            }
		}
		add = -5
	}
	if = {
		limit = {
			scope:secondary_actor = {
                prowess >= 10
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                prowess >= 15
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                prowess >= 20
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                prowess >= 25
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                prowess >= 30
            }
		}
		add = 4
	}
	
	#### TIER ###
	if = {
		limit = {
			scope:secondary_actor = {
                primary_title.tier = tier_barony
            }
		}
		add = 30
	}
	if = {
		limit = {
			scope:secondary_actor = {
                primary_title.tier = tier_county
            }
		}
		add = 50
	}
	if = {
		limit = {
			scope:secondary_actor = {
                primary_title.tier = tier_duchy
            }
		}
		add = 100
	}
	if = {
		limit = {
			scope:secondary_actor = {
                primary_title.tier = tier_kingdom
            }
		}
		add = 200
	}
	if = {
		limit = {
			scope:secondary_actor = {
                primary_title.tier = tier_empire
            }
		}
		add = 500
	}
	#### ÉDUCATION ###
	##Diplomacy Education
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_diplomacy_1
            }
		}
		add = 2
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_diplomacy_2
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_diplomacy_3
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_diplomacy_4
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_diplomacy_5
            }
		}
		add = 10
	}
	##Martial Education
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_martial_1
            }
		}
		add = 2
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_martial_2
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_martial_3
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_martial_4
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_martial_5
            }
		}
		add = 10
	}
	##Stewardship Education
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_stewardship_1
            }
		}
		add = 2
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_stewardship_2
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_stewardship_3
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_stewardship_4
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_stewardship_5
            }
		}
		add = 10
	}
	##Intrigue Education
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_intrigue_1
            }
		}
		add = 2
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_intrigue_2
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_intrigue_3
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_intrigue_4
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_intrigue_5
            }
		}
		add = 10
	}
	##Learning Education
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_learning_1
            }
		}
		add = 2
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_learning_2
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_learning_3
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_learning_4
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_learning_5
            }
		}
		add = 10
	}
	#### ATTRIBUTS ###
	##Diplomacy
	if = {
		limit = {
			scope:secondary_actor = {
				NOT = { diplomacy < 5 }
            }
		}
		add = -4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                diplomacy >= 5
				NOT = { diplomacy >= 8 }
            }
		}
		add = 2
	}
	if = {
		limit = {
			scope:secondary_actor = {
                diplomacy >= 8
				NOT = { diplomacy >= 12 }
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                diplomacy >= 12
				NOT = { diplomacy >= 16 }
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                diplomacy >= 16
				NOT = { diplomacy >= 20 }
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                diplomacy >= 16
				NOT = { diplomacy >= 20 }
            }
		}
		add = 10
	}
	##Martial
	if = {
		limit = {
			scope:secondary_actor = {
				NOT = { martial < 5 }
            }
		}
		add = -4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                martial >= 5
				NOT = { martial >= 8 }
            }
		}
		add = 2
	}
	if = {
		limit = {
			scope:secondary_actor = {
                martial >= 8
				NOT = { martial >= 12 }
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                martial >= 12
				NOT = { martial >= 16 }
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                martial >= 16
				NOT = { martial >= 20 }
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                martial >= 16
				NOT = { martial >= 20 }
            }
		}
		add = 10
	}
	##Stewardship
	if = {
		limit = {
			scope:secondary_actor = {
				NOT = { stewardship < 5 }
            }
		}
		add = -4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                stewardship >= 5
				NOT = { stewardship >= 8 }
            }
		}
		add = 2
	}
	if = {
		limit = {
			scope:secondary_actor = {
                stewardship >= 8
				NOT = { stewardship >= 12 }
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                stewardship >= 12
				NOT = { stewardship >= 16 }
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                stewardship >= 16
				NOT = { stewardship >= 20 }
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                stewardship >= 16
				NOT = { stewardship >= 20 }
            }
		}
		add = 10
	}
	##Intrigue
	if = {
		limit = {
			scope:secondary_actor = {
				NOT = { intrigue < 5 }
            }
		}
		add = -4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                intrigue >= 5
				NOT = { intrigue >= 8 }
            }
		}
		add = 2
	}
	if = {
		limit = {
			scope:secondary_actor = {
                intrigue >= 8
				NOT = { intrigue >= 12 }
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                intrigue >= 12
				NOT = { intrigue >= 16 }
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                intrigue >= 16
				NOT = { intrigue >= 20 }
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                intrigue >= 16
				NOT = { intrigue >= 20 }
            }
		}
		add = 10
	}
	##Learning
	if = {
		limit = {
			scope:secondary_actor = {
				NOT = { learning < 5 }
            }
		}
		add = -4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                learning >= 5
				NOT = { learning >= 8 }
            }
		}
		add = 2
	}
	if = {
		limit = {
			scope:secondary_actor = {
                learning >= 8
				NOT = { learning >= 12 }
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                learning >= 12
				NOT = { learning >= 16 }
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                learning >= 16
				NOT = { learning >= 20 }
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                learning >= 16
				NOT = { learning >= 20 }
            }
		}
		add = 10
	}
	#### TRAITS ###
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = incapable
            }
		}
		add = -50
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = infirm
            }
		}
		add = -50
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = intellect_bad_1
            }
		}
		add = -15
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = intellect_bad_2
            }
		}
		add = -25
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = intellect_bad_3
            }
		}
		add = -35
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = dull
            }
		}
		add = -50
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = inbred
            }
		}
		add = -15
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = maimed
            }
		}
		add = -50
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = blind
            }
		}
		add = -50
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = disfigured
            }
		}
		add = -15
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = one_eyed
            }
		}
		add = -10
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = one_legged
            }
		}
		add = -15
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = weak
            }
		}
		add = -10
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = beauty_bad_1
            }
		}
		add = -10
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = beauty_bad_2
            }
		}
		add = -15
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = beauty_bad_3
            }
		}
		add = -20
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = intellect_good_1
            }
		}
		add = 10
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = intellect_good_2
            }
		}
		add = 10
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = intellect_good_3
            }
		}
		add = 10
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = physique_good_1
            }
		}
		add = 10
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = physique_good_2
            }
		}
		add = 10
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = physique_good_3
            }
		}
		add = 10
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = strong
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = shrewd
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = fecund
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = pure_blooded
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = beauty_good_1
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = beauty_good_2
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = beauty_good_3
            }
		}
		add = 10
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = giant
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = dwarf
            }
		}
		add = -10
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = diplomat
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = family_first
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = august
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = strategist
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = overseer
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = gallant
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = architect
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = administrator
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = avaricious
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = schemer
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = seducer
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = torturer
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = whole_of_body
            }
		}
		add = 10
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = scholar
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = theologian
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = lifestyle_physician
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = lifestyle_herbalist
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = lifestyle_gardener
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = drunkard
            }
		}
		add = -8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = hashishiyah
            }
		}
		add = -6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = rakish
            }
		}
		add = -4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = reclusive
            }
		}
		add = -6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = irritable
            }
		}
		add = -4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = flagellant
            }
		}
		add = -8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = profligate
            }
		}
		add = -8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = improvident
            }
		}
		add = -6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = contrite
            }
		}
		add = -6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = comfort_eater
            }
		}
		add = -6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = inappetetic
            }
		}
		add = -6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = journaller
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = confider
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = athletic
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = lunatic_1
            }
		}
		add = -8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = lunatic_genetic
            }
		}
		add = -10
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = possessed_1
            }
		}
		add = -8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = possessed_genetic
            }
		}
		add = -10
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = depressed_1
            }
		}
		add = -6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = depressed_genetic
            }
		}
		add = -8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = ill
            }
		}
		add = -4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = pneumonic
            }
		}
		add = -8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = great_pox
            }
		}
		add = -4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = early_great_pox
            }
		}
		add = -4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = lovers_pox
            }
		}
		add = -4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = leper
            }
		}
		add = -6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = consumption
            }
		}
		add = -4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = cancer
            }
		}
		add = -6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = typhus
            }
		}
		add = -4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = bubonic_plague
            }
		}
		add = -6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = smallpox
            }
		}
		add = -4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = measles
            }
		}
		add = -4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = dysentery
            }
		}
		add = -4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = ergotism
            }
		}
		add = -4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = sickly
            }
		}
		add = -4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = scarred
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = eunuch_1
            }
		}
		add = -4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = beardless_eunuch
            }
		}
		add = -4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = pilgrim
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = hajjaj
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = sayyid
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = saoshyant
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = saoshyant_descendant
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = savior
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = divine_blood
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = blood_of_prophet
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = faith_warrior
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = saint
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = historical_character
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = legend
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = order_member
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = berserker
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = shieldmaiden
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = varangian
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = poet
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = cannibal
            }
		}
		add = -6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = adulterer
            }
		}
		add = -4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = fornicator
            }
		}
		add = -4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = murderer
            }
		}
		add = -4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = born_in_the_purple
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = augustus
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = viking
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = reincarnation
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = heresiarch
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = peasant_leader
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = populist_leader
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = witch
            }
		}
		add = -2
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = loyal
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = disloyal
            }
		}
		add = -4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = crusader_king
            }
		}
		add = 10
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = chakravarti
            }
		}
		add = 10
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = greatest_of_khans
            }
		}
		add = 10
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = conqueror
            }
		}
		add = 10
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = paragon
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = consecrated_blood
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = logistician
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = military_engineer
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = aggressive_attacker
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = unyielding_defender
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = forder
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = flexible_leader
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = desert_warrior
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = jungle_stalker
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = reaver
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = reckless
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = holy_warrior
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = open_terrain_expert
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = rough_terrain_expert
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = forest_fighter
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = cautious_leader
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = organizer
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = winter_soldier
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_martial_prowess_1
            }
		}
		add = 2
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_martial_prowess_2
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_martial_prowess_3
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_martial_prowess_4
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = diplomatic_court_1
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = diplomatic_court_2
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = warlike_court_1
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = warlike_court_2
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = administrative_court_1
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = administrative_court_2
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = intrigue_court_1
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = intrigue_court_2
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = scholarly_court_1
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = scholarly_court_2
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_republican_knowledge_1
            }
		}
		add = 2
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_republican_knowledge_2
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_republican_knowledge_3
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = education_republican_knowledge_4
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = lustful
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = chaste
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = gluttonous
            }
		}
		add = 2
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = temperate
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = greedy
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = generous
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = lazy
            }
		}
		add = -2
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = diligent
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = wrathful
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = calm
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = patient
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = impatient
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = arrogant
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = humble
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = deceitful
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = honest
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = craven
            }
		}
		add = -2
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = brave
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = shy
            }
		}
		add = -2
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = gregarious
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = ambitious
            }
		}
		add = 8
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = content
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = arbitrary
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = just
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = cynical
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = zealous
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = paranoid
            }
		}
		add = -2
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = trusting
            }
		}
		add = 2
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = compassionate
            }
		}
		add = 2
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = callous
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = sadistic
            }
		}
		add = 6
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = stubborn
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = fickle
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = eccentric
            }
		}
		add = 2
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = vengeful
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = forgiving
            }
		}
		add = 4
	}
	if = {
		limit = {
			scope:secondary_actor = {
                has_trait = campeador
            }
		}
		add = 10
	}
	if = {
		limit = {
			has_game_rule = hard_difficulty
		}
		multiply = 0.5
	}
	if = {
		limit = {
			has_game_rule = very_hard_difficulty
		}
		multiply = 0.25
	}
}

send_prisoner_herd_value = {
	value = base_prisoner_cost
	multiply = herd_value_scale_by_era
	multiply = herd_value_scale_by_tier
	if = {
		limit = {
			scope:secondary_actor.primary_title.tier = tier_county
		}
		multiply = 2
	}
	if = {
		limit = {
			scope:secondary_actor.primary_title.tier = tier_duchy
		}
		multiply = 3
	}
	if = {
		limit = {
			scope:secondary_actor.primary_title.tier = tier_kingdom
		}
		multiply = 4
	}
	if = {
		limit = {
			scope:secondary_actor.primary_title.tier = tier_empire
		}
		multiply = 5
	}
}
