highest_held_title_tier_minus_two_landed = { # for theomonarchy_elective value = highest_held_title_tier subtract = 2 min = tier_barony } roman_fervour_and_size = { value = 0 every_independent_ruler = { limit = { faith = faith:roman_catholic_faith NOT = { has_title = title:k_papal_state } } if = { limit = { highest_held_title_tier = tier_hegemony NOT = { has_title = title:k_papal_state } } add = roman_limit_bonus_15 } else_if = { limit = { highest_held_title_tier = tier_empire NOT = { has_title = title:k_papal_state } } add = roman_limit_bonus_5 } else_if = { limit = { highest_held_title_tier = tier_kingdom NOT = { has_title = title:k_papal_state } } add = roman_limit_bonus_3 } else_if = { limit = { highest_held_title_tier = tier_duchy NOT = { has_title = title:k_papal_state } } add = roman_limit_bonus_2 } else_if = { limit = { highest_held_title_tier = tier_county NOT = { has_title = title:k_papal_state } } add = roman_limit_bonus_1 } else = { } } if = { limit = { faith:roman_catholic_faith = { fervor >= 90 } } add = roman_limit_bonus_5 } else_if = { limit = { faith:roman_catholic_faith = { fervor >= 80 } } add = roman_limit_bonus_4 } else_if = { limit = { faith:roman_catholic_faith = { fervor >= 70 } } add = roman_limit_bonus_3 } else_if = { limit = { faith:roman_catholic_faith = { fervor >= 60 } } subtract = roman_limit_bonus_2 } else_if = { limit = { faith:roman_catholic_faith = { fervor >= 50 } } subtract = roman_limit_penalty_4 } else_if = { limit = { faith:roman_catholic_faith = { fervor >= 40 } } subtract = roman_limit_penalty_6 } else_if = { limit = { faith:roman_catholic_faith = { fervor >= 30 } } subtract = roman_limit_penalty_8 } else_if = { limit = { faith:roman_catholic_faith = { fervor >= 20 } } subtract = roman_limit_penalty_10 } else_if = { limit = { faith:roman_catholic_faith = { fervor >= 10 } } subtract = roman_limit_penalty_14 } else_if = { limit = { faith:roman_catholic_faith = { fervor >= 5 } } subtract = roman_limit_penalty_16 } else = { subtract = roman_limit_penalty_20 } min = 0 # Can't go lower than 0 max = 100 # Can't go higher than 100 } roman_papal_size_piety_learning_stewardship = { value = 0 every_independent_ruler = { limit = { faith = faith:roman_catholic_faith has_title = title:k_papal_state } if = { limit = { realm_size >= 60 } add = roman_limit_bonus_65 } else_if = { limit = { realm_size >= 55 } add = roman_limit_bonus_60 } else_if = { limit = { realm_size >= 50 } add = roman_limit_bonus_55 } else_if = { limit = { realm_size >= 45 } add = roman_limit_bonus_50 } else_if = { limit = { realm_size >= 40 } add = roman_limit_bonus_45 } else_if = { limit = { realm_size >= 35 } add = roman_limit_bonus_40 } else_if = { limit = { realm_size >= 30 } add = roman_limit_bonus_35 } else_if = { limit = { realm_size >= 25 } add = roman_limit_bonus_30 } else_if = { limit = { realm_size >= 20 } add = roman_limit_bonus_25 } else_if = { limit = { realm_size >= 15 } add = roman_limit_bonus_20 } else_if = { limit = { realm_size >= 10 } add = roman_limit_bonus_15 } else_if = { limit = { realm_size >= 5 } add = roman_limit_bonus_10 } else_if = { limit = { realm_size >= 3 } add = roman_limit_bonus_5 } else_if = { limit = { realm_size >= 1 } add = roman_limit_bonus_1 } else = { } } every_independent_ruler = { limit = { faith = faith:roman_catholic_faith has_title = title:k_papal_state } if = { limit = { piety_level = 8 } subtract = roman_limit_bonus_25 } else_if = { limit = { piety_level = 7 } subtract = roman_limit_bonus_20 } else_if = { limit = { piety_level = 6 } subtract = roman_limit_bonus_15 } else_if = { limit = { piety_level = 5 } subtract = roman_limit_bonus_10 } else_if = { limit = { piety_level = 4 } subtract = roman_limit_bonus_5 } else_if = { limit = { piety_level = 3 } add = roman_limit_penalty_10 } else_if = { limit = { piety_level = 2 } add = roman_limit_penalty_15 } else_if = { limit = { piety_level = 1 } add = roman_limit_penalty_20 } else_if = { limit = { piety_level = 0 } add = roman_limit_penalty_25 } else = { } } every_independent_ruler = { limit = { faith = faith:roman_catholic_faith has_title = title:k_papal_state } if = { limit = { prestige_level = 8 } subtract = roman_limit_bonus_25 } else_if = { limit = { prestige_level = 7 } subtract = roman_limit_bonus_20 } else_if = { limit = { prestige_level = 6 } subtract = roman_limit_bonus_15 } else_if = { limit = { prestige_level = 5 } subtract = roman_limit_bonus_10 } else_if = { limit = { prestige_level = 4 } subtract = roman_limit_bonus_5 } else_if = { limit = { prestige_level = 3 } add = roman_limit_penalty_10 } else_if = { limit = { prestige_level = 2 } add = roman_limit_penalty_15 } else_if = { limit = { prestige_level = 1 } add = roman_limit_penalty_20 } else_if = { limit = { prestige_level = 0 } add = roman_limit_penalty_25 } else = { } } every_independent_ruler = { limit = { faith = faith:roman_catholic_faith has_title = title:k_papal_state } if = { limit = { stewardship >= 20 } subtract = roman_limit_bonus_20 } else_if = { limit = { stewardship >= 15 } subtract = roman_limit_bonus_10 } else_if = { limit = { stewardship >= 10 } add = roman_limit_bonus_5 } else_if = { limit = { stewardship >= 8 } add = roman_limit_bonus_10 } else_if = { limit = { stewardship >= 5 } add = roman_limit_penalty_15 } else_if = { limit = { stewardship < 5 } add = roman_limit_penalty_25 } else = { } } every_independent_ruler = { limit = { faith = faith:roman_catholic_faith has_title = title:k_papal_state } if = { limit = { num_sinful_traits >= 7 } add = roman_limit_penalty_30 } else_if = { limit = { num_sinful_traits >= 6 } add = roman_limit_penalty_25 } else_if = { limit = { num_sinful_traits >= 5 } add = roman_limit_penalty_20 } else_if = { limit = { num_sinful_traits >= 4 } add = roman_limit_penalty_15 } else_if = { limit = { num_sinful_traits >= 3 } add = roman_limit_penalty_10 } else_if = { limit = { num_sinful_traits >= 2 } add = roman_limit_penalty_5 } else = { } } every_independent_ruler = { limit = { faith = faith:roman_catholic_faith has_title = title:k_papal_state } if = { limit = { num_virtuous_traits >= 7 } subtract = roman_limit_penalty_15 } else_if = { limit = { num_virtuous_traits >= 6 } subtract = roman_limit_penalty_10 } else_if = { limit = { num_virtuous_traits >= 5 } subtract = roman_limit_penalty_5 } else = { } } add = roman_limit_bonus_40 min = 0 # Can't go lower than 0 max = 100 # Can't go higher than 100 } roman_limit_bonus_1 = 1 roman_limit_bonus_2 = 2 roman_limit_bonus_3 = 3 roman_limit_bonus_4 = 4 roman_limit_bonus_5 = 5 roman_limit_bonus_6 = 6 roman_limit_bonus_7 = 7 roman_limit_bonus_8 = 8 roman_limit_bonus_9 = 9 roman_limit_bonus_10 = 10 roman_limit_bonus_11 = 11 roman_limit_bonus_12 = 12 roman_limit_bonus_13 = 13 roman_limit_bonus_14 = 14 roman_limit_bonus_15 = 15 roman_limit_bonus_16 = 16 roman_limit_bonus_17 = 17 roman_limit_bonus_18 = 18 roman_limit_bonus_19 = 19 roman_limit_bonus_20 = 20 roman_limit_bonus_25 = 25 roman_limit_bonus_30 = 30 roman_limit_bonus_35 = 35 roman_limit_bonus_40 = 40 roman_limit_bonus_45 = 45 roman_limit_bonus_50 = 50 roman_limit_bonus_55 = 55 roman_limit_bonus_60 = 60 roman_limit_penalty_1 = 1 roman_limit_penalty_2 = 2 roman_limit_penalty_3 = 3 roman_limit_penalty_4 = 4 roman_limit_penalty_5 = 5 roman_limit_penalty_6 = 6 roman_limit_penalty_7 = 7 roman_limit_penalty_8 = 8 roman_limit_penalty_9 = 9 roman_limit_penalty_10 = 10 roman_limit_penalty_11 = 11 roman_limit_penalty_12 = 12 roman_limit_penalty_13 = 13 roman_limit_penalty_14 = 14 roman_limit_penalty_15 = 15 roman_limit_penalty_16 = 16 roman_limit_penalty_17 = 17 roman_limit_penalty_18 = 18 roman_limit_penalty_19 = 19 roman_limit_penalty_20 = 20 roman_calculations = { value = 0 add = roman_papal_size_piety_learning_stewardship subtract = roman_fervour_and_size min = 0 # Can't go lower than 0 max = 100 # Can't go higher than 100 } compostelan_fervour_and_size = { value = 0 every_independent_ruler = { limit = { faith = faith:compostelan_catholic_faith NOT = { has_title = title:k_compostelan_papacy } } if = { limit = { highest_held_title_tier = tier_hegemony NOT = { has_title = title:k_compostelan_papacy } } add = compostelan_limit_bonus_15 } else_if = { limit = { highest_held_title_tier = tier_empire NOT = { has_title = title:k_compostelan_papacy } } add = compostelan_limit_bonus_5 } else_if = { limit = { highest_held_title_tier = tier_kingdom NOT = { has_title = title:k_compostelan_papacy } } add = compostelan_limit_bonus_3 } else_if = { limit = { highest_held_title_tier = tier_duchy NOT = { has_title = title:k_compostelan_papacy } } add = compostelan_limit_bonus_2 } else_if = { limit = { highest_held_title_tier = tier_county NOT = { has_title = title:k_compostelan_papacy } } add = compostelan_limit_bonus_1 } else = { } } if = { limit = { faith:compostelan_catholic_faith = { fervor >= 90 } } add = compostelan_limit_bonus_5 } else_if = { limit = { faith:compostelan_catholic_faith = { fervor >= 80 } } add = compostelan_limit_bonus_4 } else_if = { limit = { faith:compostelan_catholic_faith = { fervor >= 70 } } add = compostelan_limit_bonus_3 } else_if = { limit = { faith:compostelan_catholic_faith = { fervor >= 60 } } subtract = compostelan_limit_bonus_2 } else_if = { limit = { faith:compostelan_catholic_faith = { fervor >= 50 } } subtract = compostelan_limit_penalty_4 } else_if = { limit = { faith:compostelan_catholic_faith = { fervor >= 40 } } subtract = compostelan_limit_penalty_6 } else_if = { limit = { faith:compostelan_catholic_faith = { fervor >= 30 } } subtract = compostelan_limit_penalty_8 } else_if = { limit = { faith:compostelan_catholic_faith = { fervor >= 20 } } subtract = compostelan_limit_penalty_10 } else_if = { limit = { faith:compostelan_catholic_faith = { fervor >= 10 } } subtract = compostelan_limit_penalty_14 } else_if = { limit = { faith:compostelan_catholic_faith = { fervor >= 5 } } subtract = compostelan_limit_penalty_16 } else = { subtract = compostelan_limit_penalty_20 } min = 0 # Can't go lower than 0 max = 100 # Can't go higher than 100 } compostelan_papal_size_piety_learning_stewardship = { value = 0 every_independent_ruler = { limit = { faith = faith:compostelan_catholic_faith has_title = title:k_compostelan_papacy } if = { limit = { realm_size >= 60 } add = compostelan_limit_bonus_65 } else_if = { limit = { realm_size >= 55 } add = compostelan_limit_bonus_60 } else_if = { limit = { realm_size >= 50 } add = compostelan_limit_bonus_55 } else_if = { limit = { realm_size >= 45 } add = compostelan_limit_bonus_50 } else_if = { limit = { realm_size >= 40 } add = compostelan_limit_bonus_45 } else_if = { limit = { realm_size >= 35 } add = compostelan_limit_bonus_40 } else_if = { limit = { realm_size >= 30 } add = compostelan_limit_bonus_35 } else_if = { limit = { realm_size >= 25 } add = compostelan_limit_bonus_30 } else_if = { limit = { realm_size >= 20 } add = compostelan_limit_bonus_25 } else_if = { limit = { realm_size >= 15 } add = compostelan_limit_bonus_20 } else_if = { limit = { realm_size >= 10 } add = compostelan_limit_bonus_15 } else_if = { limit = { realm_size >= 5 } add = compostelan_limit_bonus_10 } else_if = { limit = { realm_size >= 3 } add = compostelan_limit_bonus_5 } else_if = { limit = { realm_size >= 1 } add = compostelan_limit_bonus_1 } else = { } } every_independent_ruler = { limit = { faith = faith:compostelan_catholic_faith has_title = title:k_compostelan_papacy } if = { limit = { piety_level = 8 } subtract = compostelan_limit_bonus_25 } else_if = { limit = { piety_level = 7 } subtract = compostelan_limit_bonus_20 } else_if = { limit = { piety_level = 6 } subtract = compostelan_limit_bonus_15 } else_if = { limit = { piety_level = 5 } subtract = compostelan_limit_bonus_10 } else_if = { limit = { piety_level = 4 } subtract = compostelan_limit_bonus_5 } else_if = { limit = { piety_level = 3 } add = compostelan_limit_penalty_10 } else_if = { limit = { piety_level = 2 } add = compostelan_limit_penalty_15 } else_if = { limit = { piety_level = 1 } add = compostelan_limit_penalty_20 } else_if = { limit = { piety_level = 0 } add = compostelan_limit_penalty_25 } else = { } } every_independent_ruler = { limit = { faith = faith:compostelan_catholic_faith has_title = title:k_compostelan_papacy } if = { limit = { prestige_level = 8 } subtract = compostelan_limit_bonus_25 } else_if = { limit = { prestige_level = 7 } subtract = compostelan_limit_bonus_20 } else_if = { limit = { prestige_level = 6 } subtract = compostelan_limit_bonus_15 } else_if = { limit = { prestige_level = 5 } subtract = compostelan_limit_bonus_10 } else_if = { limit = { prestige_level = 4 } subtract = compostelan_limit_bonus_5 } else_if = { limit = { prestige_level = 3 } add = compostelan_limit_penalty_10 } else_if = { limit = { prestige_level = 2 } add = compostelan_limit_penalty_15 } else_if = { limit = { prestige_level = 1 } add = compostelan_limit_penalty_20 } else_if = { limit = { prestige_level = 0 } add = compostelan_limit_penalty_25 } else = { } } every_independent_ruler = { limit = { faith = faith:compostelan_catholic_faith has_title = title:k_compostelan_papacy } if = { limit = { stewardship >= 20 } subtract = compostelan_limit_bonus_20 } else_if = { limit = { stewardship >= 15 } subtract = compostelan_limit_bonus_10 } else_if = { limit = { stewardship >= 10 } add = compostelan_limit_bonus_5 } else_if = { limit = { stewardship >= 8 } add = compostelan_limit_bonus_10 } else_if = { limit = { stewardship >= 5 } add = compostelan_limit_penalty_15 } else_if = { limit = { stewardship < 5 } add = compostelan_limit_penalty_25 } else = { } } every_independent_ruler = { limit = { faith = faith:compostelan_catholic_faith has_title = title:k_compostelan_papacy } if = { limit = { num_sinful_traits >= 7 } add = compostelan_limit_penalty_30 } else_if = { limit = { num_sinful_traits >= 6 } add = compostelan_limit_penalty_25 } else_if = { limit = { num_sinful_traits >= 5 } add = compostelan_limit_penalty_20 } else_if = { limit = { num_sinful_traits >= 4 } add = compostelan_limit_penalty_15 } else_if = { limit = { num_sinful_traits >= 3 } add = compostelan_limit_penalty_10 } else_if = { limit = { num_sinful_traits >= 2 } add = compostelan_limit_penalty_5 } else = { } } every_independent_ruler = { limit = { faith = faith:compostelan_catholic_faith has_title = title:k_compostelan_papacy } if = { limit = { num_virtuous_traits >= 7 } subtract = compostelan_limit_penalty_15 } else_if = { limit = { num_virtuous_traits >= 6 } subtract = compostelan_limit_penalty_10 } else_if = { limit = { num_virtuous_traits >= 5 } subtract = compostelan_limit_penalty_5 } else = { } } add = compostelan_limit_bonus_40 min = 0 # Can't go lower than 0 max = 100 # Can't go higher than 100 } compostelan_limit_bonus_1 = 1 compostelan_limit_bonus_2 = 2 compostelan_limit_bonus_3 = 3 compostelan_limit_bonus_4 = 4 compostelan_limit_bonus_5 = 5 compostelan_limit_bonus_6 = 6 compostelan_limit_bonus_7 = 7 compostelan_limit_bonus_8 = 8 compostelan_limit_bonus_9 = 9 compostelan_limit_bonus_10 = 10 compostelan_limit_bonus_11 = 11 compostelan_limit_bonus_12 = 12 compostelan_limit_bonus_13 = 13 compostelan_limit_bonus_14 = 14 compostelan_limit_bonus_15 = 15 compostelan_limit_bonus_16 = 16 compostelan_limit_bonus_17 = 17 compostelan_limit_bonus_18 = 18 compostelan_limit_bonus_19 = 19 compostelan_limit_bonus_20 = 20 compostelan_limit_bonus_25 = 25 compostelan_limit_bonus_30 = 30 compostelan_limit_bonus_35 = 35 compostelan_limit_bonus_40 = 40 compostelan_limit_bonus_45 = 45 compostelan_limit_bonus_50 = 50 compostelan_limit_bonus_55 = 55 compostelan_limit_bonus_60 = 60 compostelan_limit_penalty_1 = 1 compostelan_limit_penalty_2 = 2 compostelan_limit_penalty_3 = 3 compostelan_limit_penalty_4 = 4 compostelan_limit_penalty_5 = 5 compostelan_limit_penalty_6 = 6 compostelan_limit_penalty_7 = 7 compostelan_limit_penalty_8 = 8 compostelan_limit_penalty_9 = 9 compostelan_limit_penalty_10 = 10 compostelan_limit_penalty_11 = 11 compostelan_limit_penalty_12 = 12 compostelan_limit_penalty_13 = 13 compostelan_limit_penalty_14 = 14 compostelan_limit_penalty_15 = 15 compostelan_limit_penalty_16 = 16 compostelan_limit_penalty_17 = 17 compostelan_limit_penalty_18 = 18 compostelan_limit_penalty_19 = 19 compostelan_limit_penalty_20 = 20 compostelan_calculations = { value = 0 add = compostelan_papal_size_piety_learning_stewardship subtract = compostelan_fervour_and_size min = 0 # Can't go lower than 0 max = 100 # Can't go higher than 100 }