﻿## House Confederations (a.k.a. "Blocs")
#
# Confederations mainly centered around houses.
#

# Ceremony
house_bloc_ceremony_feudal = {
	house_based_confederation = yes

	is_valid_confederation = {
		cohesion > 0
	}

	on_confederation_destroyed = {
		tgp_on_bloc_destroyed_shared_effect = yes
	}

	cohesion_level = {
		cohesion_threshold = 25

		parameters = {
			any_member_increased_feast_rewards = yes
			any_member_increased_activity_attendance = yes
		}

		any_member_house_member = {
			monthly_prestige_gain_mult = 0.05
		}
	}
	cohesion_level = {
		cohesion_threshold = 50

		parameters = {
			any_member_house_continued_appointment_score = yes
			# From previous levels
			any_member_increased_feast_rewards = yes
			any_member_increased_activity_attendance = yes
		}

		any_member_house_member = {
			owned_personal_scheme_success_chance_growth_add = 5
			# From previous levels
			monthly_prestige_gain_mult = 0.05
		}
	}
	cohesion_level = {
		cohesion_threshold = 75

		parameters = {
			any_member_ceremonial_house_marriage_acceptance = yes
			# From previous levels
			any_member_increased_feast_rewards = yes
			any_member_increased_activity_attendance = yes
			leading_house_regent_appointment_score = yes
			any_member_house_continued_appointment_score = yes
		}

		leading_house_head = {
			max_personal_schemes_add = 1
		}
		any_member_house_member = {
			# From previous levels
			monthly_prestige_gain_mult = 0.05
			owned_personal_scheme_success_chance_growth_add = 2
		}
	}

	# Monthly Cohesion general change
	cohesion_base_change_monthly = {
		value = tgp_shared_bloc_cohesion_base_change_monthly_value
	}

	# Monthly Cohesion change per house
	cohesion_base_change_per_house_monthly = {
		value = tgp_shared_bloc_cohesion_base_change_per_house_monthly_value
	}

	# Monthly Cohesion per house from member-to-member House Relations
	cohesion_contribution = {
		value = tgp_shared_bloc_cohesion_contribution_value
	}

	# At what point do cohesion growth start slowing down?
	cohesion_soft_cap = {
		value = tgp_shared_bloc_cohesion_soft_cap_value
	}

	# Can this character be a member of this bloc?
	is_valid_member_character = {
		tgp_is_valid_member_character_shared_trigger = yes
	}

	# Can this house be a member of this bloc?
	is_valid_member_house = {
		tgp_is_valid_member_house_shared_trigger = yes
	}

	# Fired when a character joins the bloc
	on_member_character_joined = {
		tgp_on_member_joined_shared_effect = yes
	}

	# Fired when a character leaves the bloc
	on_member_character_left = {
		tgp_on_member_left_shared_effect = yes
	}

	# Fired when a house joins the bloc
	on_member_house_joined = {
		tgp_on_member_house_joined_shared_effect = yes
	}

	# Fired when a house leaves the bloc
	on_member_house_left = {
		tgp_on_member_house_left_shared_effect = yes
	}
}

# Determination
house_bloc_determination_feudal = {
	house_based_confederation = yes

	is_valid_confederation = {
		cohesion > 0
	}

	on_confederation_destroyed = {
		tgp_on_bloc_destroyed_shared_effect = yes
	}

	cohesion_level = {
		cohesion_threshold = 25

		any_member_house_member = {
			monthly_county_control_growth_factor = 0.1
			dread_gain_mult = 0.1
			dread_baseline_add = 5
		}
	}
	cohesion_level = {
		cohesion_threshold = 50

		parameters = {
			any_member_raid_estate_success_chance = yes
		}

		any_member_house_member = {
			owned_hostile_scheme_success_chance_growth_add = 5
			enemy_hostile_scheme_success_chance_growth_add = -5
			# From previous levels
			monthly_county_control_growth_factor = 0.1
			dread_gain_mult = 0.1
			dread_baseline_add = 5
		}
	}
	cohesion_level = {
		cohesion_threshold = 75

		parameters = {
			bloc_members_join_leaders_schemes = yes
			# From previous levels
			any_member_raid_estate_success_chance = yes
		}

		leading_house_head = {
			max_hostile_schemes_add = 1
		}
		any_member_house_member = {
			tyranny_gain_mult = -0.1
			# From previous levels
			monthly_county_control_growth_factor = 0.1
			dread_gain_mult = 0.1
			dread_baseline_add = 5
			owned_hostile_scheme_success_chance_growth_add = 5
			enemy_hostile_scheme_success_chance_growth_add = -5
		}
	}

	# Monthly Cohesion general change
	cohesion_base_change_monthly = {
		value = tgp_shared_bloc_cohesion_base_change_monthly_value
	}

	# Monthly Cohesion change per house
	cohesion_base_change_per_house_monthly = {
		value = tgp_shared_bloc_cohesion_base_change_per_house_monthly_value
	}

	# Monthly Cohesion per house from member-to-member House Relations
	cohesion_contribution = {
		value = tgp_shared_bloc_cohesion_contribution_value
	}

	# At what point do cohesion growth start slowing down?
	cohesion_soft_cap = {
		value = tgp_shared_bloc_cohesion_soft_cap_value
	}

	# Can this character be a member of this bloc?
	is_valid_member_character = {
		tgp_is_valid_member_character_shared_trigger = yes
	}

	# Can this house be a member of this bloc?
	is_valid_member_house = {
		tgp_is_valid_member_house_shared_trigger = yes
	}

	# Fired when a character joins the bloc
	on_member_character_joined = {
		tgp_on_member_joined_shared_effect = yes
	}

	# Fired when a character leaves the bloc
	on_member_character_left = {
		tgp_on_member_left_shared_effect = yes
	}

	# Fired when a house joins the bloc
	on_member_house_joined = {
		tgp_on_member_house_joined_shared_effect = yes
	}

	# Fired when a house leaves the bloc
	on_member_house_left = {
		tgp_on_member_house_left_shared_effect = yes
	}
}

# Humility
house_bloc_humility_feudal = {
	house_based_confederation = yes

	is_valid_confederation = {
		cohesion > 0
	}

	on_confederation_destroyed = {
		tgp_on_bloc_destroyed_shared_effect = yes
	}

	cohesion_level = {
		cohesion_threshold = 25

		any_member_house_member = {
			monthly_piety_gain_per_happy_powerful_vassal_add = 0.1
			monthly_piety_gain_mult = 0.05
		}
	}
	cohesion_level = {
		cohesion_threshold = 50

		parameters = {
			any_member_increased_pilgrimage_rewards = yes
		}

		any_member_house_member = {
			piety_level_impact_mult = 0.1
			vassal_piety_contribution_mult = 0.1
			# From previous levels
			monthly_piety_gain_per_happy_powerful_vassal_add = 0.1
			monthly_piety_gain_mult = 0.05
		}
	}
	cohesion_level = {
		cohesion_threshold = 75

		parameters = {
			bloc_members_join_leaders_faith = yes
			# From previous levels
			any_member_increased_pilgrimage_rewards = yes
		}

		any_member_house_member = {
			diplomacy_per_piety_level = 1
			tolerance_advantage_mod = 2
			# From previous levels
			monthly_piety_gain_per_happy_powerful_vassal_add = 0.1
			monthly_piety_gain_mult = 0.05
			piety_level_impact_mult = 0.1
		}
	}

	# Monthly Cohesion general change
	cohesion_base_change_monthly = {
		value = tgp_shared_bloc_cohesion_base_change_monthly_value
	}

	# Monthly Cohesion change per house
	cohesion_base_change_per_house_monthly = {
		value = tgp_shared_bloc_cohesion_base_change_per_house_monthly_value
	}

	# Monthly Cohesion per house from member-to-member House Relations
	cohesion_contribution = {
		value = tgp_shared_bloc_cohesion_contribution_value
	}

	# At what point do cohesion growth start slowing down?
	cohesion_soft_cap = {
		value = tgp_shared_bloc_cohesion_soft_cap_value
	}

	# Can this character be a member of this bloc?
	is_valid_member_character = {
		tgp_is_valid_member_character_shared_trigger = yes
	}

	# Can this house be a member of this bloc?
	is_valid_member_house = {
		tgp_is_valid_member_house_shared_trigger = yes
	}

	# Fired when a character joins the bloc
	on_member_character_joined = {
		tgp_on_member_joined_shared_effect = yes
	}

	# Fired when a character leaves the bloc
	on_member_character_left = {
		tgp_on_member_left_shared_effect = yes
	}

	# Fired when a house joins the bloc
	on_member_house_joined = {
		tgp_on_member_house_joined_shared_effect = yes
	}

	# Fired when a house leaves the bloc
	on_member_house_left = {
		tgp_on_member_house_left_shared_effect = yes
	}
}

# Prosperity
house_bloc_prosperity_feudal = {
	house_based_confederation = yes

	is_valid_confederation = {
		cohesion > 0
	}

	on_confederation_destroyed = {
		tgp_on_bloc_destroyed_shared_effect = yes
	}

	cohesion_level = {
		cohesion_threshold = 25

		parameters = {
			any_member_activity_cost_reduced = yes
		}

		any_member_house_member = {
			monthly_income_mult = 0.05
			mercenary_hire_cost_mult = -0.1
		}
	}
	cohesion_level = {
		cohesion_threshold = 50

		parameters = {
			any_member_commission_and_inspiration_reduced = yes
			# From previous levels
			any_member_activity_cost_reduced = yes
		}

		any_member_house_member = {
			development_growth_factor = 0.1
			# From previous levels
			monthly_income_mult = 0.05
			mercenary_hire_cost_mult = -0.1
		}
	}
	cohesion_level = {
		cohesion_threshold = 75

		parameters = {
			bloc_members_send_leader_gifts = yes
			# From previous levels
			any_member_activity_cost_reduced = yes
			any_member_commission_and_inspiration_reduced = yes
		}

		leading_house_head = {
			domain_limit_max = 1
		}
		any_member_house_member = {
			# From previous levels
			monthly_income_mult = 0.05
			development_growth_factor = 0.1
			mercenary_hire_cost_mult = -0.1
		}
	}

	# Monthly Cohesion general change
	cohesion_base_change_monthly = {
		value = tgp_shared_bloc_cohesion_base_change_monthly_value
	}

	# Monthly Cohesion change per house
	cohesion_base_change_per_house_monthly = {
		value = tgp_shared_bloc_cohesion_base_change_per_house_monthly_value
	}

	# Monthly Cohesion per house from member-to-member House Relations
	cohesion_contribution = {
		value = tgp_shared_bloc_cohesion_contribution_value
	}

	# At what point do cohesion growth start slowing down?
	cohesion_soft_cap = {
		value = tgp_shared_bloc_cohesion_soft_cap_value
	}

	# Can this character be a member of this bloc?
	is_valid_member_character = {
		tgp_is_valid_member_character_shared_trigger = yes
	}

	# Can this house be a member of this bloc?
	is_valid_member_house = {
		tgp_is_valid_member_house_shared_trigger = yes
	}

	# Fired when a character joins the bloc
	on_member_character_joined = {
		tgp_on_member_joined_shared_effect = yes
	}

	# Fired when a character leaves the bloc
	on_member_character_left = {
		tgp_on_member_left_shared_effect = yes
	}

	# Fired when a house joins the bloc
	on_member_house_joined = {
		tgp_on_member_house_joined_shared_effect = yes
	}

	# Fired when a house leaves the bloc
	on_member_house_left = {
		tgp_on_member_house_left_shared_effect = yes
	}
}

# Service
house_bloc_service_feudal = {
	house_based_confederation = yes

	is_valid_confederation = {
		cohesion > 0
	}

	on_confederation_destroyed = {
		tgp_on_bloc_destroyed_shared_effect = yes
	}

	cohesion_level = {
		cohesion_threshold = 25

		parameters = {
			any_member_house_governor_appointment_score = yes
		}

		any_member_house_member = {
			monthly_prestige_mult = 0.05
		}
	}
	cohesion_level = {
		cohesion_threshold = 50

		parameters = {
			any_member_house_governor_efficiency_boost = yes
			# From previous levels
			any_member_house_governor_appointment_score = yes
		}

		any_member_house_member = {
			owned_political_scheme_success_chance_growth_add = 5
			enemy_political_scheme_success_chance_growth_add = -5
			# From previous levels
			monthly_prestige_mult = 0.05
		}
	}
	cohesion_level = {
		cohesion_threshold = 75

		parameters = {
			bloc_leader_unlocks_restore_emperor_faction = yes
			# From previous levels
			any_member_house_governor_appointment_score = yes
			any_member_house_governor_efficiency_boost = yes
		}

		any_member_house_member = {
			# From previous levels
			monthly_prestige_mult = 0.05
			owned_political_scheme_success_chance_growth_add = 5
			enemy_political_scheme_success_chance_growth_add = -5
		}
	}

	# Monthly Cohesion general change
	cohesion_base_change_monthly = {
		value = tgp_shared_bloc_cohesion_base_change_monthly_value
	}

	# Monthly Cohesion change per house
	cohesion_base_change_per_house_monthly = {
		value = tgp_shared_bloc_cohesion_base_change_per_house_monthly_value
	}

	# Monthly Cohesion per house from member-to-member House Relations
	cohesion_contribution = {
		value = tgp_shared_bloc_cohesion_contribution_value
	}

	# At what point do cohesion growth start slowing down?
	cohesion_soft_cap = {
		value = tgp_shared_bloc_cohesion_soft_cap_value
	}

	# Can this character be a member of this bloc?
	is_valid_member_character = {
		tgp_is_valid_member_character_shared_trigger = yes
	}

	# Can this house be a member of this bloc?
	is_valid_member_house = {
		tgp_is_valid_member_house_shared_trigger = yes
	}

	# Fired when a character joins the bloc
	on_member_character_joined = {
		tgp_on_member_joined_shared_effect = yes
	}

	# Fired when a character leaves the bloc
	on_member_character_left = {
		tgp_on_member_left_shared_effect = yes
	}

	# Fired when a house joins the bloc
	on_member_house_joined = {
		tgp_on_member_house_joined_shared_effect = yes
	}

	# Fired when a house leaves the bloc
	on_member_house_left = {
		tgp_on_member_house_left_shared_effect = yes
	}
}

# Strength
house_bloc_strength_feudal = {
	house_based_confederation = yes

	is_valid_confederation = {
		cohesion > 0
	}

	on_confederation_destroyed = {
		tgp_on_bloc_destroyed_shared_effect = yes
	}

	cohesion_level = {
		cohesion_threshold = 25

		parameters = {
			any_member_casus_belli_cost_reduction = yes
		}

		any_member_house_member = {
			levy_size = 0.1
			knight_effectiveness_per_martial = 0.05
			hostage_prestige_mult = 0.1
		}
	}
	cohesion_level = {
		cohesion_threshold = 50

		parameters = {
			any_member_extra_capture_chance = yes
			# From previous levels
			any_member_casus_belli_cost_reduction = yes
		}

		any_member_house_member =	{
			led_by_owner_extra_advantage_add = 2
			siege_phase_time = -0.1
			# From previous levels
			levy_size = 0.1
			knight_effectiveness_per_martial = 0.05
			hostage_prestige_mult = 0.1
		}
	}
	cohesion_level = {
		cohesion_threshold = 75

		parameters = {
			any_member_extra_capture_chance = yes
			house_head_adopt_soryo_regency = yes
			bloc_members_join_leaders_offensive_internal_wars = yes
			# From previous levels
			any_member_casus_belli_cost_reduction = yes
			any_member_extra_capture_chance = yes
		}

		any_member_house_member = {
			men_at_arms_cap = 1
			# From previous levels
			levy_size = 0.1
			led_by_owner_extra_advantage_add = 2
			siege_phase_time = -0.1
		}
	}

	# Monthly Cohesion general change
	cohesion_base_change_monthly = {
		value = tgp_shared_bloc_cohesion_base_change_monthly_value
	}

	# Monthly Cohesion change per house
	cohesion_base_change_per_house_monthly = {
		value = tgp_shared_bloc_cohesion_base_change_per_house_monthly_value
	}

	# Monthly Cohesion per house from member-to-member House Relations
	cohesion_contribution = {
		value = tgp_shared_bloc_cohesion_contribution_value
	}

	# At what point do cohesion growth start slowing down?
	cohesion_soft_cap = {
		value = tgp_shared_bloc_cohesion_soft_cap_value
	}

	# Can this character be a member of this bloc?
	is_valid_member_character = {
		tgp_is_valid_member_character_shared_trigger = yes
	}

	# Can this house be a member of this bloc?
	is_valid_member_house = {
		tgp_is_valid_member_house_shared_trigger = yes
	}

	# Fired when a character joins the bloc
	on_member_character_joined = {
		tgp_on_member_joined_shared_effect = yes
	}

	# Fired when a character leaves the bloc
	on_member_character_left = {
		tgp_on_member_left_shared_effect = yes
	}

	# Fired when a house joins the bloc
	on_member_house_joined = {
		tgp_on_member_house_joined_shared_effect = yes
	}

	# Fired when a house leaves the bloc
	on_member_house_left = {
		tgp_on_member_house_left_shared_effect = yes
	}
}
