﻿#### Could be done just in the interaction is shown but it's future proofing...
nht_trade_agreement_number_limit_value = {
	value = 0

	if = {
		limit = { 
			highest_held_title_tier = tier_county
		}
		add = 1
	}
	else_if = {
		limit = { 
			OR = {
				highest_held_title_tier = tier_duchy
				highest_held_title_tier = tier_kingdom
			}	
		}
		add = 2
	}
	else_if = {
		limit = { 
			highest_held_title_tier = tier_empire
		}
		add = 3
	}

	if = {
		limit = {
			culture = { has_cultural_parameter = nht_can_trade_freely_without_perk }
			has_perk = nht_commerce_maestro_perk
		}
		add = 1
	}
	max = 3
	min = 0
	floor = yes	
}



half_buildings_destroyed_value = {
	value = scope:barony.title_province.num_buildings
	divide = 2
	
	min = 1	
	round = yes
}

sacking_holding_developement_level_value = {
	value = 0
		
	if = { #
		limit = { NOT = { has_game_rule = nht_sack_holding_event_no_requi_no_level } }
		add = 25
	}
	if = {
		limit = { has_game_rule = nht_sack_holding_event_enabled_dev_twenty }
		subtract = -5
	}
	if = {
		limit = { has_game_rule = nht_sack_holding_event_enabled_dev_thirty }
		add = 5
	}
	if = { 
		limit = { has_game_rule = nht_sack_holding_event_enabled_dev_thirty_five }
		add = 10
	}
	
	if = { # To account for the average developpement of counties
		limit = { NOT = { has_game_rule = nht_sack_holding_event_no_requi_no_level } }
		if = { 
			limit = { years_from_game_start >= 50 }
			add = 5
		}
		if = { 
			limit = { years_from_game_start >= 100 }
			add = 5
		}
		if = { 
			limit = { years_from_game_start >= 150 }
			add = 5
		}
		if = { 
			limit = { years_from_game_start >= 200 }
			add = 10
		}
		if = { 
			limit = { years_from_game_start >= 250 }
			add = 5
		}
	}

	max = 100
	min = 0
	floor = yes	
}



steward_promote_culture_monthly_increase = {
	add = stewardship
	divide = 20

	if = {
		limit = {
			liege = { has_perk = nht_cultural_ascendancy_perk }
		}
		add = stewardship
		divide = 10
	}
}

steward_accept_culture_yearly_increase = {
	add = stewardship
	multiply = 0.005
	if = {
		limit = {
			liege = { has_perk = nht_unity_through_diversity_perk }
		}
		add = stewardship
		multiply = 0.01
	}	
}


court_chaplain_conversion_monthly_increase = {
	add = learning
	divide = 10
	if = {
		limit = {
			liege = { has_perk = nht_faith_celerity_perk }
		}
		add = learning
		divide = 5
	}	
}



send_volunteer_soldiers_interaction_recipient_far_weaker_value = {
	value = max_military_strength
	multiply = 0.4
}

send_volunteer_soldiers_interaction_recipient_weaker_value = {
	value = max_military_strength
	multiply = 0.6
}

send_volunteer_soldiers_interaction_recipient_somewhat_weaker_value = {
	value = max_military_strength
	multiply = 0.8
}

send_volunteer_soldiers_interaction_recipient_almost_weaker_value = {
	value = max_military_strength
	multiply = 0.9
}

send_volunteer_soldiers_interaction_recipient_almost_stronger_value = {
	value = max_military_strength
	multiply = 1.1
}

send_volunteer_soldiers_interaction_recipient_somewhat_stronger_value = {
	value = max_military_strength
	multiply = 1.3
}

send_volunteer_soldiers_interaction_recipient_stronger_value = {
	value = max_military_strength
	multiply = 1.5
}

send_volunteer_soldiers_interaction_recipient_far_stronger_value = {
	value = max_military_strength
	multiply = 1.8
}

send_volunteer_soldiers_interaction_recipient_extremly_stronger_value = {
	value = max_military_strength
	multiply = 2
}



nht_trade_agreement_interaction_recipient_montly_income_2_value = {
	value = monthly_character_income
	multiply = 0.2

	min = 1
	ceiling = yes
}

nht_trade_agreement_interaction_recipient_montly_income_3_value = {
	value = monthly_character_income
	multiply = 0.3

	min = 1
	ceiling = yes
}

nht_trade_agreement_interaction_recipient_montly_income_4_value = {
	value = monthly_character_income
	multiply = 0.4

	min = 1	
	ceiling = yes
}

nht_trade_agreement_interaction_recipient_montly_income_5_value = {
	value = monthly_character_income
	multiply = 0.5
	
	min = 1	
	ceiling = yes
}

nht_trade_agreement_interaction_recipient_montly_income_6_value = {
	value = monthly_character_income
	multiply = 0.6
	

	min = 1	
	ceiling = yes
}

nht_trade_agreement_interaction_recipient_montly_income_7_value = {
	value = monthly_character_income
	multiply = 0.7
	

	min = 1
	ceiling = yes
}

nht_trade_agreement_interaction_recipient_montly_income_8_value = {
	value = monthly_character_income
	multiply = 0.8
	

	min = 1
	ceiling = yes
}

nht_trade_agreement_interaction_recipient_montly_income_9_value = {
	value = monthly_character_income
	multiply = 0.9
	

	min = 1	
	ceiling = yes
}

nht_trade_agreement_interaction_recipient_montly_income_10_value = {
	value = monthly_character_income
	multiply = 1.1
	

	min = 1	
	ceiling = yes
}

nht_trade_agreement_interaction_recipient_montly_income_11_value = {
	value = monthly_character_income
	multiply = 1.3
	

	min = 1	
	ceiling = yes
}

nht_trade_agreement_interaction_recipient_montly_income_12_value = {
	value = monthly_character_income
	multiply = 1.8
	

	min = 1	
	ceiling = yes
}

nht_trade_agreement_interaction_recipient_montly_income_13_value = {
	value = monthly_character_income
	multiply = 3
	
	min = 1
	ceiling = yes
}

nht_trade_agreement_interaction_recipient_montly_income_14_value = {
	value = monthly_character_income
	multiply = 5
	

	min = 1
	ceiling = yes
}

nht_trade_agreement_interaction_recipient_montly_income_15_value = {
	value = monthly_character_income
	multiply = 7

	min = 1
	ceiling = yes
}

nht_trade_agreement_interaction_recipient_montly_income_16_value = {
	value = monthly_character_income
	multiply = 9

	min = 1
	ceiling = yes
}



nht_sack_provisions_base_value = {
	# TERRAIN
	if = {
		limit = {
			OR = {
				terrain = desert
				terrain = desert_mountains
				terrain = taiga
			}
		}
		add = 150
	}
	else_if = {
		limit = {
			OR = {
				terrain = drylands
				terrain = jungle
				terrain = mountains
				terrain = wetlands
				terrain = steppe
			}
		}
		add = 250
	}
	else = { add = 500 }
	# BUILDINGS
	if = {
		limit = { has_building_or_higher = pastures_01 }
		add = 30
	}
	if = {
		limit = { has_building_or_higher = orchards_01 }
		add = 30
	}
	if = {
		limit = { has_building_or_higher = farm_estates_01 }
		add = 30
	}
	if = {
		limit = { has_building_or_higher = cereal_fields_01 }
		add = 30
	}
	if = {
		limit = { has_building_or_higher = plantations_01 }
		add = 30
	}
	if = {
		limit = { has_building_or_higher = hill_farms_01 }
		add = 30
	}
	# WINTER
	if = {
		limit = { has_province_modifier = winter_mild_modifier }
		add = -50
	}
	else_if = {
		limit = { has_province_modifier = winter_normal_modifier }
		add = -100
	}
	else_if = {
		limit = { has_province_modifier = winter_harsh_modifier }
		add = -150
	}
	if = {
		limit = {
			root = { has_variable = withered_land_sack }
		}
		add = -200
	}
	if = {
		limit = {
			root = { has_variable = scarred_battlefield_sack }
		}
		add = -150
	}
	if = {
		limit = {
			root = { has_variable = nht_limit_loot_provision }
		}
		add = -300
	}
	min = 50
	if = {
		limit = {
			root = { has_perk = nht_defensive_maneuvers_perk }
		}
		multiply = 1.25
	}
}


nht_limited_sack_provisions_base_value = {
	# TERRAIN
	if = {
		limit = {
			OR = {
				terrain = desert
				terrain = desert_mountains
				terrain = taiga
			}
		}
		add = 50
	}
	else_if = {
		limit = {
			OR = {
				terrain = drylands
				terrain = jungle
				terrain = mountains
				terrain = wetlands
				terrain = steppe
			}
		}
		add = 150
	}
	else = { add = 200 }
	# BUILDINGS
	if = {
		limit = { has_building_or_higher = pastures_01 }
		add = 20
	}
	if = {
		limit = { has_building_or_higher = orchards_01 }
		add = 20
	}
	if = {
		limit = { has_building_or_higher = farm_estates_01 }
		add = 20
	}
	if = {
		limit = { has_building_or_higher = cereal_fields_01 }
		add = 20
	}
	if = {
		limit = { has_building_or_higher = plantations_01 }
		add = 20
	}
	if = {
		limit = { has_building_or_higher = hill_farms_01 }
		add = 20
	}
	# WINTER
	if = {
		limit = { has_province_modifier = winter_mild_modifier }
		add = -50
	}
	else_if = {
		limit = { has_province_modifier = winter_normal_modifier }
		add = -100
	}
	else_if = {
		limit = { has_province_modifier = winter_harsh_modifier }
		add = -150
	}
	if = {
		limit = {
			root = { has_variable = withered_land_sack }
		}
		add = -200
	}
	if = {
		limit = {
			root = { has_variable = scarred_battlefield_sack }
		}
		add = -150
	}
	if = {
		limit = {
			root = { has_variable = nht_limit_loot_provision }
		}
		add = -300
	}
	min = 50
	if = {
		limit = {
			root = { has_perk = nht_defensive_maneuvers_perk }
		}
		multiply = 1.25
	}
}